/* Revenue Desk — sibling of /qwen. Tokens deliberately identical to
   /qwen/qwen.css so the two live systems read as one observatory. */
:root {
  --ink: #edf6fb;
  --muted: #8ba0af;
  --faint: #607584;
  --bg: #071019;
  --bg-deep: #04090e;
  --panel: rgba(13, 27, 37, .83);
  --panel-soft: rgba(18, 36, 48, .68);
  --line: rgba(143, 185, 205, .18);
  --line-strong: rgba(143, 185, 205, .33);
  --cyan: #83d7ee;
  --cyan-bright: #b3edfa;
  --violet: #b39bff;
  --green: #93e5ad;
  --amber: #f4c983;
  --red: #ff9d9d;
  --shadow: 0 22px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg-deep); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% -8%, rgba(71, 126, 163, .22), transparent 27rem),
    radial-gradient(circle at 5% 18%, rgba(84, 53, 137, .16), transparent 26rem),
    linear-gradient(180deg, #091522 0%, var(--bg) 44%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.shell { width: min(1500px, 100%); margin: 0 auto; padding: 0 34px; }
.topbar {
  min-height: 74px; display: flex; align-items: center; justify-content: space-between;
  gap: 22px; border-bottom: 1px solid var(--line); color: var(--muted);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.brand-mark i { width: 3px; border-radius: 2px; background: var(--cyan); display: block; }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 18px; background: var(--cyan-bright); }
.brand-mark i:nth-child(3) { height: 12px; }
.topnav { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.topnav a:hover { color: var(--ink); }
.auth-link { padding: 7px 15px; border: 1px solid var(--line-strong); border-radius: 999px; }

/* ---- hero ---- */
.hero { padding: 46px 0 8px; }
.eyebrow {
  margin: 0 0 12px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 9px;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); display: inline-block; }
.status-dot.live { background: var(--green); box-shadow: 0 0 0 4px rgba(147, 229, 173, .14); }
.status-dot.wait { background: var(--amber); }
.status-dot.err  { background: var(--red); }
h1 { margin: 0; font-size: clamp(2.1rem, 6vw, 3.3rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.05; }
h1 span { color: var(--faint); font-weight: 300; }
h1 em { font-style: normal; color: var(--cyan); }
.hero-meta { margin-top: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.mode-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px;
  border: 1px solid rgba(244, 201, 131, .38); border-radius: 999px; color: var(--amber); font-size: 12px;
}
.mini-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.lede { margin: 18px 0 0; max-width: 62ch; color: var(--muted); font-size: 15px; }

/* ---- figures ---- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 1px;
           background: var(--line); border: 1px solid var(--line); border-radius: 14px;
           overflow: hidden; margin-top: 30px; }
.figure { background: var(--bg); padding: 17px 18px; }
.figure dt { margin: 0 0 5px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.figure dd { margin: 0; font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.figure dd.dim { color: var(--faint); font-weight: 400; }
.figure dd.good { color: var(--green); }
.figure dd.cut  { color: var(--amber); }

/* ---- panels ---- */
.panel {
  margin-top: 30px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px 26px; box-shadow: var(--shadow);
}
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.section-label { margin: 0 0 3px; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--faint); }
h2 { margin: 0; font-size: 1.5rem; font-weight: 620; letter-spacing: -.01em; }
.panel-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; max-width: 68ch; }
.phase-badge { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--muted); }
.phase-badge.wait { color: var(--amber); border-color: rgba(244, 201, 131, .38); }
.phase-badge.live { color: var(--green); border-color: rgba(147, 229, 173, .34); }

/* ---- queue ---- */
.queue { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.item {
  background: var(--panel-soft); border: 1px solid var(--line);
  border-left: 2px solid var(--cyan); border-radius: 12px; padding: 15px 17px;
}
.item.aged { border-left-color: var(--amber); }
.item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.item-title { font-size: 15px; font-weight: 560; line-height: 1.35; }
.item-title a { border-bottom: 1px solid transparent; }
.item-title a:hover, .item-title a:focus-visible { color: var(--cyan-bright); border-bottom-color: var(--line-strong); }
.amount { font-size: 1.1rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cyan); }
.item-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.item-flags { margin: 11px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.item-flags li { font-size: 12.5px; color: var(--amber); padding-left: 15px; position: relative; }
.item-flags li::before { content: "!"; position: absolute; left: 0; font-weight: 700; }

.empty { margin: 18px 0 0; color: var(--faint); font-size: 14px; }
.err-note { margin: 16px 0 0; color: var(--red); font-size: 14px; }

/* ---- gates ---- */
.gates { list-style: none; counter-reset: g; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gates li { counter-increment: g; position: relative; padding: 12px 16px 12px 48px;
            background: var(--panel-soft); border: 1px solid var(--line); border-radius: 12px; }
.gates li::before {
  content: counter(g); position: absolute; left: 15px; top: 13px; width: 21px; height: 21px;
  border-radius: 50%; border: 1px solid var(--cyan); color: var(--cyan);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1;
}
.gates li.done { opacity: .55; }
.gates li.done::before { content: "\2713"; color: var(--green); border-color: var(--green); }
.gates strong { display: block; font-weight: 600; font-size: 14.5px; }
.gates .who { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.gates p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }

footer { margin: 48px 0 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }
footer a:hover { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 720px) {
  .shell { padding: 0 18px; }
  .hero { padding: 34px 0 4px; }
  .panel { padding: 20px 17px; border-radius: 15px; }
  .item-top { flex-direction: column; gap: 3px; }
  .topnav { gap: 13px; font-size: 12.5px; flex-wrap: wrap; row-gap: 8px; }
}

/* ---- owner decision controls ----
   Rendered only for a signed-in owner. RLS is the real gate; hiding these for
   everyone else is presentation, not security. */
.decide { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.decide button {
  font-size: 13.5px; font-weight: 600; padding: 9px 16px; min-height: 40px;
  border-radius: 9px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink);
}
.decide button:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan-bright); }
.decide button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.decide button:disabled { opacity: .45; cursor: default; }
.decide button.yes { border-color: rgba(147, 229, 173, .5); color: var(--green); }
.decide button.yes:hover:not(:disabled) { background: rgba(147, 229, 173, .1); color: var(--green); }

.verdict {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase;
}
.verdict.yes { color: var(--green); border: 1px solid rgba(147, 229, 173, .4); }
.verdict.no  { color: var(--faint); border: 1px solid var(--line); }
.verdict.fail { color: var(--red); border: 1px solid rgba(255, 157, 157, .45); }
.item.approved { border-left-color: var(--green); }
.item.passed { opacity: .55; }

.owner-hint {
  margin: 16px 0 0; padding: 12px 15px; border-radius: 11px;
  border: 1px dashed var(--line-strong); color: var(--muted); font-size: 13.5px;
}
.owner-hint a { color: var(--cyan); border-bottom: 1px solid var(--line-strong); }
