* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0f172a; color: #e2e8f0; }

/* Login */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: #1e293b; padding: 48px; border-radius: 16px; width: 400px; max-width: 90vw; }
.login-box h1 { font-size: 24px; margin-bottom: 8px; color: #fff; }
.login-box p { color: #94a3b8; margin-bottom: 32px; }
.login-box .error { background: #7f1d1d; color: #fca5a5; padding: 12px; border-radius: 8px; margin-bottom: 16px; }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #94a3b8; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"],
textarea, select {
    width: 100%; padding: 12px 16px; background: #0f172a; border: 1px solid #334155;
    border-radius: 8px; color: #e2e8f0; font-size: 16px; margin-bottom: 16px; outline: none;
    font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: #0096C7; }
textarea { resize: vertical; min-height: 100px; }
button, .btn { padding: 12px 24px; background: #0096C7; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s; }
button:hover, .btn:hover { background: #0077B6; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-outline { background: transparent; border: 1px solid #334155; color: #94a3b8; }
.btn-outline:hover { border-color: #0096C7; color: #0096C7; background: transparent; }

/* Dashboard Layout */
.dashboard { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: #1e293b; padding: 24px 0; flex-shrink: 0; position: fixed; height: 100vh; overflow-y: auto; }
.sidebar h2 { padding: 0 24px; font-size: 18px; color: #fff; margin-bottom: 8px; }
.sidebar .subtitle { padding: 0 24px; font-size: 13px; color: #64748b; margin-bottom: 32px; }
.sidebar a { display: block; padding: 12px 24px; color: #94a3b8; font-size: 15px; transition: 0.2s; border-left: 3px solid transparent; }
.sidebar a:hover { background: #0f172a; color: #fff; }
.sidebar a.active { background: #0f172a; color: #0096C7; border-left-color: #0096C7; font-weight: 600; }
.sidebar .divider { height: 1px; background: #334155; margin: 16px 24px; }
.sidebar a.logout { color: #f87171; margin-top: 16px; }
.sidebar a.logout:hover { background: #7f1d1d33; }

.main-content { margin-left: 280px; padding: 48px; flex: 1; max-width: 900px; }
.main-content h1 { font-size: 32px; color: #fff; margin-bottom: 8px; }
.main-content .page-desc { color: #64748b; margin-bottom: 40px; }

/* Cards */
.card { background: #1e293b; border-radius: 12px; padding: 24px; margin-bottom: 24px; border: 1px solid #334155; }
.card h3 { font-size: 18px; color: #fff; margin-bottom: 16px; }

/* JSON array editor */
.array-item { background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 16px; margin-bottom: 12px; position: relative; }
.array-item .remove-btn { position: absolute; top: 8px; right: 8px; background: #dc2626; color: #fff; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.add-btn { display: inline-block; padding: 8px 16px; background: transparent; border: 1px dashed #334155; color: #64748b; border-radius: 8px; cursor: pointer; font-size: 14px; margin-top: 8px; }
.add-btn:hover { border-color: #0096C7; color: #0096C7; background: transparent; }

/* Success message */
.success { background: #064e3b; color: #6ee7b7; padding: 12px 16px; border-radius: 8px; margin-bottom: 24px; }

/* Table */
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #334155; }
table th { color: #64748b; font-size: 13px; text-transform: uppercase; }
table td { color: #e2e8f0; }
table tr:hover { background: #0f172a33; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 24px; }
}

a { text-decoration: none; color: inherit; }

/* Image upload */
.image-upload-group { margin-bottom: 16px; }
.image-upload-group input[type="file"] { margin: 8px 0; padding: 8px; background: #1e293b; border: 1px dashed #334155; border-radius: 8px; cursor: pointer; }
.image-upload-group input[type="file"]:hover { border-color: #0096C7; }
.image-upload-group small { display: block; color: #64748b; margin: 8px 0 4px; font-size: 12px; }
.image-preview { max-width: 300px; max-height: 200px; border-radius: 8px; border: 1px solid #334155; margin-bottom: 8px; object-fit: cover; }
.image-upload-group input[type="url"] { margin-top: 0; }
