:root {
  --bg: #0c0e13;
  --panel: #141822;
  --panel-2: #1b2130;
  --line: #262d3d;
  --text: #e7ebf3;
  --muted: #8b95a8;
  --accent: #ff6b3d;
  --ok: #3ecf8e;
  --bad: #ff5d5d;
  --warn: #f2c14e;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }

.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: rgba(12, 14, 19, 0.92); position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 17px; color: var(--text); }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); }
.who { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 4px 0 6px; font-size: 26px; letter-spacing: -0.02em; }
.back { font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.clamp { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.flash {
  padding: 10px 14px; border-radius: 10px; margin-bottom: 18px;
  border: 1px solid var(--line); background: var(--panel);
}
.flash.ok { border-color: rgba(62, 207, 142, 0.35); }
.flash.bad { border-color: rgba(255, 93, 93, 0.4); }

.login-card {
  max-width: 380px; margin: 12vh auto; background: var(--panel); padding: 28px;
  border: 1px solid var(--line); border-radius: 16px;
}
.login-card h1 { margin: 0 0 6px; font-size: 24px; }
.login-card form { display: grid; gap: 10px; margin-top: 18px; }
.login-card input, .login-card button { width: 100%; }

label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
input, textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit;
}
textarea { resize: vertical; }
button {
  padding: 10px 16px; border-radius: 10px; border: 0; background: var(--accent);
  color: #14100d; font-weight: 600; font-size: 14px; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button.ghost, .ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button.danger { background: var(--bad); color: #1a0c0c; }

.queue { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 14px; overflow: hidden; }
.queue th, .queue td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.queue th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.queue tr:last-child td { border-bottom: 0; }
.queue tr:hover td { background: rgba(255, 255, 255, 0.015); }
.person { font-weight: 600; }
.row-actions { display: flex; gap: 8px; }

.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 14px; padding: 40px; text-align: center; color: var(--muted); }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid var(--line);
  color: var(--muted); background: var(--panel-2);
}
.badge.awaiting_human, .badge.approved { color: var(--ok); border-color: rgba(62,207,142,.4); }
.badge.held, .badge.failed, .badge.rejected, .badge.ai-hold, .badge.ai-fix { color: var(--warn); border-color: rgba(242,193,78,.4); }
.badge.delivered, .badge.ai-pass { color: var(--ok); border-color: rgba(62,207,142,.4); }
.badge.ai-pass { border-color: rgba(62,207,142,.4); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
@media (max-width: 980px) { .grid { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.card h2 { margin: 0 0 14px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.card video { width: 100%; border-radius: 10px; background: #000; }

.message { border-left: 2px solid var(--line); padding: 6px 0 6px 14px; margin: 0 0 14px; }
.message.in { border-color: var(--accent); }
.message .meta { display: flex; gap: 10px; align-items: baseline; }
.message .body { white-space: pre-wrap; }

.scenes { padding-left: 20px; margin: 0; }
.scenes li { margin-bottom: 12px; }
.narration { font-size: 15px; }

.claims { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.claims th, .claims td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

.actions { margin-top: 14px; }
.reject-form { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }

.facts { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }

.blocks { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }

/* Prospect page: light, honest, no chrome. */
body.prospect { background: #fbfaf7; color: #17181c; }
.prospect-wrap { max-width: 760px; margin: 0 auto; padding: 48px 22px 72px; }
.p-header h1 { margin: 0 0 8px; font-size: 27px; letter-spacing: -0.02em; }
.p-sub { color: #6a6f7a; margin: 0; }
.p-video { margin: 26px 0; }
.p-video video { width: 100%; border-radius: 14px; background: #000; box-shadow: 0 12px 40px rgba(20, 20, 30, 0.16); }
.p-note { font-size: 16px; line-height: 1.6; }
.p-cta { margin: 28px 0 12px; }
.cta {
  display: inline-block; background: #17181c; color: #fff; padding: 13px 22px;
  border-radius: 999px; font-weight: 600; text-decoration: none;
}
.cta:hover { text-decoration: none; filter: brightness(1.1); }
.p-asset a { font-weight: 600; }
.p-resources { padding-left: 18px; }
