:root {
    --bg: #0f172a;
    --surface: #111827;
    --panel: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-ghost: #dbeafe;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #f3f4f6; color: var(--text); }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { background: var(--surface); color: #fff; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.brand { font-size: 22px; font-weight: 700; }
.brand-subtitle { color: #93c5fd; margin-top: 4px; font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.nav-link { color: #cbd5e1; padding: 12px 14px; border-radius: 12px; }
.nav-link.active, .nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-footer { padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); }
.main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 24px; }
.topbar h1 { margin: 0; font-size: 28px; }
.topbar p { margin: 6px 0 0; }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04); }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 700; }
.stat .hint { color: var(--muted); font-size: 12px; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
th { color: var(--muted); font-weight: 600; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-group { display: flex; flex-direction: column; gap: 8px; }
label { font-weight: 600; font-size: 14px; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #d1d5db; background: #fff; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
.button { border: 0; border-radius: 12px; background: var(--primary); color: #fff; padding: 12px 16px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button:hover { opacity: 0.95; }
.button-secondary { background: #e5e7eb; color: #111827; }
.button-success { background: var(--success); }
.button-danger { background: var(--danger); }
.button-block { width: 100%; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-soft { background: #e0e7ff; color: #3730a3; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 600; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1d4ed8; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.kicker { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.justify-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.code { font-family: Consolas, Monaco, monospace; background: #f3f4f6; padding: 2px 6px; border-radius: 6px; }
@media (max-width: 1024px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; top: 0; z-index: 5; }
    .grid-4, .grid-3, .grid-2, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}
