:root {
  --bg: #1b1c1f;
  --bg-alt: #252629;
  --fg: #d1d5db;
  --fg-muted: #6b7280;
  --border: #2e3039;
  --sidebar-w: 230px;
  --blue: #1662A9;
  --gold: #EFB118;
  --coral: #FF725C;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-brand {
  padding: 1.25rem 1rem 1rem;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}

.nav-section {
  padding: 0.75rem 0;
  flex: 1;
}

.nav-links { list-style: none; }

.nav-links a {
  display: block;
  padding: 0.45rem 1rem;
  margin: 1px 0.5rem;
  border-radius: 5px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.12s, color 0.12s;
}

.nav-links a:hover { background: rgba(255,255,255,0.05); color: var(--fg); }
.nav-links a.active { background: rgba(255,255,255,0.08); color: var(--fg); font-weight: 600; }

/* ── Content ── */
.content {
  margin-left: var(--sidebar-w);
  padding: 2rem 2.5rem 3rem;
  max-width: 1280px;
  width: 100%;
}

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 3rem 0 2.5rem;
}

.hero h1 {
  font-size: clamp(56px, 9vw, 90px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(30deg, var(--fg) 30%, var(--fg-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.25rem;
}

.hero p {
  max-width: 34em;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-muted);
}

.hero p strong { color: var(--fg); }

/* ── Divider ── */
hr { border: none; border-top: 1px solid var(--border); margin: 1.75rem 0; }

/* ── Section heading ── */
.section-heading {
  font-size: 20px;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
}

/* ── Grid ── */
.grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ── */
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.chart-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.chart-note {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 0.5rem;
}

.chart-slot { width: 100%; }

/* ── Plot overrides for dark bg ── */
[data-plot] text { fill: var(--fg); }
[data-plot] .plot-grid line { stroke: var(--border); }

/* ── Dashboard hero (facilities-style) ── */
.dashboard-hero { margin: 1.5rem 0 2rem; }
.dashboard-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.1;
}
.dashboard-hero h2 {
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-muted);
  margin-top: 0.35rem;
}

/* ── About page ── */
.prose { max-width: 60ch; }
.prose h2 { font-size: 16px; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.prose p { color: var(--fg-muted); line-height: 1.7; font-size: 14px; }
.prose a { color: var(--blue); text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .content { margin-left: 0; padding: 1rem 1.25rem 2rem; }
  .cols-2, .cols-4 { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}
