/* =====================================================================
   Sentinel · Exclusion Screening — design system
   ===================================================================== */
@font-face {
  font-family: "InterVar";
  src: url("/static/fonts/inter-var.woff2") format("woff2-variations"), url("/static/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "InterVar", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;

  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e6e9f0;
  --line-2: #eef0f5;

  --brand: #5b5cf0;
  --brand-600: #4b4ce0;
  --brand-700: #3d3ec4;
  --brand-50: #eef0ff;
  --brand-100: #e0e3ff;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --grad: linear-gradient(135deg, #5b5cf0 0%, #8b5cf6 55%, #c026d3 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,92,240,.10), rgba(139,92,246,.10));

  /* status (validated palette, always paired with icon + label) */
  --pass: #12813f;   --pass-ink: #0d6b33;  --pass-bg: #e7f6ec;
  --review: #f2b42c; --review-ink: #8a5a00; --review-bg: #fff5dc;
  --fail: #d03b3b;   --fail-ink: #a82828;  --fail-bg: #fdeaea;
  --error: #7c5cd6;  --error-ink: #5b3fb3; --error-bg: #f1edfd;
  --pending: #94a3b8; --pending-ink: #475569; --pending-bg: #f1f4f8;

  --side: #0a0e1c;
  --side-2: #121833;
  --side-ink: #aab3cf;
  --side-ink-2: #6b7497;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .03);
  --sh-2: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px -4px rgba(15, 23, 42, .08);
  --sh-3: 0 10px 40px -10px rgba(30, 27, 75, .25);
  --ring: 0 0 0 4px rgba(91, 92, 240, .16);
  --side-w: 252px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.006em;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1 { font-size: 24px; line-height: 1.25; letter-spacing: -0.022em; margin: 0; font-weight: 680; }
h2 { font-size: 15px; letter-spacing: -0.01em; margin: 0; font-weight: 640; }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 640; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ico { flex-shrink: 0; display: inline-block; vertical-align: middle; }
::selection { background: rgba(91, 92, 240, .18); }

/* ---------------------------------------------------------------------
   App shell
   --------------------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }

.side {
  width: var(--side-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; color: var(--side-ink);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(91, 92, 240, .22), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(192, 38, 211, .10), transparent 60%),
    var(--side);
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; color: #fff; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 6px 18px -4px rgba(124, 92, 246, .7), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand .name { font-weight: 700; font-size: 15.5px; letter-spacing: -0.02em; line-height: 1.15; }
.brand .sub { font-size: 11.5px; color: var(--side-ink-2); font-weight: 500; }

.org {
  margin: 0 14px 10px; padding: 10px 12px; border-radius: 12px; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06);
}
.org .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); }
.org .t1 { color: #e6e9f5; font-size: 12.5px; font-weight: 600; }
.org .t2 { color: var(--side-ink-2); font-size: 11.5px; }

.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--side-ink-2); padding: 16px 10px 6px; font-weight: 600; }
.nav a {
  position: relative; color: var(--side-ink); padding: 9px 10px; border-radius: 10px; display: flex; align-items: center; gap: 11px;
  font-weight: 520; font-size: 13.5px; transition: background .15s, color .15s;
}
.nav a .ico { opacity: .8; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.on { background: linear-gradient(90deg, rgba(91, 92, 240, .28), rgba(91, 92, 240, .08)); color: #fff; }
.nav a.on .ico { opacity: 1; color: #b7b9ff; }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #8f91ff; }
.nav .count {
  margin-left: auto; background: #f2b42c; color: #1a1300; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; line-height: 18px;
}

.side-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me .who { min-width: 0; flex: 1; }
.me .n { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .r { color: var(--side-ink-2); font-size: 11.5px; }
.me button {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); color: var(--side-ink); width: 32px; height: 32px;
  border-radius: 9px; display: grid; place-items: center; cursor: pointer; transition: all .15s;
}
.me button:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 32px;
  background: rgba(245, 246, 250, .78); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(230, 233, 240, .7);
}
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 520; white-space: nowrap; }
.crumbs strong { color: var(--ink); font-weight: 620; }
.crumbs .ico { color: var(--faint); }
.search {
  margin-left: auto; position: relative; width: 340px; max-width: 40vw;
}
.search input[type=search] {
  width: 100%; height: 38px; min-height: 38px; padding: 0 64px 0 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); box-shadow: var(--sh-1); transition: all .15s;
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { display: none; }
.search input[type=search]:focus { outline: 0; border-color: #c7c9fb; box-shadow: var(--ring); }
.search > .ico { position: absolute; left: 12px; top: 11px; color: var(--faint); pointer-events: none; z-index: 1; }
.search kbd {
  position: absolute; right: 8px; top: 8px; font: 600 11px var(--font); color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 12.5px; font-weight: 560; color: var(--ink-2); white-space: nowrap; box-shadow: var(--sh-1);
}
.chip .pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; position: relative; }
.chip .pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #22c55e; opacity: 0; animation: ping 2.4s ease-out infinite; }
.chip .pulse.busy { background: var(--brand); }
.chip .pulse.busy::after { border-color: var(--brand); }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.content { padding: 28px 32px 64px; max-width: 1480px; width: 100%; }

/* ---------------------------------------------------------------------
   Page header
   --------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 12px; font-weight: 600; color: var(--brand-600); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .muted { margin-top: 5px; font-size: 13.5px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  padding: 20px 22px; margin-bottom: 20px;
}
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush > h2, .panel-head { padding: 18px 22px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel.flush > h2 { display: block; }
.panel-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 450; margin-top: 2px; }
.panel h2 + .sub { margin-top: 2px; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.side-r { grid-template-columns: minmax(0, 1fr) 360px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------------------------------------------------------------------
   KPI / stat cards
   --------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  position: relative; overflow: hidden; display: block; color: inherit; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 18px 16px; box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s, border-color .18s;
}
a.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: #dcdff0; color: inherit; }
.stat .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 560; }
.stat .n { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .f { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.stat .bar { height: 4px; border-radius: 99px; background: var(--line-2); margin-top: 12px; overflow: hidden; }
.stat .bar span { display: block; height: 100%; border-radius: 99px; }
.stat.pass .tile { background: var(--pass-bg); color: var(--pass); } .stat.pass .bar span { background: var(--pass); }
.stat.review .tile { background: var(--review-bg); color: #b07800; } .stat.review .bar span { background: var(--review); }
.stat.fail .tile { background: var(--fail-bg); color: var(--fail); } .stat.fail .bar span { background: var(--fail); }
.stat.error .tile { background: var(--error-bg); color: var(--error); } .stat.error .bar span { background: var(--error); }
.stat.neutral .tile { background: var(--pending-bg); color: var(--pending-ink); } .stat.neutral .bar span { background: var(--pending); }
.stat.brand .tile { background: var(--brand-50); color: var(--brand); } .stat.brand .bar span { background: var(--grad); }
.stat.fail.hot { border-color: #f6c9c9; background: linear-gradient(180deg, #fff, #fff8f8); }

/* ---------------------------------------------------------------------
   Hero (dashboard)
   --------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 28px 30px; margin-bottom: 20px; color: #fff;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(192, 38, 211, .45), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(6, 182, 212, .28), transparent 60%),
    linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4c1d95 100%);
  box-shadow: var(--sh-3);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: radial-gradient(70% 90% at 80% 20%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 90% at 80% 20%, #000, transparent 75%);
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #c7c9ff; }
.hero h1 { color: #fff; font-size: 28px; margin: 10px 0 6px; letter-spacing: -0.028em; }
.hero p { margin: 0; color: #c9cbef; max-width: 560px; font-size: 14px; }
.hero .facts { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.hero .fact .k { font-size: 11.5px; color: #a5a8e6; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.hero .fact .v { font-size: 15px; font-weight: 640; margin-top: 3px; display: flex; align-items: center; gap: 7px; }
.hero .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.ring-wrap { position: relative; width: 168px; height: 168px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-wrap .ring-label .v { font-size: 34px; font-weight: 720; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-wrap .ring-label .v small { font-size: 18px; font-weight: 600; opacity: .8; }
.ring-wrap .ring-label .k { font-size: 11.5px; color: #c7c9ff; margin-top: 6px; font-weight: 560; }

/* ---------------------------------------------------------------------
   Charts
   --------------------------------------------------------------------- */
.donut-row { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; padding: 6px 22px 22px; }
.donut { position: relative; width: 170px; height: 170px; }
.donut svg { transform: rotate(-90deg); overflow: visible; }
.donut circle.seg { transition: stroke-width .15s; cursor: default; }
.donut circle.seg:hover { stroke-width: 22; }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut .center .v { font-size: 26px; font-weight: 720; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.donut .center .k { font-size: 11.5px; color: var(--muted); font-weight: 560; }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legend-list li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; padding: 7px 8px; border-radius: 8px; }
.legend-list li:hover { background: var(--surface-2); }
.legend-list .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend-list .n { font-weight: 650; font-variant-numeric: tabular-nums; }
.legend-list .p { color: var(--muted); font-size: 12px; width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.legend-list .lbl { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.legend-list .lbl .ico { color: var(--faint); }

.bars { padding: 4px 22px 18px; }
.bars .plot { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 190px; border-bottom: 1px solid var(--line); position: relative; }
.bars .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line-2); }
.bars .col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0; z-index: 1; }
.bars .stack { width: min(38px, 70%); display: flex; flex-direction: column-reverse; gap: 2px; }
.bars .stack span { display: block; width: 100%; min-height: 0; }
.bars .stack span:last-child { border-radius: 4px 4px 0 0; }
.bars .col .tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); opacity: 0; pointer-events: none; transition: all .15s;
  background: #0b1220; color: #fff; font-size: 12px; border-radius: 10px; padding: 9px 11px; white-space: nowrap; box-shadow: var(--sh-3); z-index: 5;
}
.bars .col .tip b { display: block; margin-bottom: 4px; font-weight: 640; }
.bars .col .tip div { display: flex; align-items: center; gap: 7px; color: #cbd5e1; }
.bars .col .tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.bars .col:hover .tip { opacity: 1; transform: translate(-50%, 0); }
.bars .col:hover .stack { filter: brightness(1.05); }
.bars .col .tot { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.bars .xl { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 8px; }
.bars .xl span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 520; }
.bars .xl span.now { color: var(--ink); font-weight: 650; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.empty-chart { height: 190px; display: grid; place-content: center; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }

/* ---------------------------------------------------------------------
   Badges
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; line-height: 18px; border: 1px solid transparent; letter-spacing: 0;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.b-pass, .b-clear, .b-completed, .b-active, .b-not_match { background: var(--pass-bg); color: var(--pass-ink); border-color: #cdebd7; }
.b-review, .b-possible_match, .b-queued { background: var(--review-bg); color: var(--review-ink); border-color: #f8e2a8; }
.b-review i, .b-possible_match i, .b-queued i { background: #e09c00; }
.b-fail, .b-failed, .b-confirmed_excluded { background: var(--fail-bg); color: var(--fail-ink); border-color: #f6cccc; }
.b-error { background: var(--error-bg); color: var(--error-ink); border-color: #ddd3fb; }
.b-pending, .b-none, .b-cancelled, .b-inactive { background: var(--pending-bg); color: var(--pending-ink); border-color: #e3e8ef; }
.b-running { background: var(--brand-50); color: var(--brand-700); border-color: #d6d9ff; }
.b-running i { animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tag { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; font-size: 11.5px; color: var(--muted); font-weight: 560; line-height: 20px; }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
.t th, .t td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.t th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 620; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.t th:first-child, .t td:first-child { padding-left: 22px; }
.t th:last-child, .t td:last-child { padding-right: 22px; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover td { background: #fafbff; }
.t.compact th, .t.compact td { padding: 8px 12px; }
.t.compact th:first-child, .t.compact td:first-child { padding-left: 22px; }
.t tr.hit td { background: #fffaeb; }
.person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person .pn { font-weight: 600; color: var(--ink); }
.person a.pn:hover { color: var(--brand-600); }
.person .ps { font-size: 12px; color: var(--muted); }
.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 650; flex-shrink: 0; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

/* ---------------------------------------------------------------------
   Forms & buttons
   --------------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 450; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid #dfe3eb; border-radius: 10px; font: inherit; font-size: 13.5px;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; box-shadow: var(--sh-1);
}
input[type=file] { padding: 7px 10px; }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 12.5px; margin-right: 12px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; color: var(--ink);
}
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: #a5a7f7; box-shadow: var(--ring); }
textarea { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 450; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex-shrink: 0; }
.choice { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; transition: all .15s; margin-bottom: 10px; background: #fff; }
.choice:hover { border-color: #c9ccf7; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: var(--ring); background: #fbfbff; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.filters input[type=search] { width: 300px; }
.filters select { width: auto; min-width: 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid #dfe3eb; background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; box-shadow: var(--sh-1); transition: all .15s; letter-spacing: -0.005em;
}
.btn:hover { background: var(--surface-2); border-color: #d2d7e2; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.btn.primary {
  color: #fff; border: 1px solid rgba(0,0,0,.08); background: linear-gradient(180deg, #6667f5, #5051e6);
  box-shadow: 0 1px 2px rgba(49, 46, 129, .25), 0 4px 14px -4px rgba(91, 92, 240, .55), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn.primary:hover { background: linear-gradient(180deg, #5b5cf0, #4546d6); color: #fff; }
.btn.glass { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; backdrop-filter: blur(6px); }
.btn.glass:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn.white { background: #fff; color: #312e81; border-color: #fff; box-shadow: 0 6px 20px -6px rgba(0,0,0,.35); }
.btn.white:hover { background: #f5f5ff; color: #312e81; }
.btn.danger { color: var(--fail-ink); border-color: #f3c7c7; }
.btn.danger:hover { background: var(--fail-bg); color: var(--fail-ink); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn.ghost { box-shadow: none; border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
.btn.icon-btn { width: 30px; padding: 0; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.row-actions form { margin: 0; }

/* active / inactive switch */
.switch {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 2px 0; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--pending-ink);
}
.switch .knob {
  position: relative; width: 36px; height: 20px; border-radius: 999px; background: #d5dbe4; transition: background .2s; flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .12);
}
.switch .knob::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25); transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.switch.on { color: var(--pass-ink); }
.switch.on .knob { background: var(--pass); }
.switch.on .knob::after { transform: translateX(16px); }
.switch:hover .knob { filter: brightness(.95); }
.switch:focus-visible { outline: 0; }
.switch:focus-visible .knob { box-shadow: var(--ring); }

/* ---------------------------------------------------------------------
   Alerts
   --------------------------------------------------------------------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid;
  font-size: 13.5px; box-shadow: var(--sh-1);
}
.alert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; background: currentColor; }
.alert.success { background: #f1fbf4; color: #0d5d2c; border-color: #cdebd7; }
.alert.error { background: #fff4f4; color: #8f1f1f; border-color: #f6cccc; }
.alert.info { background: #f3f4ff; color: #2f2f9c; border-color: #dcdfff; }
.alert.warn { background: #fffaeb; color: #6b4500; border-color: #f8e2a8; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }

/* ---------------------------------------------------------------------
   Progress
   --------------------------------------------------------------------- */
.progress { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; display: flex; gap: 2px; }
.progress span { display: block; height: 100%; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.progress .p-pass { background: var(--pass); }
.progress .p-review { background: var(--review); }
.progress .p-fail { background: var(--fail); }
.progress .p-error { background: var(--error); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.legend strong { color: var(--ink); }

/* ---------------------------------------------------------------------
   Misc components
   --------------------------------------------------------------------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 520; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shot { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: var(--sh-1); }
.shot .cap { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); gap: 8px; }
.shot .cap:last-child { border-bottom: 0; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.shot a.img { display: block; max-height: 440px; overflow: hidden; background: var(--surface-2); }
.shot img { width: 100%; display: block; }
.shot .none { padding: 40px; text-align: center; color: var(--muted); }
.shot iframe.pdf { width: 100%; height: 440px; border: 0; display: block; background: #fff; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty .em-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin: 0 auto 12px; }
.empty strong { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 4px; }
details summary { cursor: pointer; color: var(--brand-600); font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.review-card { border: 1px solid #f3dfa8; background: linear-gradient(180deg, #fffdf6, #fff); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--sh-1); }
.review-card h2 { font-size: 16px; }
.danger-zone { border-color: #f3d2d2; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }

.feed { list-style: none; margin: 0; padding: 4px 22px 18px; position: relative; }
.feed li { position: relative; padding: 9px 0 9px 26px; font-size: 13px; color: var(--ink-2); }
.feed li::before { content: ""; position: absolute; left: 5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.feed li::after { content: ""; position: absolute; left: 9px; top: 26px; bottom: -8px; width: 1px; background: var(--line); }
.feed li:last-child::after { display: none; }
.feed .when { display: block; font-size: 11.5px; color: var(--faint); margin-top: 1px; }

.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.countdown div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; text-align: center; padding: 10px 4px; }
.countdown b { display: block; font-size: 22px; font-weight: 720; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ---------------------------------------------------------------------
   Login
   --------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); background: #fff; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 44px 56px; display: flex; flex-direction: column;
  background: #070a18;
}
.auth-art .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; animation: drift 18s ease-in-out infinite alternate; }
.auth-art .b1 { width: 520px; height: 520px; background: #4f46e5; top: -160px; left: -120px; }
.auth-art .b2 { width: 460px; height: 460px; background: #a21caf; bottom: -180px; right: -120px; animation-delay: -6s; opacity: .55; }
.auth-art .b3 { width: 340px; height: 340px; background: #0891b2; top: 40%; left: 45%; animation-delay: -12s; opacity: .35; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 40px) scale(1.12); } }
.auth-art .grid-bg {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 70% at 40% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 40% 40%, #000 20%, transparent 75%);
}
.auth-art > .in { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.auth-brand .mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 8px 24px -6px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255,255,255,.3); }
.auth-brand small { display: block; font-size: 12px; color: #9aa0c7; font-weight: 500; letter-spacing: 0; }
.auth-copy { margin-top: auto; max-width: 560px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 560;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #dfe1ff; backdrop-filter: blur(8px);
}
.pill b { background: var(--grad); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.auth-copy h1 { font-size: 46px; line-height: 1.06; letter-spacing: -0.04em; font-weight: 740; margin: 22px 0 16px; color: #fff; }
.auth-copy h1 em {
  font-style: normal; background: linear-gradient(90deg, #a5b4fc, #e879f9 60%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-copy p { color: #a9aed6; font-size: 16px; line-height: 1.6; margin: 0; max-width: 500px; }
.auth-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.auth-feats div {
  padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); font-size: 12.5px; color: #c3c7ea;
  backdrop-filter: blur(10px);
}
.auth-feats div .ico { color: #a5b4fc; margin-bottom: 8px; display: block; }
.auth-feats div b { display: block; color: #fff; font-size: 13.5px; margin-bottom: 2px; font-weight: 620; }

.mock {
  position: absolute; right: 56px; top: 110px; width: 330px; border-radius: 18px; padding: 16px; z-index: 2;
  background: rgba(17, 20, 45, .62); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08); animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }
.mock .mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mock .mh b { font-size: 13px; font-weight: 640; }
.mock .mh span { font-size: 11px; color: #9aa0c7; }
.mock .row {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); margin-bottom: 8px;
  font-size: 12.5px; border: 1px solid rgba(255, 255, 255, .06); opacity: 0; animation: rowin .6s ease forwards;
}
.mock .row:nth-child(2) { animation-delay: .4s; } .mock .row:nth-child(3) { animation-delay: .9s; } .mock .row:nth-child(4) { animation-delay: 1.4s; }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mock .row .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(165, 180, 252, .14); color: #c7d2fe; }
.mock .row .gr { flex: 1; min-width: 0; }
.mock .row .gr small { display: block; color: #8f95c4; font-size: 11px; }
.mock .ok { color: #4ade80; display: inline-flex; align-items: center; gap: 4px; font-weight: 620; font-size: 11.5px; }
.mock .scan { height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 10px; }
.mock .scan span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, #a5b4fc, transparent); animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.auth-foot { margin-top: 34px; display: flex; gap: 22px; color: #7c82ad; font-size: 12px; flex-wrap: wrap; }
.auth-foot span { display: inline-flex; align-items: center; gap: 6px; }

.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(28px, 6vw, 88px); background: #fff; position: relative; }
.auth-form .box { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-form h2 { font-size: 28px; letter-spacing: -0.03em; font-weight: 720; }
.auth-form .lead { color: var(--muted); margin: 8px 0 28px; font-size: 14.5px; }
.inp { position: relative; }
.inp > .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.inp input { padding-left: 40px; height: 46px; border-radius: 12px; font-size: 14.5px; }
.inp .reveal { position: absolute; right: 6px; top: 6px; height: 34px; width: 34px; border: 0; background: transparent; border-radius: 8px; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.inp .reveal:hover { background: var(--surface-2); color: var(--ink-2); }
.auth-form .btn.primary { width: 100%; height: 48px; border-radius: 12px; font-size: 15px; margin-top: 8px; }
.auth-form .btn.primary .ico { transition: transform .2s; }
.auth-form .btn.primary:hover .ico { transform: translateX(3px); }
.secure { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; }
.secure .ico { color: var(--pass); }
.auth-legal { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .mock { display: none; }
}
@media (max-width: 1100px) {
  .grid.side-r { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .ring-wrap { display: none; }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form { min-height: 100vh; padding: 32px 20px 64px; }
  .app { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; }
  .org, .side-foot .me .who { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; overflow: visible; }
  .nav .label { display: none; }
  .nav a.on::before { display: none; }
  .topbar { padding: 12px 16px; position: static; height: auto; flex-wrap: wrap; gap: 10px; }
  .topbar .crumbs { flex: 1 1 100%; }
  .topbar .chip:last-child { display: none; }
  .hero .facts { gap: 16px 24px; }
  .page-head .actions { width: 100%; }
  .search { display: none; }
  .content { padding: 20px 16px 48px; }
  .grid.two, .grid.three, .shots { grid-template-columns: 1fr; }
  .donut-row { grid-template-columns: 1fr; justify-items: center; }
  .filters input[type=search] { width: 100%; }
  .hero { padding: 22px; }
  .hero h1 { font-size: 22px; }
}
