:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-light: #ffffff;
    --muted: #64748b;
    --text: #0f172a;
    --text-light: #f8fafc;
    --accent: #2563eb;
    --border: #e2e8f0;
    --success: #16a34a;
    --error: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f8fafc; color: var(--text); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--bg); color: var(--text-light); padding: 24px; }
.brand { font-size: 22px; font-weight: 700; margin-bottom: 22px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar a { color: #cbd5e1; text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.content { flex: 1; padding: 28px; }
.auth-content { display: grid; place-items: center; }
.auth-card, .panel, .stat-card, .form-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 10px 30px rgba(15,23,42,.05); }
.auth-card { padding: 28px; width: min(460px, 100%); }
.form-card, .panel { padding: 22px; }
.form-grid { display: grid; gap: 10px; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; }
button, .btn-link { background: var(--accent); color: #fff; border: 0; padding: 11px 16px; border-radius: 12px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-link.danger, button.danger { background: var(--error); }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.flash-success { background: #ecfdf5; color: #166534; }
.flash-error { background: #fef2f2; color: #991b1b; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 22px; display: grid; gap: 8px; }
.stat-card strong { font-size: 30px; }
.two-col { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 20px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
code { font-family: Consolas, monospace; font-size: 13px; }
small { color: var(--muted); }
@media (max-width: 1100px) {
  .two-col, .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { width: auto; }
}
