/* Fonts ship with the app. Nothing is fetched from a third party. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Ink */
  --ink: #172334;
  --ink-2: #566276;
  --ink-3: #8a94a3;

  /* Surfaces */
  --page: #f6f8fb;
  --page-2: #eff3f8;
  --card: #ffffff;
  --line: #e0e6ee;
  --line-2: #dce3ec;
  --line-3: #edf1f6;

  /* Accent */
  --accent: #1f5fbf;
  --accent-ink: #174a96;
  --accent-tint: #e8f0fc;
  --accent-line: #a8c3ec;
  --on-accent: #ffffff;

  /* Status */
  --good: #1f7a45;
  --good-tint: #e9f5ee;
  --good-line: #c4e2d0;
  --warn: #8a6400;
  --warn-tint: #fdf6e3;
  --warn-line: #ecdcb0;
  --bad: #a33d2a;
  --bad-tint: #fdf1ee;
  --bad-line: #dba396;

  --radius-ctl: 3px;
  --shadow-card: 0 1px 2px rgb(23 35 52 / 0.05);
  --shadow-panel: 0 2px 10px rgb(31 95 191 / 0.18);
  --shadow-menu: 0 10px 28px rgb(23 35 52 / 0.16);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23566276' stroke-width='1.5'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  /* Light only, whatever the system setting. */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page-2);
  color: var(--ink);
  font: 14px/1.45 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: var(--radius-ctl); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
[hidden] { display: none !important; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-2); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.note { font-size: 12px; color: var(--ink-2); }

/* Small uppercase mono label used above every field and section. */
.kicker {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}
.kicker.accent, a.kicker { color: var(--accent); }

/* ---------- header ---------- */

.topbar { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line-2); }
.topbar-row, .tabs { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.topbar-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-top: 12px; padding-bottom: 8px; }
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; }
.brand-name { font-size: 12px; color: var(--ink-2); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.divider { width: 1px; height: 20px; background: var(--line); }
.who { font-size: 13px; font-weight: 500; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 9px 12px; font-size: 14px; white-space: nowrap;
  color: var(--ink-2); border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--page); color: var(--ink); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.btn.danger { border-color: var(--bad-line); color: var(--bad); }
.btn.danger:hover { background: var(--bad-tint); color: var(--bad); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn svg { flex: none; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; }
.linkbtn.kicker { color: var(--accent); }
.linkbtn.kicker.plain { color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-ctl); background: var(--card);
  font-size: 14px; color: var(--ink); cursor: pointer;
}
.chip:hover { background: var(--page); }
.chip .n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.chip[aria-pressed="true"], .chip:has(input:checked) {
  background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-ink); font-weight: 500;
}
.chip[aria-pressed="true"] .n { color: var(--accent-ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip:has(input:disabled) { opacity: 0.55; cursor: default; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line); background: var(--page-2); padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 14px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.input, .field input[type="search"], .field input[type="text"], .field input[type="email"], .field input[type="password"], .field select {
  width: 100%; min-height: 38px; padding: 8px 10px;
  border: 1px solid var(--line); background-color: var(--card); color: var(--ink); font-size: 14px;
}
.field select {
  appearance: none; -webkit-appearance: none;
  padding-right: calc(1.5em + 0.75rem);
  background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 10px center;
}
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 12px; pointer-events: none; color: var(--ink-2); }
.search input { padding-left: 32px !important; }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filters .grow { flex: 1 1 260px; }
.filters .w-sm { flex: 0 1 180px; }
.filters .w-md { flex: 0 1 210px; }
.filters .check { display: flex; align-items: center; gap: 8px; min-height: 38px; font-size: 14px; }
.count { margin-left: auto; align-self: center; }

/* ---------- layout ---------- */

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; outline: none; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.row.chart-row { grid-template-columns: minmax(0, 1fr) 380px; }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.split.wide-side { grid-template-columns: minmax(0, 1fr) 440px; }

.card { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); padding: 16px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }

/* The selected row's detail, beside the list. */
.side {
  position: sticky; top: 112px;
  max-height: calc(100vh - 128px); overflow: auto;
  background: var(--card); border: 2px solid var(--accent); box-shadow: var(--shadow-panel); padding: 16px;
}
.side-empty { border: 1px dashed var(--line-2); background: transparent; box-shadow: none; padding: 24px 16px; text-align: center; }
.side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.side-head h3 { margin-top: 4px; overflow-wrap: anywhere; }
.side section { margin-top: 20px; }
.side section > .kicker { display: block; margin-bottom: 4px; }

/* Headline numbers: an open grid with hairlines between cells. */
.stats {
  display: grid; gap: 1px; grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); min-width: 0; }
a.stat:hover { background: var(--page); color: var(--ink); text-decoration: none; }
.stat-v { font-family: var(--font-mono); font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-v.bad { color: var(--bad); }
.stat-s { font-size: 12px; color: var(--ink-2); }

/* Plans and chapters as tiles. */
/* Hairlines come from each tile's right and bottom edges, so a part-filled last row stays open. */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.tiles.plans { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); min-width: 0; }
a.tile:hover { background: var(--page); color: var(--ink); text-decoration: none; }
.tile-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.plans .tile-name { font-size: 15px; }
.tile .stat-v { font-size: 24px; }
.tile .foot { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.tile.empty-tile .stat-v { color: var(--ink-3); }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.card .table-wrap, .side .table-wrap { border: 0; box-shadow: none; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 9px 12px; text-align: left; vertical-align: middle; white-space: nowrap; }
th {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--card);
}
th.num { text-align: right; }
td { border-bottom: 1px solid var(--line-3); }
.card th:first-child, .card td:first-child { padding-left: 0; }
.card th:last-child, .card td:last-child { padding-right: 0; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--ink); }
th[aria-sort="ascending"]::after { content: " ↑"; }
th[aria-sort="descending"]::after { content: " ↓"; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--page); }
tbody tr.sel td, tbody tr.sel:hover td { background: var(--accent-tint); }
td.wrap { max-width: 360px; white-space: normal; }
td.date { font-family: var(--font-mono); font-size: 13px; }
td .strong { font-weight: 500; }
.cell-name { max-width: 220px; }
.cell-name > div { overflow: hidden; text-overflow: ellipsis; }
.sub { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.empty { padding: 32px; text-align: center; color: var(--ink-2); }
.table-foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); }

/* ---------- lists ---------- */

.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line-3); }
.list > li:last-child { border-bottom: 0; }
.list.boxed { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.list.lined { border-top: 1px solid var(--line); }
.list > li.empty { padding: 32px 16px; }

.entry { display: block; width: 100%; padding: 14px 16px; color: var(--ink); cursor: pointer; background: none; border: 0; border-radius: 0; text-align: left; }
.entry:hover { background: var(--page); text-decoration: none; color: var(--ink); }
.entry[aria-current="true"] { background: var(--accent-tint); }
.entry-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.entry-top .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-top .when { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.entry-msg { margin-top: 4px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .kicker { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mini { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.mini .what { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .amt { font-family: var(--font-mono); font-weight: 600; }
button.mini { width: 100%; background: none; border: 0; border-radius: 0; text-align: left; cursor: pointer; color: var(--ink); }
button.mini:hover { background: var(--page); }

/* ---------- status tags ---------- */

.tag {
  display: inline-block; vertical-align: middle;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3;
  padding: 3px 7px; border-radius: var(--radius-ctl); white-space: nowrap;
  color: var(--ink-2); background: var(--page); border: 1px solid var(--line);
}
.tag.good { color: var(--good); background: var(--good-tint); border-color: var(--good-line); }
.tag.warn { color: var(--warn); background: var(--warn-tint); border-color: var(--warn-line); }
.tag.bad { color: var(--bad); background: var(--bad-tint); border: 1px dashed var(--bad-line); }
.tag.accent { color: var(--accent-ink); background: var(--accent-tint); border-color: var(--accent-line); }
.tag.solid { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
a.tag:hover { text-decoration: none; filter: brightness(0.97); }
button.tag { cursor: pointer; }
button.tag:hover { filter: brightness(0.97); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- meters and chart ---------- */

.track { height: 4px; background: var(--line-3); }
.track > span { display: block; height: 100%; background: var(--accent); }
.track.low > span { background: var(--warn); }
.low-text { color: var(--warn) !important; }

.meter-list { list-style: none; margin: 0; padding: 0; }
.meter-list li { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) 48px minmax(80px, auto); align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-3); }
.meter-list li:last-child { border-bottom: 0; }
.meter-list .label { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-list .label a { color: var(--ink); }
.meter-list .val { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.meter-list .aside { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); text-align: right; white-space: nowrap; }

.status-list li { padding: 10px 0; border-bottom: 1px solid var(--line-3); }
.status-list li:last-child { border-bottom: 0; }
.status-list a { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.status-list a:hover { text-decoration: none; }
.status-list .val { margin-left: auto; font-family: var(--font-mono); font-weight: 600; }
.status-list .pct { width: 44px; text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.status-list .track { margin-top: 8px; }

.chart { position: relative; margin-top: 16px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--line-3); stroke-width: 1; }
.chart .baseline { stroke: var(--line-2); stroke-width: 1; }
.chart .axis-label { fill: var(--ink-2); font-family: var(--font-mono); font-size: 10px; }
.chart .bar { fill: var(--accent); }
.chart .bar.partial { fill: var(--accent-line); }
.chart .hit { fill: transparent; }
.chart .bar.active { fill: var(--accent-ink); }
.chart .bar.partial.active { fill: var(--accent); }
.chart .val-label { fill: var(--ink); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 10px; background: var(--accent-line); }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--ink); color: var(--card);
  padding: 8px 10px; font-size: 13px; line-height: 1.35;
  box-shadow: var(--shadow-menu); max-width: 260px;
}
.tooltip .kicker { display: block; color: var(--accent-line); }

/* ---------- detail facts ---------- */

.facts { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; margin: 16px 0 0; font-size: 13px; }
.facts dt { padding-top: 2px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.fields { margin: 16px 0 0; border-top: 1px solid var(--line); }
.fields > div { padding: 10px 0; border-bottom: 1px solid var(--line-3); }
.fields > div:last-child { border-bottom: 0; }
.fields dd { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; }
.inquiry-frame { width: 100%; height: 60vh; border: 1px solid var(--line); background: #fff; margin-top: 8px; }
details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details > summary { cursor: pointer; }
.side-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- drawer (details opened from pages without a side panel) ---------- */

.drawer {
  margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(560px, 100vw);
  border: 0; border-left: 2px solid var(--accent); padding: 0;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-menu);
}
.drawer::backdrop { background: rgb(14 20 28 / 0.35); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.drawer-head h2 { font-size: 20px; margin-top: 4px; }
.drawer-body { padding: 4px 20px 32px; }
.drawer-body section { margin-top: 20px; }
.drawer-body section > .kicker { display: block; margin-bottom: 4px; }

/* ---------- forms ---------- */

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form legend { padding: 0; margin-bottom: 4px; width: 100%; }
.role-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.check-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); max-height: 300px; overflow: auto;
}
.check-grid label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.check-grid label:has(input:checked) { background: var(--accent-tint); }
.check-grid input, .check input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.form-error { margin: 0; padding: 10px 12px; border: 1px solid var(--bad-line); background: var(--bad-tint); color: var(--bad); font-size: 13px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-actions .spacer { flex: 1; }
.form-done { padding: 10px 12px; border: 1px solid var(--good-line); background: var(--good-tint); color: var(--good); font-size: 13px; }

/* ---------- users ---------- */

.user-row { width: 100%; background: none; border: 0; border-radius: 0; text-align: left; color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) 130px 140px; align-items: center; gap: 16px; padding: 14px 16px; cursor: pointer; }
.user-row:hover { background: var(--page); }
.user-row[aria-current="true"] { background: var(--accent-tint); }
.user-row.disabled .name { color: var(--ink-2); }
.user-row .name { font-weight: 600; }
.user-row .counties { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.user-row .last { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }

/* ---------- banners ---------- */

.scope-banner { padding: 10px 12px; border: 1px solid var(--accent-line); background: var(--accent-tint); color: var(--accent-ink); font-size: 13px; }
.alert { padding: 10px 12px; border: 1px solid var(--warn-line); background: var(--warn-tint); color: var(--warn); font-size: 13px; }

/* ---------- sign-in ---------- */

.auth-page { min-height: 100dvh; display: flex; justify-content: center; background: var(--page-2); }
.auth-shell { width: 100%; max-width: 432px; min-height: 100dvh; background: var(--page); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.auth-shell header { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.auth-body { display: block; max-width: none; margin: 0; padding: 24px 16px; }
.auth-body > p { margin-top: 12px; color: var(--ink-2); }
.auth-body .form input { padding: 12px; font-size: 16px; }
.auth-body .btn.primary { width: 100%; min-height: 44px; font-size: 15px; margin-top: 4px; }
.auth-card { max-width: 432px; margin: 24px auto; width: 100%; }

/* ---------- narrow screens ---------- */

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row.chart-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .split, .split.wide-side { grid-template-columns: minmax(0, 1fr); }
  .split > .side { display: none; }
  .split.keep-side > .side { display: block; position: static; max-height: none; }
  .row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .topbar-end { margin-left: 0; width: 100%; gap: 12px; }
  .stats, .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-row { grid-template-columns: minmax(0, 1fr) auto; }
  .user-row .last { grid-column: 1 / -1; text-align: left; }
  .meter-list li { grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 40px; }
  .meter-list .aside { display: none; }
  .count { margin-left: 0; width: 100%; }
  .filters .field { flex: 1 1 100%; }
}
