/* Receptionline — "Blacktop Dark Glass" UI v2.
   Contract: design/blacktop-dark-glass/README.md + the prototype
   design/blacktop-dark-glass/Blacktop Dark Glass.dc.html.
   Mobile-first (390px canvas); ≥780px widens, ≥1100px is desktop. */

:root {
  --bg: #0B0D11;
  --ink: #F4F4F7;
  --soft: rgba(226,228,235,.68);
  --faint: rgba(226,228,235,.45);
  --ondark: #14161C;

  --glass: rgba(255,255,255,.07);        /* blurred card */
  --surface: rgba(255,255,255,.06);      /* row card / button, no blur */
  --row: rgba(255,255,255,.05);
  --track: rgba(255,255,255,.12);
  --panel: rgba(22,25,33,.97);           /* near-opaque dropdown overlay */
  --chrome: rgba(15,17,23,.72);          /* header */
  --chrome-heavy: rgba(14,16,22,.82);    /* bars, sheets */

  --bd: rgba(255,255,255,.22);
  --bd-strong: rgba(255,255,255,.34);
  --bd-input: rgba(255,255,255,.25);
  --hairline: rgba(255,255,255,.14);

  --maroon: #CE5A6E;
  --maroon-deep: #872436;
  --hot: #D9536B;                        /* chips */
  --hot-fill: rgba(196,54,76,.92);       /* urgent badge fill */
  --hot-text: #E4798B;                   /* hot numerals/text */
  --tint: rgba(190,60,80,.14);           /* urgent tint bg */
  --light: rgba(233,236,244,.92);        /* positive fill */
  --light-solid: #E9ECF4;

  --grad-primary: linear-gradient(180deg, rgba(168,46,64,.95), rgba(108,22,36,.95));

  --r: 12px; --r-badge: 8px;
  --sh-card: 0 8px 22px rgba(0,0,0,.4);
  --sh-hero: 0 14px 34px rgba(0,0,0,.5);
  --sh-press: 0 4px 12px rgba(0,0,0,.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", -apple-system, Roboto, sans-serif;
  font-size: 20px; line-height: 1.5; color: var(--ink);
  background: linear-gradient(180deg, #1A1D26 0%, #101218 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
input, select, textarea { color-scheme: dark; }
a { color: var(--maroon); font-weight: 700; text-decoration: none; }
a:hover { color: var(--maroon-deep); }
b, strong { color: var(--ink); }
.num, .tnum { font-variant-numeric: tabular-nums; }

@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes flashIn { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Focus — every interactive element gets the maroon ring. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--maroon); outline-offset: 2px;
}

/* ---------------- type ---------------- */
.eyebrow {
  font-size: 15px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--soft);
}
.page-title { font-size: 34px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.sec-title { font-size: 22px; font-weight: 800; }
.sub { font-size: 18px; color: var(--soft); }
.meta { font-size: 16px; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }
.meta-faint { font-size: 16px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.hint { font-size: 16px; color: var(--faint); margin-top: 6px; line-height: 1.4; }

/* ---------------- app chrome ---------------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.16);
  background: var(--chrome); backdrop-filter: blur(16px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
}
.appbar .crumbs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.appbar .back { font-size: 18px; font-weight: 700; color: var(--maroon); }
.appbar .brand {
  font-size: 19px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-client {
  background: var(--light); color: var(--ondark); border: none; border-radius: var(--r-badge);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 10px; cursor: pointer; flex-shrink: 0; text-decoration: none; display: inline-block;
}
.as-client:hover { color: var(--ondark); }
.as-client:active { transform: translateY(2px); }

/* Desktop nav links live in the appbar; hidden on phones. */
.topnav { display: none; }

/* ---------------- flash ---------------- */
.flash-wrap { position: relative; z-index: 29; }
.flash-wrap > div {
  background: var(--light); color: var(--ondark);
  font-size: 19px; font-weight: 600; line-height: 1.4;
  padding: 10px 8px 10px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; animation: flashIn 150ms ease-out;
}
.flash-x {
  background: none; border: none; color: var(--ondark); font-size: 26px;
  font-weight: 700; min-width: 44px; min-height: 36px; cursor: pointer; flex-shrink: 0;
}

/* ---------------- layout ---------------- */
main {
  padding: 16px 16px calc(130px + env(safe-area-inset-bottom, 0px));
  max-width: 1200px; margin: 0 auto;
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split { display: flex; gap: 10px; }
.split > * { flex: 1; min-width: 0; }

/* ---------------- cards ---------------- */
.card {
  background: var(--glass); backdrop-filter: blur(14px);
  border: 1px solid var(--bd); border-radius: var(--r);
  box-shadow: var(--sh-card); padding: 16px;
}
.card.hero { border-color: var(--bd-strong); box-shadow: var(--sh-hero); padding: 20px; }
.card.flat { background: var(--surface); backdrop-filter: none; }
.card.light { background: var(--light); color: var(--ondark); backdrop-filter: none; }
.card.light .eyebrow { color: rgba(20,22,28,.6); }
.card.light .sub { color: rgba(20,22,28,.75); }
.card.callout {
  background: var(--tint); border-left: 4px solid var(--maroon);
  box-shadow: none; padding: 14px 16px;
}
.card.callout-bd { background: var(--tint); border: 2px solid var(--maroon);
  box-shadow: none; padding: 14px 16px; font-size: 19px; line-height: 1.55; }
.banner-quiet {
  background: var(--light); color: var(--ondark); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 14px 16px; font-size: 19px; font-weight: 600; line-height: 1.45;
}

/* Row card — lists, calls. No blur, no shadow. */
.row {
  background: var(--row); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 12px 14px;
}
.row.urgent { background: var(--tint); border-left: 4px solid var(--maroon); }
.row.dashed { border-style: dashed; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.04); }
a.row, button.row { display: block; width: 100%; text-align: left; cursor: pointer;
  font-family: inherit; color: var(--ink); }
a.row:hover, button.row:hover { background: rgba(255,255,255,.09); color: var(--ink); }
a.row:active, button.row:active { transform: translateY(2px); }
.row .r-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.row .r-name { font-size: 20px; font-weight: 700; min-width: 0; }
.row .r-need { font-size: 18px; color: var(--soft); line-height: 1.4; margin-top: 4px; }
.row .r-meta { font-size: 16px; font-weight: 600; color: var(--soft); margin-top: 6px;
  font-variant-numeric: tabular-nums; }

/* ---------------- badges & chips ---------------- */
.badges { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: var(--r-badge); border: 2px solid transparent;
  display: inline-block; white-space: nowrap;
}
.badge.booked { background: var(--light-solid); color: var(--ondark); border-color: var(--light-solid); }
.badge.urgent { background: var(--hot-fill); color: #fff; border-color: var(--hot-fill); }
.badge.lead { background: rgba(255,255,255,.08); color: var(--ink); border-color: rgba(255,255,255,.4); }
.badge.ah { background: var(--track); color: var(--ink); border-color: rgba(255,255,255,.35); }
.badge.cxl { background: transparent; color: var(--faint); border-color: rgba(255,255,255,.25); text-decoration: line-through; }
.badge.late { background: var(--hot-fill); color: #fff; border-color: var(--hot-fill); }
.badge.step { background: var(--surface); color: var(--ink); border: 1px solid var(--bd); }
/* status chips (lead-text / follow-up / webhook history) */
.badge.st-sent, .badge.st-replied, .badge.st-stored, .badge.st-confirmed
  { background: var(--light-solid); color: var(--ondark); border-color: var(--light-solid); }
.badge.st-skipped, .badge.st-expired, .badge.st-ignored, .badge.st-duplicate
  { background: var(--track); color: var(--ink); border-color: rgba(255,255,255,.35); }
.badge.st-stopped, .badge.st-declined { background: transparent; color: var(--hot); border-color: var(--hot); }
.badge.st-error { background: var(--hot-fill); color: #fff; border-color: var(--hot-text); }

.chip {
  font-size: 14px; font-weight: 800; letter-spacing: .06em; padding: 6px 8px;
  border-radius: var(--r-badge); background: var(--surface); color: var(--ink);
  border: 2px solid #000; display: inline-block; font-variant-numeric: tabular-nums;
}
.chip.ghost { color: var(--faint); border-style: dashed; }
.chip-big { padding: 8px 10px; font-size: 15px; border: 1px solid var(--bd); }
.chip-big.error { background: var(--hot-fill); color: #fff; border: 2px solid var(--hot-text); }
.count {
  background: var(--hot-fill); color: #fff; font-size: 15px; font-weight: 800;
  border-radius: var(--r-badge); padding: 2px 8px; font-variant-numeric: tabular-nums;
}

/* ---------------- stats ---------------- */
.stat .n { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .n.hot { color: var(--hot-text); }
.stat .lbl { font-size: 16px; font-weight: 600; color: var(--soft); margin-top: 2px; line-height: 1.35; }
.stat .delta { font-size: 16px; font-weight: 700; margin-top: 4px; }
.stat .delta.down { color: var(--hot-text); }
.money .n { font-size: 64px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 8px; }
.rule { width: 128px; height: 6px; background: var(--maroon); margin-top: 8px; }
.rule.sm { width: 96px; }
.rule.xs { width: 64px; height: 5px; margin-top: 6px; }

/* ---------------- buttons ---------------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 14px; width: 100%;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--bd); border-radius: var(--r);
  font-family: inherit; font-size: 19px; font-weight: 700; cursor: pointer;
  text-decoration: none; text-align: center; line-height: 1.2;
}
.btn:hover { background: rgba(255,255,255,.1); color: var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: var(--sh-press); }
.btn.primary {
  min-height: 52px; background: var(--grad-primary); color: #fff;
  border: 1px solid rgba(255,255,255,.35); box-shadow: var(--sh-card); font-size: 20px;
}
.btn.primary:hover { background: var(--maroon-deep); }
.btn.light { background: var(--light); color: var(--ondark); }
.btn.light:hover { background: var(--light-solid); color: var(--ondark); }
.btn.danger { background: var(--surface); color: var(--maroon); border: 2px solid var(--maroon); }
.btn.danger:hover { background: var(--tint); color: var(--maroon); }
.btn.shadow { box-shadow: var(--sh-card); }
.btn.cb { color: var(--maroon); }
.btn.cb.done { background: var(--light); color: var(--ondark); }
.btn[disabled], .btn[disabled]:hover { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn-row { display: flex; gap: 8px; }
.btn-row .grow { flex: 1.2; }
.btn-row .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
.btn-row .btn.grow { flex: 1.2; }

/* ---------------- forms ---------------- */
label { display: block; font-size: 18px; font-weight: 700; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=time], input[type=datetime-local],
select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--glass); border: 1px solid var(--bd-input); border-radius: var(--r);
  font-size: 20px; font-family: inherit; color: var(--ink); line-height: 1.4;
}
input.missing { border: 2px solid var(--maroon); }
.needed { color: var(--hot-text); }
textarea { resize: vertical; }
select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%),
    linear-gradient(135deg, var(--soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
select.light { background-color: var(--light); color: var(--ondark); font-weight: 700; }
.check {
  display: flex; align-items: center; gap: 12px; min-height: 48px;
  font-size: 19px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.check input[type=checkbox], .check input[type=radio]
  { width: 22px; height: 22px; accent-color: var(--maroon); flex-shrink: 0; }
.check.top { align-items: flex-start; }
.check.top input { margin-top: 4px; }
.check .c-body { display: block; }
.check .c-sub { display: block; font-size: 16px; font-weight: 400; color: var(--faint);
  margin-top: 2px; line-height: 1.4; }
.copyblock {
  background: var(--surface); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 16px; line-height: 1.55; word-break: break-all; margin-top: 10px;
}
.msg { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 16px; line-height: 1.55; margin-top: 8px; white-space: pre-wrap; }

/* ---------------- dropdowns (details-based) ---------------- */
details.dd { position: relative; }
details.dd > summary { list-style: none; cursor: pointer; }
details.dd > summary::-webkit-details-marker, details summary::-webkit-details-marker { display: none; }
details.dd > summary.btn { justify-content: space-between; }
details.dd .dd-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  background: var(--panel); backdrop-filter: blur(18px);
  border: 1px solid var(--bd); border-radius: var(--r);
  box-shadow: var(--sh-card); padding: 8px; animation: sheetUp 160ms ease-out;
}
.dd-row {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  min-height: 48px; background: transparent; color: var(--ink); border: none;
  border-radius: 8px; padding: 0 12px; font-size: 19px; font-weight: 700;
  cursor: pointer; font-family: inherit; text-align: left; text-decoration: none;
}
.dd-row:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.dd-row.active { background: var(--light); color: var(--ondark); }
.dd-row.active:hover { color: var(--ondark); }

/* Inline disclosure (Add prospect, Sent + skipped, History…) */
details.acc > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; background: var(--surface); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 0 14px; font-size: 19px; font-weight: 700;
  cursor: pointer; gap: 8px;
}
details.acc > summary:active { transform: translateY(2px); }
details.acc > .acc-body { padding: 8px 0 4px; display: flex; flex-direction: column; gap: 8px; }
details.acc > .acc-card { background: var(--surface); border: 1px solid var(--bd);
  border-radius: var(--r); padding: 16px; margin-top: 8px; }
details.acc.stage > summary {
  font-size: 16px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
details.acc.stage[open] > summary { background: var(--light); color: var(--ondark); border-color: transparent; }

/* ---------------- bottom tab bar ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--chrome-heavy); backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.2);
  display: flex; padding: 0 4px calc(10px + env(safe-area-inset-bottom, 14px));
}
.tab {
  flex: 1; min-height: 54px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: transparent; border: none; border-top: 3px solid transparent;
  color: var(--ink); font-size: 14px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; cursor: pointer; padding-top: 7px;
  font-family: inherit; text-decoration: none;
}
.tab .ico { font-size: 15px; line-height: 1; }
.tab.active { border-top-color: var(--maroon); color: var(--maroon); }
.tab:hover { color: var(--maroon); }
.tab:active { transform: translateY(2px); }
.tab:focus-visible { outline-offset: -3px; }

/* ---------------- sheets & modal ---------------- */
.scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40;
  animation: fadeIn 160ms ease-out; border: none; padding: 0; cursor: default;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--chrome-heavy); backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.2);
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 16px));
  animation: sheetUp 200ms ease-out;
}
.sheet .dd-row { background: var(--surface); border: 1px solid var(--bd);
  border-radius: var(--r); min-height: 56px; padding: 0 16px; font-size: 20px; margin-top: 8px; }
.sheet .dd-row.signout { color: var(--maroon); }

.modal-back { display: none; }
.modal-back.open { display: block; }
.modal-back .scrim-el { position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 44; animation: fadeIn 160ms ease-out; }
.modal {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--chrome-heavy); backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.2);
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 16px));
  animation: sheetUp 200ms ease-out;
}
.modal .who { font-size: 26px; font-weight: 800; margin-top: 6px; }
.modal .num { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.modal .ctx { font-size: 18px; color: var(--soft); line-height: 1.4; margin-top: 8px; }
.modal .big-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.modal .pair { display: flex; gap: 10px; }
.modal .pair .btn { flex: 1; }
.modal .btn { min-height: 56px; }
.modal .foot { font-size: 16px; color: var(--faint); line-height: 1.45; margin-top: 12px; }
.modal .close { position: absolute; top: 14px; right: 14px; background: none; border: none;
  color: var(--ink); font-size: 26px; min-width: 44px; min-height: 44px; cursor: pointer; }

/* ---------------- charts ---------------- */
.bars { display: flex; align-items: flex-end; gap: 6px; margin-top: 14px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bars .peak-n { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--maroon); height: 18px; }
.bars .track { width: 100%; height: 88px; display: flex; align-items: flex-end; }
.bars .bar { width: 100%; background: var(--light-solid); min-height: 4px; }
.bars .bar.peak { background: var(--maroon); }
.bars .lbl { font-size: 16px; font-weight: 600; color: var(--soft); }

.ibar-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ibar-row .lbl { width: 122px; flex-shrink: 0; font-size: 16px; font-weight: 600; }
.ibar-row .track { flex: 1; height: 18px; background: var(--track); }
.ibar-row .fill { height: 100%; background: var(--light-solid); }
.ibar-row .fill.hot { background: var(--hot); }
.ibar-row .pct { width: 44px; text-align: right; font-size: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums; flex-shrink: 0; }

.funnel-step .block {
  min-width: 110px; background: var(--light); color: var(--ondark);
  border: 1px solid var(--bd); border-radius: var(--r); box-shadow: var(--sh-card);
  padding: 12px 14px; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.funnel-step .lbl { font-size: 19px; font-weight: 700; margin-top: 8px; }
.funnel-step .desc { font-size: 16px; color: var(--soft); line-height: 1.45; margin-top: 2px; }

/* ---------------- day group headers ---------------- */
.day-head {
  position: sticky; top: 58px; z-index: 5;
  background: rgba(17,19,26,.85); backdrop-filter: blur(10px);
  padding: 14px 0 6px; font-size: 15px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ---------------- setup wizard ---------------- */
body.setup main { padding-bottom: 170px; }
.prog { display: flex; gap: 6px; margin-top: 16px; }
.prog i { flex: 1; height: 10px; background: rgba(255,255,255,.15); border: 1px solid var(--bd); }
.prog i.done { background: var(--light-solid); }
.prog i.cur { background: var(--maroon); }
.setup-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--chrome-heavy); backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.2);
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 14px));
}
.setup-bar .back-line { text-align: center; margin-top: 10px; }
.setup-bar .back-line a { font-size: 18px; }
.stepnum { font-size: 22px; font-weight: 800; color: var(--maroon); flex-shrink: 0; }
.stepline { display: flex; gap: 12px; margin-top: 12px; font-size: 20px; line-height: 1.5; }
.bignum { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 8px; }

/* ---------------- section switcher ---------------- */
.secnav-tabs { display: none; }
.sec-tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 6px 14px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--bd); border-radius: var(--r);
  font-size: 17px; font-weight: 700;
}
.sec-tab:hover { background: rgba(255,255,255,.1); color: var(--ink); }
.sec-tab.active { background: var(--light); color: var(--ondark); border-color: transparent; }
.sec-tab.active:hover { color: var(--ondark); }
@media (min-width: 780px) {
  .secnav-dd { display: none; }
  .secnav-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
}

/* The More dropdown in the tab bar opens upward. */
.tabbar details.dd { flex: 1; display: flex; }
.tabbar details.dd > summary.tab { flex: 1; width: 100%; }
.tabbar details.dd .dd-panel {
  position: fixed; left: 8px; right: 8px; top: auto;
  bottom: calc(78px + env(safe-area-inset-bottom, 14px));
  background: var(--panel);
}
.tabbar .dd-panel .dd-row { background: var(--surface); border: 1px solid var(--bd);
  border-radius: var(--r); min-height: 56px; padding: 0 16px; font-size: 20px; margin-top: 8px; }
.tabbar .dd-panel .dd-row:first-child { margin-top: 0; }
.tabbar .dd-panel .dd-row.signout { color: var(--maroon); }

/* Row actions inside call cards */
.r-actions { margin-top: 10px; }
.r-actions .btn { font-size: 18px; }

/* The appointment's own line under the buttons: what's booked, and the X. */
.appt-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--bd);
  font-size: 16px; font-weight: 700; color: var(--soft);
  font-variant-numeric: tabular-nums;
}
.appt-line.off span { color: var(--faint); }
.appt-x {
  background: transparent; color: var(--maroon); border: 0; cursor: pointer;
  font: inherit; font-weight: 800; padding: 6px 8px; margin: -6px -8px;
  border-radius: var(--r-badge); white-space: nowrap; min-height: 44px;
}
.appt-x:hover { background: var(--tint); }
.appt-line.off .appt-x { color: var(--ink); text-decoration: underline; }

/* Single-column page width on big screens; boards and grids opt out. */
.page { max-width: 760px; margin: 0 auto; }
.page-wide { max-width: 1200px; margin: 0 auto; }
.field { margin-top: 8px; }

/* ---------------- misc ---------------- */
.empty { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 16px; font-size: 19px; }
.hist .when { font-size: 16px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.hist .what { font-size: 18px; line-height: 1.4; margin-top: 1px; }
.legal-body { font-size: 20px; line-height: 1.6; }
.legal-body h2 { font-size: 24px; font-weight: 800; margin: 22px 0 8px; }
.legal-body p, .legal-body ul { margin: 10px 0; }
.legal-body ul { padding-left: 24px; }
.legal-body .box { background: var(--tint); border: 2px solid var(--maroon); border-radius: var(--r);
  padding: 14px 16px; font-size: 19px; line-height: 1.55; margin: 14px 0; }
.login-wrap { max-width: 430px; margin: 0 auto; padding-top: 70px;
  display: flex; flex-direction: column; gap: 22px; }
.wordmark { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; }
.dialer { display: flex; gap: 8px; }
.dialer .btn { width: auto; flex-shrink: 0; padding: 8px 18px; }

/* ============================================================ */
/* ≥780px — tablet: top nav appears, bottom bar goes away        */
/* ============================================================ */
@media (min-width: 780px) {
  main { padding: 28px 32px 72px; }
  .tabbar { display: none; }
  .appbar { padding: 14px 32px; align-items: center; }
  .topnav { display: flex; align-items: center; gap: 22px; margin-left: 28px; flex: 1; }
  .topnav a { font-size: 16px; font-weight: 700; color: var(--ink);
    border-bottom: 3px solid transparent; padding: 6px 2px; }
  .topnav a.active { color: var(--maroon); border-bottom-color: var(--maroon); }
  .topnav a:hover { color: var(--maroon); }
  .topnav .spacer { flex: 1; }
  .topnav .who { font-size: 14px; font-weight: 600; color: var(--faint); }
  .appbar .crumbs { flex-direction: row; align-items: center; gap: 14px; }
  .modal { left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -50%); width: 430px; border: 1px solid var(--bd);
    border-radius: var(--r); box-shadow: var(--sh-hero); animation: fadeIn 160ms ease-out; }
  .sheet { left: auto; right: 32px; bottom: auto; top: 64px; width: 320px;
    border: 1px solid var(--bd); border-radius: var(--r); box-shadow: var(--sh-hero);
    animation: fadeIn 160ms ease-out; }
  .day-head { top: 64px; }
  .grid-4d { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .grid-4d.grid-2 { grid-template-columns: repeat(4, 1fr); }
  .cols-2d { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
}

/* Board container is a plain stack below desktop. */
.board { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================ */
/* ≥1100px — desktop: board becomes six real columns             */
/* ============================================================ */
@media (min-width: 1100px) {
  .board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: start; }
  .board details.acc.stage > summary { pointer-events: none; }
  .board .lost-col { opacity: .6; }
  .page-title { font-size: 38px; }

  /* Today and My Line spread into two columns — the phone DOM order is
     untouched; named grid areas do the rearranging. */
  .home-grid {
    display: grid; grid-template-columns: 7fr 5fr; gap: 16px;
    align-items: start; max-width: 1080px; margin: 0 auto;
    grid-template-areas: "head head" "attn stats" "attn money" "pipe pipe" "vol latest";
  }
  .hg-head { grid-area: head; } .hg-attn { grid-area: attn; }
  .hg-stats { grid-area: stats; } .hg-money { grid-area: money; }
  .hg-pipe { grid-area: pipe; } .hg-vol { grid-area: vol; }
  .hg-latest { grid-area: latest; }
  .home-grid .grid-4d { grid-template-columns: 1fr 1fr; }

  .portal-grid {
    display: grid; grid-template-columns: 7fr 5fr; gap: 16px;
    align-items: start; max-width: 1080px; margin: 0 auto;
    grid-template-areas: "head head" "sub sub" "await await"
      "calls stats" "calls bnow" "calls money" "intents texts";
  }
  .pg-head { grid-area: head; } .pg-sub { grid-area: sub; }
  .pg-await { grid-area: await; } .pg-calls { grid-area: calls; }
  .pg-stats { grid-area: stats; } .pg-bnow { grid-area: bnow; }
  .pg-money { grid-area: money; } .pg-intents { grid-area: intents; }
  .pg-texts { grid-area: texts; }
  .portal-grid .grid-4d { grid-template-columns: 1fr 1fr; }
}
