/* ============================================================
   FDA INTEL — public stylesheet (sign-in, password reset, legal).
   Serves the pages a logged-out visitor can see and NOTHING else:
   design tokens + the handful of components those pages use. The
   application stylesheet and bundle live behind authentication.
   ============================================================ */

:root {
  /* surfaces — soft cool-grey canvas, white cards, faint layered fills */
  --bg: #f6f7f9;            /* dominant page canvas */
  --surface: #ffffff;       /* cards / panels — white, depth via border */
  --surface-2: #eef0f3;     /* inputs, chips, hover fills */
  --surface-3: #e4e7eb;     /* most-elevated interactive (active seg, menus) */
  --surface-hover: #f0f2f5;

  /* borders — the workhorse separators (depth without heavy shadow) */
  --border: #e3e6ea;         /* default hairline */
  --border-strong: #d3d7dd;  /* card edges, dividers that must read */
  --border-emphasis: #b9bfc8;/* focus rings, active outlines */

  /* text — dark-on-light ramp, near-black primary, never pure black */
  --text: #16181d;          /* primary — headings, key numbers */
  --text-2: #3f454e;        /* body / secondary */
  --text-3: #6a7079;        /* muted — labels, meta */
  --text-4: #949aa3;        /* dim — captions, disabled */
  --text-5: #ccd0d6;        /* faint — hairline text, tracks */

  /* ONE interactive accent — a clean blue, deep enough to pass AA on
     white for buttons + links. Actions, active states, live data. */
  --accent: #2f6bed;
  --accent-hover: #2559d0;
  --accent-text: #ffffff;
  --brand: #2f6bed;
  --brand-bg: rgba(47,107,237,0.08);
  --brand-border: rgba(47,107,237,0.28);

  /* signals — darkened for legibility ON LIGHT. Reserved for meaning only. */
  --positive: #197f3a;
  --positive-bg: rgba(25,127,58,0.10);
  --negative: #cf2230;
  --negative-bg: rgba(207,34,48,0.09);
  --warning: #97600a;
  --warning-bg: rgba(151,96,10,0.11);
  --info: #2f6bed;
  --info-bg: rgba(47,107,237,0.08);
  --neutral: #6a7079;
  --neutral-bg: rgba(106,112,121,0.10);

  /* shape */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  /* elevation: near-nothing for cards (borders do the work); real shadow
     reserved for overlays that float above the page (drawer, modal, menu). */
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 16px 40px rgba(24,28,40,0.14), 0 3px 10px rgba(24,28,40,0.08);

  /* severity language — ONE meaning product-wide:
     critical = Class I recall, DO-NOT-DRIVE, new federal lawsuit (red)
     elevated = Class II, CPSC/NHTSA recalls, safety comms (amber)
     standard = informational events (neutral)                       */
  --sev-critical: var(--negative);
  --sev-critical-bg: var(--negative-bg);
  --sev-elevated: var(--warning);
  --sev-elevated-bg: var(--warning-bg);
  --sev-standard: var(--neutral);
  --sev-standard-bg: var(--neutral-bg);

  --t-fast: 100ms ease;
  --t: 160ms ease;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --sidebar-w: 232px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #08090a;
  --surface: #0e0f11;
  --surface-2: #16171a;
  --surface-3: #1c1d21;
  --surface-hover: #141517;

  --border: #202127;
  --border-strong: #2b2d34;
  --border-emphasis: #3a3d45;

  --text: #f0f2f4;
  --text-2: #c2c6cd;
  --text-3: #878d97;
  --text-4: #5a5f68;
  --text-5: #34373d;

  --accent: #5b8cff;
  --accent-hover: #6f9bff;
  --accent-text: #ffffff;
  --brand: #5b8cff;
  --brand-bg: rgba(91,140,255,0.11);
  --brand-border: rgba(91,140,255,0.30);

  --positive: #3fb950;
  --positive-bg: rgba(63,185,80,0.13);
  --negative: #ff5c52;
  --negative-bg: rgba(255,92,82,0.13);
  --warning: #e3a83c;
  --warning-bg: rgba(227,168,60,0.13);
  --info: #5b8cff;
  --info-bg: rgba(91,140,255,0.11);
  --neutral: #878d97;
  --neutral-bg: rgba(135,141,151,0.11);

  --shadow-lg: 0 16px 48px rgba(0,0,0,0.55), 0 4px 12px rgba(0,0,0,0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overscroll-behavior: none; }

body {
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01", "ss03", "tnum";
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.sb-logo {
  width: 30px; height: 30px;
  background: var(--accent);
  color: white;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn:hover { background: var(--surface-2); border-color: var(--text-4); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-2);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.filter-hint {
  font-size: 10px;
  color: var(--text-4);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

body.login-body {
  display: block;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface-2) 100%);
}
.login-shell {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.login-name { font-size: 18px; font-weight: 700; color: var(--text); }
.login-tag { font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); margin-top: 2px; }
.login-form { display: flex; flex-direction: column; }
.login-form input {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 11px 14px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--brand-bg);
}
.login-form .filter-label {
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-2);
}
.login-error {
  margin-top: 10px;
  padding: 9px 12px;
  background: var(--negative-bg);
  color: var(--negative);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.login-submit { margin-top: 18px; padding: 11px; font-size: 14px; justify-content: center; }
.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 20px;
}
