/* TroopCor 2.0 HQ console. "Flight Deck" direction from the DatumWorks (formerly Resurgam) brand board:
   night slate, amber signal, panel white, bezel grey. Barlow Condensed for labels, IBM Plex for text and numbers.
   Fonts are self-hosted (SIL OFL 1.1, licences in /fonts). */

@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(/fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@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 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"); }

:root {
  --slate: #142230; --slate-2: #1c2f41; --slate-3: #26405a; --amber: #f2a93b; --amber-ink: #8a5a0b;
  --panel: #eef2f5; --bezel: #8796a5;
  --bg: #f5f8fb; --surface: #ffffff; --surface-2: #f3f6f9; --line: #dbe3ea; --line-strong: #b8c5d1;
  --ink: #142230; --ink-2: #3f5165; --ink-3: #5c6d80;
  /* the left menu: bright in the light theme, night slate in the dark one */
  --rail-bg: #ffffff; --rail-edge: #dbe3ea; --rail-ink: #2b3d50; --rail-strong: #142230; --rail-label: #5c6d80;
  --rail-hover: #eef3f8; --rail-on: #fff3de; --rail-tag: #8a5a0b; --rail-line: #e6ecf1;
  --ok: #1f7a4d; --ok-bg: #e3f3ea; --warn: #8a5a0b; --warn-bg: #fdf1dc; --bad: #b3261e; --bad-bg: #fbe5e3; --info: #1d5c96; --info-bg: #e3eef8;
  --focus: 0 0 0 3px rgba(242, 169, 59, .55);
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 34, 48, .06), 0 2px 8px rgba(20, 34, 48, .05);
  --f-label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1924; --surface: #142230; --surface-2: #182a3b; --line: #263b50; --line-strong: #34506b;
  --ink: #e8eef3; --ink-2: #b6c3cf; --ink-3: #8796a5;
  --ok: #5fd39a; --ok-bg: #12352a; --warn: #f2c06e; --warn-bg: #3a2c12; --bad: #ff8a80; --bad-bg: #3d1d1d; --info: #8cc2f2; --info-bg: #13304a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --rail-bg: var(--slate); --rail-edge: transparent; --rail-ink: #d6dee6; --rail-strong: #ffffff; --rail-label: var(--bezel);
  --rail-hover: var(--slate-2); --rail-on: var(--slate-3); --rail-tag: var(--amber); --rail-line: rgba(255, 255, 255, .07);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.rail { background: var(--rail-bg); color: var(--rail-ink); border-right: 1px solid var(--rail-edge); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--rail-line); }
.brand svg { width: 30px; height: 30px; color: var(--rail-strong); flex: none; }
.brand b { font: 700 22px/1 var(--f-label); letter-spacing: .06em; color: var(--rail-strong); }
.brand small { display: block; font: 500 10.5px/1.2 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--rail-tag); margin-top: 3px; }
.nav { padding: 10px 10px 24px; flex: 1; }
.nav-group { margin-top: 12px; }
.nav-group > span { display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--rail-label); padding: 8px 10px 6px; }
.nav-group > span::before { content: ""; width: 10px; height: 2px; background: var(--amber); opacity: .7; }
.nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--rail-ink); padding: 7px 10px 7px 28px; border-radius: 7px; font-size: 13.5px; text-decoration: none; }
.nav a:hover { background: var(--rail-hover); color: var(--rail-strong); }
.nav a.on { background: var(--rail-on); color: var(--rail-strong); font-weight: 500; box-shadow: inset 3px 0 0 var(--amber); }
.nav a.top { padding-left: 10px; font-weight: 500; }
.nav .count { font: 500 11px/1 var(--f-mono); background: var(--amber); color: var(--slate); border-radius: 999px; padding: 3px 7px; }
.rail-foot { padding: 14px 18px; border-top: 1px solid var(--rail-line); font-size: 11.5px; color: var(--rail-label); }
.rail-foot .motto { font: 600 12px/1.3 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--rail-ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.search input:focus { border-color: var(--amber); background: var(--surface); }
.search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--ink-3); }
.search kbd { position: absolute; right: 10px; top: 8px; }
.search-results { position: absolute; left: 0; right: 0; top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 34, 48, .18); max-height: 420px; overflow: auto; padding: 6px; }
.search-results a { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.search-results a.sel, .search-results a:hover { background: var(--surface-2); }
.search-results .kind { font: 600 11px/1.6 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
kbd { font: 500 11px/1 var(--f-mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; color: var(--ink-3); background: var(--surface); }
.topbar .date { font: 600 13px/1 var(--f-label); letter-spacing: .12em; color: var(--ink-2); white-space: nowrap; }
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--slate); color: var(--amber); display: grid; place-items: center; font: 700 14px/1 var(--f-label); letter-spacing: .05em; }

.page { padding: 22px 28px 60px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font: 700 28px/1.05 var(--f-label); letter-spacing: .02em; margin: 4px 0 0; text-transform: uppercase; }
.crumbs { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.formerly { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--f-body); color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 4px 10px; }
.formerly b { font: 600 11px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.card > header h2, .card > header h3 { margin: 0; font: 700 15px/1.2 var(--f-label); letter-spacing: .1em; text-transform: uppercase; }
.card > header .sub { font-size: 12.5px; color: var(--ink-3); }
.card .body { padding: 4px 16px 16px; }
.card .body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
a.stat:hover { text-decoration: none; border-color: var(--line-strong); }
.stat .label { font: 600 12px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.stat .value { font: 600 26px/1.1 var(--f-mono); letter-spacing: -.01em; }
.stat .hint { font-size: 12.5px; color: var(--ink-2); }
.stat.attn { border-left: 4px solid var(--amber); }
.stat.bad { border-left: 4px solid var(--bad); }
.stat.good { border-left: 4px solid var(--ok); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--slate); border-color: var(--slate); color: #fff; }
.btn.primary:hover { background: var(--slate-3); }
:root[data-theme="dark"] .btn.primary { background: var(--amber); border-color: var(--amber); color: var(--slate); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--slate); font-weight: 600; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px/1 var(--f-body); padding: 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-bg); color: var(--info); border-color: transparent; }

.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--info-bg); color: var(--ink); border: 1px solid transparent; font-size: 13.5px; }
.callout.warn { background: var(--warn-bg); }
.callout.bad { background: var(--bad-bg); }
.callout.ok { background: var(--ok-bg); }
.callout b { font-weight: 600; }

/* tables */
.table-tools { display: flex; gap: 8px; align-items: center; padding: 0 16px 10px; flex-wrap: wrap; }
.table-wrap { overflow: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font: 600 12px/1.2 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
table.t th.num { text-align: right; }
table.t th .arrow { color: var(--amber-ink); margin-left: 4px; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t tr.click { cursor: pointer; }
table.t tr.sel td { background: var(--warn-bg); }
table.t tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.empty b { display: block; font: 600 14px/1.4 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

/* forms */
.form { display: grid; gap: 14px; }
.form .cols { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .cols3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .field > .label { font: 600 12px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-3); }
input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], input[type=date], input[type=month], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
}
input:focus, select:focus, textarea:focus { border-color: var(--amber); outline: none; box-shadow: var(--focus); }
textarea { min-height: 72px; resize: vertical; }
input.inline, select.inline { width: auto; padding: 6px 9px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--slate); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 12px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--slate); color: #fff; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a, .tabs button { border: 0; background: none; padding: 10px 14px; font: 600 13.5px/1 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs .on { color: var(--ink); border-bottom-color: var(--amber); }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
dl.kv dt { font: 600 12px/1.6 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
dl.kv dd { margin: 0; }

/* steps (settlement lifecycle) */
.steps { display: flex; gap: 0; margin: 4px 0 2px; }
.steps .s { flex: 1; position: relative; padding: 10px 12px 10px 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; }
.steps .s:first-child { border-radius: 8px 0 0 8px; }
.steps .s:last-child { border-radius: 0 8px 8px 0; }
.steps .s b { display: block; font: 700 13px/1.2 var(--f-label); letter-spacing: .12em; text-transform: uppercase; }
.steps .s.done { background: var(--ok-bg); border-color: transparent; }
.steps .s.now { background: var(--warn-bg); border-color: var(--amber); }
.steps .s.void { background: var(--bad-bg); }

/* dialogs + toasts */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
dialog.wide { width: min(880px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(14, 25, 36, .55); }
dialog header { padding: 18px 20px 6px; }
dialog header h2 { margin: 0; font: 700 20px/1.2 var(--f-label); letter-spacing: .06em; text-transform: uppercase; }
dialog header p { margin: 6px 0 0; color: var(--ink-2); }
dialog .dbody { padding: 12px 20px; max-height: 65vh; overflow: auto; }
dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.err { color: var(--bad); font-size: 13px; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--slate); color: #fff; padding: 11px 14px; border-radius: 9px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 420px; border-left: 4px solid var(--amber); font-size: 13.5px; }
.toast.bad { border-left-color: #ff8a80; }

.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--ok); }
.bar.warn > i { background: var(--amber); }
.bar.bad > i { background: var(--bad); }

.loading { padding: 40px; text-align: center; color: var(--ink-3); }
.loading::before { content: ""; display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--amber); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -4px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); background: var(--slate); }
.auth-art { position: relative; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(1200px 500px at 10% 110%, rgba(242, 169, 59, .18), transparent 60%), linear-gradient(160deg, #142230, #0e1924); }
.auth-art::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 14px); pointer-events: none; }
.auth-art .mark { display: flex; align-items: center; gap: 14px; }
.auth-art .mark svg { width: 44px; height: 44px; }
.auth-art .mark b { font: 700 34px/1 var(--f-label); letter-spacing: .08em; }
.auth-art h2 { font: 700 46px/1.02 var(--f-label); letter-spacing: .02em; text-transform: uppercase; margin: 0 0 14px; max-width: 520px; }
.auth-art h2 em { font-style: normal; color: var(--amber); }
.auth-art p { color: #b8c6d3; max-width: 460px; font-size: 15px; }
.chevrons { display: flex; gap: 6px; margin-bottom: 18px; }
.chevrons i { width: 22px; height: 10px; background: var(--amber); clip-path: polygon(0 0, 50% 60%, 100% 0, 100% 40%, 50% 100%, 0 40%); }
.chevrons i:nth-child(2) { opacity: .7; } .chevrons i:nth-child(3) { opacity: .4; }
.auth-panel { background: var(--surface); display: flex; flex-direction: column; justify-content: center; padding: 48px; }
.auth-panel .box { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-panel h1 { font: 700 30px/1.1 var(--f-label); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 6px; }
.auth-panel .lead { color: var(--ink-2); margin: 0 0 22px; }
.auth-panel .btn { width: 100%; padding: 11px 14px; }
.credit { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.credit svg { width: 18px; height: 18px; color: var(--ink); }
.notice { font-size: 11.5px; color: #8796a5; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; max-width: 520px; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.qr img, .qr svg { width: 180px; height: 180px; image-rendering: pixelated; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font: 500 14px/1.6 var(--f-mono); background: var(--surface-2); padding: 12px; border-radius: 8px; border: 1px solid var(--line); }
.secret { font: 500 13px/1.5 var(--f-mono); word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: 6px; }

/* ---------- print (manifests, settlement sheets) ---------- */
@media print {
  .rail, .topbar, .actions, .no-print, .toasts, .table-tools, .formerly { display: none !important; }
  .app { display: block; }
  body { background: #fff; color: #000; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  table.t th { position: static; background: #eee; color: #000; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g-wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  .nav { display: none; }
  .rail.open .nav { display: block; }
  .g2, .form .cols, .form .cols3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .page { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .topbar .date { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- reports catalog ---------- */
.report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.report-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); color: var(--ink); text-decoration: none; }
.report-item:hover { background: var(--surface-2); }
.report-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.report-item b { font-weight: 600; }
.report-item .formerly { align-self: flex-start; }
.report-item.blocked b { color: var(--ink-2); }

/* ---------- small-screen menu button ---------- */
.menu-btn { display: none; color: var(--rail-strong); }
@media (max-width: 820px) { .menu-btn { display: inline-flex; } }

/* Light / Dark switch in the top bar */
.theme-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--surface); color: var(--ink-2); padding: 6px 10px; cursor: pointer; font-size: 12.5px; }
.theme-switch button + button { border-left: 1px solid var(--line); }
.theme-switch button svg { width: 14px; height: 14px; }
.theme-switch button[aria-pressed="true"] { background: var(--slate); color: #fff; }
:root[data-theme="dark"] .theme-switch button[aria-pressed="true"] { background: var(--amber); color: var(--slate); }
@media (max-width: 820px) { .theme-switch .lbl { display: none; } }
