/* Vote Admin — clear sections, colour-coded activity and readable charts.
   Theme follows the system. Status always includes a label. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(vendor/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(vendor/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  color-scheme: light dark;
  --page: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --field: #ffffff;
  --line: #e4e7ef;
  --line-2: #d4d3cc;
  --ink: #1d1d1b;
  --ink-2: #5d5c57;
  --ink-3: #8f8d86;
  --accent: #4b57c9;
  --accent-ink: #ffffff;
  --accent-soft: rgba(75, 87, 201, 0.10);
  --accent-hover: #3f4ab3;
  --series-1: #5a67d8;
  --series-1-soft: rgba(90, 103, 216, 0.10);
  --good: #3f9a5b;
  --good-text: #2f6f43;
  --warning: #d29a2a;
  --serious: #d9844f;
  --critical: #c8504a;
  --critical-text: #a8413c;
  --critical-soft: rgba(200, 80, 74, 0.08);
  --note: #fbf6ea;
  --note-line: #eadcb8;
  --note-ink: #6a5420;
  --scrim: rgba(20, 20, 18, 0.32);
  --shadow: 0 1px 2px rgba(20, 20, 18, 0.04);
  --shadow-lg: 0 18px 48px rgba(20, 20, 18, 0.18);
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font);
  /* One scale for a dense tool: title 22, section 17, card 15, body 14,
     secondary 13, caption 12. */
  --fs-title: 22px;
  --fs-section: 17px;
  --fs-card: 15px;
  --fs-body: 14px;
  --fs-secondary: 13px;
  --fs-caption: 12px;
  --fs-button: 14px;
  --fw-title: 600;
  --fw-section: 600;
  --fw-card: 500;
  --fw-body: 400;
  --fw-button: 500;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #11151f;
    --surface: #1b2130;
    --surface-2: #242c3d;
    --field: #161c29;
    --line: #30394c;
    --line-2: #3e3e3a;
    --ink: #ecebe7;
    --ink-2: #b3b2ac;
    --ink-3: #858480;
    --accent: #8d97f2;
    --accent-ink: #15162a;
    --accent-soft: rgba(141, 151, 242, 0.14);
    --accent-hover: #a2abf5;
    --series-1: #8d97f2;
    --series-1-soft: rgba(141, 151, 242, 0.14);
    --good: #5fbf7c;
    --good-text: #7fcf96;
    --warning: #e0b04a;
    --critical: #e0726b;
    --critical-text: #ef8f88;
    --critical-soft: rgba(224, 114, 107, 0.10);
    --note: #26221a;
    --note-line: #4a3f26;
    --note-ink: #e6cf98;
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: none;
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: var(--fw-body) var(--fs-body)/1.55 var(--font); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: var(--fs-secondary); }
h1 { font-size: var(--fs-title); line-height: 1.25; margin: 0; font-weight: var(--fw-title); letter-spacing: -0.015em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
h2 { font-size: var(--fs-section); margin: 0 0 12px; font-weight: var(--fw-section); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-secondary); margin: 18px 0 8px; font-weight: var(--fw-card); color: var(--ink-2); }
h1, h2, h3, .brand { font-family: var(--font-display); }
.muted { color: var(--ink-2); }
.small, small { font-size: var(--fs-caption); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 40px; color: var(--ink-2); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.side { background: var(--page); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: var(--fw-title); font-size: var(--fs-card); color: var(--ink); margin: 2px 10px 22px; letter-spacing: -0.01em; }
.brand span { color: var(--ink-3); font-weight: var(--fw-body); }
.brand:hover { text-decoration: none; }
.brand-lg { font-size: var(--fs-section); margin: 0 0 18px; }
.mark { width: 24px; height: 16px; position: relative; display: inline-block; }
.mark::before, .mark::after { content: ''; position: absolute; top: 1px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink); }
.mark::before { left: 0; }
.mark::after { left: 8px; border-color: var(--accent); }
.side nav { display: grid; gap: 1px; }
.side nav a { color: var(--ink-2); padding: 7px 10px; border-radius: 8px; font-size: var(--fs-body); font-weight: var(--fw-body); }
.side nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.side nav a[aria-current] { background: var(--surface); color: var(--ink); font-weight: var(--fw-card); box-shadow: inset 2px 0 0 var(--accent), var(--shadow); }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; font-size: var(--fs-secondary); }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
#page { padding: 28px 32px 72px; max-width: 1280px; outline: none; }
.page-head { margin-bottom: 22px; display: grid; gap: 6px; }
.page-head > p { margin: 0; color: var(--ink-2); max-width: 78ch; }
.crumbs { margin: 0 0 4px; font-size: var(--fs-caption); }

/* ---------- controls ---------- */
.btn { font: inherit; font-size: var(--fs-button); font-weight: var(--fw-button); display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background 120ms, border-color 120ms; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn-danger:hover { filter: brightness(0.94); background: var(--critical); }
.btn-danger-ghost { color: var(--critical-text); border-color: var(--line-2); }
.btn-danger-ghost:hover { background: var(--critical-soft); }
.btn-xs { height: 28px; padding: 0 10px; border-radius: 7px; font-size: var(--fs-secondary); }
.btn-block { width: 100%; }
.field { display: grid; gap: 5px; font-size: var(--fs-secondary); }
.field > span { color: var(--ink-2); font-weight: var(--fw-card); }
.field em { font-style: normal; color: var(--ink-3); font-weight: var(--fw-body); }
.field small { color: var(--ink-3); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; min-height: 34px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.filters .field { min-width: 150px; }
.field-grow { flex: 1 1 280px; }
.seg { font: inherit; font-size: var(--fs-secondary); font-weight: var(--fw-button); height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; }
.seg:hover { background: var(--surface-2); text-decoration: none; }
.seg.is-on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* ---------- chips: a dot and a word, never color alone ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: var(--fs-caption); font-weight: var(--fw-body); color: var(--ink-2); background: var(--surface-2); border: 0; white-space: nowrap; vertical-align: middle; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.chip-good i { background: var(--good); }
.chip-warning i { background: var(--warning); }
.chip-critical i { background: var(--critical); }
.chip-critical { color: var(--critical-text); background: var(--critical-soft); }
.chip-accent i { background: var(--accent); }
.chip-muted { color: var(--ink-3); }
.chip-muted i { background: var(--line-2); }

/* ---------- cards, tiles, figures ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card > p:first-of-type { margin-top: 0; }
.card p { color: var(--ink-2); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.cols .card { margin: 0; }
.cols + .card, .card + .cols { margin-top: 16px; }
.cols { margin-bottom: 16px; }
/* The dashboard's first row: the total beside six tiles in two even rows. */
.hero-row { display: grid; grid-template-columns: minmax(240px, 1fr) 3fr; gap: 12px; margin-bottom: 12px; }
.hero-row .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; align-content: center; gap: 6px; box-shadow: var(--shadow); }
.hero-value { font-size: 44px; line-height: 1.05; font-weight: var(--fw-title); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tiles-wide { margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; align-content: start; position: relative; min-height: 92px; box-shadow: var(--shadow); }
.tile-label { font-size: var(--fs-secondary); color: var(--ink-2); font-weight: var(--fw-body); }
.tile-value { font-size: var(--fs-title); font-weight: var(--fw-title); line-height: 1.2; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: var(--fs-caption); color: var(--ink-3); }
.dash { transition: opacity 160ms; }
.dash.is-refreshing { opacity: 0.55; }
.grid-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.chart { margin: 0; }
.chart .card-head b { display: block; }
.chart .card-head small { color: var(--ink-3); }
.chart-plot { position: relative; outline: none; }
.chart-plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--ink-3); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1-soft); stroke: none; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .end-label { fill: var(--ink); font-size: var(--fs-caption); font-weight: var(--fw-card); }
.chart .cross { stroke: var(--line-2); stroke-width: 1; }
.chart-tip { position: absolute; top: -6px; left: 0; min-width: 100px; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--page); font-size: var(--fs-caption); pointer-events: none; display: grid; box-shadow: var(--shadow-lg); }
.chart-tip b { font-size: var(--fs-secondary); }
.chart-tip span { color: color-mix(in srgb, var(--page) 70%, transparent); }
.chart-empty { color: var(--ink-3); padding: 40px 0; text-align: center; }
.chart-table { width: 100%; border-collapse: collapse; font-size: var(--fs-secondary); }
.chart-table th, .chart-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chart-table td:last-child, .chart-table th:last-child { text-align: right; }
.bar-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 44%) 1fr auto; align-items: center; gap: 10px; border-radius: 6px; padding: 2px 4px; }
.bar-row:hover, .bar-row:focus-visible { background: var(--surface-2); }
.bar-label { color: var(--ink-2); font-size: var(--fs-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; display: block; background: var(--surface-2); border-radius: 999px; }
.bar-fill { display: block; height: 10px; background: var(--series-1); border-radius: 999px; }
.bar-value { font-size: var(--fs-secondary); font-weight: var(--fw-card); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }

/* ---------- tables and lists ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card .table-wrap { border-radius: 10px; box-shadow: none; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.table th { font-size: var(--fs-caption); text-transform: none; color: var(--ink-3); font-weight: var(--fw-card); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table tr:last-child td { border-bottom: 0; }
.table-compact td { padding: 8px 12px; font-size: var(--fs-secondary); }
.table tr.is-muted td { color: var(--ink-3); }
.person { display: grid; color: var(--ink); }
.person small { color: var(--ink-3); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn + .btn { margin-left: 6px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 12px 0; color: var(--ink-2); font-size: var(--fs-secondary); }
.pager span { margin-right: auto; }
.facts { margin: 0; display: grid; }
.facts > div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.stack { display: grid; gap: 12px; }
.empty { padding: 36px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.alert { background: var(--critical-soft); border: 1px solid color-mix(in srgb, var(--critical) 25%, transparent); color: var(--critical-text); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.prompt { margin: 8px 0; padding: 8px 12px; border-left: 2px solid var(--line-2); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.prompt small { display: block; color: var(--ink-3); }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.photo-slot { width: 96px; height: 128px; border-radius: 10px; background: var(--surface-2); overflow: hidden; display: block; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-head .muted { margin-left: auto; }
.report-people { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting small { display: block; color: var(--ink-3); }
.setting-value { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.details td { background: var(--surface-2); }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
/* Learning › What was sent: the digest's input as it went, wrapped and scrollable. */
.sent { margin-top: 12px; }
.sent summary { cursor: pointer; }
.sent pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow: auto; background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

/* ---------- dialogs & toasts ---------- */
.modal-layer { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.modal-form { padding: 22px; display: grid; gap: 14px; }
.modal-form h2 { margin: 0; }
.modal-body { margin: 0; color: var(--ink-2); }
.modal-error { margin: 0; color: var(--critical-text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; transition: opacity 180ms, transform 180ms; background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 10px; z-index: 60; max-width: min(560px, calc(100% - 32px)); pointer-events: none; box-shadow: var(--shadow-lg); font-size: var(--fs-secondary); }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.toast.is-critical { background: var(--critical); color: #fff; }
.toast.is-good { background: var(--good-text); color: #fff; }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; }
.auth-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: var(--fs-title); }
.auth-foot { color: var(--ink-3); font-size: var(--fs-caption); text-align: center; }
.form-error { color: var(--critical-text); margin: 0; }
.qr { display: block; margin: 4px auto; background: #fff; border-radius: 8px; }
.secret { word-break: break-all; }
.banner { margin: 0; padding: 10px 32px; background: var(--note); border-bottom: 1px solid var(--note-line); color: var(--note-ink); font-size: var(--fs-secondary); }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 12px 0 0; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .side nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
  .top { padding: 0 16px; position: static; }
  #page { padding: 20px 16px 48px; }
  .hero-row { grid-template-columns: 1fr; }
  .hero-row .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .diff { grid-template-columns: 1fr; }
}

/* ---------- reported chat photos ---------- */
.report-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.modal-viewer { width: min(640px, 100%); }
.modal-sheet { width: min(720px, 100%); }
.sheet-body { max-height: 65vh; overflow: auto; display: grid; gap: 14px; }
.evidence-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.evidence-messages li { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); overflow-wrap: anywhere; }
.evidence-messages li[data-from="reported"] { border-left: 2px solid var(--critical); }
.evidence-messages li[data-from="reporter"] { border-left: 2px solid var(--line-2); }
.viewer-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: var(--surface-2); border-radius: 10px; -webkit-user-select: none; user-select: none; }

/* Operations and photo review */
.problems { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.problems li { padding: 9px 12px; border-radius: 8px; background: var(--surface-2); border-left: 2px solid var(--warning); }
.problems li.is-bad { border-left-color: var(--critical); }
.problems li.is-info { border-left-color: var(--line-2); }
.chip-bad { color: var(--critical-text); background: var(--critical-soft); }
.nowrap { white-space: nowrap; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.review-photo { aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.review-photo img { width: 100%; height: 100%; object-fit: cover; }
.row-actions { display: flex; gap: 8px; }

/* Verification: one request at a time, the selfie large beside the profile photos */
kbd { font: inherit; font-size: var(--fs-caption); display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; text-align: center; color: var(--ink-2); background: var(--surface-2); line-height: 18px; }
.btn-primary kbd { color: var(--accent-ink); background: transparent; border-color: rgba(255, 255, 255, 0.5); }
.verify-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.verify-head h2 { margin: 0 0 4px; }
.verify-pose { display: grid; gap: 2px; max-width: 34ch; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.verify-pose b { font-size: var(--fs-body); }
.verify-stage { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; margin: 16px 0; align-items: start; }
.verify-selfie { margin: 0; aspect-ratio: 3 / 4; max-height: 72vh; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.verify-selfie img { width: 100%; height: 100%; object-fit: contain; -webkit-user-select: none; user-select: none; }
.verify-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.verify-photo { margin: 0; aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.verify-photo img { width: 100%; height: 100%; object-fit: cover; -webkit-user-select: none; user-select: none; }
.verify-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verify-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.verify-reasons[hidden] { display: none; }
.verify-reasons p { flex-basis: 100%; margin: 0; }
@media (max-width: 860px) { .verify-stage { grid-template-columns: 1fr; } }

/* Dashboard accents use the same category colours in cards and charts. */
.tone-indigo { --series-1: #5755d9; --series-1-soft: #5755d916; }
.tone-blue { --series-1: #2870cf; --series-1-soft: #2870cf16; }
.tone-teal { --series-1: #168375; --series-1-soft: #16837516; }
.tone-violet { --series-1: #8751c3; --series-1-soft: #8751c316; }
.tone-rose { --series-1: #bc527f; --series-1-soft: #bc527f16; }
.tone-amber { --series-1: #a86a16; --series-1-soft: #d99a261b; }
.tone-slate { --series-1: #69758e; --series-1-soft: #69758e13; }
.dashboard-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 24px; }
.dashboard-head h1 { font-size: 30px; letter-spacing: -.035em; margin: 5px 0 8px; }
.dashboard-head p { margin: 0; font-size: 12px; color: var(--ink-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; color: var(--ink-2); }
.environment-label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 6px 10px; border-radius: 20px; font-size: 11px; white-space: nowrap; }
.environment-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.dashboard-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.dashboard-toolbar .filters { margin: 0; }
.dashboard-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 14px; }
.dashboard-section-head h2 { margin: 0 0 3px; font-size: 16px; }
.dashboard-section-head p { color: var(--ink-2); font-size: 12px; margin: 0; }
.text-link { font-size: 12px; font-weight: 600; white-space: nowrap; }
.period-label { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.dash .hero-row { grid-template-columns: minmax(230px, 1.1fr) 3fr; gap: 14px; }
.dash .hero { background: linear-gradient(140deg, #272c58, #474a83); color: #fff; border: 0; padding: 26px; position: relative; overflow: hidden; }
.dash .hero::after { content: ''; position: absolute; width: 150px; height: 150px; border: 1px solid #ffffff20; border-radius: 50%; right: -70px; top: -70px; box-shadow: 0 0 0 24px #ffffff08, 0 0 0 50px #ffffff05; pointer-events: none; }
.dash .hero .tile-label { color: #e0e2ff; }
.dash .hero .tile-sub { color: #e0e2ff; line-height: 1.7; max-width: 190px; }
.dash .hero-value { font-size: 44px; margin: 8px 0; }
.hero-link { color: #fff; font-size: 12px; margin-top: 18px; font-weight: 500; }
.dash .tile { padding: 17px 18px 14px; min-height: 112px; background: linear-gradient(135deg, var(--series-1-soft), transparent 78%), var(--surface); }
.dash .tile::before { content: ''; width: 22px; height: 3px; background: var(--series-1); border-radius: 2px; margin-bottom: 9px; }
.dash .tile-value { font-size: 27px; }
.dash .tile-sub { color: var(--ink-2); font-size: 11px; line-height: 1.5; }
.dashboard-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 12px; margin-top: 16px; }
.dashboard-shortcuts > a { display: flex; align-items: center; gap: 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; transition: border-color 150ms; }
.dashboard-shortcuts > a:hover { border-color: var(--accent); text-decoration: none; }
.dashboard-shortcuts > a > span:last-child { margin-left: auto; color: var(--ink-2); }
.dashboard-shortcuts b { font-size: 12px; display: block; }
.dashboard-shortcuts small { display: block; font-size: 11px; color: var(--ink-2); margin-top: 3px; }
.shortcut-symbol { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 10px; width: 32px; height: 32px; flex-shrink: 0; font-size: 16px; }
.dash .tiles-wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dash .grid-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash .chart { padding: 22px; }
.dash .chart .card-head { margin-bottom: 20px; }
.dash .chart .card-head b::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--series-1); border-radius: 50%; margin-right: 8px; }
.dash .chart .card-head small { display: block; margin: 5px 0 0 16px; color: var(--ink-2); font-size: 11px; }
.dash .chart .line { stroke-width: 2.25; }
.dash .chart .tick { fill: var(--ink-2); font-size: 11px; }
.funnel-card { border-top: 3px solid var(--accent); }
.funnel-card:nth-child(3n + 2) { border-top-color: #168375; }
.funnel-card:nth-child(3n) { border-top-color: #bc527f; }
.funnel-rate { display: block; font-variant-numeric: tabular-nums; }
.funnel-meter { display: block; width: 100%; max-width: 180px; height: 7px; margin-top: 5px; accent-color: var(--accent); }
.funnel-meter::-webkit-meter-bar { background: var(--surface-2); border: none; border-radius: 5px; }
.funnel-meter::-webkit-meter-optimum-value { background: var(--accent); border-radius: 5px; }
@media (prefers-color-scheme: dark) {
  .tone-indigo { --series-1: #a6a4ff; --series-1-soft: #a6a4ff16; }
  .tone-blue { --series-1: #7ab5ff; --series-1-soft: #7ab5ff16; }
  .tone-teal { --series-1: #65c9b8; --series-1-soft: #65c9b816; }
  .tone-violet { --series-1: #c399f2; --series-1-soft: #c399f216; }
  .tone-rose { --series-1: #f09bbb; --series-1-soft: #f09bbb16; }
  .tone-amber { --series-1: #e7b66b; --series-1-soft: #e7b66b16; }
  .tone-slate { --series-1: #a4b2ce; --series-1-soft: #a4b2ce13; }
}
@media (max-width: 1100px) {
  .dash .tiles-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dash .hero-row { grid-template-columns: 1fr; }
  .dash .hero { min-height: 210px; }
  .dash .hero .tile-sub { max-width: none; }
  .side nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .side nav a { white-space: nowrap; }
}
@media (max-width: 600px) {
  .dashboard-head h1 { font-size: 27px; }
  .dashboard-section-head { align-items: start; }
  .dashboard-section-head p { max-width: 220px; }
  .dash .tiles-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash .grid-charts { grid-template-columns: 1fr; }
  .dashboard-shortcuts { grid-template-columns: 1fr; }
  .dash .chart { padding: 18px; }
}

/* ---------- shared workspace: all admin routes ---------- */
.nav-group { display: grid; gap: 2px; margin-bottom: 14px; }
.nav-label { padding: 8px 10px 4px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.side nav a { display: flex; align-items: center; gap: 10px; }
.side nav a::before { content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--line-2); }
.side nav a[aria-current]::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
#page[data-page] { --section-color: var(--accent); }
#page:is([data-page="users"], [data-page="support"]) { --section-color: #168a83; }
#page:is([data-page="media"], [data-page="verification"]) { --section-color: #9170cf; }
#page:is([data-page="reports"], [data-page="operations"]) { --section-color: #bc812c; }
#page:is([data-page="learning"], [data-page="spotlight"]) { --section-color: #b96383; }
#page[data-page] > .page-head { padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--section-color); border-radius: var(--radius); gap: 9px; }
#page[data-page] > .page-head h1 { font-size: 27px; letter-spacing: -.03em; }
#page[data-page] > .filters { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
#page[data-page] .table-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
#page[data-page] .card .table-wrap { border-radius: 8px; }
#page[data-page] .table th { background: var(--surface-2); font-size: 11px; letter-spacing: .025em; }
#page[data-page] .table td { padding-top: 13px; padding-bottom: 13px; }
#page[data-page] .table tbody tr:hover { background: color-mix(in srgb, var(--section-color) 4%, var(--surface)); }
#page[data-page] .empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px 24px; }
#page[data-page] .card > h2 { display: flex; align-items: center; gap: 9px; }
#page[data-page] .card > h2::before { content: ''; display: block; height: 16px; width: 4px; border-radius: 8px; background: var(--section-color); flex-shrink: 0; }
.overview-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 24px; }
.overview-stat { font: inherit; text-align: left; color: var(--ink); display: grid; align-content: start; gap: 8px; padding: 19px 22px; border: 1px solid var(--line); border-top: 3px solid var(--section-color); border-radius: var(--radius); background: var(--surface); min-width: 0; box-shadow: var(--shadow); }
.overview-stat > span { color: var(--ink-2); font-size: 12px; }
.overview-stat > b { font-size: 30px; line-height: 1.25; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.overview-stat small { color: var(--ink-2); font-size: 11px; font-weight: 400; letter-spacing: normal; }
.overview-stat:nth-child(2) { border-top-color: var(--good); }
.overview-stat:nth-child(3) { border-top-color: var(--accent); }
button.overview-stat { cursor: pointer; }
button.overview-stat:hover { background: var(--accent-soft); }
[data-page="media"] :is([data-list], [data-community], [data-rejected]) { scroll-margin-top: 72px; margin-bottom: 28px; }
[data-page="media"] .review-card { overflow: hidden; padding: 12px; }
[data-page="media"] .review-card > p { padding: 0 4px; }
[data-page="media"] .row-actions { border-top: 1px solid var(--line); padding: 12px 4px 0; }
[data-page="media"] .review-photo { background: linear-gradient(135deg, var(--surface-2), var(--accent-soft)); border-radius: 9px; }
.verify-count { display: inline-block; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; }
.verify-pose { background: var(--accent-soft); padding: 14px 16px; border-radius: 12px; }
.verify-actions { border-top: 1px solid var(--line); padding-top: 18px; }
.ops-jobs tr[data-health="failed"] td:first-child { box-shadow: inset 3px 0 var(--critical); }
.ops-jobs tr[data-health="not_configured"] td:first-child { box-shadow: inset 3px 0 var(--warning); }
.capacity-list { list-style: none; padding: 0; display: grid; gap: 15px; }
.capacity-list li > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.capacity-list meter { display: block; width: 100%; height: 13px; margin-top: 5px; }
meter::-webkit-meter-bar { background: var(--surface-2); border: 0; border-radius: 99px; }
meter::-webkit-meter-optimum-value { background: var(--section-color, var(--accent)); border-radius: 99px; }
meter::-moz-meter-bar { background: var(--section-color, var(--accent)); border-radius: 99px; }
.report-method summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.report-method[open] summary { margin-bottom: 16px; }
.report-method p { max-width: 95ch; line-height: 1.8; font-size: 12px; }
.measure-share { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.measure-share meter { width: 72px; height: 11px; }
[data-page="measures"] [data-body] > .card { border-top: 3px solid var(--section-color); }
[data-page="measures"] [data-body] > .card:nth-child(3n + 2) { --section-color: #168a83; }
[data-page="measures"] [data-body] > .card:nth-child(3n) { --section-color: #9170cf; }
@media (prefers-color-scheme: dark) {
  #page:is([data-page="users"], [data-page="support"]) { --section-color: #5ec8bd; }
  #page:is([data-page="media"], [data-page="verification"]) { --section-color: #b69aef; }
  #page:is([data-page="reports"], [data-page="operations"]) { --section-color: #dfad60; }
  #page:is([data-page="learning"], [data-page="spotlight"]) { --section-color: #e795b4; }
}
@media (max-width: 900px) {
  .nav-group { display: contents; }
  .nav-label { display: none; }
  .overview-strip { gap: 9px; }
  .overview-stat { padding: 14px; }
  .overview-stat > b { font-size: 24px; }
}
@media (max-width: 560px) {
  #page[data-page] > .page-head { padding: 18px; }
  #page[data-page] > .page-head h1 { font-size: 24px; }
  .overview-strip { grid-template-columns: 1fr; }
  .overview-stat { grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
  .overview-stat > b { grid-column: 2; grid-row: 1 / span 2; }
  .overview-stat > small { grid-column: 1; }
  .capacity-list li > div { flex-wrap: wrap; gap: 4px; }
  .verify-actions { gap: 10px; }
}
/* Keep visually hidden column labels inside their scrolling table. Without
   a containing block, an off-screen absolute label can widen the document. */
.table-wrap { position: relative; }

.queue-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }

/* Task-first admin views: summaries lead, diagnostic detail stays available. */
.results-caption { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; margin: 16px 0; }
.results-caption span { color: var(--ink-2); font-size: 12px; }
.dashboard-brief { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 24px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.dashboard-brief h2 { font-size: clamp(20px, 2.4vw, 29px); line-height: 1.3; max-width: 29ch; margin: 8px 0 12px; letter-spacing: -.035em; }
.dashboard-brief p, .attention-panel p { font-size: 12px; color: var(--ink-2); max-width: 65ch; margin: 0; }
.brief-total { display: grid; gap: 4px; padding-left: 28px; border-left: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.brief-total .hero-value { font-size: 29px; color: var(--ink); font-weight: 600; line-height: 1.2; }
.brief-total a { margin-top: 8px; }
.attention-panel { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 22px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.attention-panel h2 { margin: 7px 0 10px; }
.attention-panel .attention-report { padding: 0 20px; border: 0; border-radius: 0; border-left: 1px solid var(--line); background: none; box-shadow: none; gap: 6px; }
.attention-report .btn { margin-top: 5px; justify-self: start; }
.attention-links { display: grid; align-content: center; gap: 18px; }
.attention-links a { display: grid; gap: 4px; font-size: 12px; }
.attention-links span { color: var(--ink-2); }
.weekly-activity { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.weekly-activity .tile { padding: 20px; background: var(--surface); }
.weekly-activity .tile-value { font-size: 30px; margin: 5px 0; }
.dashboard-more { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 18px; padding: 18px 20px; }
.dashboard-more > summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.dashboard-more[open] > summary { margin-bottom: 20px; }
.snapshot-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.audit-search { max-width: 440px; margin: 16px 0 10px; }
.audit-change-preview { display: block; color: var(--ink-2); max-width: 45ch; overflow-wrap: anywhere; margin-top: 5px; }
.audit-changes { margin: 0 0 16px; display: grid; gap: 10px; }
.audit-changes > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.audit-changes dt { text-transform: capitalize; color: var(--ink-2); }
.audit-changes dd { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.audit-changes dd > span:first-child { color: var(--ink-2); }
.audit-changes dd > strong { font-weight: 500; }
.access-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-block: 1px solid var(--line); padding: 16px 0; margin: 16px 0; }
.access-facts > div { display: grid; gap: 5px; }
.access-facts span { color: var(--ink-2); font-size: 12px; }
.worldwide-access .card-head p { margin: 4px 0 0; font-size: 12px; }
@media (max-width: 900px) {
 .attention-panel { grid-template-columns: 1fr 1fr; }
 .attention-panel > div:first-child { grid-column: 1 / -1; }
 .attention-panel .attention-report { padding: 0; border-left: 0; }
 .weekly-activity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
 .dashboard-brief { grid-template-columns: 1fr; gap: 18px; }
 .brief-total { border-left: 0; padding-left: 0; grid-template-columns: auto 1fr; align-items: center; gap: 6px 12px; }
 .brief-total a { grid-column: 1 / -1; }
 .attention-panel { grid-template-columns: 1fr; padding: 18px; }
 .attention-links { border-top: 1px solid var(--line); padding-top: 18px; }
 .snapshot-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .audit-changes > div { grid-template-columns: 1fr; gap: 3px; }
 .access-facts { grid-template-columns: 1fr; }
}
