/* TAM procurement dashboard — theme v2 (1A.5g). A two-theme token system: light
   (default) + dark, both WCAG-AA (scripts/contrast-audit.js audits BOTH). Every
   color the UI paints comes from a token declared in the :root (light) or
   [data-theme="dark"] block below — components reference tokens ONLY, so there is
   ZERO literal hex/rgb outside these two blocks (scripts/theme-lint.js enforces).

   Layered on the tokens: FUNCTIONAL depth (quiet chrome-only gradient washes +
   a three-tier elevation system), a coherent MOTION system (two durations, one
   easing, reduced-motion aware), and one shared FORM vocabulary (uniform 42px
   fields, an alive focus ring, three button tiers, custom-chevron selects) used by
   every form — login, profile, admin, triage. Brand anchors are UNCHANGED: navy /
   tam-blue / tam-red semantics, Barlow, the label map, and red-is-urgency-only. */

/* ============================================================================
   LIGHT THEME (default) — every color token lives here or in the dark block.
   ========================================================================== */
:root {
  /* brand — client colors, identical in both themes */
  --navy-ink: #1b2a4a;      /* header / nav / footer chrome surface */
  --navy-hair: #10192e;     /* 1px hairline under the navy header */
  --tam-blue: #556795;      /* SOLID interactive fill (buttons, toggles, dots) */
  --tam-blue-hover: #47547a;
  --tam-blue-press: #3d496b;
  --tam-red: #b20000;       /* RESERVED: one primary action per screen + urgency */
  --tam-red-hover: #990000;
  --tam-red-press: #7d0000;

  /* accent — interactive TEXT / BORDER (links, focus ring, hover borders). Split
     from the solid fill so dark can lighten it for AA without moving the brand fill. */
  --accent: #556795;

  /* neutrals + surfaces (light: page lifted off flat gray, borders w/ presence) */
  --page: #eef1f6;
  --card: #ffffff;
  --card-sunken: #f4f6fa;   /* de-emphasized card (REJECT KPI) */
  --thead: #f3f6fb;
  --field-bg: #f7f9fc;      /* form field fill — a breath off the card */
  --surface-inset: #f1f4f9; /* reason / details / checklist notes */
  --surface-inset-2: #eef2f8;
  --surface-hover: #e9eef7; /* menu-item / chip hover wash */
  --tag-bg: #e8edf7;        /* portal / role pill background */
  --code-bg: rgba(15, 20, 32, 0.06);
  --border: #ccd3e0;
  --border-strong: #aab3c4;

  /* text */
  --text: #232c3b;
  --text-soft: #55606f;
  --text-faint: #5c6675;    /* 12–13px meta; AA on card, page, thead, sunken */
  --heading: #1b2a4a;       /* on-card headings / emphasis (navy in light) */
  --on-brand: #ffffff;      /* text + icons on navy / blue / red fills */

  /* chrome-on-navy (the header stays dark navy in BOTH themes) */
  --navy-nav: #c3ccdf;
  --navy-sub: #b7c0d6;
  --chrome-hover: rgba(255, 255, 255, 0.08);
  --chrome-active: rgba(85, 103, 149, 0.55);
  --danger-chrome-text: #e6b8b8;
  --danger-chrome-hover: rgba(178, 0, 0, 0.45);
  --danger-solid: #b20000;  /* 1A.5h: solid danger fill (hard-delete); white text AA */

  /* status — FILL (white badge text rides on these; ratio is theme-independent) */
  --match: #167a48;
  --satellite: #8a5a0d;
  --reject: #6b7280;
  --amber-strip: #8a5a0d;   /* left-edge accent on SATELLITE rows/cards */
  /* status — INK (same status as on-surface text/glyph; lightened in dark) */
  --match-ink: #167a48;
  --satellite-ink: #8a5a0d;
  --reject-ink: #6b7280;
  --red-ink: #b20000;       /* urgency text on a card surface */
  /* triage status fills */
  --keep: #47546f;
  --archived: #3f4653;

  /* feedback banners */
  --error-bg: #fdecec;
  --error-border: #f3b4b4;
  --error-text: #7a1010;
  --ok-bg: #eaf6ec;
  --ok-border: #b6ddbf;
  --ok-text: #1e5b2c;

  /* overlay + skeleton shimmer */
  --overlay: rgba(27, 42, 74, 0.42);
  --skel-base: #e7ecf3;
  --skel-sheen: #dbe2ec;

  /* interaction tints + focus glow */
  --blue-tint: rgba(85, 103, 149, 0.08);
  --blue-tint-strong: rgba(85, 103, 149, 0.14);
  --focus-glow: rgba(85, 103, 149, 0.32);
  --danger-glow: rgba(178, 0, 0, 0.20);

  /* FUNCTIONAL gradients — chrome ONLY, ≤6% lightness delta (sturdy, not glossy) */
  --grad-header: linear-gradient(180deg, #1f3054 0%, #182640 100%);
  --grad-btn-primary: linear-gradient(180deg, #c00000 0%, #b20000 100%);
  --grad-btn-go: linear-gradient(180deg, #5e70a1 0%, #556795 100%);
  --grad-kpi: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  --login-grad: linear-gradient(180deg, #e7ebf3 0%, #eef1f6 100%);

  /* three-tier ELEVATION (dark redefines all three below) */
  --elev-1: 0 1px 2px rgba(20, 30, 50, 0.08), 0 2px 8px rgba(20, 30, 50, 0.06);
  --elev-2: 0 2px 6px rgba(20, 30, 50, 0.12), 0 8px 24px rgba(20, 30, 50, 0.10);
  --elev-3: 0 4px 12px rgba(20, 30, 50, 0.16), 0 18px 48px rgba(20, 30, 50, 0.16);
  --drawer-shadow: -4px 0 24px rgba(20, 30, 50, 0.22);
  /* legacy aliases (kept so existing rules read cleanly) */
  --shadow: var(--elev-1);
  --shadow-md: var(--elev-2);

  /* type + geometry */
  --ui-font: "Barlow", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --data-font: "Barlow Semi Condensed", "Roboto Condensed", "Segoe UI", system-ui, sans-serif;
  --radius: 6px;
  --radius-lg: 8px;
  --field-h: 42px;

  /* MOTION — two durations, one easing curve. Nothing bounces, nothing loops. */
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --t-fast: 150ms var(--ease);
  --t-base: 200ms var(--ease);

  color-scheme: light;
}

/* ============================================================================
   DARK THEME — a real deep navy-slate palette (not an inversion). Elevated
   cards, adjusted status inks for dark AA, deeper shadows + 1px light borders.
   ========================================================================== */
[data-theme="dark"] {
  --navy-ink: #10192e;
  --navy-hair: #0a1120;
  --accent: #9db0de;

  --page: #0b0f18;
  --card: #161c2b;
  --card-sunken: #121826;
  --thead: #1b2333;
  --field-bg: #1c2334;
  --surface-inset: #1a2130;
  --surface-inset-2: #1a2130;
  --surface-hover: #232c40;
  --tag-bg: #232c40;
  --code-bg: rgba(255, 255, 255, 0.09);
  --border: #2c3648;
  --border-strong: #3d4a61;

  --text: #e6eaf2;
  --text-soft: #a7b0c2;
  --text-faint: #8b95a8;
  --heading: #e9edf5;
  --on-brand: #ffffff;

  --navy-nav: #c3ccdf;
  --navy-sub: #b7c0d6;
  --chrome-hover: rgba(255, 255, 255, 0.10);
  --chrome-active: rgba(85, 103, 149, 0.55);
  --danger-chrome-text: #e6b8b8;
  --danger-chrome-hover: rgba(178, 0, 0, 0.45);
  --danger-solid: #c62828;  /* 1A.5h: brighter for dark surfaces; white text still AA */

  /* status fills: white-on-fill ratio is theme-independent, so these hold AA */
  --match: #167a48;
  --satellite: #8a5a0d;
  --reject: #565e6d;
  --amber-strip: #c88a2a;
  /* status inks: lightened for legibility ON the dark card surface */
  --match-ink: #45c98a;
  --satellite-ink: #e0a53a;
  --reject-ink: #9aa3b4;
  --red-ink: #ff7a7a;
  --keep: #5a6a8c;
  --archived: #4a5468;

  --error-bg: #3a1e1e;
  --error-border: #6e2f2f;
  --error-text: #ffb4b4;
  --ok-bg: #16301f;
  --ok-border: #2f5e3f;
  --ok-text: #86d69f;

  --overlay: rgba(0, 0, 0, 0.58);
  --skel-base: #1e2637;
  --skel-sheen: #283247;

  --blue-tint: rgba(157, 176, 222, 0.10);
  --blue-tint-strong: rgba(157, 176, 222, 0.18);
  --focus-glow: rgba(157, 176, 222, 0.32);
  --danger-glow: rgba(255, 122, 122, 0.26);

  --grad-header: linear-gradient(180deg, #141d31 0%, #0e1626 100%);
  --grad-btn-primary: linear-gradient(180deg, #c00000 0%, #b20000 100%);
  --grad-btn-go: linear-gradient(180deg, #5e70a1 0%, #556795 100%);
  --grad-kpi: linear-gradient(180deg, #1a2132 0%, #151b29 100%);
  --login-grad: linear-gradient(180deg, #0d1220 0%, #0b0f18 100%);

  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.40), 0 2px 8px rgba(0, 0, 0, 0.34);
  --elev-2: 0 2px 8px rgba(0, 0, 0, 0.48), 0 10px 28px rgba(0, 0, 0, 0.42);
  --elev-3: 0 6px 16px rgba(0, 0, 0, 0.55), 0 20px 52px rgba(0, 0, 0, 0.50);
  --drawer-shadow: -8px 0 32px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  transition: background var(--t-base), color var(--t-base);
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); }

/* MOTION accessibility — collapse every transition/animation to instant. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.boot-splash { padding: 40px; color: var(--text-faint); }
.app { min-height: 100vh; display: flex; flex-direction: column; }

/* --- top bar ------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--grad-header);
  color: var(--on-brand);
  padding: 12px 20px;
  border-bottom: 1px solid var(--navy-hair);
  box-shadow: var(--elev-2);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__brand { display: flex; align-items: center; gap: 12px; }
.logo { height: 38px; width: auto; display: block; }
.logo-fallback {
  height: 38px; min-width: 38px; padding: 0 10px;
  display: grid; place-items: center;
  background: var(--tam-blue); color: var(--on-brand); font-weight: 700;
  letter-spacing: 1px; border-radius: var(--radius);
}
/* baseline-aligned lockup: wordmark + sub stacked tight against the mark */
.lockup { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.lockup__name { font-weight: 700; font-size: 17px; letter-spacing: 0.2px; }
.lockup__sub { font-size: 11px; color: var(--navy-sub); text-transform: uppercase; letter-spacing: 1.5px; }

.topbar__nav { display: flex; gap: 4px; margin-left: 8px; }
.navlink {
  background: transparent; border: 0; color: var(--navy-nav); cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius); font-weight: 600;
  min-height: 40px; transition: background var(--t-fast), color var(--t-fast);
}
.navlink:hover { color: var(--on-brand); background: var(--chrome-hover); }
.navlink--active { color: var(--on-brand); background: var(--chrome-active); }
.topbar__session { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar__user {
  font-family: var(--data-font); font-size: 13px; color: var(--navy-nav);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.navlink--logout { color: var(--danger-chrome-text); }
.navlink--logout:hover { color: var(--on-brand); background: var(--danger-chrome-hover); }

/* Theme toggle (sun/moon) — 44px target, quiet on the navy chrome. */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-width: 44px; padding: 0;
  background: transparent; border: 0; border-radius: var(--radius);
  color: var(--navy-nav); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.theme-toggle:hover { color: var(--on-brand); background: var(--chrome-hover); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }

/* --- main ---------------------------------------------------------------- */
.main { max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px; flex: 1 0 auto; }

/* --- KPI strip: answer "is everything okay?" in one glance ---------------- */
.kpis {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-bottom: 18px;
}
.kpi {
  background: var(--grad-kpi); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--elev-1); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.kpi__n { font-family: var(--data-font); font-size: 34px; font-weight: 700; line-height: 1; color: var(--text); transition: color var(--t-base); }
.kpi__label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-soft); font-weight: 600; }
.kpi__hint { font-size: 12px; color: var(--text-faint); }
/* SATELLITE = the north-star number: largest, amber accent, its own left edge */
.kpi--satellite { border-left: 4px solid var(--satellite-ink); }
.kpi--satellite .kpi__n { font-size: 46px; color: var(--satellite-ink); }
.kpi--match .kpi__n { color: var(--match-ink); }
/* REJECT is noise Juan never acts on: de-emphasized, muted, smaller */
.kpi--reject { background: var(--card-sunken); }
.kpi--reject .kpi__n { font-size: 26px; color: var(--text-faint); font-weight: 600; }
.kpi--reject .kpi__label { color: var(--text-faint); }

/* saved-search chips */
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chips__label { font-size: 12px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 1px; }
.chip {
  display: inline-flex; align-items: stretch; border: 1px solid var(--border-strong);
  border-radius: 999px; overflow: hidden; background: var(--card);
}
.chip__apply {
  border: 0; background: transparent; cursor: pointer; padding: 6px 12px;
  color: var(--accent); font-weight: 600; min-height: 34px; transition: background var(--t-fast);
}
.chip__apply:hover { background: var(--surface-hover); }
.chip__x {
  border: 0; border-left: 1px solid var(--border); background: transparent;
  cursor: pointer; padding: 0 10px; color: var(--text-faint); font-size: 16px; transition: color var(--t-fast);
}
.chip__x:hover { color: var(--red-ink); }

/* filter bar — rides the surface system */
.filters {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; box-shadow: var(--elev-1); margin-bottom: 16px;
}
.filters__group { display: flex; flex-direction: column; gap: 6px; }
.filters__group--grow { flex: 1 1 220px; }
.filters__label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-soft); }
.toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle {
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text-soft);
  padding: 7px 12px; border-radius: var(--radius); cursor: pointer; min-height: 38px;
  font-weight: 600; font-size: 13px; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.toggle:hover { border-color: var(--accent); }
.toggle--on { background: var(--tam-blue); border-color: var(--tam-blue); color: var(--on-brand); }
.toggle--satellite.toggle--on { background: var(--satellite); border-color: var(--satellite); }
.toggle--match.toggle--on { background: var(--match); border-color: var(--match); }
.toggle--reject.toggle--on { background: var(--reject); border-color: var(--reject); }

/* ============================================================================
   FORM SYSTEM (1A.5g) — ONE field/button/select vocabulary, used everywhere
   (login, profile, admin, filters, triage). No per-form one-off input styling.
   ========================================================================== */

/* Field: label ABOVE the control, uniform gap. */
.field { display: flex; flex-direction: column; gap: 6px; }
/* Label: 13px medium, sentence case — the finished look (no sparse microcaps). */
.field__label { font-size: 13px; font-weight: 500; color: var(--text-soft); letter-spacing: 0.1px; }
.field__value { color: var(--text); }
/* Inline field-level error message (paired with the red ring — never color-only). */
.field__error { font-size: 12px; font-weight: 500; color: var(--red-ink); }

/* The one input surface. Uniform 42px, subtle fill, resting 1px border. */
.input {
  min-height: var(--field-h); min-width: 150px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--field-bg); color: var(--text);
  padding: 9px 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input::placeholder { color: var(--text-faint); }
.input--grow { width: 100%; }
/* Inside a .field (a stretch flex column) the control fills the column width. */
.field .input { width: 100%; min-width: 0; }
/* Focus: a 2px accent ring + soft outer glow — the moment feels alive. */
.input:focus, .input:focus-visible {
  outline: none; border-color: var(--accent); background: var(--card);
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--focus-glow);
}
/* Invalid: a quiet red ring; the message rides below via .field__error. */
.input--invalid, .input[aria-invalid="true"] { border-color: var(--red-ink); }
.input--invalid:focus, .input[aria-invalid="true"]:focus {
  border-color: var(--red-ink); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--danger-glow);
}

/* Custom-chevron select — image-free (CSS-drawn), same box/height/focus as inputs.
   The naked OS select is the tell of an unstyled app; this retires it. */
select.input {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 34px; cursor: pointer;
  background-color: var(--field-bg);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select.input:focus { background-color: var(--card); }

/* Buttons — THREE tiers. Sized to content + padding; NO full-width slabs on
   desktop (full width is a mobile-breakpoint behavior only, below). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text);
  padding: 0 16px; min-height: var(--field-h); border-radius: var(--radius);
  font-weight: 600; cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast),
              transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--focus-glow); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* PRIMARY — solid brand-red, barely-there top-light, hover lift + shadow deepen. */
.btn--primary { background: var(--grad-btn-primary); border-color: var(--tam-red); color: var(--on-brand); }
.btn--primary:hover:not(:disabled) { border-color: var(--tam-red-hover); transform: translateY(-1px); box-shadow: var(--elev-2); }
.btn--primary:active:not(:disabled) { background: var(--tam-red-press); border-color: var(--tam-red-press); transform: translateY(1px); box-shadow: none; }
/* GO — solid tam-blue (external nav / non-red primary; red stays urgency-only). */
.btn--go { background: var(--grad-btn-go); border-color: var(--tam-blue); color: var(--on-brand); }
.btn--go:hover:not(:disabled) { border-color: var(--tam-blue-hover); transform: translateY(-1px); box-shadow: var(--elev-2); }
.btn--go:active:not(:disabled) { background: var(--tam-blue-press); border-color: var(--tam-blue-press); transform: translateY(1px); box-shadow: none; }
/* SECONDARY — outline in accent, fill-on-hover wash. */
.btn--secondary { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn--secondary:hover:not(:disabled) { background: var(--blue-tint); border-color: var(--accent); }
/* TERTIARY — ghost. */
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-hover); border-color: transparent; }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 12px; }

/* Action row — where a form's submit lives so it is content-sized + right-aligned
   (NOT a stretched slab). Full-width is applied only at the mobile breakpoint. */
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* Quiet saved-confirm (mirrors the triage confirm) for form success states. */
.form-saved {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 13px; font-weight: 600; color: var(--ok-text);
  background: var(--ok-bg); border: 1px solid var(--ok-border);
  border-radius: 999px; padding: 4px 12px;
}

/* --- states -------------------------------------------------------------- */
.state {
  background: var(--card); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 44px 40px; text-align: center; color: var(--text-soft);
}
.state__title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.state__hint { color: var(--text-soft); margin-bottom: 16px; }
.state__reset {
  border: 1px solid var(--accent); background: var(--blue-tint); color: var(--accent);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; min-height: 38px;
  transition: background var(--t-fast);
}
.state__reset:hover { background: var(--blue-tint-strong); }
.banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; font-weight: 600; }
.banner--error { background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); }
/* Quiet "bid not found" notice for a stale deep link (1A.5i): a soft, dismissible
   line — never an alarm. Neutral surface + soft text, with a small × to dismiss. */
.banner--notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-inset); border: 1px solid var(--border);
  color: var(--text-soft); font-weight: 600;
}
.banner__dismiss {
  border: 0; background: none; color: var(--text-faint); font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 4px; min-height: 28px;
}
.banner__dismiss:hover { color: var(--accent); }
.muted { color: var(--text-faint); }

/* --- bids table ---------------------------------------------------------- */
.table-wrap {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--elev-1); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
.bids { width: 100%; border-collapse: collapse; font-family: var(--data-font); }
.bids thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-soft); padding: 12px 14px; border-bottom: 2px solid var(--border-strong);
  white-space: nowrap; background: var(--thead);
}
.bids tbody td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.row { cursor: pointer; transition: background var(--t-fast), box-shadow var(--t-fast); }
/* row hover: a quiet wash + a 1px lift (inset top/bottom hairline reads as raise). */
.row:hover { background: var(--blue-tint); }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* refined 3px amber left-edge strip on SATELLITE rows */
.row--satellite td:first-child { box-shadow: inset 3px 0 0 var(--amber-strip); }

.th-due, .th-dz { color: var(--heading); }
.cell-due { white-space: nowrap; }
.due-date { font-size: 16px; font-weight: 700; color: var(--heading); display: block; }
/* urgency hierarchy: <=3d red+bold, 4-7d amber, else neutral */
.cell-due--urgent .due-date { color: var(--red-ink); }
.cell-due--soon .due-date { color: var(--satellite-ink); }
.cell-due--past .due-date { color: var(--text-faint); }
.due-flag {
  display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 700;
  color: var(--red-ink); text-transform: uppercase; letter-spacing: 0.6px;
}
.due-flag--past { color: var(--text-faint); }

/* DISTANCE / ZONE — Juan's triage signal, parsed from the decision reason */
.cell-dz { white-space: nowrap; }
.cell-dz__dist { font-size: 15px; font-weight: 700; color: var(--text); display: block; }
.cell-dz__zone { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.cell-dz__tag {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--satellite-ink); margin-left: 4px;
}
.cell-dz--fallback { font-weight: 600; color: var(--text-soft); }

.cell-title { max-width: 340px; }
.cell-title__main {
  font-weight: 600; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cell-title__cat { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.cell-agency { color: var(--text-soft); max-width: 220px; }
.cell-value { font-weight: 700; white-space: nowrap; }
.cell-value--empty { color: var(--text-faint); opacity: 0.4; font-weight: 600; }
.portal-tag {
  display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--tag-bg); color: var(--accent); font-weight: 600;
}

/* verdict badges — never --tam-red */
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase; color: var(--on-brand); white-space: nowrap;
}
.badge--match { background: var(--match); }
.badge--satellite { background: var(--satellite); }
.badge--reject { background: var(--reject); }
.badge--unknown { background: var(--text-faint); }

/* --- skeleton loaders: never spinners ------------------------------------ */
.skel {
  display: block; border-radius: 4px;
  background: linear-gradient(90deg, var(--skel-base) 25%, var(--skel-sheen) 37%, var(--skel-base) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skel--n { height: 34px; width: 60%; }
.skel--label { height: 11px; width: 40%; margin-top: 8px; }
.skel-line { height: 12px; }
.skel-line--sm { width: 55%; }
.skel-line--lg { width: 85%; }
.skel-badge { height: 18px; width: 74px; border-radius: 999px; }

/* pager */
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 12px; flex-wrap: wrap; }
.pager__info { color: var(--text-soft); font-size: 13px; }
.pager__btns { display: flex; gap: 8px; }

/* --- mobile card stack: Juan triages from the truck ---------------------- */
.cards { display: none; list-style: none; margin: 0; padding: 0; }
.card {
  display: block; width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--elev-1);
  padding: 14px 16px; margin-bottom: 12px; cursor: pointer;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.card:active { transform: translateY(1px); }
.card--satellite { border-left: 4px solid var(--amber-strip); }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card__due { font-family: var(--data-font); font-size: 18px; font-weight: 700; color: var(--heading); }
.card--urgent .card__due { color: var(--red-ink); }
.card--soon .card__due { color: var(--satellite-ink); }
.card__title { font-weight: 600; margin: 8px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-family: var(--data-font); font-size: 14px; }

/* --- detail drawer ------------------------------------------------------- */
.drawer-overlay {
  position: fixed; inset: 0; background: var(--overlay);
  display: flex; justify-content: flex-end; z-index: 40;
  animation: overlay-in var(--t-fast);
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: min(560px, 100%); height: 100%; background: var(--card);
  box-shadow: var(--drawer-shadow); overflow-y: auto;
  display: flex; flex-direction: column; animation: drawer-in var(--t-base);
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0.6; } to { transform: translateX(0); opacity: 1; } }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card);
}
.drawer__close { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--text-soft); transition: color var(--t-fast); min-width: 44px; min-height: 44px; }
.drawer__close:hover { color: var(--red-ink); }
.drawer__body { padding: 20px; }
.drawer__title { margin: 0 0 16px; font-size: 20px; color: var(--heading); }
.drawer__loading { padding: 40px; color: var(--text-faint); }
.drawer__link { display: inline-block; margin-top: 18px; text-decoration: none; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-bottom: 18px; }
.reason { margin: 0; white-space: pre-wrap; color: var(--text); background: var(--surface-inset); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }

/* --- settings panel ------------------------------------------------------ */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--elev-1); padding: 22px; }
.panel__title { margin: 0 0 6px; color: var(--heading); }
.panel__note { margin: 0 0 18px; color: var(--text-soft); }
.zone-origin { display: flex; gap: 12px; align-items: baseline; margin-bottom: 16px; }
/* Origin display name leads; coordinates demoted to a quiet secondary chip (1A.5i). */
.zone-origin__val { display: inline-flex; gap: 10px; align-items: baseline; }
.zone-origin__name { font-weight: 600; color: var(--text); }
.zone-origin__coords { font-family: var(--data-font); font-size: 12px; color: var(--text-faint); }
.bids--compact td, .bids--compact th { padding: 9px 12px; }

/* --- footer: quiet MIP brand-building on every client screen -------------- */
.footer {
  flex-shrink: 0; text-align: center; padding: 18px 20px 26px;
  color: var(--text-faint); font-size: 12px; letter-spacing: 0.3px;
}
.footer__rzr { color: var(--text-faint); }

/* --- responsive: phone / truck ------------------------------------------- */
@media (max-width: 768px) {
  .main { padding: 14px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .topbar__session { margin-left: 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi--satellite { grid-column: 1 / -1; }
  /* the table gives way to a stacked card list */
  .table-wrap { display: none; }
  .cards { display: block; }
  .filters { padding: 12px; gap: 12px; }
  .filters__group { flex: 1 1 100%; }
  .drawer { width: 100%; }
  .drawer-overlay { background: var(--card); }
  .fields { grid-template-columns: 1fr; }
  /* full-width buttons are a MOBILE behavior only (never a desktop slab). */
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}

/* --- login screen -------------------------------------------------------- */
.app-splash { padding: 60px 40px; color: var(--text-faint); text-align: center; }
.login {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--login-grad); padding: 24px;
}
.login__card {
  width: 100%; max-width: 400px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--elev-3); padding: 32px 30px;
  display: flex; flex-direction: column; gap: 14px;
}
.login__card--shake { animation: shake 0.4s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.login__head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.login__logo { height: 46px; width: auto; display: block; }
.login__head .lockup__name { color: var(--heading); }
.login__head .lockup__sub { color: var(--text-faint); }
.logo-fallback--lg { height: 46px; font-size: 18px; }
.login__title {
  font-size: 21px; font-weight: 700; color: var(--text); margin: 8px 0 2px;
}
/* Login is the first impression: it inherits the shared field/button system.
   The submit is the ONE deliberately full-width CTA (a narrow centered card). */
.login__submit { margin-top: 8px; min-height: 46px; font-size: 15px; width: 100%; }
.login__note { margin: 4px 0 0; font-size: 12px; color: var(--text-faint); text-align: center; }
/* A quiet inline text link inside the login card (1A.5k): "Forgot password?" and the
   reset sub-view's "Back to sign in". Button element for keyboard/AT parity; styled as
   a link, not a CTA — the primary blue button stays the one CTA per card. */
.login__link {
  background: none; border: 0; padding: 2px; margin: -2px auto 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--accent); text-align: center;
}
.login__link:hover { text-decoration: underline; }
.login__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   Triage — the human-action layer. Blue is the interactive accent; --tam-red
   stays reserved for the one primary action (Open on portal) + urgency.
   -------------------------------------------------------------------------- */

/* Drawer: Open-on-portal is the most prominent action, sat right under the title. */
.drawer__portal { display: block; margin: 6px 0 16px; text-decoration: none; text-align: center; min-height: 42px; line-height: 26px; }

/* Drawer triage block */
.triage { margin: 4px 0 18px; padding: 14px; background: var(--surface-inset-2); border: 1px solid var(--border); border-radius: var(--radius); }
.triage__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-soft); margin-bottom: 8px; }
.triage__row { display: flex; gap: 6px; flex-wrap: wrap; }
.triage-btn {
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; min-height: 44px; /* real 44px hit target */
  display: inline-flex; align-items: center; gap: 4px;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast), transform 90ms var(--ease);
}
.triage-btn:active { transform: translateY(1px); }
.triage-btn__check { font-size: 12px; line-height: 1; }
.triage-btn:hover { border-color: var(--accent); }
.triage-btn--on { background: var(--tam-blue); border-color: var(--tam-blue); color: var(--on-brand); }
.triage-btn.triage--interested.triage-btn--on { background: var(--tam-blue); border-color: var(--tam-blue); }
.triage-btn.triage--keep.triage-btn--on { background: var(--keep); border-color: var(--keep); }
.triage-btn.triage--not_interested.triage-btn--on { background: var(--reject); border-color: var(--reject); }
.triage-btn.triage--archived.triage-btn--on { background: var(--archived); border-color: var(--archived); }

.triage__reasons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.triage__reasons-label { font-size: 12px; color: var(--text-soft); }
.reason-chip {
  border: 1px dashed var(--border-strong); background: var(--card); color: var(--text-soft);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; min-height: 30px;
}
.reason-chip:hover { border-color: var(--accent); color: var(--accent); }
.reason-chip--on { background: var(--reject); border-color: var(--reject); border-style: solid; color: var(--on-brand); }

.triage__note { display: block; margin-top: 12px; }
.note-input { width: 100%; resize: vertical; font: inherit; }
.triage__stamp { display: block; margin-top: 4px; font-size: 11px; color: var(--text-faint); }

/* List row: status dot + note glyph + a compact overflow status menu. */
.cell-triage { position: relative; white-space: nowrap; text-align: right; }
.th-triage { width: 92px; text-align: right; }
.rowtriage { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
/* Triage state icons sit one contrast step up from muted (1A.5i P2): the default/new
   dot reads as secondary text, not faint, so a state is legibly present at a glance. */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--text-soft); }
.dot--interested { background: var(--tam-blue); }
.dot--keep { background: var(--keep); }
.dot--not_interested { background: var(--reject); }
.dot--archived { background: var(--archived); }
.dot--new { background: transparent; }
.note-glyph { color: var(--accent); font-size: 13px; }
.rowtriage__btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text-soft);
  border-radius: var(--radius); min-width: 28px; min-height: 28px; line-height: 1; cursor: pointer; font-size: 15px;
}
.rowtriage__btn:hover { border-color: var(--accent); color: var(--accent); }
.rowtriage__menu {
  position: absolute; right: 8px; top: 100%; z-index: 20; margin-top: 2px;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--elev-2); display: flex; flex-direction: column; min-width: 140px; overflow: hidden;
}
.rowtriage__item { border: 0; background: none; text-align: left; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.rowtriage__item:hover { background: var(--surface-hover); }
.rowtriage__item--on { font-weight: 700; color: var(--accent); }

/* A faint left accent on interested rows so the "top of the list" reads at a glance. */
.row--triage-interested td:first-child { box-shadow: inset 3px 0 0 var(--tam-blue); }
.row--triage-not_interested, .row--triage-archived { opacity: 0.72; }

/* --------------------------------------------------------------------------
   Drawer + trust refinement: humanized decision checklist, when/where-first
   header, quiet absence, Details disclosure. Red stays urgency-only.
   -------------------------------------------------------------------------- */

/* Screen-reader-only text (the ✓/⚠/✗ glyph carries meaning by shape). */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Drawer top block: DUE + DISTANCE/ZONE, when/where before what. */
.drawer__meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px;
  padding: 4px 0 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}
.drawer__meta-item { display: flex; flex-direction: column; gap: 3px; }
.drawer__due { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.drawer__due-date { font-family: var(--data-font); font-size: 19px; font-weight: 700; color: var(--heading); }
.drawer__due--urgent .drawer__due-date { color: var(--red-ink); }
.drawer__due--soon .drawer__due-date { color: var(--satellite-ink); }
.drawer__due--past .drawer__due-date { color: var(--text-faint); }
.drawer__dz { font-family: var(--data-font); }
.drawer__dz .cell-dz__dist { font-size: 18px; }

.drawer__title { margin-top: 2px; }
.drawer__portal-none { margin: 6px 0 16px; }

/* Decision checklist: plain-English criteria rows. */
.checklist { margin: 4px 0 16px; }
.checklist__rows { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--text); line-height: 1.4; }
.check__glyph { flex: 0 0 auto; width: 18px; text-align: center; font-weight: 700; line-height: 1.4; }
.check--check .check__glyph { color: var(--match-ink); }
.check--warn .check__glyph { color: var(--satellite-ink); }
.check--cross .check__glyph { color: var(--reject-ink); }
.check--cross .check__text { color: var(--text-soft); }
.check__text { flex: 1 1 auto; }

/* Un-parseable engine fragments, surfaced verbatim (honesty rule). */
.checklist__notes { margin-top: 10px; padding: 8px 10px; background: var(--surface-inset); border: 1px solid var(--border); border-radius: var(--radius); }
.checklist__notes-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 4px; }
.checklist__note { font-family: var(--data-font); font-size: 12px; color: var(--text-soft); }

/* Body fields — a compact single strip now that Value/Category self-suppress. */
.fields--body { margin-bottom: 8px; }

/* Details disclosure: provenance + raw reason, collapsed by default. */
.details { margin: 6px 0 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.details__summary {
  cursor: pointer; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-soft); min-height: 32px; display: flex; align-items: center;
}
.details__summary:hover { color: var(--accent); }
.details__summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.details__body { padding-top: 12px; }
.details__body .fields { margin-bottom: 12px; }
/* Nested "Technical details" (1A.5i): the raw engine reason, one collapse deeper.
   No top border/rule (it sits inside Details already) and a quieter summary. */
.details--tech { margin: 4px 0 0; border-top: 0; padding-top: 0; }
.details--tech > .details__summary { font-size: 11px; color: var(--text-faint); }
.details--tech > .details__body { padding-top: 8px; }

/* Triage confirm + undo. */
.triage__confirm {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px;
  font-size: 13px; color: var(--text); background: var(--blue-tint); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px;
}
.triage__confirm-msg { font-weight: 700; }
.triage__undo {
  border: 1px solid var(--accent); background: var(--card); color: var(--accent);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; min-height: 32px;
}
.triage__undo:hover { background: var(--blue-tint-strong); }

/* Mobile: the drawer meta grid stacks; hit targets stay 44px. */
@media (max-width: 768px) {
  .drawer__meta { grid-template-columns: 1fr; }
}

/* --- identity chip, avatar, profile + admin ------------------------------- */
/* The header identity chip: avatar + name/title, opens the Profile page. */
.idchip {
  display: flex; align-items: center; gap: 9px; background: transparent; border: 0;
  cursor: pointer; padding: 5px 8px; border-radius: var(--radius); min-height: 40px;
  transition: background var(--t-fast);
}
.idchip:hover { background: var(--chrome-hover); }
.idchip__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.idchip__name { color: var(--on-brand); font-weight: 600; font-size: 13px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idchip__title { color: var(--navy-nav); font-size: 11px; }

/* Avatar: image or initials fallback. */
.avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tam-blue); color: var(--on-brand); font-weight: 700; font-size: 12px;
  overflow: hidden;
}
.avatar--lg { width: 72px; height: 72px; font-size: 26px; }
.avatar--initials { text-transform: uppercase; }

/* Profile page: two EQUAL-HEIGHT cards side by side, stacking on narrow screens. */
.profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: stretch; }

/* Shared form-card surface (profile + admin). Distinct from the .card bid tile. */
.form-card {
  display: flex; flex-direction: column; gap: 14px; padding: 22px; height: 100%;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--elev-1);
}
.card__title { margin: 0 0 4px; font-size: 16px; color: var(--heading); }
.card__note { margin: 0; color: var(--text-faint); font-size: 13px; }

/* Avatar edit: the image itself is the affordance — hover ring + "Change" label. */
.profile-avatar { display: flex; align-items: center; gap: 16px; }
.avatar-edit {
  position: relative; padding: 0; border: 0; background: transparent; cursor: pointer;
  border-radius: 50%; line-height: 0;
}
.avatar-edit .avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px transparent; transition: box-shadow var(--t-fast); }
.avatar-edit:hover .avatar, .avatar-edit:focus-visible .avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--focus-glow); }
.avatar-edit:focus-visible { outline: none; }
.avatar-edit__overlay {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay); color: var(--on-brand); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  opacity: 0; transition: opacity var(--t-fast);
}
.avatar-edit:hover .avatar-edit__overlay, .avatar-edit:focus-visible .avatar-edit__overlay { opacity: 1; }
.profile-avatar__ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-avatar__hint { font-size: 12px; flex-basis: 100%; }
.hidden-file { display: none; }
.profile-forced { display: flex; flex-direction: column; gap: 14px; }
.profile-forced__out { align-self: center; }

.banner--ok { background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); }

/* Admin area. */
.admin { display: flex; flex-direction: column; gap: 18px; }
.admin-create { gap: 14px; }
/* Aligned grid: every label above its input, one baseline (no stagger). */
.admin-create__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.admin-users { width: 100%; }
.admin-users th, .admin-users td { text-align: left; padding: 10px 12px; vertical-align: middle; }
.admin-users tbody tr { transition: background var(--t-fast); }
.admin-users tbody tr:hover { background: var(--blue-tint); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user__text { display: flex; flex-direction: column; line-height: 1.2; }
.cell-user__name { font-weight: 600; }
.cell-user__email { font-family: var(--data-font); font-size: 12px; color: var(--text-faint); }
.cell-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row--disabled { opacity: 0.6; }
.role-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--tag-bg); color: var(--accent); }
.role-tag--admin { background: var(--tam-blue); color: var(--on-brand); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill--on { background: var(--ok-bg); color: var(--ok-text); }
.pill--off { background: var(--error-bg); color: var(--error-text); }
/* invited = a pending, not-yet-redeemed invitation — amber ink + amber hairline,
   distinct from the green active pill and the red disabled pill (AA in both themes). */
.pill--pending { background: var(--card); color: var(--satellite-ink); border: 1px solid var(--satellite-ink); }
.temp-pass { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.temp-pass code { font-family: var(--data-font); background: var(--code-bg); padding: 2px 6px; border-radius: 4px; }
.temp-pass__note { font-weight: 500; color: var(--text-soft); }

/* --- 1A.5j digest recipients + send-now ----------------------------------- */
/* Per-row digest subscription toggle: a checkbox + a small On/Off label. */
.cell-digest { white-space: nowrap; }
.digest-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.digest-toggle input { cursor: pointer; accent-color: var(--tam-blue); }
.digest-toggle__label { font-size: 12px; font-weight: 600; color: var(--text-soft); }
/* The "Send digest now" card sits between the create-user form and the table. */
.digest-card__hint { margin: 0 0 12px; font-size: 13px; }

/* --- 1A.5h invite/delete affordances -------------------------------------- */
/* Warn banner: an outcome that is not an error but needs attention (e.g. the invite
   email failed to send). Amber, matching the SATELLITE accent. */
.banner--warn { background: var(--card); border: 1px solid var(--satellite-ink); color: var(--satellite-ink); }
/* Danger button: the one destructive action (hard delete), only ever shown inside
   the type-the-email confirmation, never as a bare row action. */
.btn--danger { background: var(--danger-solid); border-color: var(--danger-solid); color: var(--on-brand); }
.btn--danger:hover:not(:disabled) { filter: brightness(0.94); }
.delete-btn:hover:not(:disabled) { color: var(--red-ink); }
/* The inline delete confirmation row: a full-width strip with the type-to-confirm
   input and armed Delete/Cancel. */
.row--confirming { background: var(--error-bg); }
.delete-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 0; }
.delete-confirm__msg { color: var(--error-text); font-weight: 500; }
.delete-confirm__input { max-width: 280px; }
