/* IronOrbit HQ — app styles. Single dark theme. */

:root {
  color-scheme: dark;
  --ink: #0b1020;
  --ink-2: #0f1528;
  --surface: #141c31;
  --surface-2: #1a2440;
  --surface-3: #212d4f;
  --line: #243052;
  --line-2: #33426c;
  --text: #efe9df;
  --text-2: #c3c4cf;
  --muted: #959cb1;
  --ion: #6fd6e8;
  --ion-strong: #93e3f1;
  --ion-ink: #052029;
  --ion-soft: rgba(111, 214, 232, 0.12);
  --gold: #f5c451;
  --gold-ink: #2b1f02;
  --gold-soft: rgba(245, 196, 81, 0.10);
  --gold-line: rgba(245, 196, 81, 0.45);
  --p-none: #ff8a5b;
  --p-broken: #f6a06a;
  --p-weak: #d2ae8c;
  --p-ok: #8f96aa;
  --danger: #f28b82;
  --danger-soft: rgba(242, 139, 130, 0.12);
  --ok: #86d9a8;
  --warn: #f2b56b;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Instrument Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --rail-w: 244px;
  --gutter: 32px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Static, low-contrast starfield */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(239, 233, 223, .42), transparent 60%),
    radial-gradient(1px 1px at 141px 187px, rgba(239, 233, 223, .30), transparent 60%),
    radial-gradient(1.4px 1.4px at 312px 92px, rgba(147, 227, 241, .38), transparent 60%),
    radial-gradient(1px 1px at 431px 301px, rgba(239, 233, 223, .26), transparent 60%),
    radial-gradient(1px 1px at 87px 389px, rgba(239, 233, 223, .32), transparent 60%),
    radial-gradient(1.2px 1.2px at 251px 471px, rgba(239, 233, 223, .34), transparent 60%),
    radial-gradient(1px 1px at 503px 23px, rgba(239, 233, 223, .28), transparent 60%),
    radial-gradient(1px 1px at 377px 543px, rgba(147, 227, 241, .26), transparent 60%),
    radial-gradient(1px 1px at 559px 409px, rgba(239, 233, 223, .30), transparent 60%),
    radial-gradient(1.3px 1.3px at 191px 297px, rgba(239, 233, 223, .22), transparent 60%),
    radial-gradient(900px 600px at 85% -10%, rgba(80, 120, 200, .10), transparent 70%);
  background-size: 600px 600px, 600px 600px, 600px 600px, 600px 600px, 600px 600px, 600px 600px, 600px 600px, 600px 600px, 600px 600px, 600px 600px, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, no-repeat;
}
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; }
h1 { font-family: var(--font-display); font-weight: 650; font-size: 30px; letter-spacing: -0.01em; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.005em; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
a { color: var(--ion); text-underline-offset: 3px; }
a:hover { color: var(--ion-strong); }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.soft { color: var(--text-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--ion); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
.gold :focus-visible, .btn-gold:focus-visible { outline-color: var(--gold); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ion); color: var(--ion-ink); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

.demo-banner {
  position: relative; z-index: 30;
  background: #182544; color: var(--text);
  border-bottom: 1px solid var(--line-2);
  text-align: center; font-size: 14px; padding: 6px 16px calc(6px);
  padding-top: calc(6px + var(--safe-t));
}

.boot-screen { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); z-index: 1; }
.boot-orbit { width: 56px; height: 56px; color: var(--ion); }
@media (prefers-reduced-motion: no-preference) { .boot-orbit { animation: spin 6s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { padding: 40px; text-align: center; }

/* ---------------------------------------------------------------- Shell */
.shell { position: relative; z-index: 1; min-height: 100vh; }
.rail {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: var(--rail-w);
  padding: calc(22px + var(--safe-t)) 14px 18px calc(14px + var(--safe-l));
  background: rgba(15, 21, 40, .92);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
  z-index: 20;
}
body.has-banner .rail { top: 33px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: var(--text); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 650; font-size: 18px; line-height: 1.1; letter-spacing: -0.01em; }
.brand-sub { display: block; font-family: var(--font-ui); font-weight: 400; font-size: 12.5px; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 15px;
  position: relative;
}
.nav-link svg { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ion); }
.nav-count { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.nav-count.gold { background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-line); }
.nav-count.gold::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.nav-count.warm { background: rgba(255, 138, 91, .14); color: var(--p-none); }
.rail-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rail-foot .btn { justify-content: flex-start; }

.main {
  position: relative; z-index: 1;
  margin-left: var(--rail-w);
  padding: 34px var(--gutter) 80px;
  max-width: calc(var(--rail-w) + 1180px);
  min-height: 100vh;
  outline: none;
}
.boot { color: var(--muted); padding: 40px 0; }

.tabbar { display: none; }

/* ---------------------------------------------------------------- Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .lede { color: var(--text-2); margin-top: 6px; max-width: 62ch; }
.page-head .head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 10px; }
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--text); }

.next-up {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 24px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(90deg, var(--surface) 0%, rgba(20, 28, 49, .4) 100%);
}
.next-up.gold { border-color: var(--gold-line); background: linear-gradient(90deg, rgba(245, 196, 81, .10), rgba(245, 196, 81, .02)); }
.next-up .next-label { color: var(--muted); font-size: 14px; }
.next-up .next-text { font-weight: 500; flex: 1 1 260px; }
.next-up.gold .next-label { color: var(--gold); }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 15px;
  border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ion); border-color: var(--ion); color: var(--ion-ink); font-weight: 600; }
.btn-primary:hover { background: var(--ion-strong); color: var(--ion-ink); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.btn-gold:hover { background: #ffd56f; color: var(--gold-ink); }
.btn-gold-outline { border-color: var(--gold-line); color: var(--gold); background: var(--gold-soft); }
.btn-gold-outline:hover { background: rgba(245, 196, 81, .18); color: var(--gold); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; border-color: rgba(242, 139, 130, .5); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #2a0806; font-weight: 600; }
.btn-danger-solid:hover { background: #f6a29b; color: #2a0806; }
.btn-sm { min-height: 34px; padding: 5px 11px; font-size: 14px; border-radius: 8px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { min-height: 48px; padding: 10px 20px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { min-width: 40px; padding: 8px; }
.linklike { background: none; border: 0; padding: 0; color: var(--ion); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- Surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head p { color: var(--muted); font-size: 14px; }
.panel + .panel { margin-top: 20px; }
.grid-2 > .panel + .panel { margin-top: 0; }
.section { margin-top: 30px; }
.section > h2 { margin-bottom: 12px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-wrap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- Pills & badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.6; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.pill.s-new { background: rgba(111, 214, 232, .12); color: var(--ion); }
.pill.s-queued { background: rgba(147, 160, 240, .16); color: #b7c0ff; }
.pill.s-contacted, .pill.s-followed_up { background: var(--surface-3); color: var(--text); }
.pill.s-replied { background: rgba(134, 217, 168, .14); color: var(--ok); }
.pill.s-interested { background: var(--gold); color: var(--gold-ink); font-weight: 600; }
.pill.s-not_interested, .pill.s-no_response { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.pill.s-unsubscribed, .pill.s-bounced { background: var(--danger-soft); color: var(--danger); }
.pill.s-client { background: rgba(134, 217, 168, .18); color: var(--ok); font-weight: 600; }
.pill.d-draft { box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; color: var(--text-2); }
.pill.d-sent { background: rgba(111, 214, 232, .12); color: var(--ion); }
.pill.d-viewed { background: rgba(147, 160, 240, .16); color: #b7c0ff; }
.pill.d-signed { background: rgba(134, 217, 168, .14); color: var(--ok); }
.pill.d-paid { background: var(--ok); color: #062615; font-weight: 600; }
.pill.d-void { background: transparent; color: var(--muted); text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--line); }
.pill.o-callback { background: rgba(255, 138, 91, .14); color: var(--p-none); }
.pill.o-interested { background: var(--gold); color: var(--gold-ink); font-weight: 600; }
.pill.o-voicemail, .pill.o-no_answer { background: var(--surface-3); color: var(--text-2); }
.pill.o-not_called { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); }
.pill.o-not_interested, .pill.o-wrong_number { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.pill.o-do_not_call { background: var(--danger-soft); color: var(--danger); }
.pill.o-demo_booked { background: var(--ion-soft); color: var(--ion); box-shadow: inset 0 0 0 1px rgba(111, 214, 232, .45); }
.pill.dm-scheduled { background: rgba(255, 138, 91, .14); color: var(--p-none); }
.pill.dm-built { background: var(--ion-soft); color: var(--ion); }
.pill.dm-presented { background: rgba(147, 160, 240, .16); color: #b7c0ff; }
.pill.dm-won { background: var(--ok); color: #062615; font-weight: 600; }
.pill.dm-lost, .pill.dm-no_show { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.pill.dm-canceled { background: transparent; color: var(--muted); text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--line); }
.pill.known { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); }
.pill.known.gold { box-shadow: inset 0 0 0 1px var(--gold-line); color: var(--gold); }

/* Priority: warm orange (best prospect) fading to muted */
.prio { display: inline-flex; align-items: center; gap: 7px; border-radius: 7px; padding: 2px 9px 2px 8px; font-size: 13px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.prio .prio-score { font-family: var(--font-mono); font-weight: 500; font-size: 12px; opacity: .8; }
.prio.t-no-website { background: var(--p-none); color: #2a0e02; }
.prio.t-broken { background: rgba(246, 160, 106, .16); color: var(--p-broken); box-shadow: inset 0 0 0 1px rgba(246, 160, 106, .55); }
.prio.t-weak { background: transparent; color: var(--p-weak); box-shadow: inset 0 0 0 1px rgba(210, 174, 140, .5); }
.prio.t-ok { background: transparent; color: var(--p-ok); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.finding { display: inline-block; font-size: 13px; color: var(--text-2); padding: 1px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.gold-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(245, 196, 81, .18); flex: none; }
.verify-tag { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: rgba(242, 181, 107, .16); color: var(--warn); }

/* ---------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 14px; font-weight: 500; color: var(--text-2); }
.field .help { font-size: 13px; color: var(--muted); line-height: 1.45; }
.req { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%; min-width: 0;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 9px 12px; min-height: 42px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23959cb1' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input:hover, select:hover, textarea:hover { border-color: #3d4d7c; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ion); outline-offset: 0; border-color: transparent; border-radius: 10px; }
input::placeholder, textarea::placeholder { color: #737b92; }
input[type="number"] { font-family: var(--font-mono); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.save-state { font-size: 13px; color: var(--muted); min-height: 1em; }
.save-state.ok { color: var(--ok); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ion); margin: 0; flex: none; cursor: pointer; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 50px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); flex: none; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform .15s; }
.switch input:checked + .track { background: var(--ion); border-color: var(--ion); }
.switch input:checked + .track::after { transform: translateX(22px); background: var(--ion-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--ion); outline-offset: 3px; }
.switch .switch-label { font-weight: 600; }

/* segmented / chips */
.chipbar { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; min-height: 36px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text-2);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.chip .chip-n { font-family: var(--font-mono); font-size: 12px; opacity: .75; }
.chip.gold { border-color: var(--gold-line); color: var(--gold); }
.chip.gold[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.chip-scroll { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-scroll::-webkit-scrollbar { display: none; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; padding: 10px 12px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
a.tab { text-decoration: none; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--ion); }

/* ---------------------------------------------------------------- Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list-head { display: grid; gap: 14px; padding: 0 14px 8px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.lrow { display: grid; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--line); position: relative; }
.lrow:hover { background: rgba(26, 36, 64, .55); }
.lrow.is-gold { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.lrow.is-gold:hover { background: rgba(245, 196, 81, .15); }
.lrow.is-selected { background: var(--ion-soft); }
.lrow-main { all: unset; box-sizing: border-box; display: grid; align-items: center; gap: 14px; padding: 13px 0; cursor: pointer; min-width: 0; color: var(--text); }
.lrow-main:focus-visible { outline: 2px solid var(--ion); outline-offset: 2px; border-radius: 6px; }
.lrow a.lrow-main { text-decoration: none; }
.cell { min-width: 0; }
.cell-title { font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.cell-title span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { display: block; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-snippet { display: block; font-size: 14px; color: var(--gold); opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* lead rows */
.leads-cols { grid-template-columns: 28px minmax(0, 1fr); }
.leads-cols-inner { grid-template-columns: minmax(0, 2.3fr) minmax(120px, 1fr) minmax(110px, .8fr) minmax(100px, .8fr); }
.list-head.leads-cols { grid-template-columns: 28px minmax(0, 2.3fr) minmax(120px, 1fr) minmax(110px, .8fr) minmax(100px, .8fr); }

#bulk { position: sticky; top: 8px; z-index: 5; }
.bulkbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--line-2); margin-bottom: 12px; }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 14px; }
.search-input { position: relative; flex: 1 1 240px; max-width: 380px; }
.search-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 38px; }

/* ---------------------------------------------------------------- Empty states */
.empty { display: flex; align-items: center; gap: 22px; padding: 22px 6px; color: var(--text-2); }
.empty svg.orbit-ill { width: 84px; height: 84px; flex: none; color: var(--line-2); }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { max-width: 54ch; font-size: 15px; }
.empty .btn { margin-top: 12px; }
.empty.gold svg.orbit-ill { color: rgba(245, 196, 81, .45); }

/* ---------------------------------------------------------------- Dashboard */
.inbox { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(245, 196, 81, .07), rgba(245, 196, 81, .015) 70%), var(--surface); }
.inbox .panel-head h2 { display: flex; align-items: center; gap: 10px; color: var(--gold); }
.inbox-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(245, 196, 81, .18); }
.inbox-item:first-child { border-top: 0; padding-top: 4px; }
.inbox-item .who { font-weight: 600; font-size: 17px; }
.inbox-item .quote { color: var(--text); opacity: .9; margin-top: 2px; font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inbox-item .when { color: var(--muted); font-size: 13px; margin-top: 2px; }

.today { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 22px; align-items: center; }
.orbit-arc { width: 172px; height: 172px; display: block; }
.orbit-arc .seg-done { stroke: var(--ion); }
.orbit-arc .seg-now { stroke: var(--ion); }
.orbit-arc .seg-future { stroke: var(--surface-3); }
.orbit-arc .seg-bg { stroke: var(--surface-3); }
.orbit-arc .big { font-family: var(--font-mono); font-size: 25px; fill: var(--text); font-weight: 500; }
.orbit-arc .lbl { font-family: var(--font-ui); font-size: 11.5px; fill: var(--muted); }
.ramp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.ramp div { border-top: 2px solid var(--surface-3); padding-top: 6px; font-size: 13px; color: var(--muted); }
.ramp div b { display: block; font-family: var(--font-mono); font-weight: 500; color: var(--text-2); font-size: 14px; }
.ramp div.done { border-color: var(--ion); }
.ramp div.now { border-color: var(--ion); color: var(--text); }
.ramp div.now b { color: var(--ion); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.status-on { color: var(--ok); font-weight: 600; }
.status-off { color: var(--warn); font-weight: 600; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; }
.mini-link { display: flex; align-items: center; gap: 12px; padding: 11px 0; text-decoration: none; color: var(--text); min-width: 0; }
.mini-link:hover { color: var(--ion-strong); }
.mini-link .grow { flex: 1; min-width: 0; }
.mini-link .grow > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; font-size: 14.5px; border-top: 1px solid var(--line); }
.activity li:first-child { border-top: 0; }
.activity .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transform: translateY(-1px); }
.activity .dot.k-reply { background: var(--gold); }
.activity .dot.k-doc { background: var(--ok); }
.activity .dot.k-call { background: var(--p-none); }
.activity .dot.k-email { background: var(--ion); }
.activity .dot.k-demo { background: #b7c0ff; }
.activity time { color: var(--muted); font-size: 13px; white-space: nowrap; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.checklist .done .tick { background: var(--ok); border-color: var(--ok); color: #062615; }
.checklist .tick svg { width: 14px; height: 14px; }
.checklist .done .what { color: var(--muted); }
.checklist .what b { font-weight: 600; display: block; }
.checklist .done .what b { color: var(--text-2); font-weight: 500; }
.checklist .what span { font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- Outreach strip */
.send-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 26px; align-items: center; }
.send-strip .explain { color: var(--text-2); font-size: 14.5px; margin-top: 6px; max-width: 60ch; }
.send-strip .today-line { font-size: 14.5px; margin-top: 6px; }
.send-strip .tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------------------------------------------------------- Drawer / sheets / dialogs */
.backdrop { position: fixed; inset: 0; background: rgba(4, 7, 16, .66); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(620px, 100vw);
  background: var(--ink-2); border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  padding-top: var(--safe-t); padding-bottom: var(--safe-b);
}
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 24px; }
.drawer-head .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; overscroll-behavior: contain; }
.drawer-body > section + section { margin-top: 24px; }
.drawer-body h3 { margin-bottom: 10px; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.details { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; font-size: 15px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.reply-callout { border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: var(--r); padding: 14px 16px; }
.reply-callout .label { color: var(--gold); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.reply-callout blockquote { margin: 0; font-size: 16px; }

.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { border-radius: var(--r); padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); max-width: 92%; }
.msg.out { align-self: flex-end; background: var(--surface-2); }
.msg.in { align-self: flex-start; border-color: var(--line-2); }
.msg.in.gold { border-color: var(--gold-line); background: var(--gold-soft); }
.msg-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.msg-subj { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.msg-body { white-space: pre-wrap; font-size: 14.5px; color: var(--text-2); overflow-wrap: anywhere; }
.msg-body.clamp { max-height: 8.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }

.dialog-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; padding-bottom: calc(20px + var(--safe-b)); }
.dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.dialog.wide { width: min(760px, 100%); }
.dialog h2 { margin-bottom: 8px; padding-right: 36px; }
.dialog .dialog-text { color: var(--text-2); }
.dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.dialog-close { position: absolute; right: 14px; top: 14px; }
.preview-mail { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-top: 14px; }
.preview-mail .subj { font-weight: 600; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.preview-mail pre { margin: 0; white-space: pre-wrap; font-family: var(--font-ui); font-size: 15px; color: var(--text-2); overflow-wrap: anywhere; }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--ink-2); border-top: 1px solid var(--line-2); border-radius: 18px 18px 0 0; padding: 10px 16px calc(18px + var(--safe-b)); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 12px; }
.sheet .nav-link { font-size: 17px; padding: 14px 12px; }

@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slideIn .22s cubic-bezier(.2, .8, .2, 1); }
  .sheet { animation: slideUp .22s cubic-bezier(.2, .8, .2, 1); }
  .dialog { animation: pop .16s ease-out; }
  .toast { animation: toastIn .2s ease-out; }
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.98); opacity: 0; } }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ---------------------------------------------------------------- Toasts */
.toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: min(440px, calc(100vw - 32px)); padding: 12px 14px 12px 16px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); box-shadow: 0 14px 40px rgba(0, 0, 0, .4); font-size: 15px; }
.toast.error { border-color: rgba(242, 139, 130, .6); }
.toast.error::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.toast.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.toast.gold { border-color: var(--gold-line); }
.toast.gold::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.toast .btn { margin-left: 4px; }

/* ---------------------------------------------------------------- Prospect results */
.search-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.quick-picks { margin-top: 14px; }
.quick-picks .label { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.results-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 10px; }
.results-bar .count { color: var(--text-2); font-size: 15px; }
.result { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; padding: 16px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.result:hover { background: rgba(26, 36, 64, .45); }
.result.is-selected { background: var(--ion-soft); }
.result input[type="checkbox"] { margin-top: 3px; }
.result-name { font-weight: 600; font-size: 17px; }
.result-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); margin-top: 6px; }
.result-meta a { color: var(--ion); }
.result-meta .rating { display: inline-flex; gap: 4px; align-items: center; }
.result-meta .rating svg { width: 14px; height: 14px; color: var(--text-2); }
.result .chips { margin-top: 8px; }
.result-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#p-actions { position: sticky; bottom: 12px; z-index: 5; }
.sticky-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-top: 14px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.inline-error { border: 1px solid rgba(242, 139, 130, .5); background: var(--danger-soft); border-radius: var(--r); padding: 14px 16px; margin-top: 18px; }
.inline-error b { color: var(--danger); }
.inline-warn { border: 1px solid rgba(242, 181, 107, .45); background: rgba(242, 181, 107, .08); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; font-size: 15px; }
.inline-warn b { color: var(--warn); }
.load-more { display: flex; justify-content: center; margin-top: 18px; }

/* ---------------------------------------------------------------- Cold calls */
.calls-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.calls-left { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 14px 0 0; overflow: hidden; }
.calls-left .tabs { padding: 0 12px; }
.calls-left .left-tools { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.calls-left .left-list { overflow-y: auto; flex: 1; }
.call-item { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.call-item:hover { background: var(--surface-2); }
.call-item[aria-current="true"] { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--ion); }
.call-item.is-gold { box-shadow: inset 3px 0 0 var(--gold); }
.call-item.is-gold[aria-current="true"] { background: rgba(245, 196, 81, .13); }
.call-item:focus-visible { outline: 2px solid var(--ion); outline-offset: -2px; }
.call-item .ci-name { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-item .ci-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.call-item .ci-due { color: var(--p-none); font-size: 13.5px; font-weight: 600; margin-top: 4px; display: block; }
.call-item .ci-phone { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.workspace { container-type: inline-size; min-width: 0; }
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@container (min-width: 700px) {
  .ws-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
  .ws-grid .script-panel { position: sticky; top: 16px; }
}
.ws-col { display: contents; }
.ws-info { order: 1; } .script-panel { order: 2; } .ws-outcome { order: 3; } .ws-owner { order: 4; } .ws-notes { order: 5; }
.ws-grid .panel + .panel { margin-top: 0; }
@container (min-width: 700px) {
  .ws-col { display: flex; flex-direction: column; gap: 20px; }
}
.c-client-inline { display: none; }
.ws-name { font-size: 26px; }
.ws-phone { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; }
.ws-phone a.phone { font-family: var(--font-mono); font-size: 32px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); text-decoration: none; border-bottom: 2px solid var(--ion); line-height: 1.25; }
.ws-phone a.phone:hover { color: var(--ion-strong); }
.ws-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.outcomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.outcome-btn { justify-content: flex-start; min-height: 46px; }
.outcome-btn[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.outcome-btn.o-gold { border-color: var(--gold-line); color: var(--gold); }
.outcome-btn.o-gold[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.outcome-btn.o-danger { color: var(--danger); }
.outcome-btn.o-danger[aria-pressed="true"] { background: var(--danger); color: #2a0806; border-color: var(--danger); }
.callback-box { margin-top: 12px; padding: 14px; border: 1px solid rgba(255, 138, 91, .45); border-radius: var(--r); background: rgba(255, 138, 91, .06); }
.owner-result { margin-top: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; }
.owner-row { display: flex; gap: 8px; align-items: flex-end; }
.owner-row .field { flex: 1; }
.not-saved { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); margin-top: 14px; color: var(--text-2); font-size: 15px; }

.script-panel { padding: 0; overflow: hidden; }
.script-panel .tabs { padding: 6px 10px 0; flex-wrap: wrap; row-gap: 0; }
.script-body { padding: 18px 22px 22px; }
.script-block + .script-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.script-block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.script-text { font-size: 18px; line-height: 1.6; max-width: 58ch; white-space: pre-wrap; color: var(--text); }
.script-when { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.pitch-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.suggest { font-size: 11.5px; font-weight: 600; color: var(--p-none); margin-left: 4px; }
.chip[aria-pressed="true"] .suggest { color: #b34a1d; }
.q-list { margin: 0; padding-left: 20px; font-size: 17px; line-height: 1.55; }
.q-list li + li { margin-top: 10px; }
.objections details { border-top: 1px solid var(--line); }
.objections details:first-of-type { border-top: 0; }
.objections summary { cursor: pointer; list-style: none; padding: 13px 4px; font-weight: 600; font-size: 16.5px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.objections summary::-webkit-details-marker { display: none; }
.objections summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); font-weight: 400; font-size: 20px; }
.objections details[open] summary::after { content: "−"; }
.objections .obj-a { padding: 0 4px 16px; }
.objections .obj-a .script-text { font-size: 17px; }

/* Google reviews strip (call workspace) */
.reviews-strip { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.reviews-strip:empty { display: none; }
.rv-top { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 15px; }
.rv-score { font-weight: 600; font-family: var(--font-mono); font-size: 15px; }
.rv-weak, .rv-none { color: var(--muted); font-size: 14px; }
.rv-none { color: var(--text-2); }
.rv-line { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.45; }
.rv-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 2px; }
.outcome-btn.o-demo { border-color: rgba(111, 214, 232, .55); color: var(--ion); }
.outcome-btn.o-demo[aria-pressed="true"] { background: var(--ion); color: var(--ion-ink); border-color: var(--ion); }

/* Call flow (first script tab) */
.flow-rail { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.flow-dot { all: unset; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 500; text-align: center; }
.flow-dot:hover { background: var(--surface-2); color: var(--text); }
.flow-dot:focus-visible { outline: 2px solid var(--ion); outline-offset: -2px; }
.flow-dot .fd-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); font-family: var(--font-mono); font-size: 13px; }
.flow-dot.done .fd-n { background: var(--surface-3); border-color: var(--surface-3); color: var(--text-2); }
.flow-dot[aria-current="step"] { color: var(--text); }
.flow-dot[aria-current="step"] .fd-n { background: var(--ion); border-color: var(--ion); color: var(--ion-ink); font-weight: 600; }
.flow-card { border-left: 3px solid var(--ion); padding-left: 18px; }
.flow-n { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--ion); font-weight: 500; margin-bottom: 2px; }
#flow-h { font-size: 18px; }
.flow-tip { margin-top: 14px; font-size: 14px; color: var(--text-2); max-width: 60ch; }
.flow-tip b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 6px; }
.flow-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.book-form { margin-top: 18px; padding: 16px; border-radius: var(--r); background: var(--ink-2); border: 1px solid rgba(111, 214, 232, .35); }
.book-form h5 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 14px; }
.book-form h5 svg { width: 20px; height: 20px; color: var(--ion); }
.slot-field { border: 0; padding: 0; margin: 0; grid-column: 1 / -1; }
.slot-field legend { font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.slot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-chips .chip { font-family: var(--font-mono); font-size: 13.5px; min-width: 88px; justify-content: center; }
.booked-box { margin-top: 18px; padding: 16px; border-radius: var(--r); border: 1px solid rgba(134, 217, 168, .45); background: rgba(134, 217, 168, .06); }
.bb-head { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 8px; }
.bb-head svg { width: 22px; height: 22px; flex: none; color: #062615; background: var(--ok); border-radius: 50%; padding: 3px; }
.sms-text { margin-top: 6px; white-space: pre-wrap; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Demos */
.demos-row { margin: 0 0 20px; }
.inbox + .demos-row { margin: 20px 0 0; }
.demo-panel.urgent { border-color: rgba(255, 138, 91, .5); }
.due-text { color: var(--p-none) !important; font-weight: 500; }
.dm-time { flex: none; min-width: 72px; font-size: 14px; color: var(--text); }
.demo-tabs { margin-bottom: 18px; }
.demo-tabs .chip-n { font-family: var(--font-mono); font-size: 12px; opacity: .75; margin-left: 2px; }
.tab.tab-warm .chip-n { color: var(--p-none); opacity: 1; font-weight: 600; }
.demo-list { display: flex; flex-direction: column; gap: 16px; }
.demo-list > .panel + .panel { margin-top: 0; }
.demo-card { padding: 20px 22px; scroll-margin-top: 16px; }
.demo-card.is-focus { border-color: var(--ion); box-shadow: 0 0 0 1px var(--ion); }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dc-who { min-width: 0; }
.dc-who h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.dc-when { margin-top: 4px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 15.5px; }
.dc-rel { font-size: 13px; font-weight: 600; color: var(--p-none); }
.dc-contact { margin-top: 2px; overflow-wrap: anywhere; }
.dc-notes { margin-top: 10px; color: var(--text-2); }
.dc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 16px; border-top: 1px solid var(--line); }
.dc-step { padding: 14px 16px 4px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dc-step:first-child { border-left: 0; padding-left: 0; }
.dc-step:last-child { padding-right: 0; }
.dc-step h4 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.dc-n { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.dc-n svg { width: 13px; height: 13px; }
.dc-step.done .dc-n { background: var(--ok); border-color: var(--ok); color: #062615; }
.dc-step.done h4 { color: var(--text-2); }
.dc-link { overflow-wrap: anywhere; }
.dc-cal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.dc-cal .linklike { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; }
.dc-cal .linklike svg { width: 14px; height: 14px; }
.dc-status { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-status .chip { min-height: 32px; padding: 4px 11px; font-size: 13.5px; }
.chip.chip-ok { border-color: rgba(134, 217, 168, .5); color: var(--ok); }
.chip.chip-ok[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #062615; }
.file-btn { position: relative; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--ion); outline-offset: 2px; }
.file-btn.is-busy { opacity: .6; pointer-events: none; }
.demo-script { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.demo-script li + li { border-top: 1px solid var(--line); padding-top: 16px; }
.demo-script h4 .flow-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--text); margin: 0 8px 0 0; }
.demo-script .script-text { font-size: 17px; }

/* ---------------------------------------------------------------- Clients & docs */
.clients-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 90px 120px; }
.docs-cols { grid-template-columns: 130px minmax(0, 1.6fr) minmax(0, 1.2fr) 110px 100px; }
.list-head.clients-cols, .list-head.docs-cols { padding-left: 14px; padding-right: 14px; }
.money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.money.due { color: var(--warn); }

.doc-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.doc-editor .preview-col { position: sticky; top: 16px; }
.step { padding: 20px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; padding-top: 0; }
.step > h3 { margin-bottom: 12px; display: flex; gap: 10px; align-items: baseline; }
.step-n { font-family: var(--font-mono); color: var(--ion); font-size: 14px; font-weight: 500; }
.type-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.type-opt { position: relative; }
.type-opt input { position: absolute; opacity: 0; }
.type-opt label { display: block; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; font-weight: 600; }
.type-opt label span { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.type-opt input:checked + label { border-color: var(--ion); background: var(--ion-soft); }
.type-opt input:focus-visible + label { outline: 2px solid var(--ion); outline-offset: 2px; }
.catalog-group + .catalog-group { margin-top: 16px; }
.catalog-group h4 { font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.catalog-group.offer h4 { color: var(--gold); }
.cat-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.cat-item:first-of-type { border-top: 0; }
.cat-item .nm { font-weight: 500; }
.cat-item .ds { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.cat-item .pr { font-family: var(--font-mono); font-size: 14px; color: var(--text-2); white-space: nowrap; }
.cat-item.offer { border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: var(--r); padding: 10px 12px; }
.line-items { display: flex; flex-direction: column; gap: 10px; }
.line-item .f-desc { grid-column: 1 / -1; }
.line-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 12px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); }
.line-item .lt { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.line-item .lt b { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; margin-top: 14px; font-size: 15px; max-width: 340px; margin-left: auto; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; font-family: var(--font-mono); }
.totals .grand { font-weight: 600; color: var(--text); font-size: 17px; padding-top: 6px; border-top: 1px solid var(--line); }

.paper-wrap { background: #2a3350; border-radius: var(--r-lg); padding: 18px; border: 1px solid var(--line); }
.paper-label { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 14px; margin-bottom: 10px; gap: 10px; }
.paper { background: #fff; color: #1b1b1b; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); overflow: auto; max-height: calc(100vh - 140px); color-scheme: light; }
.paper.tall { max-height: none; }
.paper-empty { padding: 60px 30px; text-align: center; color: #555; font-size: 15px; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.doc-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.doc-side .btn { justify-content: flex-start; }
.disabled-reason { font-size: 13.5px; color: var(--warn); margin-top: -4px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 1.5px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline .node { width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--ink-2); display: grid; place-items: center; }
.timeline .done .node { border-color: var(--ion); background: var(--ion); color: var(--ion-ink); }
.timeline .done.paid .node { border-color: var(--ok); background: var(--ok); color: #062615; }
.timeline .node svg { width: 12px; height: 12px; }
.timeline .tl-what { font-weight: 500; }
.timeline .tl-when { font-size: 13px; color: var(--muted); }
.timeline li:not(.done) .tl-what { color: var(--muted); font-weight: 400; }

/* ---------------------------------------------------------------- Settings */
.settings-tabs { margin-bottom: 22px; }
.settings-section { max-width: 860px; }
.settings-section .panel + .panel { margin-top: 20px; }
.days-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.days-pick label { position: relative; }
.days-pick input { position: absolute; opacity: 0; }
.days-pick span { display: inline-flex; min-width: 50px; justify-content: center; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line-2); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); }
.days-pick input:checked + span { background: var(--ion-soft); border-color: var(--ion); color: var(--text); }
.days-pick input:focus-visible + span { outline: 2px solid var(--ion); outline-offset: 2px; }
.token-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.token-chip { font-family: var(--font-mono); font-size: 13px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--ion); cursor: pointer; }
.token-chip:hover { background: var(--surface-2); }
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tpl-grid textarea { min-height: 340px; font-size: 15px; }
.settings-group { border-top: 1px solid var(--line); }
.settings-group > summary { cursor: pointer; padding: 14px 2px; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); font-weight: 400; font-size: 20px; }
.settings-group[open] > summary::after { content: "−"; }
.settings-group > .inner { padding: 0 2px 20px; display: flex; flex-direction: column; gap: 14px; }
.obj-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); }
.obj-edit .field { grid-column: 1; }
.obj-edit .rm { grid-column: 2; grid-row: 1; align-self: start; }
.warmup-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.warmup-table div { padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.warmup-table div b { display: block; font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--text); }
.warmup-table div.now { border-color: var(--ion); background: var(--ion-soft); color: var(--text-2); }

/* ---------------------------------------------------------------- Login */
.login { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); }
.login-card .brand { padding: 0 0 26px; justify-content: center; }
.login-card .brand svg { width: 44px; height: 44px; }
.login-card .brand-name { font-size: 24px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card .err { color: var(--danger); font-size: 14px; min-height: 1.2em; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1180px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-side { position: static; order: -1; }
  .doc-editor { grid-template-columns: minmax(0, 1fr); }
  .doc-editor .preview-col { position: static; }
  .paper { max-height: 80vh; }
}
@media (max-width: 1180px) {
  .dc-steps { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .dc-step { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 6px; }
}
@media (max-width: 1020px) {
  :root { --gutter: 24px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .calls-layout { grid-template-columns: minmax(0, 1fr); }
  .calls-left { position: static; max-height: 460px; }
  .tpl-grid { grid-template-columns: minmax(0, 1fr); }
  .send-strip { grid-template-columns: minmax(0, 1fr); }
  .send-strip .tools { justify-content: flex-start; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  h1 { font-size: 25px; }
  .rail { display: none; }
  .main { margin-left: 0; padding: calc(20px + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + 40px) calc(var(--gutter) + var(--safe-l)); }
  body.has-banner .main { padding-top: 18px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
    background: rgba(13, 19, 37, .97); border-top: 1px solid var(--line);
  }
  .tab-link { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--muted); cursor: pointer; position: relative; text-align: center; min-width: 0; }
  .tab-link svg { width: 23px; height: 23px; }
  .tab-link[aria-current="page"] { color: var(--text); }
  .tab-link[aria-current="page"] svg { color: var(--ion); }
  .tab-link:focus-visible { outline: 2px solid var(--ion); outline-offset: -4px; border-radius: 10px; }
  .tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-family: var(--font-mono); font-size: 11px; line-height: 18px; text-align: center; background: var(--p-none); color: #2a0e02; font-weight: 600; }
  .tab-badge.gold { background: var(--gold); color: var(--gold-ink); }
  .toasts { left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); align-items: stretch; }
  .toast { max-width: none; }
  .page-head { margin-bottom: 18px; align-items: flex-start; flex-direction: column; }
  .page-head .head-actions { width: 100%; }
  .panel { padding: 16px; border-radius: 14px; }
  .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .today { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .today > div:last-child { justify-self: stretch; }
  .inbox-item { grid-template-columns: auto minmax(0, 1fr); }
  .inbox-item .btn { grid-column: 2; justify-self: start; }
  .list-head { display: none; }
  .lrow { padding: 0 10px; gap: 10px; }
  .leads-cols-inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .leads-cols-inner .c-prio { grid-column: 1; grid-row: 2; }
  .leads-cols-inner .c-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .leads-cols-inner .c-last { grid-column: 2; grid-row: 2; justify-self: end; font-size: 13px; }
  .clients-cols { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .clients-cols .c-contact { grid-column: 1; grid-row: 2; }
  .clients-cols .c-docs { display: none; }
  .docs-cols { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .docs-cols .c-num { grid-column: 1; grid-row: 2; font-size: 13px; color: var(--muted); }
  .docs-cols .c-title { grid-column: 1; grid-row: 1; }
  .docs-cols .c-client { display: none; }
  .docs-cols .c-client-inline { display: inline; }
  .docs-cols .c-total { grid-column: 2; grid-row: 1; }
  .docs-cols .c-status { grid-column: 2; grid-row: 2; justify-self: end; }
  .drawer { width: 100vw; border-left: 0; }
  .drawer-head { padding: 16px; }
  .drawer-body { padding: 16px 16px 30px; }
  .details { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .details dt { margin-top: 10px; font-size: 14px; }
  .search-form { grid-template-columns: minmax(0, 1fr); }
  .result { grid-template-columns: 26px minmax(0, 1fr); padding: 14px 8px; }
  .result-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ws-phone a.phone { font-size: 27px; }
  .script-body { padding: 16px; }
  .script-panel .tabs { flex-wrap: nowrap; }
  .script-text { font-size: 17px; }
  .flow-card { padding-left: 12px; }
  .flow-dot { font-size: 11.5px; padding: 6px 0; }
  .flow-dot .fd-n { width: 26px; height: 26px; }
  .rv-line { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .demo-card { padding: 16px; }
  .dc-head { flex-direction: column-reverse; gap: 8px; }
  .slot-chips .chip { min-width: 0; flex: 1 1 88px; }
  .type-pick { grid-template-columns: minmax(0, 1fr); }
  .warmup-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .empty { flex-direction: column; align-items: flex-start; gap: 12px; }
  .empty svg.orbit-ill { width: 64px; height: 64px; }
  #bulk { top: 4px; }
  #p-actions { bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); }
  .dialog { padding: 20px; }
  .paper-wrap { padding: 8px; margin: 0 -8px; }
  .chip-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 2px; margin: 0 calc(var(--gutter) * -1); }
}

/* ---------------------------------------------------------------- Print: only the paper */
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #000; }
  body::before { display: none; }
  .rail, .tabbar, .demo-banner, .toasts, #layer, .page-head, .doc-side, .back-link, .paper-label, .skip-link, .no-print { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; max-width: none; }
  .doc-layout { display: block; }
  .paper-wrap { background: none; border: 0; padding: 0; }
  .paper { box-shadow: none; max-height: none; overflow: visible; border-radius: 0; }
  .paper-scale { zoom: 1 !important; width: auto !important; } /* undo the on-screen fit-to-column scaling */
}

/* App & updates settings */
.steps-list { display: grid; gap: 10px; padding-left: 20px; margin: 4px 0 0; max-width: 68ch; color: var(--text); }
.steps-list li { padding-left: 4px; }
.steps-list b { font-weight: 600; }
