:root {
    --navy: #0f172a;
    --orange: #f97316;
    --line: #e6e8ee;
    --paper: #f4f6f8;
    --ink: #1f2937;
    --muted: #64748b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", sans-serif; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Saira", sans-serif; margin: 0 0 8px; }
button, input, textarea, select { font: inherit; }

.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--navy); }
.login-card { width: min(420px, calc(100% - 32px)); background: white; border-radius: 20px; padding: 28px; }
.login-card h1 { font-size: 32px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--orange); color: white; }

.shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #dbe3ef; padding: 22px 16px; }
.sidebar a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; color: #dbe3ef; font-size: 14px; }
.sidebar a.active, .sidebar a:hover { background: rgba(255,255,255,.08); color: white; }
.sidebar .group { margin: 18px 10px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; }
.side-brand { display: flex; align-items: center; gap: 10px; color: white; font-family: "Saira", sans-serif; font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.main { padding: 28px; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card, .panel { background: white; border-radius: 16px; padding: 18px; box-shadow: 0 10px 30px rgba(15,23,42,.05); }
.card strong { display: block; font-size: 32px; font-family: "Saira", sans-serif; }
.badge { background: var(--orange); color: white; border-radius: 999px; padding: 0 7px; font-size: 12px; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); }
.thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; }
.actions { display: flex; gap: 8px; }
.btn, button.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--orange); color: white; border: 0; border-radius: 999px;
    padding: 10px 16px; font-weight: 700; cursor: pointer;
}
.btn.navy { background: var(--navy); }
.btn.ghost { background: white; color: var(--navy); border: 1px solid var(--line); }
.btn.danger { background: #b91c1c; }
.form { display: grid; gap: 14px; max-width: 860px; }
.field { display: grid; gap: 6px; }
.field-check { grid-template-columns: auto 1fr; align-items: center; }
.field span { font-weight: 700; font-size: 14px; }
input, textarea, select { width: 100%; border: 1px solid #d8dee8; border-radius: 12px; padding: 12px 14px; background: white; }
input[type="checkbox"] { width: auto; }
textarea { min-height: 120px; }
.help, .muted { color: var(--muted); font-size: 13px; }
.error { color: #b91c1c; font-size: 13px; }
.alert { background: #ecfdf3; color: #166534; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.group-title { margin: 22px 0 8px; }
.status { font-size: 12px; font-weight: 700; color: #166534; }
.status.off { color: #b91c1c; }
.pager { display: flex; gap: 12px; margin-top: 14px; }
.pager a { color: var(--orange); font-weight: 700; }

@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .cards { grid-template-columns: 1fr 1fr; }
    .sidebar { position: sticky; top: 0; z-index: 5; }
}
