@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/ibm-plex-serif-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/ibm-plex-serif-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Light palette */
  --bg: #F3F4F8;
  --bg-panel: #F8F9FC;
  --surface: #FFFFFF;
  --surface-alt: #FAFBFD;
  --border: #DDE1EC;
  --border-strong: #CBD0DD;
  --divider: #EDEFF4;

  --navy-900: #00205B;
  --navy-800: #072B6A;
  --navy-700: #14387E;
  --navy-600: #274C9B;
  /* Pre-app canvas, used by the public activation / console boot screens
     (.activation-public) and the sign-in frame (.auth-shell), so pre-login and
     post-login read as one product. Porcelain, the light inverse of the earlier
     navy canvas: every surface that draws the logo is light (decision of
     2026-10-06), and it stays light in the dark theme. */
  --bg-canvas: #F3F4F8;
  --bg-page: var(--bg-canvas);
  --heading-900: var(--navy-900);
  --heading-800: var(--navy-800);
  --heading-700: var(--navy-700);
  --accent: #8A6A3A;
  --accent-soft: #F5EFE4;
  --accent-ink: #6B5129;

  --ink-900: #0B1220;
  --ink-700: #28375A;
  --ink-500: #5A6478;
  --ink-400: #646C80;
  --ink-300: #A6ACBB;

  --ready-bg: #E5F1EA;
  --ready-fg: #1F6B43;
  --ready-dot: #2D8A5A;

  --review-bg: #E5ECF8;
  --review-fg: #274C9B;
  --review-dot: #597AB6;
  --warn: #274C9B;
  --warn-soft: #EBF0FA;
  --warning-strong: #274C9B;

  --hold-bg: #F8E2DE;
  --hold-fg: #9C2E1B;
  --hold-dot: #C7472F;

  --excluded-bg: #EDEDED;
  --excluded-fg: #585858;
  --excluded-dot: #929292;

  --shadow-sm: 0 1px 0 rgba(11, 18, 32, 0.04), 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-md: 0 1px 2px rgba(11, 18, 32, 0.05), 0 6px 18px -8px rgba(11, 18, 32, 0.10);
  --shadow-lg: 0 8px 28px -12px rgba(11, 18, 32, 0.18);

  --radius-sm: 6px;
  --radius-compact: 7px;
  --radius-control: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --control-height: 42px;
  --control-height-compact: 34px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  display: block;
  color: var(--ink-500);
  font: 700 12px/1.2 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Scaler (fixed-width desktop canvas) ---------- */
html, body { background: #0A1422; }
body.dark { background: #050B16; }

/* ---------- App shell ---------- */
.app {
  min-height: 900px;
  background: var(--bg);
}

/* ---------- Top nav ---------- */
.topbar {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 32px;
  background: #FFFFFF;
  color: #0B1220;
  border-bottom: 1px solid #DDE1EC;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04);
  gap: 36px;
}
.brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #FFFFFF;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius:var(--radius-sm);
  color: #00205B;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav a:hover { background: rgba(0, 32, 91, 0.06); color: #00205B; }
.nav a.active {
  background: #00205B;
  color: #FFFFFF;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.run-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius:var(--radius-sm);
  background: rgba(0, 32, 91, 0.03);
  border: 1px solid rgba(0, 32, 91, 0.14);
  color: #00205B;
  font-size: 13px;
  font-weight: 500;
}
.run-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #5DB07F;
  box-shadow: 0 0 0 3px rgba(93, 176, 127, 0.18);
}
.icon-btn {
  width: 32px; height: 32px;
  border-radius:var(--radius-sm);
  background: transparent;
  border: 1px solid rgba(0, 32, 91, 0.18);
  color: #00205B;
  display: grid; place-items: center;
  transition: background 0.12s ease;
}
.icon-btn:hover { background: rgba(0, 32, 91, 0.06); color: #00205B; }

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius:var(--radius-sm);
  background: rgba(0, 32, 91, 0.03);
  border: 1px solid rgba(0, 32, 91, 0.14);
  color: #00205B;
  font-size: 13px;
  cursor: pointer;
  /* Rendered as a <button> when the shell supplies a sign-out handler. */
  font-family: inherit;
  text-align: left;
  margin: 0;
  transition: background 0.12s ease;
}
button.user-menu:hover,
button.user-menu[aria-expanded="true"] { background: rgba(0, 32, 91, 0.06); }
button.user-menu[aria-expanded="true"] > svg { transform: rotate(180deg); }
.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3D62B3, #274C9B);
  color: white;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.user-menu .user-meta { line-height: 1.15; }
.user-menu .user-name { font-weight: 500; color: #00205B; font-size: 13px; }
.user-menu .user-org { font-size: 11px; color: #5A6478; }

/* Account dropdown anchored to the user chip. Sign out lives here so the
   in-page workspace cards stay free of session controls. */
.user-menu-wrap { position: relative; }
.user-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 200px;
  padding: 6px;
  border-radius:var(--radius-sm);
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(4, 17, 53, 0.42);
}
.user-menu-identity {
  display: grid;
  gap: 2px;
  padding: 6px 10px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.user-menu-identity b { color: #FFFFFF; font-size: 13px; font-weight: 500; }
.user-menu-identity small { color: #92A2C2; font-size: 11px; }
.user-menu-panel [role="menuitem"] {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius:var(--radius-sm);
  background: transparent;
  color: #DFE4F2;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.user-menu-panel [role="menuitem"]:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }

/* ---------- Page container ---------- */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 28px 32px 32px;
  max-width: 1480px;
  margin: 0 auto;
}

/* ---------- Page title ---------- */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.page-head .titles { flex: 1; min-width: 0; }
.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.crumbs a { color: var(--ink-500); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--ink-300); }

.page-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing:0;
  margin: 0 0 6px;
  color: var(--heading-900);
  display: flex;
  align-items: center;
  gap: 14px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  background: var(--review-bg);
  color: var(--review-fg);
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex: none;
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--review-dot);
}
.page-sub {
  font-size: 15px;
  color: var(--ink-500);
  margin: 0;
  max-width: 720px;
}

.actions { display: flex; align-items: center; gap: var(--space-2); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 18px;
  border-radius:var(--radius-control);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.06s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary {
  background: #C9A66B;
  color: #08132B;
  border-color: #C9A66B;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, var(--shadow-sm);
}
.btn-primary:hover { background: #D8BA86; border-color: #D8BA86; }
.btn-secondary {
  background: var(--surface);
  color: var(--heading-800);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: #F5F7FB; border-color: #B9BFCE; }
.btn-danger {
  background: var(--hold-bg);
  color: var(--hold-fg);
  border-color: var(--hold-dot);
}
.btn-danger:hover { box-shadow: inset 0 0 0 1px var(--hold-fg); }
.btn-sm { height: var(--control-height-compact); padding: 0 var(--space-3); font-size: 14px; border-radius:var(--radius-sm); }

/* ---------- Stepper ---------- */
.stepper {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius:var(--radius);
  padding: 4px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: relative;
  min-width: 0;
}
.step + .step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px; height: 26px;
  background: var(--divider);
  transform: translateY(-50%);
}

/* ---------- Summary cards ---------- */
.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.sum-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.sum-card .label {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sum-card .value {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing:0;
  color: var(--heading-900);
  margin-top: 6px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.sum-card .foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-500);
}
.sum-card .foot .delta { color: var(--ready-fg); font-weight: 500; }
.sum-card .foot .delta.warn { color: var(--review-fg); }

.sum-card.attention {
  background: #F7FBFF;
  border-color: #D2E0FA;
}
.sum-card.attention .value { color: #7A4408; }

/* ---------- Toolbar ---------- */
.workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--divider);
  background: linear-gradient(to bottom, #FBFCFE, #FFFFFF);
}
.tab-group {
  display: inline-flex;
  background: #EFF2F8;
  border-radius:var(--radius-control);
  padding: 3px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius:var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-500);
  background: transparent;
  border: 0;
  transition: background 0.12s, color 0.12s;
}
.tab:hover { color: var(--ink-900); }
.tab.active {
  background: var(--surface);
  color: var(--heading-900);
  box-shadow: 0 1px 0 rgba(11, 18, 32, 0.06), 0 1px 3px rgba(11, 18, 32, 0.06);
}
.tab .count {
  background: #DDE1EC;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
}
.tab.active .count { background: var(--accent-soft); color: var(--accent-ink); }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius:var(--radius-compact);
  background: var(--surface);
  border: 1px solid var(--border);
  width: 280px;
  margin-left: auto;
}
.search input {
  border: 0; outline: 0; background: transparent;
  font-size: 14px;
  color: var(--ink-900);
  width: 100%;
}
.search input::placeholder { color: var(--ink-400); }
.search svg { color: var(--ink-400); flex: none; }
.search-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-400);
  background: #F0F3F9;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}


/* ---------- Table ---------- */
.tbl-wrap { width: 100%; overflow-x: auto; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.tbl thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: #F6F8FC;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl thead th.num { text-align: right; }
.tbl tbody td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--divider);
  color: var(--ink-700);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.1s; }
.tbl tbody tr:hover { background: #F9FAFD; }
.tbl tbody tr.selected { background: #F0F3FC; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 14px; color: var(--ink-900); }

.cb {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  background: #FFFFFF;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.12s;
  vertical-align: middle;
}
.cb:hover { border-color: var(--accent); }
.cb.checked {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: white;
}
.cb svg { width: 11px; height: 11px; display: block; }

.hh {
  display: flex; align-items: center; gap: 12px;
}
.hh-init {
  width: 30px; height: 30px;
  border-radius:var(--radius-compact);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--heading-700);
  background: #EAEEF9;
  border: 1px solid #D5DDEF;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  flex: none;
}
.hh-text { line-height: 1.2; }
.hh-name { color: var(--heading-900); font-weight: 500; font-size: 15px; }
.hh-meta { color: var(--ink-400); font-size: 13px; margin-top: 2px; font-family: var(--font-mono); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius:var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge.ready { background: var(--ready-bg); color: var(--ready-fg); }
.badge.ready .dot { background: var(--ready-dot); }
.badge.review { background: var(--review-bg); color: var(--review-fg); }
.badge.review .dot { background: var(--review-dot); }
.badge.hold { background: var(--hold-bg); color: var(--hold-fg); }
.badge.hold .dot { background: var(--hold-dot); }
.badge.excluded { background: var(--excluded-bg); color: var(--excluded-fg); }
.badge.excluded .dot { background: var(--excluded-dot); }

.note { font-size: 14px; color: var(--ink-500); }
.note.warn { color: var(--review-fg); }
.note.hold { color: var(--hold-fg); }
.note.excluded { color: var(--excluded-fg); }
.note.ready { color: var(--ready-fg); }
.note .resolve {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.note .resolve:hover { color: var(--accent-ink); }


.tbl-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--divider);
  background: var(--surface-alt);
  font-size: 14px;
  color: var(--ink-500);
}
.tbl-foot .total {
  display: flex; align-items: center; gap: 18px;
  color: var(--ink-700);
}
.tbl-foot .total .amount {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--heading-900);
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #F0F3FC;
  border-bottom: 1px solid #D9E0F1;
  color: var(--heading-800);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Right panel ---------- */
.side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.checklist { padding: 6px 8px 10px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius:var(--radius-control);
}
.check + .check { border-top: 1px solid var(--divider); }

.activity {
  display: flex;
  gap: 12px;
  padding: 10px 18px;
  font-size: 14px;
}

/* ---------- Audit strip ---------- */
.audit {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 4px;
}
.audit .group { display: flex; align-items: center; gap: 8px; }
.audit .label { color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 500; }
.audit .value { color: var(--ink-900); font-weight: 500; font-size: 13px; }
.audit .value.mono { font-family: var(--font-mono); font-weight: 400; }
.audit .right { margin-left: auto; display: flex; gap: 18px; align-items: center; }

/* ---------- Modal ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border-radius: 12px;
  width: 720px;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px -16px rgba(0, 32, 91, 0.4);
  overflow: hidden;
  animation: pop 0.18s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop {
  from { transform: translateY(8px) scale(0.985); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* utility */

/* selection ring on focus */
:where(button, input, select, textarea, a, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Dark mode ---------- */
body.dark {
  /* surfaces — 3 separated elevation steps */
  --bg: #08132B;
  --bg-panel: #0E1937;
  --surface: #142449;
  --surface-alt: #182B54;
  --border: #26395F;
  --border-strong: #3A4E73;
  --divider: #1D2E54;

  /* brand navy — top bar sits just below the bg */
  --navy-900: #08132B;
  --navy-800: #122146;
  --navy-700: #132D5F;
  --heading-900: var(--ink-900);
  --heading-800: var(--ink-700);
  --heading-700: var(--ink-700);
  --topbar-bg: #060F23;

  /* accent — brightened so it pops on dark */
  --accent: #C9A66B;
  --accent-soft: #2C2718;
  --accent-ink: #E3CFA6;

  /* text — near-white top, never pure #FFF */
  --ink-900: #E8EBF5;
  --ink-700: #C7CEDE;
  --ink-500: #9AA3C0;
  --ink-400: #848FA7;
  --ink-300: #5B647A;

  /* status — dark tinted bg + brightened fg */
  --ready-bg: #123326; --ready-fg: #5FCB8E; --ready-dot: #43B377;
  --review-bg: #283F6A; --review-fg: #C3D5F6; --review-dot: #7C9EDD;
  --hold-bg: #3A1C14; --hold-fg: #ED8E78; --hold-dot: #D9684E;
  --excluded-bg: #2E2E2E; --excluded-fg: #ABABAB; --excluded-dot: #696969;

  /* shadows — deeper, plus a hairline top highlight for crisp card edges */
  --shadow-sm: 0 1px 0 rgba(255,255,255,.03) inset, 0 1px 2px rgba(0,0,0,.35);
  --shadow-md: 0 1px 0 rgba(255,255,255,.04) inset, 0 8px 24px -10px rgba(0,0,0,.6);

  color: var(--ink-900);
  background: var(--bg);
}
body.dark .topbar { background: var(--topbar-bg); color: #E8EBF5; border-bottom-color: var(--bg); box-shadow: none; }
body.dark .nav a { color: #C7D0E6; }
body.dark .nav a:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
body.dark .nav a.active { background: rgba(70, 114, 197, 0.22); color: #FFFFFF; }
body.dark .run-chip { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.10); color: #DFE4F2; }
body.dark .icon-btn { border-color: rgba(255, 255, 255, 0.10); color: #C7D0E6; }
body.dark .icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: #FFF; }
body.dark .user-menu { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); color: #DFE4F2; }
body.dark button.user-menu:hover,
body.dark button.user-menu[aria-expanded="true"] { background: rgba(255, 255, 255, 0.08); }
body.dark .user-menu .user-name { color: #FFFFFF; }
body.dark .user-menu .user-org { color: #92A2C2; }
/* The account arrow's color is written in the JSX (slate, for the light bar); the navy bar needs it light. */
body.dark .user-menu > svg { color: #92A2C2 !important; }
body.dark .hh-init { background: #12316E; border-color: #29457C; color: #BDCEEF; }
body.dark .tbl thead th { background: #0A1C44; color: var(--ink-500); }
body.dark .tbl tbody tr:hover { background: #0C265A; }
body.dark .tbl tbody tr.selected { background: #112F6B; }
body.dark .tab-group { background: #0A1C44; }
body.dark .tab.active { background: var(--surface); color: var(--ink-900); }
body.dark .tbl-foot { background: var(--surface-alt); }
body.dark .toolbar { background: var(--surface); }
body.dark .audit { background: var(--surface); border-top-color: var(--border); }
body.dark .bulk-bar { background: #092968; border-bottom-color: #183264; color: #C7D0E6; }
body.dark .btn-secondary {
  background: var(--surface-alt);
  border-color: var(--border-strong);
  color: var(--ink-700);
}
body.dark .btn-secondary:hover { background: var(--surface); border-color: var(--accent); }
body.dark .tab .count,
body.dark .search-kbd { background: var(--surface-alt); color: var(--ink-700); }
body.dark .sum-card.attention { background: #1B212C; border-color: #333D4F; }
body.dark .sum-card.attention .value { color: #A5BEED; }
