/* Phase 0 console.
   Not a landing page. A dense operational view for one person who already
   reads this data as a spreadsheet, so the job is legibility and continuity:
   the status chips use the exact Legend-tab fills from the workbook.
   The one deliberate signature is the verdict spine, a colored rail down the
   left of every card that encodes the single most important thing about a row,
   whether it is being worked and why. */

:root {
  --ink: #1b1f24;
  --ink-soft: #5b636d;
  --line: #e4e7ec;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --accent: #2f6f4f;        /* the Legend header green, muted */
  --accent-ink: #1f4733;
  --skip: #b02a2a;
  --hold: #9a6b1f;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.45;
}

/* topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark {
  font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 1px;
  background: var(--accent); color: #fff; padding: 7px 9px; border-radius: 6px;
}
.title { font-weight: 650; letter-spacing: -0.01em; }
.sub { color: var(--ink-soft); font-size: 12.5px; }
.meta { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); text-align: right; }
.meta .mode { color: var(--accent-ink); font-weight: 600; }
.meta .whoami { color: var(--accent-ink); font-weight: 600; }

main { padding: 22px; max-width: 1500px; margin: 0 auto; }

/* phase 1 report */
.phase1 {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 22px;
}
.p1head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.phase1 h2 { margin: 0; font-size: 15px; font-weight: 750; letter-spacing: -0.2px; color: var(--ink); text-transform: none; }
.p1sub { font-size: 12.5px; color: var(--ink-soft); }
.p1grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.p1cell .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.p1cell .v { font-family: var(--sans); font-size: 13.5px; margin-top: 4px; color: var(--ink); }
.p1warn { color: var(--hold); font-weight: 600; }

/* columns */
.cols { display: grid; grid-template-columns: 1.15fr 0.9fr 0.95fr; gap: 18px; align-items: start; }
@media (max-width: 1040px) { .cols { grid-template-columns: 1fr; } }
.colhead { font-size: 15px; margin: 0 0 2px; letter-spacing: -0.01em; }
.count { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.colnote { margin: 0 0 12px; color: var(--ink-soft); font-size: 12.5px; }

/* card, with the verdict spine */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 9px; padding: 12px 14px 12px 18px; margin-bottom: 10px;
  cursor: default; transition: box-shadow .12s ease, transform .12s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  border-radius: 9px 0 0 9px; background: var(--rail, var(--line));
}
.card.batch { --rail: var(--accent); }
.card.held  { --rail: var(--hold); }
.card.skip  { --rail: var(--skip); }
.card.actionable { cursor: pointer; }
.card.actionable:hover { box-shadow: 0 2px 10px rgba(20,25,30,.08); transform: translateY(-1px); }

.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.who { font-weight: 620; letter-spacing: -0.01em; }
.co { color: var(--ink-soft); font-weight: 400; }
.tier { font-family: var(--mono); font-size: 11px; color: var(--accent-ink); background: #e8f1eb; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; border: 1px solid rgba(0,0,0,.06); color: #2a2f36; }
.chip.channel { font-family: var(--mono); text-transform: lowercase; background: #f0f2f5; }
.chip.customer { background: #eef4ff; border-color: #cfe0ff; }
.chip.stale { background: #fff4e5; border-color: #f0d9b3; color: var(--hold); }

.reason { margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }
.card.skip .reason { color: #7a2b2b; }
.flags { margin-top: 6px; }
.flag { font-size: 11.5px; color: var(--hold); display: flex; gap: 6px; }
.flag::before { content: "▸"; color: var(--hold); }

.draftbtn {
  margin-top: 10px; font: 600 12.5px var(--sans); color: #fff; background: var(--accent);
  border: 0; border-radius: 7px; padding: 7px 12px; cursor: pointer;
}
.draftbtn:hover { background: var(--accent-ink); }
.draftbtn[disabled] { opacity: .5; cursor: default; }
.incomplete-note { margin-top: 7px; font-size: 11.5px; color: var(--hold); }

/* inline drafts in the batch column */
.draft-slot { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.draft-slot.err { color: var(--skip); }
.d-subject { font-family: var(--mono); font-size: 12px; margin-bottom: 6px; color: var(--ink); }
.d-subject-label { color: var(--ink-soft); }
.draft-slot .d-msg {
  font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; color: var(--ink);
  background: #fbfbfc; border: 1px solid var(--line); border-radius: 8px; padding: 12px;
}
.draft-slot .d-msg.warn { border-color: #f0d9b3; background: #fffaf1; }
.draft-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.draft-foot .d-send {
  font: 600 12px var(--sans); color: #fff; background: var(--accent);
  border-radius: 6px; padding: 7px 12px; text-decoration: none;
}
.draft-foot .foot-warn { font-size: 12px; color: var(--hold); }
.draft-foot .foot-meta { font-size: 11.5px; color: var(--ink-soft); font-family: var(--mono); }
.draft-foot .d-copy { font: 500 12px var(--sans); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 10px; cursor: pointer; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(15,18,22,.35); z-index: 20; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  background: var(--panel); border-left: 1px solid var(--line); z-index: 21;
  box-shadow: -8px 0 30px rgba(15,18,22,.14); overflow-y: auto;
}
.drawer-inner { padding: 22px 24px 40px; }
.drawer-close { position: absolute; top: 14px; right: 18px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.d-name { font-size: 20px; font-weight: 680; letter-spacing: -0.02em; }
.d-sub { color: var(--ink-soft); margin-bottom: 4px; }
.d-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); margin: 18px 0 6px; }
.d-msg { font-family: var(--mono); font-size: 13px; white-space: pre-wrap; background: #fbfbfc; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.d-msg.warn { border-color: #f0d9b3; background: #fffaf1; }
.d-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.d-send { display: inline-block; margin-top: 14px; font: 600 13px var(--sans); color: #fff; background: var(--accent); border-radius: 7px; padding: 9px 14px; text-decoration: none; }
.d-send.blocked { background: #d9c39a; color: #4a3c1c; pointer-events: none; }
.d-fallback { margin-top: 12px; }
.d-copy { font: 500 12px var(--sans); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.meta-wrap { display: flex; align-items: center; gap: 16px; }
.profile-select {
  font: 600 12.5px var(--sans); color: var(--accent-ink); background: #fff;
  border: 1px solid var(--accent); border-radius: 7px; padding: 7px 28px 7px 12px;
  cursor: pointer; min-width: 120px; appearance: auto; -webkit-appearance: auto;
}
.profile-select:hover { background: #f4f9f6; }
.askbtn {
  font: 600 12.5px var(--sans); color: var(--accent-ink); background: #e8f1eb;
  border: 1px solid #cfe3d6; border-radius: 7px; padding: 8px 12px; cursor: pointer;
  white-space: nowrap;
}
.askbtn:hover { background: #dceae1; }
.askbtn[aria-expanded="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* compact Claude chat: launcher pill + small popover */
.chat-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  font: 600 13px var(--sans); color: #fff; background: var(--accent);
  border: 0; border-radius: 22px; padding: 11px 18px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(20,25,30,.18);
}
.chat-launch:hover { background: var(--accent-ink); }

.chatbox {
  position: fixed; right: 20px; bottom: 20px; z-index: 31;
  width: 380px; height: 340px; max-width: calc(100vw - 40px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(20,25,30,.20); overflow: hidden;
}
.chatbox[hidden] { display: none; }   /* explicit, overrides any stale rule */
.chatbox-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font: 600 13px var(--sans); background: #fafbfc;
}
.chatbox-close {
  border: 0; background: none; font-size: 20px; line-height: 1;
  color: var(--ink-soft); cursor: pointer; padding: 0 4px;
}
.chatbox-close:hover { color: var(--ink); }
.chatbox-log {
  flex: 1; overflow-y: auto; padding: 12px; display: flex;
  flex-direction: column; gap: 8px;
}
.cb-msg {
  font-size: 12.5px; line-height: 1.45; padding: 8px 11px; border-radius: 10px;
  max-width: 88%; white-space: pre-wrap; word-wrap: break-word;
}
.cb-msg.bot { background: #f1f4f7; color: var(--ink); align-self: flex-start; border-bottom-left-radius: 3px; }
.cb-msg.me { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.cb-msg.thinking { color: var(--ink-soft); font-style: italic; }
.chatbox-input { display: flex; gap: 7px; padding: 10px; border-top: 1px solid var(--line); }
.chatbox-input input {
  flex: 1; font: 400 13px var(--sans); padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 20px; outline: none;
}
.chatbox-input input:focus { border-color: var(--accent); }
.chatbox-input button {
  width: 36px; flex: none; font: 700 15px var(--sans); color: #fff;
  background: var(--accent); border: 0; border-radius: 50%; cursor: pointer;
}
.chatbox-input button[disabled] { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  .chatbox { width: calc(100vw - 40px); height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .spinner { transition: none; animation: none; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== tabs (Console / Dashboard) ===== */
.tabs { display: flex; gap: 2px; padding: 0 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tab {
  font: 600 13.5px var(--sans); color: var(--ink-soft); background: none; border: 0;
  padding: 12px 15px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* ===== dashboard ===== */
#view-dashboard { padding: 22px; max-width: 1500px; margin: 0 auto; }
.dash-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.dash-sub { color: var(--ink-soft); font-size: 12.5px; font-family: var(--mono); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.kpi-v { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.kpi-v.accent { color: var(--accent-ink); }
.kpi-l { margin-top: 7px; font-size: 12px; color: var(--ink-soft); }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.panel h3 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 10px; }
.bar-lab { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: #eef0f3; border-radius: 5px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 5px; min-width: 2px; }
.bar-fill.c1 { background: #2a78d6; }   /* validated categorical: email */
.bar-fill.c2 { background: #eb6834; }   /* linkedin */
.bar-fill.c3 { background: #1baf7a; }   /* phone */
.bar-fill.c0 { background: #b6bcc4; }   /* no channel */
/* Status-colored stage bars reuse the records' pastel legend fills. A hairline
   inset keeps the lightest ones (e.g. Cold) legible against the track. */
.bar-fill.status { box-shadow: inset 0 0 0 1px rgba(30, 50, 80, .14); }
.bar-val { font-family: var(--mono); font-size: 12.5px; text-align: right; color: var(--ink); }

.minirow { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.minirow:last-child { border-bottom: 0; }
.minirow b { font-family: var(--mono); }

.health { display: flex; flex-wrap: wrap; gap: 10px; }
.hchip { display: flex; align-items: center; gap: 7px; font-size: 12.5px; background: #f4f6f8; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; }
.hchip b { font-family: var(--mono); }
.hdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.hchip.ok .hdot { background: #0ca30c; }
.hchip.warn .hdot { background: #e79a12; }
.hchip.crit .hdot { background: #d03b3b; }
.panel-note { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-soft); }

/* ===== records manager ===== */
#view-records { padding: 22px; max-width: 1500px; margin: 0 auto; }
.rec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.rec-head h2 { margin: 0 0 3px; font-size: 18px; letter-spacing: -0.01em; }
.rec-tools { display: flex; gap: 10px; align-items: center; }
#rec-search {
  font: 400 13px var(--sans); padding: 9px 13px; border: 1px solid var(--line);
  border-radius: 8px; outline: none; min-width: 240px;
}
#rec-search:focus { border-color: var(--accent); }
.rec-btn {
  font: 600 13px var(--sans); color: #fff; background: var(--accent);
  border: 0; border-radius: 8px; padding: 9px 15px; cursor: pointer; white-space: nowrap;
}
.rec-btn:hover { background: var(--accent-ink); }
.rec-btn.ghost { background: #fff; color: var(--accent-ink); border: 1px solid var(--accent); }
.rec-btn.ghost:hover { background: #f4f9f6; }

.rec-tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.rec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rec-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--panel); white-space: nowrap;
}
.rec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rec-table tr:last-child td { border-bottom: 0; }
.rec-table tbody tr:hover { background: #f7f9f8; }
.rec-table .rmono { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.rec-table .rmuted { color: #b3b8bf; }
.rec-status {
  display: inline-block; font-size: 11.5px; color: #2a2f36; padding: 3px 9px;
  border-radius: 20px; border: 1px solid rgba(0,0,0,.07); white-space: nowrap;
}
.rec-actions { text-align: right; white-space: nowrap; }
.rec-mini {
  font: 500 12px var(--sans); border: 1px solid var(--line); background: #fff;
  border-radius: 6px; padding: 5px 10px; cursor: pointer; margin-left: 6px; color: var(--ink);
}
.rec-mini:hover { border-color: var(--accent); color: var(--accent-ink); }
.rec-mini.del:hover { border-color: var(--skip); color: var(--skip); }

/* record edit form (in the drawer) */
.rec-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.recf { display: flex; flex-direction: column; gap: 4px; }
.recf span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.recf input, .recf textarea {
  font: 400 13px var(--sans); padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 7px; outline: none; width: 100%; resize: vertical;
}
.recf input:focus, .recf textarea:focus { border-color: var(--accent); }
.rec-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }

/* ===== console batch summary (slimmed) ===== */
.batch-summary {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 26px 22px; text-align: center;
}
.bs-num { font-size: 44px; font-weight: 780; letter-spacing: -0.02em; color: var(--accent-ink); line-height: 1; }
.bs-label { margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.bs-break { margin-top: 10px; font-size: 12.5px; font-family: var(--mono); color: var(--ink-soft); }
.bs-btn {
  margin-top: 18px; font: 700 14px var(--sans); color: #fff; background: var(--accent);
  border: 0; border-radius: 9px; padding: 12px 20px; cursor: pointer; width: 100%;
}
.bs-btn:hover { background: var(--accent-ink); }

/* ===== send queue (one-card review) ===== */
#view-review { padding: 22px; max-width: 780px; margin: 0 auto; }
.rev-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.rev-head h2 { margin: 0 0 3px; font-size: 18px; letter-spacing: -0.01em; }
.rev-meter { min-width: 160px; text-align: right; }
.rev-count { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.rev-count b { font-size: 22px; color: var(--ink); }
.rev-bar { height: 7px; background: #e7eae8; border-radius: 5px; overflow: hidden; margin: 7px 0 5px; }
.rev-bar-fill { height: 100%; background: var(--accent); border-radius: 5px; transition: width .2s ease; }
.rev-sub { font-size: 11.5px; color: var(--ink-soft); font-family: var(--mono); }

.rev-stackwrap { position: relative; }
.rev-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; box-shadow: 0 10px 30px -18px rgba(20,40,30,.4);
}
.rev-card.behind {
  position: absolute; left: 0; right: 0; top: 0; height: 60px;
  z-index: 0; box-shadow: none;
}
.rev-card.behind.b1 { transform: translateY(10px) scale(.985); opacity: .7; }
.rev-card.behind.b2 { transform: translateY(20px) scale(.97); opacity: .45; }
.rev-card.top { position: relative; z-index: 2; }
.rev-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rev-who { font-weight: 680; font-size: 17px; letter-spacing: -0.01em; }
.rev-who .co { color: var(--ink-soft); font-weight: 400; font-size: 15px; }
.rev-chips { display: flex; gap: 6px; align-items: center; }
.rev-done { font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 12px; }

.rev-subject { font-family: var(--mono); font-size: 13px; margin-bottom: 10px; color: var(--ink); }
.rev-subject span { color: var(--ink-soft); text-transform: uppercase; font-size: 10px; letter-spacing: 0.06em; }
.rev-body {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; color: var(--ink);
  background: #fbfbfc; border: 1px solid var(--line); border-radius: 10px; padding: 16px; max-height: 340px; overflow: auto;
}
.rev-body.warn { border-color: #f0d9b3; background: #fffaf1; }

/* inline draft editing on the Send Queue card */
.rev-edit-lab { display:block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-soft); margin:0 0 6px; }
.rev-edit-subject { width:100%; font-family:var(--mono); font-size:13px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; margin-bottom:14px; }
.rev-edit-body { width:100%; font-family:var(--mono); font-size:13.5px; line-height:1.55; padding:14px 16px; border:1px solid var(--line); border-radius:10px; resize:vertical; min-height:180px; }
.rev-edit-subject:focus, .rev-edit-body:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(47,109,246,.12); }
.rev-edit-hint { font-size:12px; color:var(--ink-soft); margin-top:8px; }

.rev-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.rev-btn {
  font: 600 13.5px var(--sans); padding: 10px 16px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; display: inline-block;
}
.rev-btn:hover { border-color: var(--accent); }
.rev-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.rev-btn.primary:hover { background: var(--accent-ink); }
.rev-btn.ghost { color: var(--ink-soft); }
.rev-btn.disabled { background: #f1f2f4; color: #98a0a8; border-color: var(--line); cursor: default; }
.rev-btn[disabled] { opacity: .45; cursor: default; }
.rev-gmail {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #f4f8f6; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 14px; font-size: 13px; color: var(--ink-soft);
}
.rev-gmail.ok { background: #eef4f0; color: var(--accent-ink); font-weight: 600; }
.rev-btn.sm { padding: 7px 13px; font-size: 12.5px; }
.rev-empty { text-align: center; padding: 48px 20px; }
.rev-empty h2 { margin: 0 0 8px; }
.rev-empty .rev-btn { margin-top: 14px; }

/* ----- onboarding (first-run checklist) ----- */
#onboarding{ margin:0 0 22px; }
.ob-card{ background:#fff; border:1px solid #e6eaf1; border-radius:16px; padding:22px 24px;
  box-shadow:0 8px 26px rgba(20,40,90,.06); }
.ob-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.ob-hi{ font-size:19px; font-weight:700; letter-spacing:-.3px; color:#111826; }
.ob-lead{ font-size:14px; color:#6b7686; margin-top:3px; }
.ob-dismiss{ background:none; border:none; color:#9aa4b2; font-size:13px; cursor:pointer; padding:4px 6px; }
.ob-dismiss:hover{ color:#6b7686; }
.ob-steps{ display:flex; flex-direction:column; gap:12px; }
.ob-step{ display:flex; gap:14px; align-items:flex-start; padding:14px 14px; border:1px solid #edf0f5;
  border-radius:12px; background:#fbfcfe; }
.ob-step.done{ background:#f3faf6; border-color:#d6efe0; }
.ob-check{ flex:none; width:26px; height:26px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font-size:13px; font-weight:700; color:#fff; background:#2f6df6; }
.ob-step.done .ob-check{ background:#0f9d58; }
.ob-main{ flex:1; }
.ob-title{ font-size:15px; font-weight:650; color:#111826; }
.ob-body{ font-size:13.5px; color:#6b7686; margin-top:2px; }
.ob-body b{ color:#111826; }
.ob-actions{ margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }
.ob-btn{ background:#2f6df6; color:#fff; border:none; border-radius:8px; padding:8px 14px;
  font-size:13.5px; font-weight:600; cursor:pointer; }
.ob-btn:hover{ background:#1f52c9; }
.ob-btn.ghost{ background:#eef2fb; color:#2f4a86; }
.ob-btn.ghost:hover{ background:#e2e9f7; }
.ob-btn:disabled{ opacity:.6; cursor:default; }
.ob-hint{ font-size:13px; color:#9aa4b2; font-style:italic; }
.ob-finish{ display:flex; align-items:center; gap:14px; margin-top:14px; padding:16px 18px;
  border-radius:12px; background:linear-gradient(135deg,#eef3ff,#f2effe); border:1px solid #dbe4fb; }
.ob-finish-badge{ font-size:26px; flex:none; line-height:1; }
.ob-finish-main{ flex:1; }
.ob-finish-title{ font-size:15.5px; font-weight:700; color:#111826; letter-spacing:-.2px; }
.ob-finish-body{ font-size:13px; color:#5b6472; margin-top:2px; line-height:1.5; }
.ob-finish-actions{ display:flex; gap:8px; flex-wrap:wrap; flex:none; }
@media(max-width:640px){ .ob-finish{ flex-direction:column; align-items:flex-start; } }

/* profile / voice editor drawer */
.recf-hint{ display:block; font-size:12px; color:#9aa4b2; margin-top:5px; line-height:1.4; }
a.editprofile{ color:#2f6df6; text-decoration:none; }
a.editprofile:hover{ text-decoration:underline; }

/* settings drawer: grouped sections */
.setf-group{ padding:16px 0; border-top:1px solid var(--line); }
.setf-group:first-of-type{ border-top:none; padding-top:6px; }
.setf-h{ font-size:15px; font-weight:750; letter-spacing:-.2px; color:var(--ink); margin-bottom:2px; }
.setf-group .colnote{ margin:2px 0 12px; }
.setf-select{ width:100%; }
.recf textarea{ width:100%; font-family:var(--sans); font-size:14px; line-height:1.5; padding:12px 13px;
  border:1px solid var(--line); border-radius:10px; resize:vertical; min-height:150px; }
.recf textarea:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(47,109,246,.12); }
.plan-btns{ display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }

/* ============================================================
   CADENTO VISUAL REFRESH — brand continuity with the site + pricing.
   Appended override layer: reskins tokens to blue/indigo and adds
   polish (bigger buttons, rounder cards, custom selects, bolder
   headings) without touching layout/grids.
   ============================================================ */
:root{
  --ink:#0f1626; --ink-soft:#6b7686; --line:#e6eaf1; --bg:#f5f7fc; --panel:#ffffff;
  --accent:#2f6df6; --accent-ink:#1f52c9; --indigo:#5b3df6;
  --grad:linear-gradient(135deg,#3b82f6,#5b3df6);
  --radius:14px; --shadow:0 12px 34px rgba(20,40,90,.09); --shadow-sm:0 5px 18px rgba(20,40,90,.06);
}
body{ font-size:15px; color:var(--ink); }

/* ---- topbar / brand ---- */
.topbar{ padding:16px 26px; border-bottom:1px solid var(--line); box-shadow:0 2px 12px rgba(20,40,90,.03); }
.mark{ background:transparent; padding:0; border-radius:0; display:flex; align-items:center; }
.title{ font-size:19px; font-weight:800; letter-spacing:-.5px; }
.sub{ font-size:13.5px; }
.meta{ font-family:var(--sans); font-size:13.5px; line-height:1.6; color:var(--ink-soft); }
.meta .mstat{ color:var(--ink); font-weight:700; }
.meta .mode, .meta .whoami{ color:var(--accent-ink); font-weight:600; }
.meta a.editprofile, .meta a.signout{ font-size:13px; font-weight:600; }

/* ---- headings ---- */
.colhead{ font-size:18px; font-weight:750; letter-spacing:-.4px; color:var(--ink); display:flex; align-items:center; gap:9px; }
.rec-head h2, .rev-head h2{ font-size:24px; font-weight:800; letter-spacing:-.6px; color:var(--ink); }
.colnote{ font-size:13px; }

/* count pills beside the console section headings — bigger, brand-colored, legible */
.count{ font-family:var(--sans); font-size:14px; font-weight:800; color:var(--accent-ink);
  background:#eaf1ff; border:1px solid #d6e4ff; border-radius:20px; padding:2px 12px;
  min-width:30px; text-align:center; letter-spacing:0; line-height:1.5; }
#batch-count{ color:#fff; background:var(--grad); border-color:transparent; box-shadow:0 2px 8px rgba(47,109,246,.25); }
.count:empty{ display:none; }

/* ---- tabs: pill-style active state ---- */
.tabs{ padding:8px 22px; gap:6px; }
.tab{ font-size:14.5px; font-weight:600; padding:9px 16px; border-radius:10px; border-bottom:none !important; color:var(--ink-soft); transition:background .15s,color .15s; }
.tab:hover{ background:#eef2fb; color:var(--ink); }
.tab.active{ color:#fff; background:var(--accent); }

/* ---- panels & cards: softer, rounder ---- */
.phase1, .rec-tablewrap{ border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.card{ border-radius:12px; }
.card.actionable:hover{ box-shadow:var(--shadow); }

/* ---- buttons: bigger, rounded, on-brand ---- */
.draftbtn, .rec-btn, .bs-btn, .rev-btn, .chatbox-input button, .d-send{
  font: 700 14px var(--sans); border-radius:10px; padding:10px 16px;
  background:var(--accent); color:#fff; border:none; cursor:pointer; text-decoration:none;
  display:inline-block; box-shadow:0 2px 10px rgba(47,109,246,.20);
  transition:background .15s, filter .15s, transform .04s;
}
.draftbtn:hover, .rec-btn:hover, .chatbox-input button:hover{ background:var(--accent-ink); }
.rev-btn, .rev-btn.primary{ padding:12px 20px; }
.rev-btn.primary, .bs-btn, .d-send{ background:var(--grad); }
.rev-btn.primary:hover, .bs-btn:hover, .d-send:hover{ filter:brightness(.95); }
.draftbtn:active, .rec-btn:active, .rev-btn:active{ transform:translateY(1px); }
.draftbtn[disabled], .rev-btn.disabled{ background:#eef0f5; color:#9aa4b2; box-shadow:none; }
/* ghost / secondary buttons */
.rec-btn.ghost, .rev-btn.ghost{ background:#eef2fb; color:#26406f; border:1px solid transparent; box-shadow:none; }
.rec-btn.ghost:hover, .rev-btn.ghost:hover{ background:#e2e9f7; }
.rec-mini{ border-radius:8px; }

/* ---- selects & inputs: custom, not browser-default ---- */
select, .profile-select, #rec-search, input[type="search"], input[type="text"],
.rec-form input, .rec-form select, .rec-form textarea{
  font: 500 14px var(--sans); color:var(--ink); background:#fff;
  border:1px solid var(--line); border-radius:10px; padding:10px 12px;
}
select, .profile-select{
  -webkit-appearance:none; appearance:none; cursor:pointer; padding-right:34px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat; background-position:right 11px center;
}
.profile-select:hover{ background-color:#f7f9ff; }
select:focus, input:focus, textarea:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(47,109,246,.14); }

/* ---- accents that were green ---- */
.tier{ color:var(--accent-ink); background:#eaf1ff; }
.bs-num{ color:var(--accent); }
.bar-fill, .rev-bar-fill{ background:var(--accent); }

/* ---- floating chat launcher ---- */
.chat-launch{ background:var(--grad); border-radius:24px; font: 700 14px var(--sans); padding:12px 20px; box-shadow:var(--shadow); }
.chat-launch:hover{ filter:brightness(.95); }

/* ---- dashboard refresh ---- */
.dash-head{ margin-bottom:20px; }
.dash-head h2{ font-size:24px; font-weight:800; letter-spacing:-.6px; color:var(--ink); }
.dash-sub{ font-size:13.5px; color:var(--muted); }
.kpis{ display:grid; grid-template-columns:repeat(5,1fr); gap:16px; margin-bottom:22px; }
.kpi{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:18px; box-shadow:var(--shadow-sm); }
.kpi-ic{ width:38px; height:38px; border-radius:11px; background:#eaf1ff; display:inline-flex; align-items:center; justify-content:center; margin-bottom:13px; }
.kpi-ic svg{ width:22px; height:22px; fill:none; stroke:var(--accent); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.kpi.hero .kpi-ic{ background:var(--grad); } .kpi.hero .kpi-ic svg{ stroke:#fff; }
.kpi-v{ font-size:32px; font-weight:800; letter-spacing:-1px; color:var(--ink); line-height:1; }
.kpi-v.accent{ background:linear-gradient(90deg,var(--accent),var(--indigo)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.kpi-l{ font-size:12.5px; color:var(--muted); margin-top:8px; }
@media(max-width:900px){ .kpis{ grid-template-columns:repeat(2,1fr);} }

.dash-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; }
@media(max-width:820px){ .dash-grid{ grid-template-columns:1fr;} }
.panel{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px; box-shadow:var(--shadow-sm); }
.panel h3{ font-size:15px; font-weight:750; color:var(--ink); margin:0 0 16px; letter-spacing:-.2px; }
.bars{ display:flex; flex-direction:column; gap:11px; }
.bar-row{ display:grid; grid-template-columns:118px 1fr auto; align-items:center; gap:12px; }
.bar-lab{ font-size:13px; color:var(--ink); display:flex; align-items:center; gap:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cdot{ width:9px; height:9px; border-radius:50%; flex:none; }
.bar-track{ background:#eef1f6; border-radius:6px; height:16px; overflow:hidden; }
.bar-fill{ height:100%; border-radius:6px; min-width:3px; transition:width .45s ease; }
.bar-val{ font-size:13px; color:var(--ink); font-weight:600; text-align:right; white-space:nowrap; }
.bar-pct{ color:var(--muted); font-weight:500; font-size:12px; }
.minirow{ display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); font-size:14px; }
.minirow:last-child{ border-bottom:none; }
.minirow b{ font-size:16px; color:var(--ink); }
.health{ display:flex; flex-direction:column; gap:10px; }
.hchip{ display:flex; align-items:center; gap:9px; font-size:13.5px; padding:10px 13px; border-radius:10px; background:#f3faf6; color:#166b3a; }
.hchip .hdot{ width:8px; height:8px; border-radius:50%; background:currentColor; flex:none; }
.hchip.warn{ background:#fff8ec; color:#9a6b1f; } .hchip.crit{ background:#fdecea; color:#b02a2a; }
.hchip b{ font-weight:800; }
.panel-note{ font-size:12.5px; color:var(--muted); margin-top:12px; }
