:root {
    --bg: #0d1420;
    --bg-2: #101d2e;
    --panel: #162842;
    --line: rgba(175, 195, 218, 0.14);
    --text: #eaf2fa;
    --muted: #b8c7d9;
    --accent: #4c70a4;
    --success: #15a36a;
    --error: #d95c5c;
}
* { box-sizing: border-box; }
body { margin:0; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: linear-gradient(180deg, var(--bg), var(--bg-2)); color: var(--text); }
a { text-decoration:none; color:inherit; }
.admin-body { min-height:100vh; }
.admin-login-body { display:grid; place-items:center; padding:24px; }
.login-card, .panel { background: rgba(22,40,66,.9); border:1px solid var(--line); border-radius:24px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-card { width:min(440px, 100%); padding:28px; }
.login-card h1 { margin:0 0 8px; }
.stack-form, .grid-form { display:grid; gap:16px; }
label { display:grid; gap:8px; color: var(--muted); font-size:14px; }
input, textarea, select {
    width:100%; padding:12px 14px; border-radius:14px; border:1px solid rgba(255,255,255,0.08);
    background: rgba(8,14,22,.9); color: var(--text); outline:none;
}
input:focus, textarea:focus, select:focus { border-color: rgba(175,195,218,0.34); }
textarea { resize: vertical; }
.btn {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    padding:12px 18px; border-radius:14px; border:1px solid transparent; cursor:pointer;
    background: rgba(255,255,255,0.04); color: var(--text);
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #355278); }
.btn.ghost { border-color: var(--line); }
.btn.danger { background: rgba(217,92,92,0.16); color: #ffd7d7; border-color: rgba(217,92,92,0.2); }
.admin-topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:28px 24px 12px; }
.admin-topbar h1 { margin:0 0 6px; }
.admin-topbar p { margin:0; color:var(--muted); max-width:760px; }
.topbar-actions { display:flex; gap:10px; flex-wrap:wrap; }
.admin-shell { display:grid; grid-template-columns: 240px 1fr; gap:20px; padding:20px 24px 32px; }
.sidebar { position:sticky; top:20px; height:fit-content; display:grid; gap:10px; padding:18px; background: rgba(22,40,66,.7); border:1px solid var(--line); border-radius:22px; }
.sidebar a { padding:10px 12px; border-radius:12px; color: var(--muted); }
.sidebar a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.admin-main { display:grid; gap:18px; }
.panel { padding:22px; }
.panel-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.panel-head h2 { margin:0; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-form.compact-form { margin-bottom:18px; }
.grid-form .full { grid-column: 1 / -1; }
.thumb-box { width:120px; height:120px; border-radius:18px; overflow:hidden; border:1px solid var(--line); }
.thumb-box img { width:100%; height:100%; object-fit:cover; }
.repeat-list { display:grid; gap:14px; }
.repeat-card { padding:18px; border-radius:20px; border:1px solid var(--line); background: rgba(0,0,0,.14); }
.repeat-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.row-actions { display:flex; gap:10px; margin-top:14px; }
.inline-delete { margin-top: -6px; }
.alert { padding:14px 16px; border-radius:14px; margin-bottom:12px; }
.alert.success { background: rgba(21,163,106,0.16); color:#b8ffe1; border:1px solid rgba(21,163,106,0.24); }
.alert.error { background: rgba(217,92,92,0.16); color:#ffd7d7; border:1px solid rgba(217,92,92,0.24); }
@media (max-width: 980px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position:relative; top:auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .grid-form, .repeat-grid, .admin-topbar { grid-template-columns: 1fr; display:grid; }
    .admin-shell { padding:16px; }
    .panel, .login-card { padding:18px; }
    .sidebar { grid-template-columns: 1fr; }
}
