
:root {
  --ink: #102033;
  --muted: #667085;
  --line: #d9e2ec;
  --paper: #fffaf2;
  --panel: #ffffff;
  --blue: #0f4c81;
  --red: #c44536;
  --gold: #d99a22;
  --green: #227a5b;
  --slate: #344054;
  --shadow: 0 24px 60px rgba(16, 32, 51, 0.10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 80% 0%, rgba(217, 154, 34, 0.18), transparent 30%),
    linear-gradient(135deg, #f7efe0 0%, #edf5f6 52%, #f8fafc 100%);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 310px;
  padding: 28px 22px;
  background: rgba(255, 250, 242, 0.92);
  border-right: 1px solid rgba(16, 32, 51, 0.12);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}
.brand-kicker, .eyebrow { color: var(--red); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.brand h1 { font-size: 28px; letter-spacing: -.05em; line-height: 1.05; margin: 10px 0; }
.brand p { color: var(--muted); line-height: 1.45; margin: 0 0 26px; }
.nav { display: grid; gap: 8px; margin-bottom: 28px; }
.nav-link, button {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  color: var(--slate);
  background: rgba(255,255,255,0.74);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.nav-link { text-align: left; }
.nav-link:hover, button:hover { transform: translateY(-1px); }
.nav-link.active { background: var(--ink); color: white; box-shadow: var(--shadow); }
.filters { display: grid; gap: 10px; }
label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  font: inherit;
}
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.main { margin-left: 310px; padding: 28px; max-width: calc(100vw - 310px); overflow-x: hidden; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.top-actions { flex-shrink: 0; }
.topbar h2 { font-size: 36px; letter-spacing: -.05em; margin: 4px 0 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(16,32,51,0.10);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.kpi { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 800; }
.kpi .value { font-size: 34px; font-weight: 900; letter-spacing: -.04em; }
.kpi .note { color: var(--muted); font-size: 12px; }
.chart { height: 430px; width: 100%; overflow: hidden; }
.chart.tall { height: 620px; }
.chart.extra-tall { height: 1120px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 12px; }
.section-title h3 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.section-title p { margin: 0; color: var(--muted); }
.table-wrap { overflow: auto; max-height: 560px; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: white; font-size: 13px; }
th { position: sticky; top: 0; background: var(--ink); color: white; text-align: left; cursor: pointer; }
th, td { padding: 10px 12px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
tr:hover td { background: #f8fafc; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 900; background: #eef2f6; color: var(--slate); }
.pill.high, .pill.true, .pill.severe { background: #fee4e2; color: #b42318; }
.pill.medium, .pill.moderate { background: #fef0c7; color: #b54708; }
.pill.low, .pill.partial { background: #d1e9ff; color: #175cd3; }
.pill.clear, .pill.yes { background: #dcfae6; color: #067647; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 220px; }
.callout { border-left: 5px solid var(--blue); background: rgba(15,76,129,0.08); }
@media (max-width: 980px) {
  .sidebar { position: relative; width: auto; }
  .main { margin-left: 0; max-width: none; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
}
