/* CFM Análise AI — REVIEWER surface. Terracotta/teal, deliberately unlike the client's navy/gold:
   at a glance you should know which surface you're on. SLA colours key off stage_age_days (time
   waiting on THIS reviewer), never age_days. */
:root{
  --bg:            #33190D;
  --surface:       #4E240F;
  --surface-raised:#5C2A13;
  --surface-sunk:  #3E1D0B;
  --border:        #7A4A34;
  --border-soft:   #653A26;

  --text:          #FBF0E9;
  --text-2:        #DDBBA4;
  --text-muted:    #B08E77;

  --accent:        #4BABBD;
  --accent-hover:  #5FBFD1;
  --accent-on:     #10353B;

  --sla-ok:    #B08E77;
  --sla-warn:  #F0C93E;
  --sla-breach:#F0A79B;

  --radius: 8px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

*{ box-sizing:border-box; }

body{
  margin:0; padding:2rem 1rem;
  background:var(--bg); color:var(--text);
  font-family:system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size:16px; line-height:1.5;
}
.wrap{ max-width:860px; margin:0 auto; }
a{ color:var(--text-2); }

.masthead{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
  padding-bottom:14px; margin-bottom:22px;
  border-bottom:1px solid var(--border-soft);
}
.wordmark{ margin:0; font-size:15px; font-weight:600; white-space:nowrap; }
.wordmark .ia{ color:var(--accent); }
.wordmark .sep{ color:var(--text-muted); font-weight:400; }
.who{ margin:0; font-size:13px; color:var(--text-muted); }
.who a{ color:var(--text-2); }

.head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:16px; flex-wrap:wrap; margin-bottom:6px;
}
h1{ margin:0; font-size:24px; font-weight:600; }
.lede{ margin:0 0 18px; font-size:14px; color:var(--text-2); }

/* Ambient pipeline number — a count, not rows (the reviewer can't act on stages 2-4). */
.pipeline{ font-size:13px; color:var(--text-muted); white-space:nowrap; padding-bottom:2px; }
.pipeline b{ color:var(--text-2); font-weight:500; font-variant-numeric:tabular-nums; }

.toggle{
  display:flex; gap:4px; background:var(--surface-sunk);
  border-radius:var(--radius); padding:3px; margin-bottom:14px; width:fit-content;
}
.toggle button{
  font:inherit; font-size:13px; padding:6px 14px; border:none; border-radius:6px;
  background:transparent; color:var(--text-2); cursor:pointer; transition:background .12s, color .12s;
}
.toggle button:hover{ color:var(--text); }
.toggle button[aria-selected="true"]{ background:var(--accent); color:var(--accent-on); }

.panel{ background:var(--surface); border-radius:12px; overflow:hidden; }

.row{
  display:flex; align-items:center; gap:14px;
  padding:13px 16px; border-bottom:1px solid var(--border-soft); transition:background .1s;
}
.row:last-child{ border-bottom:none; }
.row:hover{ background:var(--surface-raised); }
.row-main{ flex:1; min-width:0; }
.pseud{ margin:0; font-size:15px; font-family:var(--mono); }
.label{ margin:2px 0 0; font-size:12px; color:var(--text-2); font-family:var(--mono); }

/* Stage indicator: 6 segments off `stage`. Every queue row is 5/6, so this confirms, not
   navigates — small and quiet. Not four chips off the dead `status` field. */
.stage{ display:flex; gap:2px; flex-shrink:0; }
.seg{ width:12px; height:4px; border-radius:1px; background:rgba(0,0,0,.28); }
.seg.done{ background:var(--border); }
.seg.now{ background:var(--accent); }
.stage-n{ font-size:11px; color:var(--text-muted); font-family:var(--mono); white-space:nowrap; min-width:30px; }

.age{
  font-size:13px; font-variant-numeric:tabular-nums; text-align:right;
  min-width:80px; flex-shrink:0; color:var(--sla-ok);
}
.age.warn{ color:var(--sla-warn); }
.age.breach{ color:var(--sla-breach); font-weight:500; }
.age small{ display:block; font-size:11px; color:var(--text-muted); font-weight:400; }

.btn{
  display:inline-block; font:inherit; font-size:13px; font-weight:500;
  padding:7px 15px; border:none; border-radius:var(--radius);
  background:var(--accent); color:var(--accent-on);
  cursor:pointer; text-decoration:none; white-space:nowrap; flex-shrink:0; transition:background .12s;
}
.btn:hover{ background:var(--accent-hover); }
.btn.ghost{ background:transparent; color:var(--text-2); border:1px solid var(--border); }
.btn.ghost:hover{ background:var(--surface-raised); color:var(--text); }

/* Accordion: group by pseudonym. Secondary view — a toggle, not the landing state. */
.group{ background:var(--surface); border-radius:12px; margin-bottom:8px; overflow:hidden; }
.group-head{
  display:flex; align-items:center; gap:12px; width:100%; padding:13px 16px;
  background:none; border:none; cursor:pointer; color:var(--text); font:inherit; text-align:left;
}
.group-head:hover{ background:var(--surface-raised); }
.chev{
  width:7px; height:7px; flex-shrink:0;
  border-right:2px solid var(--text-2); border-bottom:2px solid var(--text-2);
  transform:rotate(-45deg); transition:transform .15s; margin-right:3px;
}
.group-head[aria-expanded="true"] .chev{ transform:rotate(45deg); }
.group-head .label-g{ flex:1; font-family:var(--mono); font-size:15px; }
.group-head .count{ font-size:12px; color:var(--text-muted); }
.group-body{ border-top:1px solid var(--border-soft); }
.group-body[hidden]{ display:none; }

/* The empty state is the PRIMARY state (a reviewer's queue is empty most of the time until
   Alpha/Bravo push dossiers to Stage 5). It must read "nothing for you yet", not "broken". */
.empty{ background:var(--surface); border-radius:12px; padding:44px 24px; text-align:center; }
.empty-mark{
  width:34px; height:34px; margin:0 auto 14px;
  border:2px solid var(--border); border-radius:50%; position:relative;
}
.empty-mark::after{
  content:''; position:absolute; left:9px; top:15px; width:12px; height:6px;
  border-left:2px solid var(--border); border-bottom:2px solid var(--border); transform:rotate(-45deg);
}
.empty h2{ margin:0 0 6px; font-size:17px; font-weight:500; }
.empty p{ margin:0; font-size:14px; color:var(--text-2); }
.empty .sub{ margin-top:10px; font-size:13px; color:var(--text-muted); }

/* Detail (dossier opened from a queue row) + login/error hero. */
.card{ background:var(--surface); border-radius:12px; padding:18px 20px; margin-bottom:12px; }
.card h2{ margin:0 0 12px; font-size:16px; font-weight:600; }
.kv{ display:grid; grid-template-columns:200px 1fr; gap:8px 16px; margin:0; font-size:14px; }
.kv dt{ color:var(--text-muted); }
.kv dd{ margin:0; color:var(--text); }
.notes{ list-style:none; margin:0; padding:0; }
.note{ padding:10px 0; border-bottom:1px solid var(--border-soft); font-size:14px; color:var(--text-2); }
.note:last-child{ border-bottom:none; }
.note .kind{ font-size:11px; color:var(--accent); font-family:var(--mono); }
.back{ display:inline-block; margin-bottom:14px; font-size:13px; color:var(--text-2); }

.hero{ max-width:520px; }
.hero .eyebrow{
  margin:0 0 10px; font-size:12px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--accent); font-family:var(--mono);
}
.hero h1{ font-size:30px; line-height:1.2; margin:0 0 14px; }
.hero .lede{ font-size:16px; color:var(--text-2); margin:0 0 22px; }

.detail-head{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.detail-head .pseud{ font-size:20px; }

.foot{
  margin-top:36px; padding-top:14px; border-top:1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  font-size:12px; color:var(--text-muted);
}
.foot p{ margin:0; }
