:root {
  --bg: #0f172a;
  --card: #111827;
  --soft: #1f2937;
  --line: #334155;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #0b1220;
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: #09101d; border-right: 1px solid #172033; padding: 24px; }
.sidebar h1 { font-size: 20px; margin: 0 0 18px; }
.sidebar nav a { display: block; padding: 10px 12px; border-radius: 12px; color: var(--muted); margin-bottom: 6px; }
.sidebar nav a:hover, .sidebar nav a.active { background: #13203a; color: white; }
.user-box { margin-top: 24px; padding-top: 18px; border-top: 1px solid #1f2a3e; display: grid; gap: 10px; }
.main { padding: 28px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.card { background: rgba(17,24,39,.9); border: 1px solid #1f2a3e; border-radius: 20px; padding: 20px; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat { font-size: 30px; font-weight: 700; }
.label { color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #1f2a3e; text-align: left; vertical-align: top; }
th { color: #cbd5e1; font-size: 13px; }
tr:hover td { background: rgba(255,255,255,.02); }
input, select, textarea, button {
  width: 100%;
  border: 1px solid #334155;
  background: #0f172a;
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
}
textarea { min-height: 90px; resize: vertical; }
button, .btn { background: #1d4ed8; cursor: pointer; color: white; border: 0; display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; border-radius: 12px; width: auto; }
.btn.secondary { background: #334155; }
.btn.green { background: #15803d; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; }
.flash.success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3); }
.flash.error { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; background: #334155; }
.badge.green { background: rgba(34,197,94,.18); color: #86efac; }
.badge.red { background: rgba(239,68,68,.16); color: #fca5a5; }
.badge.orange { background: rgba(245,158,11,.14); color: #fcd34d; }
.inline-form { display: grid; gap: 12px; }
.compact-form textarea { min-height: 70px; }
.muted { color: var(--muted); }
.topbar-note { color: var(--muted); font-size: 14px; }
.simple-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.divider { height: 1px; background: #1f2a3e; margin: 6px 0 2px; }
.auth-body { display: grid; place-items: center; min-height: 100vh; }
.auth-shell { width: min(460px, calc(100vw - 32px)); }
.auth-card h2 { margin-bottom: 8px; }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #172033; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .page-header { align-items: flex-start; flex-direction: column; }
}
