:root {
  --ink: #eaf1fb;
  --muted: #8e9db1;
  --line: #263247;
  --canvas: #0b111b;
  --panel: #111927;
  --panel-2: #151f30;
  --blue: #5b7cff;
  --mint: #43d1a0;
  --amber: #efbb56;
  --red: #f17474;
  --display: "Arial Narrow", "Roboto Condensed", "Microsoft YaHei", sans-serif;
  --body: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  --utility: "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: var(--body); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
[hidden] { display: none !important; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 70% 20%, #182a46 0, transparent 35%), linear-gradient(135deg, #0b111b, #101a28); }
.login-card { width: min(460px, 100%); padding: 42px; border: 1px solid var(--line); background: rgba(17,25,39,.94); box-shadow: 0 34px 90px rgba(0,0,0,.4); border-radius: 24px; }
.login-card h1 { font: 700 44px/1 var(--display); margin: 16px 0 14px; letter-spacing: -.04em; }
.login-card p { color: var(--muted); line-height: 1.7; margin: 0 0 28px; }
.login-card label, .note-label { display: grid; gap: 9px; color: var(--muted); font-size: 13px; }
.login-card input, textarea, .search input { color: var(--ink); border: 1px solid var(--line); background: #0c1421; border-radius: 12px; padding: 13px 14px; }
.login-card button { width: 100%; margin-top: 16px; border: 0; border-radius: 12px; padding: 14px; background: var(--mint); color: #07150f; font-weight: 800; cursor: pointer; }
.form-error { display: block; min-height: 20px; margin-top: 12px; color: var(--red); font-size: 13px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 294px minmax(0, 1fr) 330px; grid-template-rows: 72px minmax(0, 1fr); }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: 294px 1fr auto; align-items: center; border-bottom: 1px solid var(--line); background: #0d1522; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: #0c1421; border-radius: 10px; font: 800 14px/1 var(--utility); }
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; color: var(--muted); margin-top: 3px; font: 10px/1 var(--utility); letter-spacing: .08em; }
.progress-strip { display: flex; justify-content: center; gap: 26px; }
.metric { display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 12px; }
.metric b { color: var(--ink); font: 700 19px/1 var(--utility); }
.metric.approved b { color: var(--mint); }
.metric.missing b { color: var(--amber); }
.quiet-button { border: 0; background: transparent; color: var(--muted); padding: 12px 22px; cursor: pointer; }

.queue-panel { border-right: 1px solid var(--line); background: #0d1522; min-height: 0; display: flex; flex-direction: column; }
.queue-tools { padding: 18px 16px 14px; border-bottom: 1px solid var(--line); }
.search { display: grid; gap: 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.search input { width: 100%; padding: 11px 12px; }
.filter-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 10px; }
.filter-row button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 9px; padding: 8px 4px; font-size: 12px; cursor: pointer; }
.filter-row button.active { background: #203251; color: #cbd7ff; border-color: #365181; }
.queue-heading { display: flex; justify-content: space-between; padding: 13px 16px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.queue-heading small { font-family: var(--utility); }
.player-queue { overflow: auto; min-height: 0; padding: 8px; }
.player-row { width: 100%; display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 12px 10px; border-radius: 12px; cursor: pointer; }
.player-row:hover { background: #131e2e; }
.player-row.active { background: #1a2941; }
.status-dot { width: 7px; height: 28px; border-radius: 99px; background: var(--amber); }
.player-row[data-status="approved"] .status-dot { background: var(--mint); }
.player-row[data-status="rejected"] .status-dot { background: var(--red); }
.player-row[data-status="no_candidate"] .status-dot, .player-row[data-status="skipped"] .status-dot { background: #526176; }
.player-row strong { display: block; font-size: 14px; }
.player-row small { display: block; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.candidate-count { font: 11px/1 var(--utility); color: var(--muted); }

.review-stage { min-width: 0; overflow: auto; padding: 28px 30px 40px; }
.player-header { display: flex; justify-content: space-between; align-items: end; min-height: 98px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.player-header h2 { font: 700 clamp(34px, 5vw, 62px)/.92 var(--display); letter-spacing: -.045em; margin: 11px 0 8px; }
.player-header p { color: var(--muted); margin: 0; }
.player-code { text-align: right; color: var(--muted); font: 11px/1.7 var(--utility); }
.eyebrow { color: #7d97ff; font: 700 10px/1 var(--utility); letter-spacing: .16em; }
.candidate-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; padding: 22px 0; min-height: 400px; }
.candidate-card { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; overflow: hidden; color: var(--ink); text-align: left; cursor: pointer; padding: 0; transition: border-color .16s ease, transform .16s ease; }
.candidate-card:hover { border-color: #4d6384; transform: translateY(-2px); }
.candidate-card.active { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint); }
.candidate-card.rejected { opacity: .42; }
.image-frame { aspect-ratio: 4/5; background: #0b111b; position: relative; overflow: hidden; }
.image-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.image-badge { position: absolute; top: 10px; left: 10px; padding: 6px 8px; border-radius: 7px; background: rgba(7,13,22,.82); color: var(--mint); font: 10px/1 var(--utility); backdrop-filter: blur(8px); }
.candidate-meta { padding: 12px; }
.candidate-meta strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.candidate-meta span { display: block; color: var(--muted); font: 10px/1.45 var(--utility); margin-top: 5px; }
.empty-state { min-height: 310px; grid-column: 1/-1; display: grid; place-content: center; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }
.empty-state strong { color: var(--ink); font-size: 18px; margin-bottom: 8px; }
.evidence-panel { border-top: 1px solid var(--line); padding: 22px 0; display: grid; grid-template-columns: minmax(220px, .8fr) 1.4fr; gap: 28px; }
.evidence-primary h3 { margin: 9px 0; font-size: 17px; overflow-wrap: anywhere; }
.evidence-primary a { color: var(--mint); font-size: 13px; text-decoration: none; }
.evidence-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.evidence-grid div { border-left: 1px solid var(--line); padding-left: 13px; }
.evidence-grid dt { color: var(--muted); font-size: 11px; }
.evidence-grid dd { margin: 7px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.evidence-grid .warning { color: var(--amber); }

.decision-panel { border-left: 1px solid var(--line); background: var(--panel); padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; }
.decision-copy { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.decision-copy h3 { margin: 10px 0; font: 700 26px/1.05 var(--display); }
.decision-copy p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; }
.check { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 13px; padding: 13px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--mint); }
.check strong, .check small { display: block; }
.check strong { font-size: 13px; }
.check small { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 4px; }
.note-label { margin-top: 3px; }
.note-label textarea { resize: vertical; min-height: 96px; }
.decision-actions { display: grid; gap: 9px; margin-top: auto; }
.decision-actions button { border-radius: 12px; padding: 13px; cursor: pointer; font-weight: 750; }
.approve { border: 0; background: var(--mint); color: #07150f; }
.approve:disabled { cursor: not-allowed; opacity: .32; }
.reject { border: 1px solid #57333a; background: #24171c; color: #ff9a9a; }
.reject:disabled { opacity: .3; cursor: not-allowed; }
.skip { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.save-status { min-height: 18px; font-size: 12px; color: var(--mint); }

@media (max-width: 1080px) {
  .shell { grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: 68px auto auto; }
  .topbar { grid-template-columns: 250px 1fr auto; }
  .decision-panel { grid-column: 2; border-left: 0; border-top: 1px solid var(--line); }
  .progress-strip { gap: 12px; }
  .metric span { display: none; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .topbar { display: flex; position: sticky; height: 64px; justify-content: space-between; }
  .progress-strip { display: none; }
  .queue-panel { border: 0; min-height: auto; }
  .player-queue { display: flex; overflow-x: auto; padding: 8px 12px 13px; }
  .player-row { min-width: 210px; background: #111b2a; margin-right: 8px; }
  .queue-heading { display: none; }
  .review-stage { padding: 22px 16px; }
  .player-header h2 { font-size: 40px; }
  .candidate-rail { grid-template-columns: 78vw 78vw; overflow-x: auto; scroll-snap-type: x mandatory; }
  .candidate-card { scroll-snap-align: start; }
  .evidence-panel { grid-template-columns: 1fr; }
  .decision-panel { padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
  .login-card { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
