:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #94a3b8;
  --line: #1f2937;
  --text: #e5e7eb;
  --accent: #38bdf8;
  --good: #22c55e;
  --bad: #ef4444;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
body { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; background: #0b1220; border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.brand { font-size: 22px; font-weight: 800; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a { padding: 10px 12px; border-radius: 10px; color: var(--text); background: transparent; }
.sidebar nav a.active, .sidebar nav a:hover { background: #162033; }
.logout-form button { width: 100%; }
.main { padding: 24px; }
.with-sidebar { margin-left: 240px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.narrow { max-width: 980px; }
.grid { display: grid; gap: 18px; }
.two-col { grid-template-columns: 1fr 1fr; }
.stats-grid { grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; }
.stat strong { display: block; font-size: 30px; margin-bottom: 8px; }
.stat span { color: var(--muted); }
form.form-grid { display: grid; gap: 12px; }
form.form-grid.dense { grid-template-columns: 1fr 1fr; }
form.form-grid label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input, textarea, select, button { width: 100%; border-radius: 10px; border: 1px solid #334155; background: #0b1220; color: var(--text); padding: 10px 12px; }
textarea { resize: vertical; min-height: 64px; }
button { background: #0284c7; border-color: #0284c7; cursor: pointer; font-weight: 700; }
.checkbox { display: flex !important; align-items: center; gap: 10px; color: var(--text) !important; }
.checkbox input { width: auto; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions form { display: inline-block; }
.actions-inline { display: flex; gap: 12px; align-items: center; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 700; }
.wrap { word-break: break-all; }
.flash { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; }
.flash-success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.35); }
.flash-error { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.35); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: min(420px, 100%); }
@media (max-width: 1100px) {
  .two-col, .stats-grid, form.form-grid.dense { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: static; width: auto; }
  .with-sidebar { margin-left: 0; }
}
