/*
 * Compact desktop layout in Spotter's palette (docs/MODERATOR_CONSOLE.md §2).
 *
 * Two things are load-bearing rather than decorative:
 *  - Evidence never shrinks to fit. Its type size is fixed and it wraps and scrolls; a moderator
 *    reading a threat must not be reading it at 11px because the column was tight.
 *  - The evidence column is wider than the decision column, and at 1280x800 the first viewport holds
 *    the case facts, the start of the report, the start of the snapshot and the decision controls.
 */

:root {
  --bg: #101216;
  --surface: #1a1e24;
  --surface-2: #222730;
  --line: #2c323c;
  --accent: #6ea8ff;
  --ink: #101722;
  --text: #f4f6fa;
  --text-2: #b7c0ce;
  --text-3: #8d99aa;
  --danger: #ff8a7a;
  --warn: #ffc46b;
  --ok: #7fd6a2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--text-3); }

/* ── Header ── */
.bar {
  display: flex; align-items: center; gap: 24px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font-weight: 800; letter-spacing: 3px; font-size: 13px; }
.sub { color: var(--text-3); font-size: 13px; }
.env { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
/* Production is the one label that must never be mistaken for anything else. */
.env-prod { background: var(--danger); color: var(--ink); }
.env-dev { background: var(--surface-2); color: var(--text-2); }
.bar nav { display: flex; gap: 16px; margin-left: auto; }
.bar nav a { color: var(--text-2); text-decoration: none; padding: 4px 2px; border-bottom: 2px solid transparent; }
.bar nav a.nav-on { color: var(--text); border-bottom-color: var(--accent); }
.operator { display: flex; align-items: center; gap: 8px; }

.banner:empty { display: none; }
.warn {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: var(--warn); color: var(--ink); font-weight: 600;
}
.warn .btn { background: var(--ink); color: var(--text); }

.view { padding: 20px; max-width: 1400px; margin: 0 auto; }
.view-head { margin-bottom: 14px; }
.view-head h1 { font-size: 20px; }
.state { padding: 24px 0; color: var(--text-3); }
.state-error { color: var(--danger); }

/* ── Buttons, chips, tags ── */
.btn {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--text-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-danger { background: var(--danger); color: var(--ink); border-color: var(--danger); }
.btn-quiet { background: transparent; }
.link-back { background: none; border: 0; color: var(--text-3); cursor: pointer; font: inherit; padding: 0 0 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: flex-end; }
.filters-form { gap: 14px; }
.chip { background: transparent; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font: inherit; cursor: pointer; }
.chip-on { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 600;
}
.tag-urgent, .tag-overdue { background: var(--danger); color: var(--ink); }
.tag-confirmed_violation { background: var(--danger); color: var(--ink); }
.tag-no_violation, .tag-insufficient_evidence { background: var(--surface-2); color: var(--text-2); }

.ref-search { display: flex; gap: 8px; margin-bottom: 16px; }
input, select, textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font: inherit; min-width: 0;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* ── Tables ── */
.queue { width: 100%; border-collapse: collapse; }
.queue th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.queue td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.row { cursor: pointer; }
.row:hover { background: var(--surface); }
.row.overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.row.denied td { color: var(--danger); }

/* ── Case detail ── */
.case-head { margin-bottom: 16px; }
.case-head h1 { font-size: 20px; display: flex; align-items: center; gap: 6px; }
.case-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 10px; }
.fact dt { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); }
.fact dd { font-weight: 600; }

/* Evidence gets the wide column. */
.case-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .case-grid { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.panel h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); margin-bottom: 10px; }
.panel h3 { font-size: 13px; margin: 12px 0 4px; }
.notice { border-color: var(--line); background: var(--surface-2); }
.list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.perms li { border: 0; padding: 1px 0; font-size: 12px; color: var(--text-2); }

.submission { padding: 10px 0; border-bottom: 1px solid var(--line); }
.submission-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; }

.evidence .capture { font-weight: 700; }
.inert-note { margin-top: 10px; font-size: 12px; color: var(--text-3); }
.evidence-field { margin-top: 12px; }
/*
 * The preserved document. Fixed 15px with generous wrapping: evidence is never shrunk to fit a
 * column, and long text scrolls with the page rather than being clipped.
 */
.evidence-text {
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--text-3);
  border-radius: 8px; padding: 12px 14px; font-size: 15px; line-height: 1.6;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.evidence-line { min-height: 1.6em; }
.current summary, .technical summary { cursor: pointer; color: var(--text-3); margin-top: 12px; }

/*
 * A shared workout post reads as the post it was: headline, who shared it, the workout's name, when,
 * and the same one-line summary the app speaks ("6 exercises · 18 sets · 48 min · 2 PRs"). Absent
 * values are simply absent — no placeholder rows, no zeros.
 */
.evidence-doc {
  margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-left: 3px solid var(--text-3);
  border-radius: 8px; background: var(--bg);
}
.doc-headline { font-size: 16px; font-weight: 700; line-height: 1.4; }
.doc-byline { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.doc-title { font-size: 15px; font-weight: 600; margin-top: 10px; }
.doc-when { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.doc-summary { font-size: 15px; margin-top: 8px; }
.doc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.6; }
.doc-list li { overflow-wrap: anywhere; }
.evidence-doc .evidence-field h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); margin-bottom: 4px; }
.technical dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.action { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.review:empty { display: none; }
.review { margin-top: 10px; padding: 12px; border: 1px solid var(--warn); border-radius: 10px; background: var(--surface-2); }
.review h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--warn); }
.confirm-row { display: flex; gap: 8px; margin-top: 12px; }
.action-status:empty { display: none; }
.action-status { margin-top: 8px; font-size: 13px; color: var(--text-2); }

.timeline { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.timeline li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.timeline .evidence-text { flex-basis: 100%; font-size: 14px; }

.locked { max-width: 460px; margin: 80px auto; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.locked h1 { font-size: 22px; }
a.btn { text-decoration: none; display: inline-block; }
