/* Atlas Dialer. Navy-black and white, hairline borders, violet accent from the logo, maroon for warnings.
   Geist for words, Geist Mono for numbers, phones and times so columns line up. */
:root {
  color-scheme: dark;
  /* Atlas Dialer (Nov 12): navy-black page from the logo, lighter navy cards, violet accent from the wave mark. */
  /* Nov 12 pass 2: a deeper indigo-black page, borderless lighter panels (refs: indigo CRM + Mosaic dark) */
  --bg: #0d1120;
  --surface: #161c31;
  --surface-2: #1d243e;
  --surface-3: #272f4f;
  --line: rgba(176, 186, 255, .08);
  --line-2: rgba(176, 186, 255, .15);
  --ink: #f9fafb;
  --ink-soft: #a7b0c0;
  --ink-faint: #737d91;
  --signal: #a78bfa;
  --signal-soft: rgb(var(--signal-rgb) / .12);
  --signal-ink: #111827;
  --signal-rgb: 167 139 250;
  --signal-text: #cdbffd;
  --signal-text-2: #e6deff;
  --primary: #a78bfa;
  --primary-ink: #111827;
  --primary-hover: #c4b5fd;
  --well: #0c1220;
  --well-2: #131b2b;
  --float-rgb: 30 41 59;
  --pill-rgb: 24 33 51;
  --glow: rgb(167 139 250 / .07);
  /* The logo's violet: the same in every theme */
  --brand: #a78bfa;
  --brand-rgb: 167 139 250;
  /* Errors and warnings: maroon, so a problem never looks like the violet accent. */
  --danger: #a3293f;
  --danger-text: #f08a9c;
  --danger-soft: rgba(163, 41, 63, .18);
  /* Charts and your own text bubbles: a deeper violet that white text reads on. */
  --ocean: #7463ea;
  --font: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: "Archivo", "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 9px;
  --fast: 160ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-float: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 50px -18px rgba(2, 6, 18, .85), 0 2px 8px rgba(2, 6, 18, .45);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 14.5px/1.5 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(1200px 500px at 50% -260px, var(--glow), transparent 70%), var(--bg);
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: currentColor; }
main { max-width: 1180px; margin: 0 auto; padding: 36px 24px 96px; }
main.wide { max-width: none; padding-left: 28px; padding-right: 28px; }
h1 { font: 800 32px/1.08 var(--display); letter-spacing: -.025em; margin: 0; }
h2 { font: 700 17px var(--display); letter-spacing: -.02em; margin: 0 0 12px; }
button { font: inherit; color: inherit; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
[hidden] { display: none !important; }
.eyebrow { margin: 0 0 6px; font: 500 11px/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.sub, .muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.warn { color: var(--danger-text); }
.small { font-size: 12.5px; }

/* ---------- nav pill ---------- */
.dock { position: sticky; top: 14px; z-index: 20; display: flex; justify-content: center; padding: 14px 16px 0; pointer-events: none; }
.pill {
  pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; max-width: 100%; overflow-x: auto;
  background: rgb(var(--pill-rgb) / .85); border: 1px solid var(--line); box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}
.brand { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; margin-right: 4px; flex: none; color: var(--ink); text-decoration: none; }
/* The Atlas mark: an A with wave bars for its crossbar, dark on a violet tile. */
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand); flex: none; }
.mark svg { width: 20px; height: 20px; }
.brand-name { font: 800 14px var(--display); letter-spacing: .04em; text-transform: uppercase; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; color: var(--ink-soft);
  font: 500 13.5px var(--font); text-decoration: none; white-space: nowrap; transition: background var(--fast) var(--ease), color var(--fast);
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.tab[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .09); }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font: 600 11px/1 var(--mono); }
.count.late { background: var(--signal); color: var(--signal-ink); }
.count.alert { background: #e5484d; color: #fff; }
.tab.icon { padding: 0 10px; }
button.tab { border: 0; background: none; cursor: pointer; }
button.tab[aria-expanded="true"] { color: var(--ink); background: rgba(255, 255, 255, .09); }
.nav-gap { width: 10px; flex: none; }
.phone-btn .phone-dot { margin: 0; }
/* The menu under your name: the pages you open now and then */
.more-open .caret { font-size: 10px; color: var(--ink-faint); }
.more-badge { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.more-menu { pointer-events: auto; position: fixed; z-index: 30; min-width: 190px; padding: 6px; border-radius: 14px; background: rgb(var(--float-rgb) / .97);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-float); animation: rise 160ms var(--ease); display: grid; }
.more-menu a, .more-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; text-align: left;
  color: var(--ink-soft); font: 500 13.5px var(--font); text-decoration: none; cursor: pointer; }
.more-menu a:hover, .more-menu button:hover, .more-menu a:focus-visible, .more-menu button:focus-visible { color: var(--ink); background: rgba(255, 255, 255, .06); }
.more-menu a[aria-current="page"] { color: var(--ink); }
.more-menu[hidden] { display: none; }
.more-menu .narrow-only { display: none; }
@media (max-width: 560px) { .more-menu .narrow-only { display: block; } }
.more-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
@media (max-width: 560px) {
  .pill .tab { padding: 0 9px; font-size: 13px; }
  .pill .brand, .pill .wide-only { display: none; }
  .nav-gap { width: 2px; }
}
/* Dial box: drops down under the top bar */
.dialpad { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; width: min(380px, calc(100vw - 32px)); padding: 12px; border-radius: 16px; background: rgb(var(--float-rgb) / .96);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-float); animation: rise 180ms var(--ease); }
.dialpad[hidden] { display: none; }
.dialpad input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--ink); font: 500 15px var(--mono); }
.dialpad p { flex-basis: 100%; margin: 0; }
.tab svg { width: 16px; height: 16px; }
/* Audio menu: drops down under the top bar, like the Dial box */
.audio-panel { position: fixed; top: 66px; left: 0; right: 0; margin-inline: auto; z-index: 30; display: grid; gap: 12px;
  width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 86px); overflow-y: auto; padding: 14px 16px 12px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-float); animation: rise 180ms var(--ease); }
.audio-panel[hidden], .audio-panel [hidden] { display: none; }
.au-head { display: flex; align-items: center; justify-content: space-between; margin: -4px -6px -4px 0; }
.au-head h2 { margin: 0; font-size: 15px; }
.au-note { margin: 0; font-size: 12.5px; color: var(--ink-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.au-note.warn { color: var(--danger-text); }
.au-pair { display: flex; align-items: flex-end; gap: 8px; }
.au-pair .f { flex: 1; min-width: 0; }
.au-pair .btn { height: 38px; }
.au-meter { height: 4px; margin-top: -6px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.au-meter span { display: block; height: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform 60ms linear; }
.au-range input { padding: 0; accent-color: var(--ink); }
.au-switches { display: grid; gap: 6px; margin: 2px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); }
.au-switches legend { padding: 0 0 6px; font-size: 12.5px; color: var(--ink-soft); }
.au-switches label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.au-reset { justify-self: start; margin-left: -12px; }

/* ---------- buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: 500 13.5px var(--font); text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: background var(--fast) var(--ease), border-color var(--fast), transform var(--fast) var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; color: var(--ink-soft); }
.btn.ghost:hover { color: var(--ink); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn.danger:hover { border-color: var(--danger); color: var(--danger-text); }
.btn kbd { font: 500 11px var(--mono); padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, .08); color: var(--ink-soft); }
.btn.primary kbd { background: rgba(0, 0, 0, .12); color: var(--bg); }
input, textarea, select {
  font: inherit; color: var(--ink); padding: 8px 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--well);
  transition: border-color var(--fast), box-shadow var(--fast); min-width: 0;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(255, 255, 255, .4); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--signal); }
textarea { resize: vertical; min-height: 72px; width: 100%; }
/* The call note: two lines to start, drag it as big as a notes template needs (Seth, Oct 30) */
.note-box { min-height: 52px; max-height: 70vh; }
label.f, div.f { display: grid; gap: 5px; font-size: 12.5px; color: var(--ink-soft); }
label.f input, label.f select, label.f textarea { font-size: 14px; color: var(--ink); width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.spacer { flex: 1; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg a, .seg label { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; color: var(--ink-soft);
  font: 500 13px var(--font); text-decoration: none; cursor: pointer; }
.seg a[aria-current="page"], .seg label:has(input:checked) { background: var(--surface-3); color: var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid transparent; border-radius: 14px; padding: 20px 22px; box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -18px rgba(0, 0, 0, .8); }
.card + .card { margin-top: 12px; }
:where(.grid2, .grid3, .settings-grid) > .card { margin-top: 0; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card h2 .spacer + * { font: 500 13px var(--font); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .sub { margin: 6px 0 0; }
.empty { padding: 40px 24px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); text-align: center; color: var(--ink-soft); }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }
.group { display: flex; align-items: baseline; gap: 8px; margin: 28px 0 10px; font: 500 11px var(--font); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint); }
.group:first-child { margin-top: 0; }

/* ---------- flash ---------- */
.flashes { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); }
.flash { padding: 11px 16px; border-radius: 12px; background: rgba(24, 27, 29, .96); border: 1px solid var(--line-2); box-shadow: var(--shadow-float);
  font-size: 14px; animation: rise 260ms var(--ease); }
.flash.error { border-color: var(--danger); background: linear-gradient(var(--danger-soft), var(--danger-soft)), var(--surface); color: var(--danger-text); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 26px; }
/* Stat tiles: small uppercase label on top, a big white number under it */
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 8px; padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -18px rgba(0, 0, 0, .8); }
.stat .num { display: block; font: 800 32px/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.stat .lbl { display: block; color: var(--ink-faint); font: 600 11px/1.35 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.stat.lead .num { font-size: clamp(20px, 1.9vw, 30px); white-space: nowrap; } /* fits 118/325 in a 1/6-width card */

/* ---------- lists / tables ---------- */
.list { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .who { display: grid; min-width: 0; }
.item .who a { font-weight: 500; text-decoration: none; }
.item .who a:hover { text-decoration: underline; }
.item .meta { font-size: 12.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta .mono { color: var(--ink-soft); }
.item .acts { display: flex; gap: 6px; align-items: center; }
.item.late .when { color: var(--signal); }
.msg { margin-top: 6px; padding: 8px 11px; border-radius: 10px; background: var(--surface-2); color: var(--ink-soft); font-size: 13px; white-space: pre-wrap; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font: 500 11px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover { background: rgba(255, 255, 255, .02); }
.t a { text-decoration: none; font-weight: 500; }
/* Dialer setup: the list options on the left, the call schedule on the right (Cohen, Oct 31) */
.dial-split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 12px; align-items: start; }
.dial-split .card { margin-top: 0; }
.dial-split label.row { flex-wrap: nowrap; }
.dial-split label.row > input { flex: none; }
.dial-split .seg label { white-space: nowrap; }
.dial-split .seg .mono { margin-left: 6px; }
@media (max-width: 1200px) { .dial-split { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 900px) { .dial-split { grid-template-columns: minmax(0, 1fr); } }
.call-sched td:first-child { width: 120px; white-space: nowrap; }
.call-sched tr.best td:last-child { color: #a8e6bf; }
.call-sched tr.now td { background: var(--signal-soft); color: var(--ink); }
.call-sched tr.now td:first-child { box-shadow: inset 2px 0 0 var(--signal); }
.preset { display: inline-flex; align-items: center; gap: 2px; }
.preset form { margin: 0; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: auto; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.chip.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.warn { border-color: rgba(163, 41, 63, .6); color: var(--danger-text); }
.chip.ok { border-color: var(--signal); color: var(--signal); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.tag-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.tag-pick legend { padding: 0; margin-bottom: 6px; }
.tag-pick .chips { gap: 6px; }
.tag-pick .chip { height: 30px; padding: 0 12px; font-size: 13px; gap: 6px; cursor: pointer; }
.tag-pick .chip input { position: absolute; opacity: 0; pointer-events: none; }
.tag-pick .chip:has(input:checked) { background: var(--surface-3); color: var(--ink); border-color: var(--ink-soft); }
.tag-pick .chip:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }
.tag-opt { display: inline-flex; align-items: center; }
.tag-folder { border-top: 1px solid var(--line); }
.tag-folder:last-of-type { border-bottom: 1px solid var(--line); }
.tag-folder summary { display: flex; align-items: center; gap: 10px; min-height: 42px; cursor: pointer; list-style: none; color: var(--ink-soft); }
.tag-folder summary::-webkit-details-marker { display: none; }
.tag-folder summary svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.tag-folder summary:hover, .tag-folder[open] summary { color: var(--ink); }
.tag-folder[open] summary svg { color: var(--ocean); }
.tag-folder-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.tag-folder-picked { display: none; margin-left: auto; color: var(--ocean); }
.tag-folder:has(input:checked) .tag-folder-picked { display: inline; }
.tag-folder .chips { padding: 2px 0 14px 28px; }
.tag-tools { margin-top: 8px; gap: 10px; align-items: center; }
.tag-opt:has(.tag-x) .chip { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; padding-right: 8px; }
.tag-x { height: 30px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 0 999px 999px 0; background: none;
  color: var(--ink-faint); font-size: 14px; line-height: 1; cursor: pointer; }
.tag-x:hover, .tag-x:focus-visible { color: var(--danger-text); border-color: currentColor; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input[type="search"] { width: 260px; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line-2); }

/* ---------- contact page ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.contact-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.phone { font: 500 18px var(--mono); letter-spacing: -.02em; }
.callbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.dispos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dispo { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface-2); cursor: pointer; font: 500 13px var(--font); text-align: left; transition: background var(--fast), border-color var(--fast), transform var(--fast); }
.dispo:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, .2); }
.dispo:active { transform: scale(.98); }
.dispo kbd { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .08);
  font: 600 11px var(--mono); color: var(--ink-soft); flex: none; }
.dispo.picked { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dispo.picked kbd { background: rgba(0, 0, 0, .15); color: var(--bg); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3);
  font: 600 10px var(--mono); color: var(--ink-soft); }
.timeline .k-disposition .ico, .timeline .k-reply .ico { background: var(--ink); color: var(--bg); }
.timeline .what { font-size: 13.5px; }
.timeline .when { font: 11.5px var(--mono); color: var(--ink-faint); }
.timeline .body { white-space: pre-wrap; color: var(--ink-soft); font-size: 13px; }
dl.facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13.5px; }
dl.facts dt { color: var(--ink-faint); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
details.edit summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; list-style: none; }
details.edit summary::-webkit-details-marker { display: none; }
details.edit[open] summary { margin-bottom: 12px; }
.callback-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.callback-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-basis: 100%; }
.callback-quick:empty { display: none; }

/* ---------- pipeline board (Atlas, Nov 12): arrow headers in each stage's color, a value strip, chip cards ---------- */
#board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { display: flex; flex-direction: column; min-height: 200px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
.col-head, .lane-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; height: 46px; padding: 0 26px 0 22px;
  background: var(--stage); color: #111827; border: 0; font: 700 16px var(--display); letter-spacing: -.01em; text-align: left; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
#board .col:first-child .col-head, .lane-head { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); padding-left: 16px; }
#board .col:last-child .col-head { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); padding-right: 16px; }
.col-head .caret { font-size: 11px; opacity: .6; transition: transform var(--fast) var(--ease); }
.col-head:hover .caret { opacity: 1; }
.col-head:focus-visible, .lane-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.col-total { padding: 12px 16px; font-size: 17px; font-weight: 500; border-bottom: 1px solid var(--line); }
.col.shut { min-height: 0; border: 0; }
.col.shut .col-head .caret { transform: rotate(-90deg); }
.col.shut .col-body, .col.shut .col-total { display: none; }
.col-body { display: grid; gap: 10px; padding: 12px; align-content: start; min-height: 120px; flex: 1; transition: background var(--fast); }
.col.over .col-body { background: var(--signal-soft); }
.deal { display: grid; gap: 10px; padding: 14px 14px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: grab;
  text-decoration: none; color: var(--ink); transition: border-color var(--fast), transform var(--fast) var(--ease), box-shadow var(--fast); }
.deal:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: 0 8px 22px -12px rgba(2, 6, 18, .9); }
.deal.dragging { opacity: .45; }
.deal .n { font: 600 15px var(--font); letter-spacing: -.01em; }
.deal .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.deal .chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; border: 0; padding: 0 10px; border-radius: 6px; background: var(--surface-3); font-size: 13px; white-space: nowrap; }
.deal .chip.tag { box-shadow: inset 3px 0 0 var(--stage, var(--signal)); padding-left: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.deal .chip.money { font-family: var(--mono); font-size: 12.5px; }
.deal .chip.money .faint { font-family: var(--font); }
.deal .chip.due { color: var(--ink); box-shadow: inset 3px 0 0 var(--stage, var(--signal)); padding-left: 12px; }
.deal .chip.due.late { box-shadow: inset 3px 0 0 var(--danger-text); }
.deal .foot { display: flex; align-items: center; gap: 10px; min-width: 0; }
.deal .avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--stage, var(--signal)) 28%, var(--surface-3));
  color: var(--ink); font: 700 11.5px var(--display); letter-spacing: .02em; }
.deal .when { font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-left: auto; text-align: right; }
.deal .when.late { color: var(--danger-text); }
.deal .ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
/* Callback lanes above the deals */
.lane-title { margin: 22px 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .lanes { grid-template-columns: minmax(0, 1fr); } }
.lane { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); min-width: 0; }
.lane-head { cursor: default; }
.lane-note { margin: 0; padding: 10px 16px; font-size: 12.5px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.lane .col-body { max-height: 420px; overflow-y: auto; min-height: 90px; }
.lane .deal { cursor: pointer; }
.lane-empty { margin: 8px 4px; font-size: 13px; color: var(--ink-faint); }
.lane-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: #111827; color: var(--stage);
  font: 600 12.5px var(--font); text-decoration: none; white-space: nowrap; }
.lane-btn:hover { background: #1e293b; }

/* ---------- dialer ---------- */
.dialer { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.lead-card { padding: 26px 28px; }
.lead-name { font: 800 34px/1.05 var(--display); letter-spacing: -.025em; }
.lead-phone { font: 500 22px var(--mono); margin-top: 6px; }
.lead-sub { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.big-call { height: 52px; padding: 0 28px; font-size: 16px; }
.progress { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-bottom: 18px; }
.progress span { display: block; height: 100%; background: var(--ink); transition: width 300ms var(--ease); }
.queue { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow: auto; }
.queue li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 9px; font-size: 13px; color: var(--ink-soft); }
.queue li.cur { background: var(--surface-3); color: var(--ink); }
.queue li.done { color: var(--ink-faint); text-decoration: line-through; }
.queue .tag { font: 11px var(--mono); }
.status-line { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-soft); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- import mapping / settings ---------- */
.map-row { display: grid; grid-template-columns: 1fr 220px 1.4fr; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.map-row .sample { font: 12px var(--mono); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.secret { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--well); font: 13px var(--mono); overflow-wrap: anywhere; }

/* ---------- reports ---------- */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 160px; align-items: end; }
.bars .b { display: grid; grid-template-rows: 16px 1fr 18px; height: 100%; text-align: center; }
.bars .n { font: 11px var(--mono); color: var(--ink-soft); }
.bars .bar { align-self: end; height: var(--h); min-height: 2px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.bars .t { font: 10.5px var(--mono); color: var(--ink-faint); padding-top: 4px; }
.hbar { display: grid; grid-template-columns: 140px minmax(0, 1fr) 48px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.hbar .track { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.hbar .fill { height: 100%; width: var(--w); background: var(--ink); border-radius: 8px; }
.hbar .n { font: 12px var(--mono); text-align: right; color: var(--ink-soft); }

@media (max-width: 900px) {
  .contact, .dialer, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-row { grid-template-columns: 1fr 1fr; }
  .map-row .sample { grid-column: span 2; }
}
@media (max-width: 560px) {
  main { padding: 24px 16px 80px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .dispos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; }
  .filters input[type="search"] { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- browser phone ---------- */
.phone-dot { width: 9px; height: 9px; margin: 0 8px 0 4px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.phone-dot[data-state="ready"] { background: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.phone-dot[data-state="connecting"] { animation: breathe 1.4s ease-in-out infinite; }
.phone-dot[data-state="error"] { background: var(--danger); }
.callbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px;
  width: min(640px, calc(100vw - 32px)); padding: 10px 12px 10px 18px; border-radius: 999px; background: rgb(var(--float-rgb) / .94);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: rise 220ms var(--ease); }
.callbar[data-state="active"] { border-color: rgba(255, 255, 255, .35); }
.callbar[data-state="ringing"] { animation: rise 220ms var(--ease), breathe 1.6s ease-in-out infinite; }
/* Locked: only Hang up ends the call */
.callbar.locked { border-color: var(--signal); box-shadow: var(--shadow-float), 0 0 0 1px var(--signal); }
#cb-lock[aria-pressed="true"] { background: var(--signal-soft); color: var(--ink); border-color: var(--signal); }
/* A locked call ended without Hang up: offer to call right back */
.callbar.dropped { bottom: 18px; z-index: 41; border-color: var(--danger); font-size: 13.5px; }
.callbar.dropped > span { flex: 1; min-width: 0; }
/* Missed calls: up top on every page until called back or dismissed (missed-calls.js) */
.missed-calls { position: fixed; top: 84px; right: 16px; z-index: 42; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
/* Only inside the alert box: .missed alone is also the missed-call message recorder on Settings and Account */
.missed-calls > .missed { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 16px; background: rgb(var(--float-rgb) / .96);
  border: 1px solid var(--signal); box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: rise 220ms var(--ease); }
.missed-text { display: grid; flex: 1; min-width: 0; }
.missed-who { font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.missed-who:hover { text-decoration: underline; }
.missed-line { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.missed-said { font-size: 12.5px; color: var(--ink); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.missed-said:empty { display: none; }
.missed-audio { width: 100%; height: 30px; margin-top: 6px; }
.cb-who-btn { display: grid; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; min-width: 0; flex: 1; }
.cb-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-num { font-size: 12px; color: var(--ink-faint); }
.cb-state { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.cb-time { font-size: 13px; color: var(--ink-soft); min-width: 38px; }
.btn.on { background: var(--ink); color: var(--bg); }
.flashes { bottom: 84px; }
.reply { border-left: 2px solid var(--ink); }
@media (max-width: 560px) { .cb-state { display: none; } }
/* Add call: the second person gets a row of their own under the lead */
.callbar.three { flex-wrap: wrap; border-radius: 22px; }
.cb-row { display: flex; align-items: center; gap: 10px; flex-basis: 100%; padding-top: 10px; border-top: 1px solid var(--line); }
.cb-row[hidden] { display: none; }
/* Incoming call: the caller's contact and script in front of everything, or beside the call you're on (incoming.js) */
.incoming { position: fixed; inset: 0; z-index: 38; display: flex; flex-direction: column; background: var(--bg); animation: rise 180ms var(--ease); }
.incoming[hidden] { display: none; }
/* Beside your call: on the left, under the menu, clear of the day timer and missed calls pinned top right */
.incoming.side { inset: 76px auto 92px 16px; width: min(520px, calc(100vw - 32px)); border-radius: 18px; overflow: hidden;
  border: 1px solid var(--signal); box-shadow: var(--shadow-float); }
.in-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.incoming:not(.side) .in-head { padding: 22px 260px 14px 24px; } /* in front of everything: Close stays left of the day timer */
@media (max-width: 700px) { .incoming:not(.side) .in-head { padding-top: 84px; padding-right: 14px; } }
.in-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.in-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.in-state { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--signal); }
.in-num { font-size: 13px; color: var(--ink-faint); }
#in-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
/* With the caller's panel up, the ringing call bar stays solid: its pulse faded Answer into the page behind it */
body:has(#incoming:not([hidden])) #callbar[data-state="ringing"] { animation: rise 220ms var(--ease); }
/* The page inside the panel: no menu bar above it, and the script sized for the panel */
body.pop main { padding-top: 16px; }
body.pop .dock, body.pop .shift, body.pop #callbar, body.pop .missed-calls, body.pop .incoming, body.pop .dialpad,
body.pop .audio-panel, body.pop #update-banner { display: none !important; }
/* The contact's Call and Text buttons sit in the page there: floating, they'd land on the real call bar */
body.pop .contact .callbar { position: static; transform: none; width: auto; margin: 16px 0 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; z-index: auto; }
body.pop .pop-script { position: static; height: min(62vh, 640px); }
body.pop .pop-script .script-body { padding: 8px 24px 30vh; font-size: 20px; }
.cb-row input { flex: 1; min-width: 0; font-family: var(--mono); }
.cb-guest-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Keypad for the added call: carrier menus that say "press 2 for agents" */
.cb-keys { flex-wrap: wrap; }
.cb-keys-sent { flex-basis: 100%; min-height: 18px; font-size: 13px; letter-spacing: .12em; color: var(--ink); overflow: hidden;
  white-space: nowrap; }
.cb-keys-sent:empty::before { content: attr(data-empty); letter-spacing: 0; color: var(--ink-faint); font-family: var(--sans, inherit); }
.cb-keygrid { flex: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.cb-key { height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  font-size: 16px; font-weight: 600; cursor: pointer; transition: background 120ms, transform 80ms; }
.cb-key:hover { background: rgba(255, 255, 255, .12); }
.cb-key:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.cb-key:active, .cb-key.hit { transform: scale(.92); background: var(--ink); color: var(--bg); }
#cb-keypad[aria-pressed="true"] { background: var(--signal-soft); color: var(--ink); border-color: var(--signal); }
@media (max-width: 560px) { .cb-keygrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .cb-key { height: 40px; } }
.btn select { width: auto; padding: 0 2px; border: 0; background: transparent; color: var(--ink); font: inherit; box-shadow: none; cursor: pointer; }

/* ---------- live call: lead on the left, script on the right ---------- */
.dialer.live { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); }
.live-left .lead-card { padding: 22px 24px; }
/* 2 lines: main lead | line 2 lead | script */
.dialer.live.two { grid-template-columns: minmax(300px, 380px) minmax(260px, 340px) minmax(0, 1fr); }
.live-line2 { display: block; }
.line-cards + .line-cards { margin-top: 12px; }
.line-cards[hidden] { display: none; }
/* 3 lines: line 1 | line 2 | line 3 | script, each line its own column */
.dialer.live.three { grid-template-columns: repeat(3, minmax(250px, 1fr)) minmax(320px, 1.2fr); }
.dialer.live.three .live-line2 { display: contents; }
.line1-label { display: none; }
.dialer.live.three .line1-label { display: block; }
.dialer.live.three .line-cards + .line-cards { margin-top: 0; }
.dialer.live.three .lead-name { font-size: clamp(22px, 1.9vw, 30px); }
/* 4-5 lines (and the simple view): line 1's card, then every other line as a slim card under it | the script, wide */
.dialer.live.slim { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
.dialer.live.slim .live-left .lead-card:not(.line2-card) { padding: 16px 18px; }
.dialer.live.slim .live-left .lead-name { font-size: 25px; }
.dialer.live.slim .lead-phone { font-size: 17px; margin-top: 4px; }
.dialer.live.slim .live-left .lead-card .row { margin-top: 12px !important; }
.dialer.live.slim .big-call { height: 40px; }
.dialer.live.slim .line1-label { display: block; margin-bottom: 4px; }
.dialer.live.slim .live-line2 { margin-top: 10px; display: grid; gap: 6px; }
.dialer.live.slim .live-line2[hidden] { display: none; }
.dialer.live.slim .line-cards + .line-cards { margin-top: 0; }
.dialer.live.slim .live-line2 [id$="-detail-card"] { display: none !important; }
.dialer.live.slim .line2-card {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "tag name sub" "tag status phone";
  align-items: center; gap: 1px 10px; padding: 9px 12px 9px 10px; border-radius: var(--r);
  transition: border-color var(--fast), background var(--fast), opacity var(--fast);
}
.dialer.live.slim .line2-card .eyebrow { grid-area: tag; align-self: stretch; display: grid; place-items: center; margin: 0;
  border-radius: 7px; background: var(--surface-2); font: 600 0/1 var(--mono); color: var(--ink-faint); }
.dialer.live.slim .line-cards[data-line="2"] .eyebrow::after { content: "2"; font-size: 13px; }
.dialer.live.slim .line-cards[data-line="3"] .eyebrow::after { content: "3"; font-size: 13px; }
.dialer.live.slim .line-cards[data-line="4"] .eyebrow::after { content: "4"; font-size: 13px; }
.dialer.live.slim .line-cards[data-line="5"] .eyebrow::after { content: "5"; font-size: 13px; }
.dialer.live.slim .line2-card .lead-name { grid-area: name; font: 600 15px/1.25 var(--font); letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialer.live.slim .line2-card .status-line { grid-area: status; gap: 6px; font-size: 12px; min-width: 0; }
.dialer.live.slim .line2-card .lead-phone { grid-area: phone; margin: 0; font-size: 12px; color: var(--ink-faint); text-align: right; }
.dialer.live.slim .line2-card .lead-sub { grid-area: sub; margin: 0; justify-content: flex-end; }
.dialer.live.slim .line2-card .lead-sub .chip { height: 18px; padding: 0 7px; font-size: 11px; color: var(--ink-faint); border-color: var(--line); }
.dialer.live.slim .line2-card .lead-sub .chip + .chip { display: none; }
.dialer.live.slim .line2-card .live-dot { width: 6px; height: 6px; flex: none; }
.dialer.live.slim .line2-card[data-state="idle"] { opacity: .5; }
.dialer.live.slim .line2-card[data-state="idle"] .eyebrow { grid-row: 1 / 3; }
.dialer.live.slim .line2-card[data-state="idle"] .status-line { grid-row: 1 / 3; grid-column: 2 / 4; }
.dialer.live.slim .line2-card[data-state="ring"] .live-dot { background: var(--ink-soft); }
.dialer.live.slim .line2-card[data-state="vm"] .live-dot { background: var(--ink-faint); animation: none; }
.dialer.live.slim .line2-card[data-state="live"] { border-color: rgb(var(--signal-rgb) / .55); background: linear-gradient(90deg, var(--signal-soft), transparent 70%), var(--surface); }
.dialer.live.slim .line2-card[data-state="live"] .eyebrow { background: var(--signal); color: var(--bg); }
.dialer.live.slim .line2-card[data-state="live"] .live-dot { background: var(--signal); }
.dialer.live.slim .line2-card[data-state="live"] .status-line { color: var(--ink); }
.dialer.live.talking .live-left .lead-card:not(.line2-card) { border-color: rgb(var(--signal-rgb) / .45); }

/* Simple view: your lines and the script while they ring (no section tabs; the objection boxes stay); once someone
   picks up, their card, the results and the script. */
body.simple-view .page-head .row > :not(.keep) { display: none; }
/* Dialer controls: the ones you touch while dialing up front, the set-once ones behind the sliders button */
.dial-controls { flex: 1; justify-content: flex-end; }
.dial-more { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.icon-btn { padding: 0 10px; }
.icon-btn[aria-expanded="true"] { color: var(--ink); background: rgba(255, 255, 255, .09); }
.paused-chip { display: none; font-size: 12px; color: var(--signal); }
.dial-more:has(#pause:checked) .paused-chip { display: inline; }
.dial-settings { position: absolute; top: calc(100% + 8px); left: 0; z-index: 25; display: grid; gap: 2px; min-width: 250px; padding: 6px;
  border-radius: 14px; background: rgb(var(--float-rgb) / .97); border: 1px solid var(--line-2); box-shadow: var(--shadow-float); animation: rise 160ms var(--ease); }
.dial-settings[hidden] { display: none; }
.dial-settings label, .dial-settings a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px;
  color: var(--ink-soft); font: 500 13.5px var(--font); text-decoration: none; cursor: pointer; }
.dial-settings label:hover, .dial-settings a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.dial-settings a { border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }
@media (max-width: 700px) {
  .page-head .dial-controls { position: relative; justify-content: flex-start; flex-basis: 100%; flex-wrap: wrap; }
  .dial-more { position: static; }
  .dial-settings { left: 0; right: 0; min-width: 0; }
  .dialer.live .live-left .lead-card .row { flex-wrap: wrap; }
}
body.simple-view .dialer.live:not(.talking) .live-left > .card:not(.lead-card):not(#dispo-card) { display: none; }
body.simple-view .script-tabs { display: none; }
/* While the lines ring: line 1 is a slim card like the rest, one Call button under them, no extras. */
body.simple-view .page-head .eyebrow { display: none; }
body.simple-view .page-head h1 { font-size: 20px; }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "tag name phone" "tag status status";
  align-items: center; gap: 1px 10px; padding: 9px 12px 9px 10px; border-radius: var(--r); }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) .line1-label { grid-area: tag; align-self: stretch;
  display: grid; place-items: center; margin: 0; border-radius: 7px; background: var(--surface-2); font: 600 0/1 var(--mono); color: var(--ink-faint); }
body.simple-view .dialer.live:not(.talking) .line1-label::after { content: "1"; font-size: 13px; }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) .lead-name { grid-area: name; font: 600 15px/1.25 var(--font);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) .lead-phone { grid-area: phone; margin: 0; font-size: 12px; color: var(--ink-faint); }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) .status-line { grid-area: status; font-size: 12px; gap: 6px; }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) .flash { grid-column: 1 / -1; }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) :is(.back-arrow, .lead-sub) { display: none; }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) .row { order: 9; grid-column: 1 / -1; margin-top: 8px !important; }
body.simple-view .dialer.live:not(.talking) .live-left .lead-card:not(.line2-card) :is(#skip, #open) { display: none; }
body.simple-view .dialer.live:not(.talking) .big-call { width: 100%; justify-content: center; }
body.simple-view .dialer.live:not(.talking) .live-line2 .lead-sub { display: none; }
body.simple-view .dialer.live:not(.talking) .line2-card { grid-template-areas: "tag name phone" "tag status status"; }
body.simple-view .dialer.live:not(.talking) .line2-card { padding-top: 9px; padding-bottom: 9px; }
body.simple-view .dialer.live:not(.talking) .line2-card .lead-name { font-size: 15px; }
body.simple-view .script-bar { position: absolute; top: 12px; right: 14px; z-index: 2; padding: 0; border: 0; background: none; }
body.simple-view .script-card { position: relative; }
@media (min-width: 1101px) { body.simple-view .script-card { position: sticky; } }
/* Talking: the lead's details under the results, to read off their birthday or email (Camacho, Oct 30). */
body.simple-view .dialer.live .queue-card,
body.simple-view .dialer.live.talking .live-line2 { display: none; }
.live-line2[hidden] { display: none; }
.live-line2 .lead-card { padding: 22px 24px; }
.live-line2 .lead-name { font-size: 26px; }
.live-line2 .lead-phone { font-size: 18px; }
.back-arrow { display: block; margin: -6px 0 6px -8px; padding: 2px 8px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink-faint); font-size: 20px; line-height: 1; cursor: pointer; }
.back-arrow:hover { background: var(--surface-2); color: var(--ink); }
.back-arrow:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 2px; }
.live-left .lead-name { font-size: 30px; }
.live-left .dispos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.live-left .lead-card .row { flex-wrap: nowrap; }
.live-left .big-call { height: 46px; padding: 0 22px; font-size: 15px; }
.queue-card summary { list-style: none; cursor: pointer; }
.queue-card summary::-webkit-details-marker { display: none; }
.queue-card summary h2 { margin: 0; }
.queue-card[open] summary h2 { margin-bottom: 12px; }
.queue-card summary h2::after { content: "Show"; margin-left: auto; font: 500 12px var(--font); color: var(--ink-faint); }
.queue-card[open] summary h2::after { content: "Hide"; }

.script-card { position: sticky; top: 16px; height: max(480px, calc(100vh - 212px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.script-bar { display: flex; gap: 10px; align-items: center; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.script-tabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.script-tabs::-webkit-scrollbar { display: none; }
.script-tab { flex: none; height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--ink-soft); font: 500 13px var(--font); cursor: pointer; transition: background var(--fast), color var(--fast), border-color var(--fast); }
.script-tab:hover { color: var(--ink); border-color: rgba(255, 255, 255, .25); }
.script-tab[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.obj-all { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--signal); background: var(--signal-soft);
  color: var(--signal); font: 600 13px var(--font); cursor: pointer; transition: background var(--fast), color var(--fast); }
.obj-all:hover, .obj-all[aria-expanded="true"] { background: var(--signal); color: var(--bg); }
.obj-menu { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid rgb(var(--signal-rgb) / .25); background: linear-gradient(180deg, rgb(var(--signal-rgb) / .07), rgb(var(--signal-rgb) / .02)); }
.obj-btn { min-height: 38px; padding: 7px 16px; border-radius: 12px; border: 1px solid rgb(var(--signal-rgb) / .45); background: rgb(var(--signal-rgb) / .06);
  color: var(--signal-text); font: 500 15px/1.25 var(--font); text-align: left; cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast) var(--ease); }
.obj-btn::before { content: "“"; color: var(--signal); margin-right: 2px; }
.obj-btn::after { content: "”"; color: var(--signal); margin-left: 1px; }
.obj-btn:hover { background: rgb(var(--signal-rgb) / .14); border-color: var(--signal); color: var(--signal-text-2); }
.obj-btn:active { transform: translateY(1px); }
.obj-btn[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--bg); }
.obj-btn[aria-pressed="true"]::before, .obj-btn[aria-pressed="true"]::after { color: var(--bg); }
.script-body { flex: 1; overflow-y: auto; padding: 8px 40px 45vh; font: 400 23px/1.55 var(--font); letter-spacing: -.012em; outline: none; }
.script-body .sec h3 { margin: 34px 0 14px; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.script-body .say { margin: 0 0 16px; max-width: 62ch; color: var(--ink); }
.script-body a { color: var(--signal); text-decoration-color: currentColor; overflow-wrap: anywhere; }
.script-body .gap { height: 16px; } /* a blank line in the script */
.script-body .client { margin: 0 0 12px; max-width: 62ch; color: var(--ink-faint); font-style: italic; }
.script-body .client::before { content: "They say: "; font: 600 11px var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.script-body .cue { margin: 24px 0 10px; font: 600 13px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--signal); }
.script-body .check { margin: 0 0 16px; padding-left: 1.1em; max-width: 62ch; }
.script-body .check li { margin: 4px 0; }
.script-body .check li::marker { color: var(--ink-faint); }
.script-body .blank { color: var(--signal); border-bottom: 1px dashed rgb(var(--signal-rgb) / .5); }
.script-body .obj-inline { margin: 6px 0 26px; padding: 14px 16px 16px; border-radius: 14px; border: 1px solid rgb(var(--signal-rgb) / .22);
  background: linear-gradient(180deg, rgb(var(--signal-rgb) / .07), rgb(var(--signal-rgb) / .025)); }
.script-body .obj-inline-label { display: block; margin-bottom: 10px; font: 600 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--signal); }
.script-body .obj-inline-row { display: flex; flex-wrap: wrap; gap: 8px; }
.obj-btn.obj-missing { border-style: dashed; border-color: rgba(163, 41, 63, .6); color: var(--danger-text); }
.script-body .obj-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 -40px 8px; padding: 18px 40px 16px; background: linear-gradient(180deg, #101a2a, #10151d); border-bottom: 1px solid rgb(var(--signal-rgb) / .3); }
.script-body .obj-title-wrap { display: grid; gap: 2px; min-width: 0; }
.script-body .obj-kicker { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--signal); }
.script-body .obj-title { font: 600 24px/1.2 var(--font); letter-spacing: -.02em; color: #fff1ea; }
.script-body .obj-back { flex: none; height: 40px; padding: 0 16px; font-size: 14px; }
.script-body .sec.obj { margin-top: 8px; }
.script-body .sec.obj > :first-child { margin-top: 8px; }
.script-end { margin-top: 40px; font: 12px var(--mono); color: var(--ink-faint); text-transform: uppercase; letter-spacing: .1em; }
.script-empty { padding: 40px 0; font-size: 17px; color: var(--ink-soft); }

.script-edit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.script-edit > .card { margin-top: 0; }
.script-edit textarea { width: 100%; min-height: 70vh; font: 13.5px/1.6 var(--mono); resize: vertical; }
.script-help { grid-column: 1 / -1; }

@media (max-width: 1360px) {
  /* not enough width for three columns: the two lead cards sit side by side above the script */
  .dialer.live.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dialer.live.two .script-card { grid-column: 1 / -1; position: static; height: 75vh; }
  /* 3 lines on a narrower screen: the three line columns stay side by side, the script goes underneath */
  .dialer.live.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .dialer.live, .dialer.live.slim { grid-template-columns: minmax(0, 1fr); }
  .script-card { position: static; height: 75vh; }
  .script-body { padding: 8px 22px 30vh; font-size: 20px; }
  .script-body .obj-head { margin: 0 -22px 8px; padding: 16px 22px 14px; }
  .script-edit { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 9-hour day timer, pinned top right ---------- */
.shift { position: fixed; top: 24px; right: 24px; z-index: 40; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(15, 17, 18, .82); border: 1px solid var(--line-2); box-shadow: var(--shadow-float); backdrop-filter: blur(14px); }
.shift-main { display: flex; align-items: center; gap: 9px; padding: 3px 14px 3px 3px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink); cursor: pointer; transition: background var(--fast); }
.shift-main:hover { background: rgba(255, 255, 255, .05); }
.shift-ring { width: 34px; height: 34px; transform: rotate(-90deg); }
.shift-ring circle { fill: none; stroke-width: 3; }
.shift-ring .track { stroke: rgba(255, 255, 255, .1); }
.shift-ring .arc { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke var(--fast); }
.shift-text { display: grid; line-height: 1.1; text-align: left; }
.shift-time { font: 600 15px var(--mono); letter-spacing: -.02em; }
.shift-label { font: 500 10.5px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.shift-reset { width: 28px; height: 28px; margin-right: 3px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-faint);
  font-size: 15px; cursor: pointer; transition: background var(--fast), color var(--fast); }
.shift-reset:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }
.shift[data-state="idle"] .shift-time { color: var(--ink-soft); }
.shift[data-state="running"] .shift-label::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
  background: var(--ink); vertical-align: 1px; animation: breathe 2.4s ease-in-out infinite; }
.shift[data-state="paused"] .shift-time { color: var(--ink-soft); }
.shift[data-state="paused"] .arc { stroke: var(--ink-faint); }
.shift[data-state="done"] { border-color: var(--signal); background: rgba(16, 24, 42, .9); }
.shift[data-state="done"] .arc { stroke: var(--signal); }
.shift[data-state="done"] .shift-time, .shift[data-state="done"] .shift-label { color: var(--signal); }
@media (max-width: 1180px) { .shift { top: auto; bottom: 18px; right: 16px; } }

/* ---------- missed-call message (Settings → Phone) ---------- */
.missed { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.missed h3 { margin: 0 0 6px; font-size: 15px; }
.missed-script { margin: 10px 0 12px; padding: 12px 14px; border-left: 3px solid var(--line-2); background: var(--surface-2);
  border-radius: var(--r-sm); font-size: 15px; line-height: 1.5; }
.missed audio { height: 34px; }
.stat.warn { border-color: rgba(163, 41, 63, .6); }
.stat.warn .num { color: var(--danger-text); }

/* Daily goals on Today: neutral meters, white when a goal is hit (orange stays for warnings) */
.goals { margin-bottom: 26px; }
.goals h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.goals-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.goal { display: grid; gap: 10px; align-content: start; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.goal .lbl { color: var(--ink-faint); font-size: 12.5px; }
.goal .num { font: 500 26px/1 var(--mono); }
.goal .of { margin-left: 2px; color: var(--ink-faint); font-size: 15px; }
.meter { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--ocean); }
.goal.hit { background: var(--surface-3); border-color: var(--line-2); }
.goal.hit .meter span { background: var(--ocean); }
.hit-tag { margin-left: 4px; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-soft); font-size: 11px; }
.tally { display: flex; gap: 6px; }
.tally form { margin: 0; }
.goal-setup .sub { margin: 6px 0 0; color: var(--ink-soft); }
.goal-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.goal-inputs input { font-family: var(--mono); }

/* Contacts spreadsheet view: every imported column, scrolls sideways, name stays put */
.sheet-wrap { max-height: calc(100vh - 260px); }
.t.sheet th, .t.sheet td { white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.t.sheet thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
.t.sheet th:nth-child(2), .t.sheet td:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.t.sheet thead th:nth-child(2) { z-index: 3; background: var(--surface-2); }
.tag-delete { justify-content: flex-end; gap: 10px; margin: -4px 0 12px; }
.btn.stop { border-color: var(--danger); color: var(--danger-text); font-weight: 600; }
.btn.stop:hover { background: var(--danger); color: #fff; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); display: grid; gap: 12px; }
.login-card h1 { margin: 4px 0 4px; }
.login-card .btn { justify-content: center; margin-top: 4px; }
.login-error { margin: 0; color: var(--signal-text); font-size: 13.5px; }
.team-actions summary { list-style: none; cursor: pointer; }
.team-actions summary::-webkit-details-marker { display: none; }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-faint); text-decoration: none; padding: 0 6px; }
.who:hover { color: var(--ink); }
.board { margin-bottom: 16px; }
.board td.num, .board th.num { text-align: right; }
.board tr.cur td { background: rgba(255, 255, 255, .04); }
.team-boards .board th, .team-boards .board td { padding: 10px 6px; } /* five columns in a third-width card */
.team-boards .board td:first-child, .team-boards .board th:first-child { padding-left: 0; }
.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* Drop pins: where leads hang up (recordings.py). A map pin: a rounded square turned so one corner points down. */
.pin { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--signal); box-shadow: 0 0 0 2px rgb(var(--signal-rgb) / .18); flex: none; }
.pin-count { display: inline-flex; align-items: center; margin-left: 6px; padding: 0 6px 0 5px; height: 18px; border-radius: 999px;
  font: 600 11px var(--mono, monospace); color: var(--signal); background: rgb(var(--signal-rgb) / .1); border: 1px solid rgb(var(--signal-rgb) / .3); }
.pin-count .pin { width: 7px; height: 7px; margin-right: 4px; box-shadow: none; }
.rec audio { width: 100%; height: 36px; }
.rec-track { position: relative; height: 34px; margin-top: 8px; border-top: 1px dashed var(--line-2); }
.rec-ch { position: absolute; left: var(--at); top: 0; transform: translateX(-1px); height: 100%; padding: 0 0 0 6px; border: 0;
  border-left: 1px solid var(--ink-faint); background: none; color: var(--ink-faint); font: 11px var(--font); cursor: pointer;
  max-width: 22%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.rec-ch:hover, .rec-ch:focus-visible { color: var(--ink); border-left-color: var(--ink); }
.rec-drop { position: absolute; left: var(--at); top: -6px; transform: translateX(-50%); }
.rec-drop .pin { width: 14px; height: 14px; margin: 0; }
.drop-bars { display: grid; gap: 8px; }
.drop-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: 13.5px; }
.drop-bar .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-3, rgba(255,255,255,.06)); overflow: hidden; }
.drop-bar .track span { display: block; height: 100%; width: var(--w); background: var(--signal); border-radius: 3px; }
.rec-dot { display: none; align-items: center; gap: 6px; font: 600 11px var(--font); letter-spacing: .06em; color: var(--ink-faint); }
.rec-dot[data-on="rec"], .rec-dot[data-on="ask"] { display: inline-flex; }
.rec-dot[data-on="rec"] { color: #ff4d4d; }
.rec-dot[data-on="rec"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; animation: breathe 1.6s ease-in-out infinite; }
.hbar .fill.drop { background: var(--signal); }
#drops .hbar { grid-template-columns: minmax(120px, 1.2fr) minmax(0, 1fr) 36px; }
#drops h2 .pin { margin-right: 2px; }

/* Script editor (script-editor.js): cards on the left, the dialer's look on the right. */
.se { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 16px; align-items: start; }
.se-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.se-tip { margin: 0 0 12px; }
.se-insert { position: relative; }
.se-insert-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 280px; max-height: 360px; overflow-y: auto;
  padding: 8px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-float); }
.se-insert-menu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font: 13.5px var(--font); cursor: pointer; }
.se-insert-menu button:hover { background: var(--surface-3); }
.se-insert-menu .eyebrow { margin: 8px 10px 4px; }
.se-card { padding: 14px 16px; }
.se-card + .se-card { margin-top: 10px; }
.se-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.se-head .eyebrow { margin: 0; flex: none; }
.se-title { flex: 1; min-width: 0; font: 600 15px var(--font); }
.se-sub { margin: 0 0 6px; }
.se-line { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 4px 0; }
.se-kind { height: 36px; }
.se-text-in { width: 100%; min-height: 36px; resize: none; overflow: hidden; font: 14.5px/1.45 var(--font); }
.se-tools { display: inline-flex; gap: 2px; }
.se-ico { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--ink-faint); cursor: pointer; font: 15px var(--font); }
.se-ico:hover, .se-ico:focus-visible { background: var(--surface-3); color: var(--ink); }
.se-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.se-chip { height: 28px; padding: 0 10px; cursor: pointer; background: none; font: 12.5px var(--font); }
.se-chip.on { background: var(--signal-soft); border-color: var(--signal); color: var(--ink); }
.se-add-line { margin-top: 6px; }
.se-add { margin-top: 12px; }
.se-text textarea { min-height: 260px; font: 13.5px/1.5 var(--mono); }
.se-side { position: sticky; top: 92px; display: grid; gap: 10px; }
.se-side .eyebrow { margin: 0; }
.se-preview.script-body { max-height: 58vh; padding: 4px 22px 22px; font-size: 18px; }
.se-preview .sec h3 { margin-top: 18px; }
.se-save { padding: 14px 16px; }
@media (max-width: 900px) { .se { grid-template-columns: 1fr; } .se-side { position: static; } .se-line { grid-template-columns: 1fr auto; } .se-kind { grid-column: 1 / -1; } }
.fb-body { display: block; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.fb-thread { display: grid; gap: 8px; margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.fb-msg.mine { border-left: 0; }
.fb-msg .fb-body { margin-top: 2px; }
.fb-reply { margin-top: 10px; }
.fb-reply summary { cursor: pointer; color: var(--ink-soft); }
.fb-reply form { margin-top: 8px; align-items: flex-end; }
.fb-reply textarea { flex: 1; min-width: 0; }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-fill:hover { filter: brightness(1.12); }
.btn.install-app { border-color: var(--signal); color: var(--ink); }

/* A deploy happened while this page was open (update-check.js) */
.update-banner { position: sticky; top: 0; z-index: 60; display: flex; gap: 12px; align-items: center; justify-content: center;
  padding: 8px 16px; background: var(--warn-bg, #fff4d6); color: var(--text, #1a1a1a); border-bottom: 1px solid var(--line, #e3d6a8); font-size: 14px; }
/* The dialer halted for a server update (dialer.js updateTick): nothing else on the page can be used until it reloads */
.update-halt { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 5, 6, .82); backdrop-filter: blur(3px); }
.update-halt[hidden] { display: none; }
.update-halt-card { max-width: 420px; width: 100%; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: var(--surface-2); box-shadow: var(--shadow-float); text-align: center; }
.update-halt-card h2 { margin: 4px 0 8px; font-size: 22px; }
.update-halt-card p { color: var(--ink-soft); margin: 0 0 16px; }
.update-halt-card .btn { width: 100%; justify-content: center; }
/* Multi-pick dropdown (states): looks like a select, opens a checkbox list */
details.pick { position: relative; }
details.pick summary { list-style: none; cursor: pointer; padding: 8px 30px 8px 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--well); color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
details.pick summary::-webkit-details-marker { display: none; }
details.pick summary::after { content: "▾"; position: absolute; right: 11px; color: var(--ink-soft); }
details.pick[open] summary { border-color: rgba(255, 255, 255, .4); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
details.pick .pick-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 300px; overflow-y: auto;
  padding: 6px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--well-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
details.pick .pick-menu label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 6px; font-size: 13.5px; color: var(--ink); white-space: nowrap; cursor: pointer; }
details.pick .pick-menu label:hover { background: rgba(255, 255, 255, .06); }
.filters details.pick { min-width: 130px; max-width: 220px; }
/* Recordings: search bar, tabs, calls grouped by day, one line each until opened */
.rec-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.rec-bar input[type="search"] { width: 280px; }
.rec-len { display: inline-flex; gap: 6px; align-items: center; }
.rec-len input { width: 72px; }
.rec-tabs { margin-bottom: 18px; }
.rec-day { margin-bottom: 22px; }
.rec-day h2 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft); margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.rec-list { border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
details.rec { border-top: 1px solid var(--line-2); }
details.rec:first-child { border-top: 0; }
details.rec summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(140px, 1.4fr) 76px 56px minmax(0, 2fr) auto;
  gap: 12px; align-items: center; padding: 10px 14px; }
details.rec summary::-webkit-details-marker { display: none; }
details.rec summary:hover { background: rgba(255, 255, 255, .03); }
details.rec[open] summary { background: rgba(255, 255, 255, .04); }
.rec-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-meta { font-size: 12.5px; color: var(--ink-soft); }
.rec-tags { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.rec-body { padding: 4px 14px 14px; background: rgba(255, 255, 255, .02); }
.rec-actions { margin-top: 10px; }
.rec-settings { margin-top: 24px; }
.rec-settings > summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; }
@media (max-width: 640px) {
  details.rec summary { grid-template-columns: 1fr auto; }
  details.rec .rec-meta:first-of-type, .rec-agent { display: none; }
  .rec-tags { grid-column: 1 / -1; }
  .rec-bar input[type="search"] { width: 100%; }
}

/* The bad-numbers receipt prints clean for a vendor: no app chrome or buttons. */
@media print {
  .dock, .shift, .page-head .row, .page-head .eyebrow, .seg { display: none !important; }
  body { background: #fff; color: #000; }
  .table-wrap { border: 0; overflow: visible; }
}

/* Today (Cohen, Oct 31): goals and today's numbers side by side as two compact cards; one-line task rows */
.today-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 26px; }
.today-top > .card { margin: 0; padding: 16px 18px; }
.today-top .goals h2 { font-size: 16px; }
.today-top .goals-head { margin-bottom: 12px; }
.today-top .goal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.today-top .goal { gap: 6px; padding: 10px 12px; }
.today-top .goal .num { font-size: 20px; }
.today-top .goal .of { font-size: 13px; }
.today-top .goal-setup h2 { font-size: 16px; margin: 0; }
.today-top .goal-setup .sub { font-size: 13px; }
.today-top .goal-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.stats-card .eyebrow { margin: 0 0 10px; }
.stats-card .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; margin: 0; }
.stats-card .stat { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.stats-card .stat .num, .stats-card .stat.lead .num { font-size: 28px; }
.stats-card .stat .lbl { font-size: 10.5px; }
.item.task { grid-template-columns: 132px minmax(0, 1fr) auto; padding: 10px 18px; }
.item.task .when { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.item.task .who { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 4px; }
.item.task .who .msg, .item.task .who .note { flex-basis: 100%; }
.item.task .acts .btn.ghost { color: var(--ink-faint); }
.item.task .acts .btn.ghost:hover { color: var(--ink); }
@media (max-width: 900px) { .today-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .item.task { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .item.task .when { grid-column: 1 / -1; }
  .today-top .goal-grid, .today-top .goal-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Left sidebar on wide screens (Cohen, Oct 31): the same menu as the pill, tucked away off the left edge. The arrow tab
   slides it out over the page and it slides back after a pick, so pages and the dialer keep their full width. Phones
   keep the pill. */
.side-only, .side-toggle { display: none; }
@media (min-width: 1100px) {
  :root { --side-w: 216px; }
  body:not(.pop) .dock { position: fixed; inset: 0 auto 0 0; z-index: 45; width: var(--side-w); display: block; padding: 18px 12px;
    pointer-events: auto; background: var(--surface); border-right: 1px solid var(--line); transform: translateX(-100%);
    visibility: hidden; }
  body.side-anim .dock { transition: transform 220ms var(--ease), visibility 0s 220ms; }
  body.side-open .dock { transform: none; visibility: visible; box-shadow: var(--shadow-float); }
  body.side-anim.side-open .dock { transition: transform 220ms var(--ease); }
  .side-toggle { position: fixed; top: 22px; left: 0; z-index: 46; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px; width: 24px; height: 52px; padding: 0;
    border: 1px solid var(--line-2); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface); color: var(--ink-soft);
    font: 500 14px/1 var(--font); cursor: pointer; transition: left 220ms var(--ease), color var(--fast); }
  .side-toggle:hover, .side-toggle:focus-visible { color: var(--ink); }
  .side-toggle span { transition: transform 220ms var(--ease); }
  body.side-open .side-toggle { left: var(--side-w); }
  body.side-open .side-toggle span { transform: rotate(180deg); }
  .side-toggle .phone-dot { width: 7px; height: 7px; margin: 0; }
  body.side-open .side-toggle .phone-dot { display: none; }
  body.pop .side-toggle { display: none; }
  .pill { flex-direction: column; align-items: stretch; height: 100%; gap: 2px; padding: 0; border: 0; border-radius: 0; background: none;
    box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
  .pill .brand { width: auto; height: 40px; justify-content: start; display: flex; align-items: center; gap: 12px; padding: 0 12px; margin: 0 0 18px;
    border-radius: 10px; color: var(--ink); text-decoration: none; font: 600 14.5px var(--font); letter-spacing: -.01em; }
  .pill .tab { height: 38px; padding: 0 12px; gap: 11px; border-radius: 10px; font-size: 14px; }
  .pill .tab .ic { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
  .pill .tab[aria-current="page"] .ic { opacity: 1; }
  /* Nov 12: violet section headers with a line icon; pages are plain text under them, and the open page gets a
     full-width band with a violet notch on the left edge */
  .pill .nav-sec.side-only { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 16px 12px 6px; border-top: 1px solid var(--line);
    font: 700 12px var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--signal); }
  .pill .brand + .nav-sec.side-only { border-top: 0; margin-top: 0; padding-top: 2px; }
  .pill .nav-sec svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .pill a.navlink { position: relative; height: 38px; margin: 0 -12px; padding: 0 22px 0 50px; border-radius: 0; font-size: 13.5px; color: var(--ink-soft); }
  .pill a.navlink:hover { background: rgba(255, 255, 255, .035); color: var(--ink); }
  .pill a.navlink[aria-current="page"] { background: rgb(var(--signal-rgb) / .17); color: var(--ink); font-weight: 600; }
  .pill a.navlink[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 13px; background: var(--signal);
    clip-path: polygon(0 0, 100% 50%, 0 100%); }
  .pill .tab .count { margin-left: auto; }
  .side-only { display: inline; }
  .pill svg.side-only { display: block; }
  .nav-gap { flex: 1; width: auto; }
  .pill .phone-btn { gap: 11px; padding: 0 16px; }
  .pill .more-open { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 6px; height: 44px; }
  .pill .more-open .caret { margin-left: auto; transform: rotate(-90deg); }
  .more-menu { z-index: 47; }
}

/* The day timer is just its ring in the corner; hovering (or tapping) it slides out the time and label (Cohen, Oct 31) */
.shift { padding: 3px; gap: 0; }
.shift-main { gap: 0; padding: 3px; transition: padding 200ms var(--ease); }
.shift-text { max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; transition: max-width 220ms var(--ease), opacity 160ms; }
.shift-reset { width: 0; margin: 0; padding: 0; opacity: 0; overflow: hidden; transition: width 200ms var(--ease), opacity 160ms; }
.shift:hover, .shift:focus-within, .shift[data-state="done"] { gap: 4px; }
.shift:hover .shift-main, .shift:focus-within .shift-main, .shift[data-state="done"] .shift-main { gap: 9px; padding: 3px 14px 3px 3px; }
.shift:hover .shift-text, .shift:focus-within .shift-text, .shift[data-state="done"] .shift-text { max-width: 220px; opacity: 1; }
.shift:hover .shift-reset, .shift:focus-within .shift-reset { width: 28px; margin-right: 3px; opacity: 1; }

/* Charts (Oct 31): thin rounded bars on a hairline baseline, a tooltip on hover, the number beside each bar */
.chart-sub { margin: -6px 0 14px; color: var(--ink-faint); font-size: 12.5px; }
.funnel { display: grid; gap: 12px; margin-top: 4px; }
.funnel .row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 72px; gap: 12px; align-items: center; font-size: 13.5px; }
.funnel .track { height: 22px; border-radius: 0 6px 6px 0; background: rgba(255, 255, 255, .03); }
#funnel { margin-bottom: 12px; }
#drops { margin-top: 12px; }
.grid2 > .card + .card { margin-top: 0; }
.funnel .fill { display: block; height: 100%; width: max(var(--w), 3px); border-radius: 0 6px 6px 0; background: var(--ocean); transition: width 400ms var(--ease); }
.funnel .n { display: grid; justify-items: center; font: 14px var(--mono); line-height: 1.15; }
.funnel .n .faint { display: block; }
.funnel .n .faint { font-size: 11.5px; }
.cols { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; height: 180px; align-items: end;
  border-bottom: 1px solid var(--line-2); }
.cols .c { position: relative; display: flex; align-items: end; height: 100%; }
.cols .c { justify-content: center; }
.cols .c .bar { width: 100%; max-width: 56px; height: var(--h); min-height: 0; border-radius: 4px 4px 0 0; background: var(--ocean); opacity: .85;
  transition: opacity var(--fast); }
.cols .c:hover .bar { opacity: 1; }
.cols .c.zero .bar { height: 1px; background: var(--line-2); }
.cols-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; margin-top: 6px; }
.cols-x span { font: 10.5px var(--mono); color: var(--ink-faint); text-align: center; white-space: nowrap; overflow: hidden; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  padding: 5px 9px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-float);
  color: var(--ink); font: 500 12px var(--font); white-space: nowrap; pointer-events: none; }
.cols .c[data-tip]:hover::after { bottom: calc(var(--h) + 8px); }
.hbar .track, .funnel .track { display: block; }
.hbar .fill { display: block; background: var(--ocean); }
@media (max-width: 560px) { .funnel .row { grid-template-columns: 92px minmax(0, 1fr) 72px; gap: 8px; } }

/* Patch notes (Oct 31): a red dot until you've read the newest */
.new-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; flex: none; }
.pill .notes-tab .new-dot { margin-left: auto; }
.side-toggle .new-dot { width: 7px; height: 7px; }
body.side-open .side-toggle .new-dot { display: none; }
@media (min-width: 1100px) { .pill a.side-only { display: inline-flex; } .more-menu .below-side, .more-badge.below-side { display: none; } }
.notes { max-width: 640px; }
.notes .entry + .entry { margin-top: 18px; }
.notes h2 { margin: 0 0 4px; font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.notes h3 { margin: 16px 0 6px; font-size: 15px; font-weight: 600; }
.notes ul { margin: 0; padding-left: 18px; color: var(--ink-soft); line-height: 1.7; }

/* Today's callbacks card (Oct 31): due now and upcoming in one place, upcoming grouped by day */
.agenda { padding: 0; overflow: hidden; margin-bottom: 26px; }
.agenda-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.agenda .seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); font: 500 13px var(--font); cursor: pointer; }
.agenda .seg button span { margin-left: 4px; color: var(--ink-faint); }
.agenda .seg button[aria-selected="true"] { background: var(--surface-3); color: var(--ink); }
.agenda .seg button[aria-selected="true"] span { color: var(--ocean); }
.list.flat { border: 0; border-radius: 0; background: none; }
.agenda-day { margin: 0; padding: 14px 18px 4px; font: 500 11.5px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.agenda-day + .list .item:first-child { border-top: 0; }
.agenda-empty { margin: 0; padding: 22px 18px; }

/* Contacts (Oct 31): a row of tool buttons, then one clean table card with initials and colored stage pills */
.ctoolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ctoolbar .tool { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); font: 500 14px var(--font); text-decoration: none; cursor: pointer;
  transition: background var(--fast), color var(--fast); }
.ctoolbar .tool:hover, .ctoolbar .tool[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.ctoolbar .tool svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ctoolbar .search { flex: 1 1 320px; justify-content: flex-start; cursor: text; }
.ctoolbar .search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; outline: none; }
.tool-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ocean); }
.filter-panel { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.filter-panel[hidden] { display: none; }
.filter-panel details.pick { min-width: 130px; max-width: 220px; }
.ctable { padding: 0; overflow: hidden; }
.ctable-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 10px; }
.ctable-head h2 { margin: 0; font-size: 17px; }
.ctable-head h2 .faint { margin-left: 6px; font-size: 13px; }
.ctable-head select { width: auto; height: 34px; padding: 0 30px 0 12px; font-size: 13px; line-height: 34px; }
.table-wrap.flat { border: 0; border-radius: 0; background: none; }
.t.clean th { font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--ink-soft); border-bottom: 1px solid var(--line-2); }
.t.clean td { padding-top: 11px; padding-bottom: 11px; border-bottom: 0; }
.t.clean tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.t.clean th:first-child, .t.clean td:first-child { padding-left: 22px; width: 40px; }
.who-cell { display: inline-flex; align-items: center; gap: 11px; font-weight: 500; text-decoration: none; }
.who-cell:hover { text-decoration: underline; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; font: 600 11.5px var(--font); letter-spacing: .02em;
  color: hsl(var(--hue) 60% 82%); background: hsl(var(--hue) 28% 26%); }
.stage-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 8px; font: 500 12.5px var(--font); white-space: nowrap;
  color: #c8ccd1; background: rgba(255, 255, 255, .07); }
.stage-pill[data-stage="new"] { color: #e8c15a; background: rgba(201, 133, 0, .2); }
.stage-pill[data-stage="contacted"] { color: #5fd0a3; background: rgba(25, 158, 112, .2); }
.stage-pill[data-stage="appointment-set"] { color: #7cc3ec; background: rgba(43, 144, 200, .22); }
.stage-pill[data-stage="presentation"] { color: #b9b1f5; background: rgba(144, 133, 233, .2); }
.stage-pill[data-stage="won"] { color: #6fe08a; background: rgba(12, 163, 12, .22); }
.stage-pill[data-stage="lost"] { color: #f08a8a; background: rgba(230, 103, 103, .2); }
.ctable-more { display: flex; gap: 8px; padding: 14px 22px 18px; }
.ctable-more .btn { flex: 1; justify-content: center; }
@media (max-width: 560px) { .ctoolbar .tool:not(.search) { flex: 1 1 calc(50% - 5px); } .ctable-head { flex-wrap: wrap; } }

/* Messaging Suite (Oct 31): voicemails with a one-click "Add to callbacks", and text threads beside the conversation */
.vs-n { margin-left: 4px; color: var(--ocean); }
.vs-card { padding: 0; overflow: hidden; }
.vs-head { display: flex; align-items: center; gap: 8px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.vs-head h2 { margin: 0; font-size: 17px; }
.vs-head h2 .faint { margin-left: 6px; font-size: 13px; }
.vs-head form { margin: 0; }
.vs-empty { margin: 0; padding: 28px 22px; }
.vm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) auto; gap: 8px 16px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); }
.vm:first-of-type { border-top: 0; }
.vm-who { display: grid; min-width: 0; }
.vm-who a, .vm-who b { font-weight: 500; text-decoration: none; }
.vm-who .meta { font-size: 12.5px; color: var(--ink-faint); }
.vm audio { width: 100%; height: 34px; }
.vm-acts { display: flex; gap: 6px; justify-content: flex-end; }
.vm-acts form { margin: 0; }
.vm-added { font-size: 12.5px; color: #a8e6bf; }
.vm-text { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: 13.5px; }
.vm.done .vm-who a, .vm.done .vm-who b { color: var(--ink-soft); }
.vs-card.texts { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 190px); min-height: 460px; }
.threads { overflow-y: auto; border-right: 1px solid var(--line); }
.thread { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; }
.thread:hover { background: rgba(255, 255, 255, .03); }
.thread.on { background: var(--surface-3); }
.th-text { display: grid; min-width: 0; }
.th-name { display: flex; align-items: center; gap: 7px; font-weight: 500; font-size: 14px; }
.th-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-faint); font-size: 12.5px; }
.th-at { align-self: start; font-size: 11px; color: var(--ink-faint); }
.convo { display: flex; flex-direction: column; min-height: 0; }
.convo-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.convo-head a, .convo-head b { font-weight: 600; text-decoration: none; }
.bubbles { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px 22px; }
.bubble { max-width: min(520px, 75%); }
.bubble p { margin: 0; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; line-height: 1.45; font-size: 14px; }
.bubble span { display: block; margin-top: 3px; font-size: 10.5px; color: var(--ink-faint); }
.bubble.theirs p { background: var(--surface-3); border-bottom-left-radius: 5px; }
.bubble.mine { align-self: flex-end; text-align: right; }
.bubble.mine p { background: var(--ocean); color: #fff; border-bottom-right-radius: 5px; text-align: left; }
.composer { display: flex; gap: 10px; align-items: end; padding: 14px 18px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; min-height: 44px; }
@media (max-width: 800px) {
  .vm { grid-template-columns: minmax(0, 1fr); }
  .vm-acts { justify-content: flex-start; }
  .vs-card.texts { grid-template-columns: minmax(0, 1fr); height: auto; }
  .threads { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .bubbles { min-height: 280px; }
}

/* State picker search (Oct 31) */
.pick-menu .pick-find { position: sticky; top: 0; z-index: 1; width: 100%; height: 34px; margin-bottom: 4px; }
.pick-menu label[hidden] { display: none; }

/* Simple view, someone picked up (Cohen, Oct 31): the lead's card and full details look just like the normal view,
   recent history included, beside the big script */
body.simple-view .dialer.live.slim.talking { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); }
body.simple-view .dialer.live.slim.talking .live-left .lead-card:not(.line2-card) { padding: 22px 24px; }
body.simple-view .dialer.live.slim.talking .live-left .lead-name { font-size: 30px; }
body.simple-view .dialer.live.slim.talking .live-left .lead-phone { font-size: 22px; margin-top: 6px; }
body.simple-view .dialer.live.slim.talking .line1-label { display: none; }
body.simple-view .dialer.live.slim.talking .big-call { height: 46px; }

/* Script editor: paste a script (Oct 31) */
.paste-panel { margin-bottom: 14px; }
.paste-panel[hidden] { display: none; }
.paste-panel h2 { margin: 0 0 4px; }
.paste-panel textarea { width: 100%; margin-top: 8px; font: 14px/1.5 var(--font); }
.paste-done { margin-bottom: 14px; }
.vs-send { margin-bottom: 14px; }

/* Callbacks on Today (Oct 31): pastel red within the hour (or overdue), a lighter red later today */
/* Nov 12: no more red rows. A callback within the hour gets a violet edge; the rest stay plain. */
.item.task.soon { box-shadow: inset 3px 0 0 var(--signal); }

/* Spam shield (Nov 1) */
.shield-card { padding: 0; overflow: hidden; margin-bottom: 14px; }
.shield-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.shield-head h2 { margin: 0; font-size: 17px; }
.shield-grid td { vertical-align: top; }
.t.clean.shield-grid th:first-child, .t.clean.shield-grid td:first-child { width: 160px; white-space: nowrap; }
.sh-cell.flagged { background: rgba(242, 139, 139, .07); }
.sh-cell.rested { background: rgba(242, 139, 139, .14); }
.sh-rest { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; }
.sh-tag { font-size: 12px; color: #f2a0a0; }
.sh-dispute { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 22px; border-top: 1px solid var(--line); }
.sh-dispute:first-of-type { border-top: 0; }
.sh-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.sh-status { font-weight: 500; color: var(--ink-soft); }
.sh-status[data-status="queued"] { color: #e8c15a; }
.sh-status[data-status="failed"] { color: #f08a8a; }
.sh-status[data-status="submitted"], .sh-status[data-status="cleared"] { color: #a8e6bf; }
.sh-copy { margin-top: 8px; }
.sh-copy summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; }
.sh-copy pre { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; font: 12.5px/1.6 var(--mono); }
.sh-empty { margin: 0; padding: 22px; }
.sh-form { padding-bottom: 18px; }
.sh-form h3 { margin: 18px 22px 4px; font-size: 14px; }
.sh-form > p, .sh-form > .row { margin-left: 22px; margin-right: 22px; }
.sh-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 14px 22px 0; }
.sh-fields .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .sh-fields { grid-template-columns: minmax(0, 1fr); } .sh-dispute { grid-template-columns: minmax(0, 1fr); } .sh-acts { justify-content: flex-start; } }

/* Page transitions (Nov 1): the old page fades out with a light blur, the new one fades in, about a quarter second.
   Chrome, Edge and Safari 18.2+; other browsers switch instantly. The sidebar arrow and the timer stay put. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 200ms cubic-bezier(.4, 0, .2, 1) both; }
::view-transition-new(root) { animation: page-in 260ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes page-out { to { opacity: 0; filter: blur(6px); transform: scale(.995); } }
@keyframes page-in { from { opacity: 0; filter: blur(6px); transform: scale(1.005); } }
.side-toggle { view-transition-name: side-toggle; }
.shift { view-transition-name: day-timer; }
::view-transition-group(side-toggle), ::view-transition-group(day-timer) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* An open sidebar pushes the page over instead of covering it (not on the dialer, where it overlays) */
@media (min-width: 1100px) {
  body.side-open:not([data-page="board.dialer_run"]) main { margin-left: var(--side-w); max-width: min(1180px, calc(100vw - var(--side-w))); }
  body.side-open:not([data-page="board.dialer_run"]) main.wide { margin-left: var(--side-w); max-width: none; }
  body.side-anim main { transition: margin-left 220ms var(--ease); }
  body.side-open:not([data-page="board.dialer_run"]) .dock { box-shadow: none; }
}
.dock { view-transition-name: sidebar; }
::view-transition-group(sidebar) { animation: none; }

/* Nov 1: the dialer page's two cards stack when there isn't room beside the call schedule (sidebar open on a
   1280px screen), and toggle rows wrap instead of poking out of their card */
.dial-split { container-type: inline-size; }
@container (max-width: 1120px) { .dial-opts { grid-template-columns: minmax(0, 1fr); } }
.dial-split .seg { flex-wrap: wrap; max-width: 100%; }
/* With the sidebar open, pages keep clear of the day timer ring in the top right corner */
@media (min-width: 1181px) {
  body.side-open:not([data-page="board.dialer_run"]) main { max-width: min(1180px, calc(100vw - var(--side-w) - 88px)); }
  body.side-open:not([data-page="board.dialer_run"]) main.wide { padding-right: 88px; }
}

/* Team boards (Nov 1): each card at least 400px wide, wrapping to fewer per row instead of squeezing, numbers on
   one line, and the three cards lined up at the top */
.team-boards { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); align-items: start; }
.team-boards > .card { margin-top: 0; min-width: 0; }
.team-boards .board { width: 100%; }
.team-boards .board td.num, .team-boards .board th.num { white-space: nowrap; }
.team-boards .board th { white-space: nowrap; }
@media (max-width: 560px) { .team-boards { grid-template-columns: minmax(0, 1fr); } .team-boards > .card { overflow-x: auto; } }

/* Account: check my numbers for spam */
.sc-list { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 4px; }
.sc-list li.on { color: var(--ocean); }
.sc-list .warn { color: var(--danger-text); }

/* Column view (Nov 2): the lead card's buttons wrap inside a narrow column */
.dialer.live.three .live-left .lead-card .row { flex-wrap: wrap; }

/* ---------- Atlas Dialer login lockup ---------- */
.lockup { display: flex; align-items: center; gap: 14px; margin: 0 0 6px; }
.lockup .mark { width: 52px; height: 52px; border-radius: 14px; }
.lockup .mark svg { width: 36px; height: 36px; }
.lockup-words { display: grid; gap: 6px; }
.lockup-name { font: 400 30px/1 "Archivo Black", var(--display); letter-spacing: .01em; color: var(--ink); }
.lockup-sub { font: 600 11px/1 var(--display); letter-spacing: .62em; color: var(--brand); }
.login-card h1 { font-size: 22px; }
/* Upcoming callbacks fold away like a folder */
.lane-fold { align-self: start; }
.lane-fold > summary { list-style: none; cursor: pointer; }
.lane-fold > summary::-webkit-details-marker { display: none; }
.lane-fold > summary .caret { font-size: 11px; opacity: .65; transform: rotate(-90deg); transition: transform var(--fast) var(--ease); }
.lane-fold[open] > summary .caret { transform: none; }
.lane-fold > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.lanes { align-items: start; }

/* Nov 12 pass 2: a card's first heading reads as a header strip with a hairline under it */
.card > h2:first-child { margin: -20px -22px 16px; padding: 16px 22px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }


/* ---------- Classic theme (Nov 12): the pre-Atlas charcoal greys with the logo's violet. Only colors change; the layout is the same ---------- */
:root[data-theme="classic"] {
  --bg: #151618;
  --surface: #1d1f22;
  --surface-2: #232529;
  --surface-3: #2a2d31;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --ink: #ededee;
  --ink-soft: #a0a4a8;
  --ink-faint: #676c70;
  /* Nov 12: the blue accent became the logo's violet; the charcoal greys stay */
  --signal: #a78bfa;
  --signal-soft: rgba(167, 139, 250, .1);
  --signal-ink: #151618;
  --signal-rgb: 167 139 250;
  --signal-text: #cdbffd;
  --signal-text-2: #e6deff;
  --primary: #ededee;
  --primary-ink: #151618;
  --primary-hover: #ffffff;
  --well: #0b0c0d;
  --well-2: #111213;
  --float-rgb: 37 40 44;
  --pill-rgb: 29 31 34;
  --glow: rgba(255, 255, 255, .045);
  --danger-text: #e27a8c;
  --danger-soft: rgba(163, 41, 63, .16);
  --ocean: #7463ea;
}
/* ---------- startup animation (Nov 12) ---------- */
.splash { position: fixed; inset: 0; z-index: 9999; display: none; place-items: center;
  background: radial-gradient(700px 420px at 50% 42%, rgb(var(--brand-rgb) / .14), transparent 70%), var(--bg); transition: opacity 420ms var(--ease); }
.splash.on { display: grid; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-in { display: grid; justify-items: center; gap: 22px; }
.splash-mark { position: relative; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 30px; background: var(--brand);
  box-shadow: 0 24px 70px -22px rgb(var(--brand-rgb) / .65); animation: splash-pop 560ms cubic-bezier(.2, 1.4, .4, 1) both; }
.splash-mark svg { width: 76px; height: 76px; }
.splash .sb { position: absolute; top: 67.7px; width: 3px; border-radius: 2px; background: #111827; translate: 0 -50%;
  will-change: transform; animation: splash-wave 900ms ease-in-out infinite; }
.splash .sb:nth-of-type(2) { animation-delay: 120ms; }
.splash .sb:nth-of-type(3) { animation-delay: 240ms; }
.splash .sb:nth-of-type(4) { animation-delay: 360ms; }
.splash-word { display: grid; justify-items: center; gap: 7px; opacity: 0; }
.splash.word .splash-word { animation: splash-up 420ms var(--ease) both; }
.splash-name { font: 400 32px/1 "Archivo Black", var(--display); letter-spacing: .02em; color: var(--ink); }
.splash-sub { font: 600 12px/1 var(--display); letter-spacing: .62em; padding-left: .62em; color: var(--brand); }
.splash-load { width: 150px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; animation: splash-up 520ms 260ms var(--ease) both; }
.splash-load span { display: block; height: 100%; background: var(--brand); transform-origin: left; animation: splash-fill var(--splash-ms, 1700ms) cubic-bezier(.4, 0, .2, 1) both; }
@keyframes splash-wave { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1.3); } }
@keyframes splash-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes splash-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes splash-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .splash .sb, .splash-mark, .splash.word .splash-word, .splash-load { animation: none; }
  .splash.word .splash-word { opacity: 1; }
  .splash-load span { animation-timing-function: linear; }
}
.more-menu .theme-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-now { padding: 2px 8px; border-radius: 999px; background: var(--signal-soft); color: var(--signal); font-size: 12px; font-weight: 600; }
/* A line pacing took away (Nov 12): a themed note in its card, never dimmed like an idle line */
.line2-card[data-state="paused"], .dialer.live.slim .line2-card[data-state="paused"] { opacity: 1; border: 1px dashed var(--signal);
  background: linear-gradient(90deg, var(--signal-soft), transparent 80%), var(--surface); }
.line2-card[data-state="paused"] .eyebrow { color: var(--signal); }
.pace-note { display: grid; gap: 3px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.pace-note b { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; }
.pace-note b::before { content: ""; width: 9px; height: 10px; flex: none; border-left: 3px solid var(--signal); border-right: 3px solid var(--signal); }
.agenda-more { margin: 0; padding: 12px 18px; font-size: 12.5px; border-top: 1px solid var(--line); }
