/* Lead caller dashboard, Kintake theme (Cory's logo and palette, 2026-11-08).
   Deep Indigo sidebar with the glowing mark, Cream page, white panels on Warm Stone
   hairlines. DM Serif Display for page titles, DM Sans for UI and body, DM Mono for
   figures, times and counts. Status colors always sit next to a text label, never
   alone; booked green and flagged amber are the strongest colors after the brand.
   Fonts are self-hosted (SIL OFL, see static/fonts) so the CSP stays font-src 'self'.

   Mobile first (2026-11-12). The phone (390 px) is the primary layout: one column of
   cards, a compact indigo top bar with the page title and a Menu button, 16 px body
   so iOS never zooms an input, every tap target at least 44 px, and nothing wider
   than the screen (wide tables scroll inside their card or turn into cards). From
   900 px tables come back as tables (the leads table from 1280 px, two cards per row
   below that); from 1024 px the sidebar replaces the top bar.
   The serif is for page titles only; section and card headings are DM Sans. */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("/static/fonts/DMSans-var-latin.woff2") format("woff2"); }
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/DMSerifDisplay-400-latin.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/DMMono-400-latin.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/DMMono-500-latin.woff2") format("woff2"); }
:root {
  /* Cory's palette */
  --indigo: #1B1336; --purple: #6D4EF6; --purple-press: #5B3FD9; --lilac: #B9A7F2; --lav: #E8E1FF;
  --teal: #0E4F57; --tealmist: #4E8E94; --cream: #F8F4EA; --stone: #E6DED3;
  /* ink and surfaces */
  --ink: #1B1336; --muted: #5E5873; --dim: #6E6788; --surface: #FFFFFF; --surface2: #FCFAF5;
  --hair: #E6DED3; --hair-soft: #EFE9E0; --side-ink: #E8E1FF; --side-muted: #B9A7F2;
  /* status: text, tint, marker */
  --good: #17663A; --good-bg: #E3F3E8; --good-dot: #2E9E5B;
  --warn: #7A4D00; --warn-bg: #FFF1C2; --warn-dot: #E9B10A; --warn-line: #EED68A;
  --bad: #B42318; --bad-bg: #FDECEA; --bad-dot: #D93A2B;
  --info: #0E4F57; --info-bg: #E0EFF0; --info-dot: #4E8E94;
  --gray: #5B5670; --gray-bg: #EEEBF3; --gray-dot: #8F89A3;
  --display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: var(--display);
  --sidebar-w: 228px; --radius: 14px; --tap: 44px; --gap: 12px;
}

/* ---------------------------------------------------------------- base (phone) */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--cream); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--ink); font-size: 16px; line-height: 1.55; min-height: 100vh; background: var(--cream);
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--teal); text-decoration-color: rgba(14,79,87,.35); text-underline-offset: 3px; }
a:hover { color: var(--purple-press); text-decoration-color: var(--purple); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
img { max-width: 100%; }
p { margin: 0 0 10px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .na { color: var(--dim); } .bad { color: var(--bad); }
.wrap { overflow-wrap: anywhere; word-break: break-word; }
.microlabel { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.glass, .card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(27,19,54,.04), 0 6px 18px rgba(27,19,54,.04); }
.card { padding: 16px; margin: 0 0 var(--gap); }
.count { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); background: var(--gray-bg);
  border-radius: 999px; padding: 1px 9px; letter-spacing: 0; text-transform: none; }

/* lockup: the mark plus live "kintake" in DM Sans */
.lockup { display: inline-flex; align-items: center; gap: 5px; line-height: 1; }
.lockup-mark { height: 34px; width: auto; display: block; }
.lockup .wm { font-family: var(--sans); font-weight: 700; font-size: 27px; letter-spacing: -.02em; transform: translateY(-1px); }
.lockup-dark .wm { color: #FFFFFF; }
.lockup-light .wm { color: var(--indigo); }

/* ---------------------------------------------------------------- shell: top bar and menu */
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 6px 8px 6px max(12px, env(safe-area-inset-left)); padding-top: max(6px, env(safe-area-inset-top));
  background: radial-gradient(240px 120px at 0% 0%, rgba(109,78,246,.35), transparent 70%), var(--indigo); color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(27,19,54,.18); }
.topbar-mark { display: flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); flex: none; }
.topbar-mark img { height: 28px; width: auto; display: block; }
.topbar-title { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-pill { margin: 0; flex: none; }
.menu-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); min-width: var(--tap); padding: 0 12px;
  background: rgba(232,225,255,.10); color: #FFFFFF; border: 1px solid rgba(232,225,255,.22); border-radius: 10px;
  font: 600 15px var(--sans); cursor: pointer; }
.menu-icon { position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-icon::before { top: -5px; } .menu-icon::after { top: 5px; }
.nav-open .menu-icon { background: transparent; }
.nav-open .menu-icon::before { top: 0; transform: rotate(45deg); } .nav-open .menu-icon::after { top: 0; transform: rotate(-45deg); }
html:not(.js) .menu-btn { display: none; }

.sidebar { color: var(--side-ink); background: var(--indigo); display: flex; flex-direction: column; padding: 8px 16px 18px; }
.js .sidebar { display: none; }
.js .nav-open .sidebar { display: flex; position: sticky; top: 56px; z-index: 19; box-shadow: 0 12px 28px rgba(27,19,54,.35); }
.sidebar .microlabel { color: var(--side-muted); }
.sidebar-header .lockup, .sidebar-subtitle { display: none; }
.sidebar-subtitle { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--side-muted); margin-top: 8px; }
.firm-plate { background: #FFFFFF; border-radius: 8px; padding: 5px; width: 104px; }
.sidebar-logo { width: 94px; display: block; border-radius: 4px; }
.sidebar-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0 4px; }
.product { font-family: var(--display); font-size: 20px; }
.pill { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--hair); }
.pill-shadow { color: #F5C451; border-color: rgba(245,196,81,.55); background: rgba(245,196,81,.10); }
.sidebar-nav { list-style: none; padding: 0; margin: 10px 0 14px; }
.sidebar-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--side-ink); font-weight: 500; font-size: 17px; }
.sidebar-nav a:hover { background: rgba(232,225,255,.08); color: #FFFFFF; }
.sidebar-nav a.active { background: rgba(185,167,242,.16); color: #FFFFFF; box-shadow: inset 3px 0 0 var(--lilac); }
.tenant-form { display: flex; flex-direction: column; gap: 4px; }
.tenant-form select { width: 100%; background: #2A2152; color: var(--side-ink); border-color: rgba(232,225,255,.22); }
.sidebar-footer { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--side-muted); }
.sidebar-footer .sidebar-user { color: var(--side-ink); }
.btn-logout { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; border: 1px solid rgba(232,225,255,.25); border-radius: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--lilac); text-decoration: none; }
.btn-logout:hover { color: #FFFFFF; }
.btn-ghost-dark { background: transparent; border: 1px solid rgba(232,225,255,.3); color: var(--side-ink); }
.main-content { min-width: 0; padding: 14px 14px 40px; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }

.banner { padding: 8px 12px; border-radius: 10px; margin-bottom: 8px; font-size: 13.5px; line-height: 1.45; }
.banner-shadow { background: var(--warn-bg); border: 1px solid var(--warn-line); color: #5C3A00; }
.banner-mail { background: var(--bad-bg); border: 1px solid #F4C3BD; color: var(--bad); }
.banner-mail a { color: var(--bad); text-decoration: underline; }
.banner-demo { background: var(--info-bg); border: 1px solid #B5D6D9; color: var(--info); }
.page-head { margin: 8px 0 14px; }
.page-head h1 { font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1.15; margin: 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; }
.back::before { content: ""; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; }
h2 { font-family: var(--sans); font-weight: 650; font-size: 18px; line-height: 1.3; margin: 0 0 10px; }
.panel { padding: 16px; margin-bottom: var(--gap); }
.note { color: var(--muted); font-size: 14px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; font-size: 13px; font-family: var(--mono); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.empty { margin: 0 2px 8px; }

/* ---------------------------------------------------------------- status and chips */
.status { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; white-space: nowrap;
  padding: 3px 11px 3px 9px; border-radius: 999px; line-height: 1.4; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.status-green { color: var(--good); background: var(--good-bg); } .status-green .dot { background: var(--good-dot); }
.status-yellow { color: var(--warn); background: var(--warn-bg); } .status-yellow .dot { background: var(--warn-dot); box-shadow: 0 0 0 1.5px var(--warn); }
.status-red { color: var(--bad); background: var(--bad-bg); } .status-red .dot { background: var(--bad-dot); }
.status-blue { color: var(--info); background: var(--info-bg); } .status-blue .dot { background: var(--info-dot); }
.status-gray { color: var(--gray); background: var(--gray-bg); } .status-gray .dot { background: var(--gray-dot); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.chip { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 2px 9px; border-radius: 999px; margin: 0 4px 4px 0;
  border: 1px solid var(--warn-line); color: var(--warn); background: var(--warn-bg); white-space: nowrap; }
.chip-info { border-color: #B5D6D9; color: var(--info); background: var(--info-bg); }
.chip-bad { border-color: #F4C3BD; color: var(--bad); background: var(--bad-bg); }

/* ---------------------------------------------------------------- forms and buttons */
input, select { background: var(--surface); color: var(--ink); border: 1px solid #D8CEC0; border-radius: 10px; padding: 8px 11px;
  font: inherit; font-size: 16px; min-height: var(--tap); max-width: 100%; }
input:focus, select:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
input[type=date] { color-scheme: light; min-width: 0; -webkit-appearance: none; appearance: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); background: var(--purple); color: #FFFFFF; border: 0;
  border-radius: 10px; padding: 0 18px; font-family: var(--sans); font-weight: 600; cursor: pointer; text-decoration: none; font-size: 16px; }
.btn:hover { background: var(--purple-press); color: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid #D8CEC0; font-weight: 500; }
.btn-ghost:hover { background: var(--lav); color: var(--ink); }
.btn-block { width: 100%; }
.inline-form { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }

/* ---------------------------------------------------------------- disclosures */
details > summary { cursor: pointer; }
.fold { padding: 0; overflow: hidden; }
.fold > summary, .filter-fold > summary, .call-transcript > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; font-weight: 600; font-size: 16px; }
.fold > summary::-webkit-details-marker, .filter-fold > summary::-webkit-details-marker,
.call-transcript > summary::-webkit-details-marker, .gray-fold > summary::-webkit-details-marker { display: none; }
.fold > summary > span:first-child, .filter-fold > summary > span:first-child { flex: 1; }
.fold > summary::after, .filter-fold > summary::after, .call-transcript > summary::after, .gray-fold > summary::after {
  content: ""; flex: none; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  margin-top: -5px; transform: rotate(45deg); transition: transform .15s ease; }
details[open] > summary::after { margin-top: 5px; transform: rotate(225deg); }
.fold[open] > summary { border-bottom: 1px solid var(--hair-soft); }
.fold-body { padding: 14px 16px 16px; }

/* ---------------------------------------------------------------- key/value lists */
.kv { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 12px 0 0; font-size: 15px; }
.kv dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: 8px; }
.kv dd { margin: 0; }

/* ---------------------------------------------------------------- tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--hair); padding: 9px 10px; background: var(--surface2); }
.data-table td { border-bottom: 1px solid var(--hair-soft); padding: 10px; vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
.source-table { min-width: 340px; font-size: 14px; }
.source-table td, .source-table th { padding: 9px 6px; }
.source-table .frac { display: block; margin-left: 0; }
.cell-label { display: none; }

/* Stacking tables: each row is a small card of label and value on phones. */
@media (max-width: 899px) {
  .data-table.stack thead { display: none; }
  .data-table.stack, .data-table.stack tbody { display: block; }
  .data-table.stack tr { display: block; border: 1px solid var(--hair); border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; background: var(--surface); }
  .data-table.stack td { display: block; position: relative; min-height: 30px; border: 0; padding: 5px 0 5px 8.4em; text-align: left; }
  .data-table.stack td::before { content: attr(data-label); position: absolute; left: 0; top: 8px; width: 7.6em; font-family: var(--mono); font-size: 11px;
    letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
  .data-table.stack td.row-action { padding: 10px 0 4px; }
  .data-table.stack .chip { white-space: normal; }
  .data-table:not(.leads-table) td a, .kv dd a, .flag-top a { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); }
  .data-table.stack td a { margin: -10px 0; }
  .data-table.stack td.row-action::before { content: none; }
}

/* ---------------------------------------------------------------- home */
.cards { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-bottom: var(--gap); }
.cards .card { margin: 0; }
.card .range { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 2px; }
.card .big { font-family: var(--mono); font-size: 44px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 8px 0 2px; color: var(--indigo); }
.frac { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.card .frac { margin-left: 0; display: block; }
.stat-card .kv { border-top: 1px solid var(--hair-soft); margin-top: 14px; padding-top: 4px; }
.booking-card { padding: 18px 18px 14px; display: flex; flex-direction: column; }
.bc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bc-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.2; color: var(--indigo); }
.bc-head .range { margin: 0; white-space: nowrap; }
.bc-rates { display: grid; grid-template-columns: 1fr 1fr; margin: 14px 0 0; border: 1px solid var(--hair-soft); border-radius: 12px; overflow: hidden; }
.bc-rate { padding: 12px 14px 12px; background: var(--surface2); min-width: 0; }
.bc-rate + .bc-rate { border-left: 1px solid var(--hair-soft); }
.bc-rate-claire { background: #F4F0FF; }
.bc-rate .big { font-family: var(--sans); font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.bc-rate-claire .big { color: var(--purple-press); }
.bc-of { font-size: 13px; line-height: 1.35; color: var(--muted); }
.bc-who { margin-top: 16px; }
.bc-bar { display: block; width: 100%; height: 10px; margin: 8px 0 8px; border-radius: 999px; overflow: hidden; background: var(--hair-soft); }
.seg-claire { background: var(--purple); fill: var(--purple); } .seg-held { background: var(--tealmist); fill: var(--tealmist); }
.seg-staff { background: var(--lilac); fill: var(--lilac); } .seg-waiting { background: #CFC6B8; fill: #CFC6B8; }
.bc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bc-table th { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 0 0 2px; text-align: left; }
.bc-table td { padding: 5px 0; border-top: 1px solid var(--hair-soft); }
.bc-table .num { text-align: right; width: 4.2em; font-variant-numeric: tabular-nums; }
.bc-table td.num { font-weight: 600; }
.bc-key { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.bc-foot { margin: 8px 0 0; font-size: 12.5px; color: var(--dim); }
.bc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--hair-soft); }
.bc-facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.bc-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-facts dd .muted, .bc-facts dd .na { display: block; font-size: 12.5px; font-weight: 400; }
.bc-note { margin: 0 2px var(--gap); font-size: 13px; color: var(--dim); }

/* ---------------------------------------------------------------- leads list */
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.status-chip { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 4px; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-family: var(--mono); font-size: 12.5px; }
.status-chip:first-child { padding: 0 16px; background: var(--surface); border: 1px solid var(--hair); }
.status-chip .status { padding: 8px 13px 8px 11px; }
.status-chip.is-active .status, .status-chip.is-active:first-child { box-shadow: 0 0 0 2px var(--purple); }
.view-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.view-chip { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border-radius: 999px;
  text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--hair); font-size: 14px; }
.view-chip.is-active { box-shadow: 0 0 0 2px var(--purple); font-weight: 600; }
.filter-fold { padding: 0; }
.filter-fold[open] > summary { border-bottom: 1px solid var(--hair-soft); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px 16px; }
.filters label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.filters select, .filters input { width: 100%; font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.filter-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Glass, app wide (2026-11-15). base.html puts body.theme-glass on every page, so the
   dark indigo gradient, frosted cards, light text and glowing status dots from the
   Leads page carry everywhere. Inside the main column the palette variables are
   re-pointed at their dark-ground values, so the shared rules above (cards, tables,
   folds, kv lists, chat bubbles) turn glass without a second copy of each rule; the
   rules below only fix what has a hard-coded light color. These sit before the Leads
   block so that block wins every tie and the Leads page looks exactly as it did.
   Text on the glass stays at 4.5:1 or better: secondary text is #C9BDF2 (about 6.4:1
   on the lightest card face), links #A5F3FC, alarms #FECACA. */
.theme-glass .main-content {
  --ink: #F8F4EA; --indigo: #F8F4EA; --muted: #C9BDF2; --dim: #C9BDF2; --teal: #A5F3FC; --purple-press: #D6CBFF;
  --surface: rgba(255,255,255,.06); --surface2: rgba(255,255,255,.04); --hair: rgba(185,167,242,.20); --hair-soft: rgba(185,167,242,.14);
  --lav: rgba(156,133,255,.20); --gray-bg: rgba(255,255,255,.10);
  --good: #86EFAC; --good-bg: rgba(74,222,128,.10); --warn: #FDE68A; --warn-bg: rgba(250,204,21,.08); --warn-line: rgba(250,204,21,.45);
  --bad: #FCA5A5; --bad-bg: rgba(248,113,113,.12); --info: #A5F3FC; --info-bg: rgba(103,232,249,.10); --gray: #D4CFE3;
}
.theme-glass .card { background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); border-color: rgba(185,167,242,.18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.theme-glass .card:not(.filter-fold) { border-radius: 18px; }
.theme-glass .main-content h2, .theme-glass .main-content .lead-name { color: var(--g-ink); }
.theme-glass .main-content .back { color: var(--g-dim); text-decoration: none; }
.theme-glass .main-content .back:hover { color: var(--g-ink); }
.theme-glass .main-content .bad { color: #FCA5A5; }
.theme-glass .main-content .would { color: #FDE68A; }

/* alerts: amber for shadow mode, cyan for the demo tenant, a solid red bar for the mail alarm */
.theme-glass .banner { border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.theme-glass .banner-shadow { background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.50); color: #FDE68A; }
.theme-glass .banner-demo { background: rgba(103,232,249,.10); border: 1px solid rgba(103,232,249,.45); color: #A5F3FC; }
.theme-glass .banner-mail { background: rgba(220,38,38,.28); border: 1px solid rgba(248,113,113,.70); border-left: 5px solid #F87171; color: #FECACA;
  box-shadow: 0 0 24px rgba(248,113,113,.18); }
.theme-glass .banner-mail b { color: #FFFFFF; }
.theme-glass .main-content .banner-mail a { display: inline-block; padding: 14px 0; margin: -14px 0; color: #FFFFFF; text-decoration: underline; text-decoration-color: rgba(255,255,255,.6); }
.theme-glass .flash { background: rgba(255,255,255,.06); border: 1px solid rgba(185,167,242,.30); color: var(--g-ink); }
.theme-glass .flash-error { background: rgba(220,38,38,.22); border-color: rgba(248,113,113,.65); color: #FECACA; }
.theme-glass .chip-info { border-color: rgba(103,232,249,.45); color: #A5F3FC; background: rgba(103,232,249,.08); }
.theme-glass .chip-bad { border-color: rgba(248,113,113,.60); color: #FECACA; background: rgba(248,113,113,.14); }

/* buttons and inputs: the Leads Filter and Clear glass buttons, everywhere */
.theme-glass .main-content .btn { min-height: var(--tap); background: rgba(156,133,255,.24); color: var(--g-ink); border: 1px solid rgba(185,167,242,.55); }
.theme-glass .main-content .btn:hover { background: rgba(156,133,255,.36); color: var(--g-ink); }
.theme-glass .main-content .btn:focus-visible { outline: 2px solid #9C85FF; outline-offset: 2px; }
.theme-glass .main-content .btn-ghost { background: rgba(255,255,255,.04); font-weight: 500; }
.theme-glass .main-content input:not([type=checkbox]):not([type=radio]), .theme-glass .main-content select {
  color-scheme: dark; min-height: var(--tap); background: rgba(255,255,255,.07); color: var(--g-ink); border: 1px solid rgba(185,167,242,.38); }
.theme-glass .main-content input:not([type=checkbox]):not([type=radio]):hover, .theme-glass .main-content select:hover { background: rgba(255,255,255,.11); border-color: rgba(185,167,242,.6); }
.theme-glass .main-content input:focus, .theme-glass .main-content select:focus { outline: 2px solid #9C85FF; outline-offset: 2px; border-color: #B9A7F2; }
.theme-glass .main-content input[type=checkbox] { accent-color: #9C85FF; width: 22px; height: 22px; min-height: 0; margin: 0 8px 0 0; vertical-align: -5px; }
.theme-glass .main-content label.small { display: flex; align-items: center; min-height: var(--tap); }
.theme-glass .main-content .inline-form input[type=checkbox] { flex: none; min-width: 0; }
.theme-glass .main-content .inline-form label.small { flex-basis: 100%; }
.theme-glass audio { color-scheme: dark; }

/* tables: glass rows with light text */
.theme-glass .data-table:not(.leads-table) th { background: transparent; color: var(--lilac); border-bottom-color: rgba(185,167,242,.22); }
.theme-glass .data-table:not(.leads-table) tbody tr:hover { background: rgba(255,255,255,.05); }
.theme-glass .data-table:not(.leads-table) .chip { margin: 0 4px 4px 0; }
.theme-glass .data-table .btn, .theme-glass .callbacks-table td.mono { white-space: nowrap; }
@media (max-width: 899px) {
  .theme-glass .data-table.stack tr { background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border-color: rgba(185,167,242,.18); border-radius: 14px; }
  .theme-glass .data-table.stack td::before { color: var(--lilac); width: 122px; font-size: 11px; }
  .theme-glass .data-table.stack td { padding-left: 134px; }
  .theme-glass .data-table.stack td.row-action { padding-left: 0; }
}

/* Booking: glowing serif figures, as on the kintake.ai stats band */
.theme-glass .bc-title { color: var(--g-ink); }
.theme-glass .bc-rates { border-color: rgba(185,167,242,.18); }
.theme-glass .bc-rate { background: rgba(255,255,255,.03); }
.theme-glass .bc-rate + .bc-rate { border-left-color: rgba(185,167,242,.18); }
.theme-glass .bc-rate-claire { background: radial-gradient(160px 90px at 50% 40%, rgba(156,133,255,.22), transparent 75%), rgba(156,133,255,.08); }
.theme-glass .bc-rate .big { font-family: var(--display); font-weight: 400; font-size: 50px; letter-spacing: 0; line-height: 1; margin: 8px 0 6px; color: #F8F4EA;
  text-shadow: 0 0 18px rgba(185,167,242,.55), 0 0 42px rgba(156,133,255,.35); }
.theme-glass .bc-rate-claire .big { color: #E8E1FF; text-shadow: 0 0 18px rgba(185,167,242,.75), 0 0 46px rgba(156,133,255,.55); }
.theme-glass .bc-facts dd { color: var(--g-ink); }
.theme-glass .bc-facts dd a { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); }
.theme-glass .seg-waiting { background: rgba(255,255,255,.32); fill: rgba(255,255,255,.32); }
.theme-glass .bc-bar { background: rgba(255,255,255,.10); }

/* lead page */
.theme-glass .lead-progress { max-width: 24em; margin: -4px 0 16px; }
.theme-glass .lead-progress .track { margin: 0; }
.theme-glass .main-content .action { background: rgba(156,133,255,.16); color: var(--g-ink); border: 1px solid rgba(185,167,242,.40); }
.theme-glass .main-content .action:hover { background: rgba(156,133,255,.28); color: var(--g-ink); }
.theme-glass .action-kind { color: var(--lilac); }
.theme-glass .next-card { border-left: 4px solid #9C85FF; }
.theme-glass .next-ended { border-left-color: #A39DB8; }
.theme-glass .convo { background: rgba(10,6,24,.22); }
.theme-glass .turn-caller .turn-text { background: rgba(255,255,255,.07); border-color: rgba(185,167,242,.22); }
.theme-glass .turn-agent .turn-text { background: rgba(156,133,255,.22); color: var(--g-ink); border: 1px solid rgba(185,167,242,.30); }
.theme-glass .sms-out .sms-body { background: rgba(156,133,255,.22); color: var(--g-ink); border: 1px solid rgba(185,167,242,.30); }
.theme-glass .form-text { background: rgba(255,255,255,.05); border-left-color: var(--lilac); }
.theme-glass .call-summary { background: rgba(255,255,255,.05); border: 1px solid rgba(185,167,242,.14); }
.theme-glass .fact-strong { background: rgba(156,133,255,.20); }

/* Glass (Cory's pick, 2026-11-15; design/lead-cards option A with option C's track).
   Page-level rules are on body.theme-glass (every page); the card rules are the Leads list's own.
   Each lead is a frosted card on the dark indigo gradient, one column on a phone,
   two from 600 px, and a glass row from 1280 px. The status pill keeps its text
   label next to the glowing dot. The four-step track (Received, Called, Texted,
   Booked) takes the status color. Light text on the dark ground stays above 4.5:1. */
html:has(body.theme-glass) { background: #140E29; }
body.theme-glass { background-color: #140E29; background-image: radial-gradient(1400px 900px at 0% 0%, #2A1F5C 0%, #1B1336 55%, #140E29 100%); background-repeat: no-repeat; }
.theme-glass { --g-ink: #F8F4EA; --g-soft: #E8E1FF; --g-dim: #C9BDF2; --g-line: rgba(185,167,242,.20); }
.theme-glass .main-content { color: var(--g-ink); }
.theme-glass .page-head h1 { color: var(--g-ink); }
.theme-glass .page-head .sub, .theme-glass .main-content .muted, .theme-glass .main-content .note, .theme-glass .main-content .na { color: var(--g-dim); }
.theme-glass .main-content a { color: #A5F3FC; text-decoration-color: rgba(165,243,252,.45); }
.theme-glass .view-chip, .theme-glass .status-chip:first-child { background: rgba(255,255,255,.06); border-color: var(--g-line); color: var(--g-ink); text-decoration: none; }
.theme-glass .view-chip:hover, .theme-glass .status-chip:first-child:hover { background: rgba(255,255,255,.11); color: var(--g-ink); }
.theme-glass .status-chip { color: var(--g-ink); text-decoration: none; }
.theme-glass .view-chip.is-active, .theme-glass .status-chip.is-active .status, .theme-glass .status-chip.is-active:first-child { box-shadow: 0 0 0 2px #9C85FF; }
.theme-glass .main-content .count { background: rgba(255,255,255,.10); color: var(--g-soft); }
.theme-glass .status { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-family: var(--sans); font-weight: 600; }
.theme-glass .status-green { color: #86EFAC; } .theme-glass .status-green .dot { background: #4ADE80; box-shadow: 0 0 10px #4ADE80; }
.theme-glass .status-yellow { color: #FDE68A; } .theme-glass .status-yellow .dot { background: #FACC15; box-shadow: 0 0 10px #FACC15; }
.theme-glass .status-blue { color: #A5F3FC; } .theme-glass .status-blue .dot { background: #67E8F9; box-shadow: 0 0 10px #67E8F9; }
.theme-glass .status-red { color: #FCA5A5; } .theme-glass .status-red .dot { background: #F87171; box-shadow: 0 0 10px #F87171; }
.theme-glass .status-gray { color: #D4CFE3; } .theme-glass .status-gray .dot { background: #A39DB8; }
.theme-glass .filter-fold { background: rgba(255,255,255,.05); border-color: var(--g-line); box-shadow: none; color: var(--g-ink); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.theme-glass .filter-fold[open] > summary { border-bottom-color: var(--g-line); }
.theme-glass .filter-fold > summary::after, .theme-glass .gray-fold > summary::after { border-color: var(--g-dim); }
.theme-glass .filters label { color: var(--g-dim); }
.theme-glass .filters select, .theme-glass .filters input { color-scheme: dark; min-height: var(--tap); background: rgba(255,255,255,.07); color: var(--g-ink); border: 1px solid rgba(185,167,242,.38); }
.theme-glass .filters select:hover, .theme-glass .filters input:hover { background: rgba(255,255,255,.11); border-color: rgba(185,167,242,.6); }
.theme-glass .filters select:focus, .theme-glass .filters input:focus { outline: 2px solid #9C85FF; outline-offset: 2px; border-color: #B9A7F2; }
.theme-glass .filters option, .theme-glass .filters optgroup { background: #1B1336; color: #F8F4EA; }
.theme-glass .filters input::-webkit-calendar-picker-indicator { opacity: .85; cursor: pointer; }
.theme-glass .filter-actions .btn { min-height: var(--tap); background: rgba(156,133,255,.24); color: var(--g-ink); border: 1px solid rgba(185,167,242,.55); }
.theme-glass .filter-actions .btn:hover { background: rgba(156,133,255,.36); color: var(--g-ink); }
.theme-glass .filter-actions .btn-ghost { background: rgba(255,255,255,.04); border-color: rgba(232,225,255,.35); font-weight: 500; }
.theme-glass .filter-actions .btn-ghost:hover { background: rgba(255,255,255,.10); }
.theme-glass .filter-actions .btn:focus-visible { outline: 2px solid #9C85FF; outline-offset: 2px; }
.theme-glass .main-content .btn-ghost { color: var(--g-ink); border-color: rgba(232,225,255,.35); text-decoration: none; }
.theme-glass .main-content .btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--g-ink); }
.theme-glass .gray-fold > summary { color: var(--g-dim); }
.theme-glass .chip { margin: 0; font-family: var(--sans); font-size: 12px; padding: 3px 10px; border: 1px solid rgba(250,204,21,.45); color: #FDE68A; background: rgba(250,204,21,.08); }

.leads-table, .leads-table thead, .leads-table tbody { display: block; }
.leads-table thead { display: none; }
.leads-table tbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.leads-table tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; column-gap: 0;
  grid-template-areas: "lead lead status" "track track track" "next next next" "flags flags flags" "source touches received";
  padding: 16px 16px 14px; border-radius: 18px; color: var(--g-ink, #F8F4EA);
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); border: 1px solid rgba(185,167,242,.18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.leads-table tr.row-green { box-shadow: 0 10px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(74,222,128,.14); }
.leads-table tr.row-yellow { box-shadow: 0 10px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(250,204,21,.16); }
.page-leads .leads-table tbody tr:hover, .page-leads .leads-table tbody tr:active { background: linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.05)); }
.leads-table td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; font-size: 14.5px; }
.leads-table .c-lead { grid-area: lead; padding-right: 10px; }
.page-leads .leads-table .c-lead a { font-size: 17.5px; font-weight: 650; letter-spacing: -.01em; color: var(--g-ink); text-decoration: none; }
.leads-table .lead-phone { margin-top: 2px; font-size: 13px; color: var(--lilac); }
.leads-table .c-status { display: contents; }
.leads-table .c-status .status { grid-area: status; justify-self: end; max-width: 12.5em; white-space: normal; line-height: 1.3; padding: 5px 11px 5px 10px; }
.leads-table .track { grid-area: track; }
.track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 14px 0 2px; padding: 0; }
.track .step .bar { display: block; height: 5px; border-radius: 99px; background: rgba(255,255,255,.13); }
.track .step-name { display: block; margin-top: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: #A9A2C6; }
.track .step.is-on .step-name { color: var(--g-ink, #F8F4EA); }
.row-green .step.is-on .bar, .track-green .step.is-on .bar { background: #4ADE80; box-shadow: 0 0 8px rgba(74,222,128,.45); }
.row-yellow .step.is-on .bar, .track-yellow .step.is-on .bar { background: #FACC15; box-shadow: 0 0 8px rgba(250,204,21,.45); }
.row-blue .step.is-on .bar, .track-blue .step.is-on .bar { background: #67E8F9; box-shadow: 0 0 8px rgba(103,232,249,.45); }
.row-red .step.is-on .bar, .track-red .step.is-on .bar { background: #F87171; box-shadow: 0 0 8px rgba(248,113,113,.45); }
.row-gray .step.is-on .bar, .track-gray .step.is-on .bar { background: #A39DB8; }
.leads-table .c-next { grid-area: next; margin-top: 10px; color: var(--g-soft, #E8E1FF); line-height: 1.45; }
.leads-table .who-calls strong { font-weight: 600; }
.leads-table .assign, .leads-table .touch, .leads-table .agent { font-size: 12.5px; color: var(--g-dim, #C9BDF2); }
.leads-table .touch .mono { font-size: 12px; }
.leads-table .c-flags { grid-area: flags; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.leads-table .c-flags:empty { display: none; }
.leads-table .c-source, .leads-table .c-touches, .leads-table .c-received { align-self: stretch; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(185,167,242,.14);
  font-family: var(--mono); font-size: 12px; line-height: 1.45; color: var(--lilac); }
.leads-table .c-source { grid-area: source; }
.leads-table .c-touches { grid-area: touches; display: flex; align-items: flex-start; gap: 10px; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
.leads-table .ct { display: inline-flex; align-items: center; gap: 5px; }
.leads-table .ico { flex: none; opacity: .85; }
.leads-table .c-received { grid-area: received; text-align: right; white-space: nowrap; }
.leads-table .dt-y { display: none; }
.gray-fold .leads-table tr { background: rgba(255,255,255,.035); border-color: rgba(185,167,242,.12); box-shadow: none; }
.page-leads .gray-fold .leads-table .c-lead a { color: #DCD6EE; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.row-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row-green:not(.lead-row) { border-left-color: var(--good-dot) !important; }
.row-yellow:not(.lead-row) { border-left-color: var(--warn-dot) !important; }
.row-red:not(.lead-row) { border-left-color: var(--bad-dot) !important; }
.row-blue:not(.lead-row) { border-left-color: var(--info-dot) !important; }
.gray-fold { margin-top: 18px; }
.gray-fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--muted); font-family: var(--mono); font-size: 13px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- lead page */
.lead-page { max-width: 880px; }
.lead-head { padding: 16px 16px 6px; }
.lead-head .who-calls { margin: 0 0 2px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.lead-name { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 0 0 10px; }
.lead-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.lead-status .status { font-size: 13px; padding: 5px 13px 5px 11px; }
.contact-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
.action { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px; border-radius: 12px; text-decoration: none;
  background: var(--lav); color: var(--indigo); border: 1px solid #D6CBFB; min-width: 0; }
.action:hover { background: #DCD2FF; color: var(--indigo); }
.action-kind { flex: none; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--purple-press); width: 4.6em; }
.action .mono, .action-value { font-size: 16px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; padding: 12px 0 10px; border-top: 1px solid var(--hair-soft); }
.meta div { min-width: 0; }
.meta dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.meta .mono { font-size: 12.5px; letter-spacing: -.01em; }

.next-card { border-left: 4px solid var(--purple); }
.next-card .next-what { margin: 6px 0 4px; font-size: 16px; }
.next-card .next-what strong { margin-right: 6px; }
.next-ended { border-left-color: var(--gray-dot); }
.next-card p:last-child { margin-bottom: 0; }

.call-card { padding: 0; overflow: hidden; scroll-margin-top: 70px; }
.call-head { padding: 14px 16px 4px; }
.call-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.call-n { font-weight: 700; font-size: 17px; }
.call-title .mono { font-size: 13.5px; color: var(--muted); }
.call-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fact { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--hair-soft); }
.fact-strong { background: var(--gray-bg); border-color: transparent; color: var(--ink); font-weight: 500; }
.player { padding: 10px 16px 4px; }
.player audio { display: block; width: 100%; height: 48px; margin: 0; }
.player p { margin: 4px 0 6px; }
.call-summary { margin: 8px 16px 12px; padding: 10px 12px; background: var(--surface2); border-radius: 10px; font-size: 15px; }
.call-summary .microlabel { display: block; margin-bottom: 2px; }
.call-transcript { border-top: 1px solid var(--hair-soft); }
.call-transcript > summary { color: var(--purple-press); }
.call-transcript[open] > summary { border-bottom: 1px solid var(--hair-soft); }
.convo { list-style: none; margin: 0; padding: 14px 12px 16px; display: flex; flex-direction: column; gap: 10px; background: #FBF9F4; }
.turn { max-width: 88%; display: flex; flex-direction: column; gap: 2px; }
.turn-who { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.turn-text { padding: 9px 12px; border-radius: 14px; font-size: 15.5px; line-height: 1.5; white-space: pre-line; }
.turn-caller { align-self: flex-start; }
.turn-caller .turn-text { background: var(--surface); border: 1px solid var(--hair); border-top-left-radius: 4px; }
.turn-agent { align-self: flex-end; align-items: flex-end; }
.turn-agent .turn-who { color: var(--purple-press); }
.turn-agent .turn-text { background: var(--lav); color: var(--indigo); border-top-right-radius: 4px; }
.turn-note { align-self: center; max-width: 100%; font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }

.texts-card { padding: 14px 12px; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sms { max-width: 88%; display: flex; flex-direction: column; gap: 3px; }
.sms-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.sms-body { margin: 0; padding: 9px 12px; border-radius: 14px; font-size: 15.5px; white-space: pre-line; }
.sms-in { align-self: flex-start; }
.sms-in .sms-body { background: var(--surface2); border: 1px solid var(--hair); border-top-left-radius: 4px; }
.sms-out { align-self: flex-end; align-items: flex-end; }
.sms-out .sms-body { background: var(--lav); color: var(--indigo); border-top-right-radius: 4px; }

.flag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.flag-list li + li { border-top: 1px solid var(--hair-soft); padding-top: 14px; }
.flag-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.flag-why { margin: 6px 0 8px; }
.flag-answer { margin: 2px 0 0; }
.form-text { margin: 6px 0 0; padding: 10px 12px; border-left: 3px solid var(--lilac); background: var(--surface2); border-radius: 0 8px 8px 0; white-space: pre-wrap; }
.would { font-weight: 600; color: var(--warn); }
.events { list-style: none; margin: 0; padding: 0; }
.events li { padding: 8px 0; border-bottom: 1px solid var(--hair-soft); font-size: 14.5px; }
.events li:last-child { border-bottom: 0; }
.ev-kind { font-weight: 600; }
#contact-guard { scroll-margin-top: 70px; }

/* ---------------------------------------------------------------- sign-in and setup */
.login-body { display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(900px 520px at 85% -10%, rgba(109,78,246,.55), transparent 65%), linear-gradient(135deg, #1B1336 0%, #22175A 60%, #34248A 100%); }
.login-card { width: 100%; max-width: 380px; padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 20px 60px rgba(10,6,24,.45); }
.login-card form { display: flex; flex-direction: column; gap: 6px; }
.login-card .lockup { margin-bottom: 8px; }
.login-card h1 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 6px 0 0; }
.login-card p { margin: 0 0 8px; }
.login-card label { font-size: 14px; color: var(--muted); margin-top: 6px; }
.login-logo { width: 140px; border-radius: 6px; }
.login-card .btn { margin-top: 12px; }
.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-card .btn-microsoft { text-align: center; }
.login-or { margin: 14px 0 0; text-align: center; font-size: 13.5px; }
.field-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 6px; }
.flash { padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.flash-error { background: var(--bad-bg); border: 1px solid #F4C3BD; color: var(--bad); }

/* ---------------------------------------------------------------- tablet */
@media (min-width: 600px) {
  .main-content { padding: 18px 22px 44px; }
  .contact-actions { grid-template-columns: 1fr 1fr; }
  .meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .booking-cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .kv { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 8px 16px; }
  .stat-card .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stat-card .kv dt { padding-top: 8px; }
  .kv dt { padding-top: 3px; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inline-form { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .inline-form input { flex: 1; min-width: 200px; }
  .card, .panel { padding: 18px 20px; }
  .fold, .call-card, .filter-fold { padding: 0; }
  .convo { padding: 16px 20px 18px; }
  .turn, .sms { max-width: 76%; }
  .leads-table tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- desktop tables */
@media (min-width: 900px) {
  .table-scroll { margin: 0; padding: 0; }
  .source-table { font-size: 15px; }
  .source-table .frac { display: inline; margin-left: 6px; }
  .filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
  .filters label { width: auto; }
  .filters select { min-width: 9em; }
  .filter-actions { display: flex; gap: 10px; }
  .data-table tbody tr:hover { background: #FBF8F2; }
}

/* ---------------------------------------------------------------- wide screens: the leads list as glass rows */
@media (min-width: 1280px) {
  .leads-table thead { display: block; }
  .leads-table thead tr, .leads-table tbody tr { column-gap: 14px; align-items: start; padding: 12px 16px; border-radius: 14px;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .75fr) minmax(0, .85fr);
    grid-template-areas: "lead status next source flags touches received"; }
  .leads-table thead tr { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-top: 0; padding-bottom: 2px; }
  .leads-table th { padding: 0; border: 0; background: none; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--lilac); }
  .leads-table tbody { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .page-leads .leads-table .c-lead a { font-size: 15.5px; }
  .leads-table .c-status { display: block; grid-area: status; }
  .leads-table .c-status .status { max-width: none; }
  .leads-table .track { margin: 8px 0 0; max-width: 15em; }
  .leads-table .step-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .leads-table .c-next, .leads-table .c-flags { margin-top: 0; }
  .leads-table .c-flags:empty { display: block; }
  .leads-table .c-source, .leads-table .c-touches, .leads-table .c-received { margin: 0; padding: 0; border: 0; text-align: left; }
  .leads-table .dt-d, .leads-table .dt-t { display: block; }
  .leads-table .dt-y { display: inline; }
  .leads-table .dt-sep { display: none; }
}

/* ---------------------------------------------------------------- desktop shell */
@media (min-width: 1024px) {
  body { font-size: 15px; }
  .app-shell { display: flex; background: linear-gradient(90deg, var(--indigo) var(--sidebar-w), transparent var(--sidebar-w)); }
  .topbar { display: none; }
  .js .sidebar, .sidebar { display: flex; width: var(--sidebar-w); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 16px;
    background: radial-gradient(340px 260px at 0% 0%, rgba(109,78,246,.30), transparent 70%), var(--indigo); box-shadow: none; }
  .sidebar-header { display: block; padding: 0; }
  .sidebar-header .lockup { display: inline-flex; }
  .sidebar-subtitle { display: block; }
  .firm-plate { margin-top: 16px; width: 132px; padding: 6px; }
  .sidebar-logo { width: 120px; }
  .sidebar-header .pill { margin-top: 12px; }
  .sidebar-nav { margin: 24px 0 18px; }
  .sidebar-nav a { font-size: 15px; min-height: 42px; }
  .sidebar-footer { margin-top: auto; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; }
  .btn-logout { min-height: 32px; padding: 0 10px; }
  .main-content { flex: 1; padding: 24px 28px 48px; }
  .page-head h1 { font-size: 34px; }
  .lead-name { font-size: 38px; }
  .tenant-form select { font-size: 14px; min-height: 38px; }
}

/* Release to Claire on the lead page (app/release.py). */
.release-card ul { margin: 6px 0 10px 18px; padding: 0; }
.release-card .flash { margin: 8px 0; }

/* Sign-in and set-up pages in Glass (2026-11-15): the app's dark gradient, a frosted card, the glowing mark. */
body.login-body.theme-glass { background-color: #140E29; background-image: radial-gradient(900px 520px at 85% -10%, rgba(109,78,246,.45), transparent 65%), radial-gradient(1400px 900px at 0% 0%, #2A1F5C 0%, #1B1336 55%, #140E29 100%); }
.login-body .login-card { background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.04)); border: 1px solid rgba(185,167,242,.24); border-radius: 20px;
  color: var(--g-ink); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.login-body .login-card .muted, .login-body .login-card label, .login-body .field-label { color: var(--g-dim); }
.login-body .login-card a:not(.btn) { color: #A5F3FC; }
.login-body .login-card input { color-scheme: dark; background: rgba(255,255,255,.07); color: var(--g-ink); border: 1px solid rgba(185,167,242,.38); }
.login-body .login-card input:hover { background: rgba(255,255,255,.11); border-color: rgba(185,167,242,.6); }
.login-body .login-card input:focus { outline: 2px solid #9C85FF; outline-offset: 2px; border-color: #B9A7F2; }
.login-body .login-card .btn { background: rgba(156,133,255,.30); color: var(--g-ink); border: 1px solid rgba(185,167,242,.6); }
.login-body .login-card .btn:hover { background: rgba(156,133,255,.42); color: #FFFFFF; }
.login-body .flash-error { background: rgba(220,38,38,.22); border-color: rgba(248,113,113,.65); color: #FECACA; }
/* Email problems: a failed row keeps a clear red edge on the glass (the text says "failed" beside it). */
.theme-glass .data-table:not(.leads-table) tr.row-red td:first-child { box-shadow: inset 4px 0 0 #F87171; }
@media (max-width: 899px) {
  .theme-glass .data-table.stack tr.row-red { box-shadow: inset 4px 0 0 #F87171; }
  .theme-glass .data-table.stack tr.row-red td:first-child { box-shadow: none; }
}

/* Checkboxes and radios on the dark theme (PM review 11/15) */
.theme-glass input[type="checkbox"], .theme-glass input[type="radio"] { color-scheme: dark; accent-color: #9C85FF; }
