/* XDRIP Tracker — minimal, dense, dark. v0.1 */
:root {
  --bg: #0a0d12;
  --surface: #11161e;
  --surface-2: #161c25;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eef5;
  --muted: #8a96a6;
  --primary: #3aa0ff;
  --accent: #10b981;
  --warn: #f5a623;
  --danger: #ef4444;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; letter-spacing: 0.5px; }
.brand-x { color: var(--primary); }
.brand-sub { color: var(--muted); font-weight: 600; margin-left: 4px; }

.nav { display: flex; gap: 18px; }
.nav a { color: var(--text); font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

.hero { margin-bottom: 24px; }
.hero h1 { margin: 0 0 4px 0; font-size: 22px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.kpi-num { font-size: 26px; font-weight: 700; color: var(--text); }
.kpi-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 12px 0; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.table td { font-size: 14px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.next-steps ol { margin: 0; padding-left: 20px; }
.next-steps li { margin-bottom: 6px; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* v0.4 — auth */
.user-chip {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.user-name { color: var(--text); font-weight: 600; }
.logout-form { margin: 0; }
.link-btn {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 0; font: inherit; text-decoration: underline;
}
.link-btn:hover { color: var(--text); }
.auth-card {
  max-width: 380px; margin: 60px auto;
  display: flex; flex-direction: column; gap: 14px;
}
.auth-card h1 { margin: 0; font-size: 20px; }
.auth-card .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-card input[type="email"] {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: var(--radius); font: inherit;
}
.auth-card input[type="email"]:focus { outline: none; border-color: var(--primary); }
.auth-card button[type="submit"] {
  background: var(--primary); color: #001425; border: 0;
  padding: 10px 14px; border-radius: var(--radius); font-weight: 700; cursor: pointer;
}
.auth-card .ok  { color: var(--accent); }
.auth-card .err { color: var(--danger); }

/* v0.4 — list/detail views */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin: 18px 0 14px;
}
.page-head h1 { margin: 0; font-size: 22px; }
.page-head .muted { font-size: 13px; }

.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-bar input[type="search"] {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 10px; border-radius: var(--radius); font: inherit; min-width: 240px;
}
.filter-bar input[type="search"]:focus { outline: none; border-color: var(--primary); }
.filter-bar .check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.filter-bar button {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: var(--radius); cursor: pointer;
}
.filter-bar button:hover { border-color: var(--primary); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; text-decoration: none;
}
.chip:hover { color: var(--text); border-color: var(--primary); text-decoration: none; }
.chip-on { background: var(--primary); color: #001425; border-color: var(--primary); }
.chip-on:hover { color: #001425; }

.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.pill-queued { color: var(--muted); }
.pill-sent { background: rgba(58,160,255,0.12); color: var(--primary); border-color: rgba(58,160,255,0.3); }
.pill-opened { background: rgba(245,166,35,0.12); color: var(--warn); border-color: rgba(245,166,35,0.3); }
.pill-replied,
.pill-interested,
.pill-meeting-booked,
.pill-closed-won { background: rgba(16,185,129,0.12); color: var(--accent); border-color: rgba(16,185,129,0.3); }
.pill-not-now,
.pill-paused { color: var(--warn); }
.pill-hard-no,
.pill-closed-lost,
.pill-dnc { background: rgba(239,68,68,0.12); color: var(--danger); border-color: rgba(239,68,68,0.3); }
.pill-ready { background: rgba(16,185,129,0.18); color: var(--accent); border-color: rgba(16,185,129,0.4); }
.pill-draft { color: var(--muted); }
.pill-archived { opacity: 0.6; }
.pill-tpl { background: rgba(58,160,255,0.12); color: var(--primary); border-color: rgba(58,160,255,0.3); }

.pill-prio-top { background: rgba(239,68,68,0.18); color: var(--danger); border-color: rgba(239,68,68,0.4); }
.pill-prio-high { background: rgba(245,166,35,0.18); color: var(--warn); border-color: rgba(245,166,35,0.4); }
.pill-prio-medium { color: var(--muted); }
.pill-prio-low { opacity: 0.7; }

.pill-dir-outbound { background: rgba(58,160,255,0.12); color: var(--primary); border-color: rgba(58,160,255,0.3); }
.pill-dir-inbound  { background: rgba(16,185,129,0.18); color: var(--accent); border-color: rgba(16,185,129,0.4); }

.pager { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 24px; padding: 0 4px; }
.pager a, .pager span { font-size: 13px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.kv > div { display: contents; }
.kv .k { color: var(--muted); font-size: 12px; padding-top: 2px; text-transform: lowercase; }
.kv .v { font-size: 14px; word-break: break-word; }
.kv .v.pre { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; }

.mono { font-family: var(--mono); }
.small { font-size: 12px; }
.ml-auto { margin-left: auto; }
.ml-2 { margin-left: 8px; }

.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li {
  border-left: 2px solid var(--border); padding: 4px 0 4px 14px;
}
.timeline .t-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px;
}
.timeline .t-subject { font-weight: 600; margin-top: 4px; }
.timeline .t-body { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 4px; max-height: 200px; overflow: auto; }

.draft-body {
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin: 0; white-space: pre-wrap; word-break: break-word;
  max-height: 600px; overflow: auto;
}

.pre { white-space: pre-wrap; }

/* v0.4 — buttons / forms / activity */
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn-primary { background: var(--primary); color: #001425; border-color: var(--primary); }
.btn-primary:hover { color: #001425; opacity: 0.9; }
.btn-primary[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-warn { background: rgba(245,166,35,0.18); color: var(--warn); border-color: rgba(245,166,35,0.4); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border-color: rgba(239,68,68,0.4); }

.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select, .inline-form input[type="text"] {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 8px; font: inherit; font-size: 13px;
}
.inline-form select:focus, .inline-form input:focus { outline: none; border-color: var(--primary); }

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.form-grid input, .form-grid textarea, .form-grid select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: 14px; resize: vertical;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus { outline: none; border-color: var(--primary); }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }

.activity { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.activity li {
  display: grid; grid-template-columns: 80px 60px 130px 1fr; gap: 10px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px;
}
.activity li:last-child { border-bottom: none; }
.activity .actor { font-weight: 700; color: var(--primary); text-transform: lowercase; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: 1; }
  .activity li { grid-template-columns: 1fr; gap: 2px; }
}

/* v0.4 — Today page */
.today-head { align-items: flex-start; }
.today-head h1 { margin: 0 0 4px; }
.today-bucket { padding: 18px; }
.today-bucket .bucket-head { margin-bottom: 12px; }
.today-bucket .bucket-head h2 { margin: 0 0 4px; font-size: 16px; }
.today-bucket .bucket-head p { margin: 0; }
.today-bucket .table td:last-child { text-align: right; white-space: nowrap; }
.today-bucket + .today-bucket { margin-top: 16px; }

/* v0.4 — Today polish + Wrap */
.day-pulse {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  padding: 14px 18px; margin: 14px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.pulse { display: flex; flex-direction: column; min-width: 70px; }
.pulse-num { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1; }
.pulse-label { font-size: 11px; color: var(--muted); text-transform: lowercase; margin-top: 3px; }
.pulse-action .pulse-num { color: var(--accent); }

.brief-callout {
  background: rgba(58,160,255,0.08);
  border: 1px solid rgba(58,160,255,0.25);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-top: 10px;
  font-size: 13px;
}
.brief-label { color: var(--muted); margin-right: 8px; font-size: 12px; }
.brief-text { color: var(--text); }

.actions-cell { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

.wrap-select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px 9px; font: inherit; font-size: 13px;
}
.wrap-textarea {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical;
}
.wrap-textarea:focus { outline: none; border-color: var(--primary); }

/* v0.4 — paste cards for executive flow */
.paste-help {
  background: rgba(58,160,255,0.08);
  border: 1px solid rgba(58,160,255,0.25);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 14px 0 10px;
  font-size: 13px;
  color: var(--text);
}
.paste-help strong { color: var(--primary); margin-right: 6px; }

.paste-card { padding: 0; overflow: hidden; }
.paste-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.paste-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }
.paste-step-1 .paste-head h2 { color: var(--primary); }
.paste-step-2 .paste-head h2 { color: var(--accent); }
.paste-actions { display: flex; align-items: center; gap: 12px; }

.paste-card .draft-body {
  margin: 0; border-radius: 0; border: none;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
  background: var(--surface-2); color: var(--text);
  padding: 16px 18px; white-space: pre-wrap; word-break: break-word;
  max-height: none;
}

.copy-btn { transition: background 0.15s, color 0.15s; }
.copy-btn.copied { background: var(--accent); color: #001428; border-color: var(--accent); }

/* v0.4 — Next-action hero + Next-step card + Channel badges + Topbar badge */

/* Topbar badge on Today nav */
.nav-today { position: relative; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  margin-left: 6px; padding: 0 6px;
  background: var(--accent); color: #001428;
  font-size: 11px; font-weight: 800;
  border-radius: 9px;
  vertical-align: middle;
}

/* /today next-action hero */
.hero-action {
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 18px 0 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(58,160,255,0.08), rgba(16,185,129,0.05));
  display: flex; flex-direction: column; gap: 10px;
}
.hero-action.hero-reply {
  background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(58,160,255,0.06));
  border-color: rgba(16,185,129,0.35);
}
.hero-action.hero-send {
  background: linear-gradient(135deg, rgba(58,160,255,0.14), rgba(16,185,129,0.04));
  border-color: rgba(58,160,255,0.35);
}
.hero-action.hero-follow-up {
  background: linear-gradient(135deg, rgba(245,166,35,0.14), rgba(255,255,255,0.02));
  border-color: rgba(245,166,35,0.35);
}
.hero-action.hero-queue {
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.hero-action.hero-empty {
  background: var(--surface);
  text-align: center;
}
.hero-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-kind {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  color: var(--muted); text-transform: uppercase;
}
.hero-action.hero-reply .hero-kind { color: var(--accent); }
.hero-action.hero-send .hero-kind { color: var(--primary); }
.hero-action.hero-follow-up .hero-kind { color: var(--warn); }
.hero-title { margin: 0; font-size: 22px; font-weight: 700; }
.hero-sub { margin: 0; color: var(--muted); font-size: 14px; }
.hero-cta { margin-top: 4px; }

/* Larger CTA button variant */
.btn-large {
  padding: 11px 22px; font-size: 14px; font-weight: 700;
}

/* Contact next-step card */
.next-step {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 14px 0;
  border: 1px solid var(--border);
}
.next-step-primary {
  background: rgba(58,160,255,0.10);
  border-color: rgba(58,160,255,0.35);
}
.next-step-warn {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.35);
}
.next-step-neutral {
  background: var(--surface);
}
.next-step-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  color: var(--muted); text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  background: var(--surface-2);
}
.next-step-primary .next-step-eyebrow { color: var(--primary); background: rgba(58,160,255,0.18); }
.next-step-warn .next-step-eyebrow { color: var(--danger); background: rgba(239,68,68,0.18); }
.next-step-label { flex: 1; min-width: 200px; font-size: 14px; color: var(--text); }

/* Channel badges */
.channel-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.channel-badge.ch-x { background: rgba(255,255,255,0.06); color: var(--text); }
.channel-badge.ch-linkedin { background: rgba(58,160,255,0.14); color: var(--primary); border-color: rgba(58,160,255,0.30); }
.channel-badge.ch-email { background: rgba(245,166,35,0.10); color: var(--warn); border-color: rgba(245,166,35,0.25); }
.channel-badge.ch-form { background: rgba(255,255,255,0.04); }
.channel-badge.ch-phone { background: rgba(16,185,129,0.10); color: var(--accent); border-color: rgba(16,185,129,0.25); }
.channel-badge.ch-meeting { background: rgba(16,185,129,0.16); color: var(--accent); border-color: rgba(16,185,129,0.35); }

/* v0.4 — Search overlay (Ctrl+K) */
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  margin-right: 14px; padding: 6px 10px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; font-size: 13px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.search-trigger:hover { border-color: var(--primary); color: var(--text); }
.search-icon { font-size: 14px; }
.search-label { font-size: 12px; }
.search-kbd, .search-kbd-inline {
  display: inline-block;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted);
}

.search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  z-index: 999;
  align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.search-overlay.open { display: flex; }
.search-modal {
  width: min(620px, 92vw);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.search-input {
  flex: 1; background: transparent; border: 0;
  color: var(--text); font: inherit; font-size: 16px;
  outline: none;
}
.search-input::placeholder { color: var(--muted); }
.search-results {
  max-height: 56vh; overflow-y: auto;
}
.search-row {
  padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.search-row:last-child { border-bottom: none; }
.search-row:hover, .search-row.sel {
  background: rgba(58,160,255,0.10);
}
.search-row strong { font-size: 14px; }
.search-empty { padding: 18px 16px; color: var(--muted); font-size: 13px; }
.search-hint {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  text-align: right;
}

/* Sticky page-head on long pages */
.page-head.sticky-head {
  position: sticky; top: 0; z-index: 10;
  margin-left: -24px; margin-right: -24px;
  padding: 14px 24px;
  background: rgba(10,13,18,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

/* Inline fit-note editing */
.fit-note-cell { position: relative; min-width: 220px; }
.fit-note-display { cursor: text; padding: 4px 6px; border-radius: 4px; }
.fit-note-display:hover { background: var(--surface-2); outline: 1px dashed var(--border); }
.fit-note-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.fit-note-input {
  flex: 1;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--primary); border-radius: 4px;
  padding: 4px 8px; font: inherit; font-size: 12px;
}
.fit-note-input:focus { outline: none; }

@media (max-width: 720px) {
  .search-trigger .search-label { display: none; }
}

/* v0.4 — Timeline v2, Stale tiers, Bulk bar, Quick reply, Arc chart */

/* Timeline v2 — week groups + colored rails */
.timeline-v2 { display: flex; flex-direction: column; gap: 18px; }
.timeline-week { }
.timeline-week-label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.timeline li.t-inbound { border-left-color: var(--accent); border-left-width: 3px; }
.timeline li.t-outbound { border-left-color: var(--primary); border-left-width: 3px; }
.t-draft-link {
  font-size: 11px; color: var(--primary); text-decoration: none;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(58,160,255,0.10); border: 1px solid rgba(58,160,255,0.3);
}
.t-draft-link:hover { background: rgba(58,160,255,0.20); text-decoration: none; }

/* Stale tier pills */
.pill.stale-cool { background: rgba(245,166,35,0.12); color: var(--warn); border-color: rgba(245,166,35,0.3); }
.pill.stale-cold { background: rgba(245,166,35,0.22); color: var(--warn); border-color: rgba(245,166,35,0.5); }
.pill.stale-ice  { background: rgba(239,68,68,0.18); color: var(--danger); border-color: rgba(239,68,68,0.4); }

/* Bulk bar */
.bulk-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.bulk-count { min-width: 80px; }
.bulk-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.bulk-select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 10px; font: inherit; font-size: 13px;
}
#bulk-submit:disabled { opacity: 0.45; cursor: not-allowed; }

/* Quick reply on /today */
.quick-reply-form { gap: 6px; }
.quick-reply-note {
  width: 200px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px 9px; font: inherit; font-size: 12px;
}
.quick-reply-note:focus { outline: none; border-color: var(--primary); }

/* Arc chart */
.arc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.arc-head h2 { margin: 0; font-size: 15px; }
.arc-legend { display: flex; align-items: center; gap: 12px; }
.arc-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.arc-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.arc-key-send::before { background: var(--primary); }
.arc-key-reply::before { background: var(--accent); }
.arc-svg { width: 100%; height: auto; display: block; }

/* v0.4 — Funnel scoreboard */
.funnel-card { padding: 18px 22px; }
.funnel-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.funnel-head h2 { margin: 0; font-size: 16px; }
.funnel-rows { display: flex; flex-direction: column; gap: 8px; }
.funnel-row {
  display: grid; grid-template-columns: 140px 1fr 120px;
  align-items: center; gap: 14px;
  padding: 6px 0;
}
.funnel-stage strong { display: block; font-size: 14px; }
.funnel-stage .muted { font-size: 11px; }
.funnel-bar-wrap {
  position: relative;
  background: var(--surface-2);
  border-radius: 4px;
  height: 28px;
  overflow: hidden;
}
.funnel-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(58,160,255,0.5), rgba(16,185,129,0.7));
  transition: width 0.3s;
}
.funnel-num {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-weight: 800; font-size: 14px; color: var(--text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.funnel-rate { text-align: right; font-size: 11px; }
.rate-good { color: var(--accent); }
.rate-ok   { color: var(--warn); }
.rate-low  { color: var(--danger); }

/* v0.4 — Read-only mode pill */
.pill-readonly {
  background: rgba(245,166,35,0.18);
  color: var(--warn);
  border-color: rgba(245,166,35,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* v0.4 — Disposition flag */
.t-disp-form { margin-top: 6px; gap: 6px; }
.t-disp-form select { font-size: 11px; padding: 3px 8px; }
.pill.disp-unreachable { background: rgba(245,166,35,0.15); color: var(--warn); border-color: rgba(245,166,35,0.4); }
.pill.disp-dead-account { background: rgba(239,68,68,0.18); color: var(--danger); border-color: rgba(239,68,68,0.4); }
.pill.disp-wrong-channel { background: rgba(58,160,255,0.15); color: var(--primary); border-color: rgba(58,160,255,0.35); }
.pill.disp-needs-warm-intro { background: rgba(168,85,247,0.18); color: #c2a4ff; border-color: rgba(168,85,247,0.4); }
.pill.disp-needs-research { background: rgba(255,255,255,0.06); color: var(--muted); }
.t-disp-unreachable, .t-disp-dead-account { opacity: 0.6; }
.t-disp-dead-account { text-decoration: line-through; }


/* ── /enrich page ─────────────────────────────────────────────────────────── */
.enrich-save { display: flex; flex-direction: column; gap: 6px; }
.enrich-email-input {
  width: 100%;
  min-width: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.04);
  color: var(--fg, #e8eaed);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
}
.enrich-email-input:focus { outline: 2px solid #4a9eff; outline-offset: -1px; }
.enrich-save-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.enrich-source { font-size: 12px; padding: 4px 6px; min-width: 88px; }
.enrich-verified-label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted, #9aa3b2); cursor: pointer; }
.enrich-verified-label input { margin: 0; }
.enrich-save-btn { padding: 4px 12px; font-size: 12px; }

/* Tighten the table density on /enrich */
.container table.table td { vertical-align: top; }
.container .card .table thead th { white-space: nowrap; }

/* ── Grouped drafts table (/drafts) ──────────────────────────────────────── */
.drafts-grouped tbody { border-top: 2px solid var(--border); }
.drafts-grouped tbody:first-of-type { border-top: none; }

.draft-group-header td {
  background: rgba(255, 255, 255, 0.025);
  padding: 10px 8px 7px;
  border-bottom: none;
  font-size: 13px;
}
.draft-group-count {
  float: right;
}

.draft-row td:first-child {
  padding-left: 16px;
}
.draft-row:last-child td {
  border-bottom: none;
}

