@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/assets/fonts/space-mono-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
/* Macomb HQ demo. Layout: the real app's shell (sidebar + topbar + view), drawers for records, sheets for customer pages. */
:root {
  --bg: #eef3f5; --panel: #ffffff; --panel-2: #f6f9fa; --panel-3: #eaf0f2; --line: #e1e9ec; --line-2: #c9d6dc;
  --ink: #0b2f3f; --ink-2: #39586a; --ink-3: #6a8494;
  --brand: #1d6bd0; --brand-ink: #ffffff; --brand-wash: color-mix(in srgb, var(--brand) 11%, transparent); --brand-line: color-mix(in srgb, var(--brand) 35%, transparent);
  --ok: #157a42; --ok-wash: #e2f4e9; --warn: #8a5a00; --warn-wash: #fff2d1; --bad: #b42318; --bad-wash: #fde7e4; --info: #275f98; --info-wash: #e4eef9;
  --side: #0a2a38; --side-2: #0e3445; --side-ink: #d9e6ec; --side-mute: #86a2b0; --side-hi: rgba(255,255,255,.08);
  --map-land: #e9efe6; --map-block: #dfe7da; --map-road: #ffffff; --map-road-2: #f5f7f3; --map-water: #c8e0ec; --map-park: #d4e8cc;
  --f: "Poppins", "Helvetica Neue", Arial, sans-serif; --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --r: 14px; --r-s: 9px;
  --shadow: 0 1px 2px rgba(11,47,63,.05), 0 10px 30px -14px rgba(11,47,63,.22);
  --shadow-lg: 0 30px 80px -20px rgba(5,20,28,.45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #071319; --panel: #0d1f28; --panel-2: #112833; --panel-3: #16303c; --line: #1b3542; --line-2: #2a4a5a;
  --ink: #e5eff3; --ink-2: #b1c5ce; --ink-3: #809fac;
  --ok: #5fd39a; --ok-wash: rgba(95,211,154,.13); --warn: #f2c45a; --warn-wash: rgba(242,196,90,.13); --bad: #ff8a80; --bad-wash: rgba(255,138,128,.13); --info: #8fbbe9; --info-wash: rgba(143,187,233,.13);
  --side: #040d12; --side-2: #08171f; --side-hi: rgba(255,255,255,.07);
  --map-land: #10232b; --map-block: #142a33; --map-road: #23404c; --map-road-2: #1a3440; --map-water: #0b2f40; --map-park: #13302a;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #071319; --panel: #0d1f28; --panel-2: #112833; --panel-3: #16303c; --line: #1b3542; --line-2: #2a4a5a;
  --ink: #e5eff3; --ink-2: #b1c5ce; --ink-3: #809fac;
  --ok: #5fd39a; --ok-wash: rgba(95,211,154,.13); --warn: #f2c45a; --warn-wash: rgba(242,196,90,.13); --bad: #ff8a80; --bad-wash: rgba(255,138,128,.13); --info: #8fbbe9; --info-wash: rgba(143,187,233,.13);
  --side: #040d12; --side-2: #08171f; --side-hi: rgba(255,255,255,.07);
  --map-land: #10232b; --map-block: #142a33; --map-road: #23404c; --map-road-2: #1a3440; --map-water: #0b2f40; --map-park: #13302a;
  color-scheme: dark }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { height: 100%; }
html { padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 9px 12px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 17px; height: 17px; padding: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
a { color: var(--brand); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.mute { color: var(--ink-3); }
.note { font-size: 13px; color: var(--ink-3); }

/* ---------- shell ---------- */
/* The way back to dillardsdigital.com, at the top of the main column. Shown only when the demo is opened on its own (app.js sets .solo); inside the frame on /demo/ the site's header does this. */
.demo-strip { display: none; }
.solo .demo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin: 0; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: var(--side); color: var(--side-mute); font-size: 13px; line-height: 1.3; }
.demo-strip span { margin-right: auto; }
.demo-strip .short { display: none; }
.demo-strip a { display: inline-flex; align-items: center; min-height: 40px; color: var(--side-ink); text-decoration: underline; text-decoration-color: rgba(217, 230, 236, .45); text-underline-offset: 3px; }
.demo-strip a:hover { color: #fff; text-decoration-color: currentColor; }
.demo-strip a.go { color: #fff; font-weight: 600; }
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100%; }
.side { background: linear-gradient(180deg, var(--side-2), var(--side)); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 14px 10px; gap: 10px; z-index: 20; }
.biz-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); text-align: left; color: var(--side-ink); transition: background .15s; }
.biz-btn:hover { background: var(--side-hi); }
.biz-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; flex: none; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.biz-btn b { display: block; font-size: 13.5px; line-height: 1.25; }
.biz-btn small { color: var(--side-mute); font-size: 12px; }
.biz-menu { display: grid; gap: 2px; padding: 5px; border-radius: 12px; background: rgba(255,255,255,.05); animation: pop .14s ease-out; }
.biz-menu button { display: flex; align-items: center; gap: 10px; padding: 7px; border: 0; border-radius: 9px; background: none; color: var(--side-ink); text-align: left; font-size: 13.5px; }
.biz-menu button:hover, .biz-menu button[aria-current="true"] { background: var(--side-hi); }
.nav { display: grid; gap: 1px; overflow-y: auto; scrollbar-width: thin; margin-inline: -4px; padding-inline: 4px; }
.nav hr { border: 0; border-top: 1px solid rgba(255,255,255,.07); margin: 6px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 9px; color: var(--side-ink); text-decoration: none; font-size: 14px; transition: background .12s; }
.nav a:hover { background: var(--side-hi); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); font-weight: 600; box-shadow: 0 6px 16px -8px var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 10px 8px 2px; border-top: 1px solid rgba(255,255,255,.07); }
.me { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.me small { display: block; color: var(--side-mute); font-size: 11.5px; }
.side-foot .row button { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: var(--side-ink); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(22px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(10px); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; }
.searchbtn { flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); color: var(--ink-3); font-size: 14px; text-align: left; }
.searchbtn:hover { border-color: var(--line-2); }
.searchbtn kbd { margin-left: auto; font: 500 11px var(--mono); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; background: var(--panel); }
.top .spacer { flex: 1; }
.iconbtn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); flex: none; }
.iconbtn:hover { border-color: var(--line-2); color: var(--ink); }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; border: 2px solid var(--panel); }
.clock { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; white-space: nowrap; }
.clock b { font-variant-numeric: tabular-nums; }
.clock .live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 1.6s infinite; }
.demo-pill { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--warn); background: var(--warn-wash); padding: 7px 10px; border-radius: 99px; white-space: nowrap; }
.popover { position: absolute; top: calc(100% + 8px); right: 0; width: min(340px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 30; padding: 6px; animation: pop .14s ease-out; }
.popover .item { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px; text-align: left; font-size: 14px; }
.popover .item:hover { background: var(--panel-2); }
.popover .item svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 2px; }
.popover .item small { display: block; color: var(--ink-3); font-size: 12.5px; }
.rel { position: relative; }

.view { padding: 26px max(16px, env(safe-area-inset-right, 0px)) 64px max(22px, env(safe-area-inset-left, 0px)); display: grid; gap: 18px; align-content: start; max-width: 1280px; width: 100%; animation: in .18s ease-out; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
.head p { margin-top: 4px; color: var(--ink-2); max-width: 72ch; }
.eyebrow { font: 600 11.5px/1 var(--f); letter-spacing: .09em; text-transform: uppercase; color: var(--brand); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); white-space: nowrap; transition: transform .08s, border-color .12s, filter .12s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn.pri { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 6px 16px -10px var(--brand); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 1px 2px rgba(11,47,63,.04); min-width: 0; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card > header h2 { font-size: 15.5px; font-weight: 700; }
.pad { padding: 16px; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gm { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px 12px; display: grid; gap: 2px; text-align: left; position: relative; overflow: hidden; }
button.kpi { border: 1px solid var(--line); transition: transform .12s, box-shadow .12s; }
button.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.kpi b { font-size: 26px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--ink-3); font-size: 12.5px; }
.kpi svg.spk { position: absolute; right: 12px; top: 14px; width: 76px; height: 28px; }
.kpi:has(> svg.spk) > span { padding-right: 84px; } /* the label wraps beside the trend line, not under it */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.tabs button .c { opacity: .6; margin-left: 4px; font-weight: 500; }

.list { display: grid; }
.li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; }
.li:first-child { border-top: 0; }
button.li:hover { background: var(--panel-2); }
.li b { font-weight: 600; }
.li .sub { color: var(--ink-3); font-size: 13px; grid-column: 1; }
.li .end { text-align: right; grid-row: 1 / 3; grid-column: 2; display: grid; gap: 4px; justify-items: end; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: #fff; flex: none; }
.who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.who > span { min-width: 0; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); }
td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; transition: background .1s; }
tbody tr.click:hover td { background: var(--panel-2); }
.t-r { text-align: right; }
td .sub { color: var(--ink-3); font-size: 13px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.c-done { color: var(--ok); background: var(--ok-wash); }
.c-wait { color: var(--info); background: var(--info-wash); }
.c-att { color: var(--warn); background: var(--warn-wash); }
.c-late { color: var(--bad); background: var(--bad-wash); }
.c-neu { color: var(--ink-2); background: var(--panel-3); }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--brand-wash); color: var(--brand); font-weight: 600; }
.callout { padding: 12px 14px; border-radius: 11px; background: var(--brand-wash); border: 1px solid var(--brand-line); font-size: 14px; }
.callout.warn { background: var(--warn-wash); border-color: transparent; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; }
.field { display: grid; gap: 5px; font-size: 13.5px; }
.field > span { font-weight: 600; color: var(--ink-2); }
.form { display: grid; gap: 12px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.switch span small { display: block; color: var(--ink-3); font-size: 13px; }
.tgl { position: relative; width: 42px; height: 24px; flex: none; appearance: none; -webkit-appearance: none; border-radius: 99px; background: var(--line-2); border: 0; padding: 0; cursor: pointer; transition: background .15s; }
.tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.tgl:checked { background: var(--brand); }
.tgl:checked::after { transform: translateX(18px); }
.progress { height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .35s; }

/* ---------- schedule ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(128px, 1fr)); min-width: 920px; }
.day { border-left: 1px solid var(--line); min-height: 380px; padding-bottom: 8px; transition: background .12s; }
.day:first-child { border-left: 0; }
.day h3 { font-size: 12.5px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-3); display: flex; justify-content: space-between; }
.day h3 b { color: var(--ink); font-size: 14px; }
.day.today h3 { background: var(--brand-wash); }
.day.over { background: var(--brand-wash); }
.slot { margin: 7px 7px 0; padding: 7px 9px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--crew, var(--brand)); font-size: 12.5px; display: grid; gap: 1px; text-align: left; width: calc(100% - 14px); box-shadow: 0 1px 2px rgba(11,47,63,.05); touch-action: manipulation; user-select: none; }
.slot b { font-weight: 600; font-size: 13px; }
.slot.done { opacity: .55; }
.slot:hover { box-shadow: var(--shadow); }
.ghost { position: fixed; pointer-events: none; z-index: 60; opacity: .92; transform: rotate(-2deg); box-shadow: var(--shadow-lg); }
.dragging { opacity: .3; }

/* ---------- pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; min-width: 1150px; }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 360px; transition: background .12s; }
.col.over { background: var(--brand-wash); border-color: var(--brand-line); }
.col h3 { font-size: 13px; display: flex; justify-content: space-between; padding: 2px 4px 4px; }
.col h3 span { color: var(--ink-3); font-weight: 500; }
.deal { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; display: grid; gap: 3px; font-size: 13px; text-align: left; user-select: none; touch-action: manipulation; }
.deal b { font-size: 14px; }
.deal:hover { box-shadow: var(--shadow); }

/* ---------- messages ---------- */
.msg-wrap { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: 560px; }
.threads { border-right: 1px solid var(--line); overflow-y: auto; max-height: 640px; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.bubbles { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 470px; background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 18px 18px; }
.bub { max-width: 76%; padding: 9px 13px; border-radius: 16px; font-size: 14px; animation: in .16s ease-out; }
.bub.in { background: var(--panel); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.bub.out { background: var(--brand); color: var(--brand-ink); align-self: flex-end; border-bottom-right-radius: 5px; }
.bub.sys { align-self: center; background: var(--panel-3); color: var(--ink-2); font-size: 12.5px; padding: 4px 12px; border-radius: 99px; }
.bub small { display: block; opacity: .7; font-size: 11px; margin-top: 2px; }
.vm { display: flex; align-items: center; gap: 10px; align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 13px; }
.vm .wave { display: flex; gap: 2px; align-items: center; height: 24px; }
.vm .wave i { width: 3px; border-radius: 2px; background: var(--ink-3); }
.vm.play .wave i { background: var(--brand); }
.composer { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.composer .row input { flex: 1; }
.consent { padding: 10px 16px; font-size: 13px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- maps ---------- */
.map { position: relative; overflow: hidden; background: var(--map-land); }
.map svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); padding: 10px 16px; border-top: 1px solid var(--line); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.stop { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); }
.stop:first-child { border-top: 0; }
.stop .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line-2); }
.stop.done .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.stop.skip .n { background: var(--bad-wash); color: var(--bad); border-color: var(--bad); }
.stop.next { background: var(--brand-wash); }
.rule-pop { position: absolute; left: 16px; top: 16px; max-width: 320px; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 8px; font-size: 13.5px; animation: pop .18s ease-out; border: 1px solid var(--line); }

/* ---------- calling ---------- */
.callcard { display: grid; gap: 14px; }
.script { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 15px; line-height: 1.6; }
.script mark { background: var(--brand-wash); color: var(--brand); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-3); font: 11px var(--f); }
.chart .grid { stroke: var(--line); }
.hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 13.5px; padding: 6px 0; }
.hbar .track { height: 10px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.funnel { display: grid; gap: 6px; }
.funnel div { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 14px; }

/* ---------- ask ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 340px; max-height: 520px; overflow-y: auto; }
.chat .q { align-self: flex-end; background: var(--brand); color: var(--brand-ink); padding: 9px 13px; border-radius: 16px 16px 5px 16px; max-width: 80%; }
.chat .a { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); padding: 11px 14px; border-radius: 16px 16px 16px 5px; max-width: 88%; white-space: pre-wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line-2); background: var(--panel); border-radius: 99px; padding: 6px 12px; font-size: 13px; }
.chips button:hover { border-color: var(--brand); color: var(--brand); }
.caret::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--brand); }

/* ---------- ownership ---------- */
.pin { display: grid; justify-items: center; gap: 16px; padding: 48px 16px; text-align: center; }
.pin .dots { display: flex; gap: 12px; }
.pin .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-3); }
.pin .dots i.on { background: var(--ink); border-color: var(--ink); }
.pin .pad-keys { display: grid; grid-template-columns: repeat(3, 64px); gap: 10px; }
.pin .pad-keys button { height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-size: 20px; font-weight: 600; }
.pin .pad-keys button:active { background: var(--panel-3); }
.shake { animation: shake .3s; }
.biz-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) repeat(4, minmax(96px, auto)); gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.biz-row .dot { width: 10px; height: 10px; border-radius: 50%; }
.ops { background: #050c11; color: #cfe3ec; border-radius: var(--r); overflow: hidden; border: 1px solid #13303d; font-family: var(--mono); font-size: 12.5px; }
.ops header { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #13303d; color: #7fc7e8; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; flex-wrap: wrap; }
.ops .ops-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.ops canvas { width: 100%; height: auto; display: block; }
.ops .side-panel { border-left: 1px solid #13303d; padding: 14px; display: grid; gap: 12px; align-content: start; }
.ops .side-panel b { color: #fff; }
.ops .row-l { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #13303d; padding-bottom: 6px; }
.ops .ok { color: #5fe0a0; }
.ops .warn { color: #f2c45a; }

/* ---------- settings ---------- */
.set-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.set-nav { display: grid; gap: 1px; padding: 8px; position: sticky; top: 80px; }
.set-nav h4 { margin: 10px 8px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.set-nav button { text-align: left; padding: 7px 10px; border-radius: 8px; border: 0; background: none; font-size: 14px; color: var(--ink-2); }
.set-nav button:hover { background: var(--panel-2); }
.set-nav button[aria-current="true"] { background: var(--brand-wash); color: var(--brand); font-weight: 600; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 10px; border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-2); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.drop { border: 2px dashed var(--line-2); border-radius: 14px; padding: 26px; text-align: center; display: grid; gap: 8px; justify-items: center; background: var(--panel-2); }
.preview-sms { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 14px; }

/* ---------- drawer + sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(4, 13, 18, .5); z-index: 40; animation: fade .15s ease-out; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); z-index: 41; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s cubic-bezier(.2,.8,.2,1); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.drawer > header h2 { font-size: 21px; }
.drawer .body { overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 16px; align-content: start; flex: 1; }
.sheet-bg { position: fixed; inset: 0; background: rgba(4, 13, 18, .6); z-index: 45; display: grid; place-items: start center; overflow-y: auto; padding: max(24px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 24px max(12px, env(safe-area-inset-left, 0px)); animation: fade .15s ease-out; }
.sheet { width: min(720px, 100%); background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.sheet-top { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px 9px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); gap: 10px; }
.sheet-top .url { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.sheet-hero { padding: 24px; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); color: var(--brand-ink); display: grid; gap: 4px; }
.sheet-hero h2 { font-size: 25px; }
.sheet-hero .lbl { opacity: .85; font-size: 13px; font-weight: 600; }
.sheet-body { padding: 20px 24px 24px; display: grid; gap: 16px; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tier { position: relative; border: 2px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 6px; align-content: start; cursor: pointer; background: var(--panel); transition: border-color .12s, transform .12s; }
.tier:hover { transform: translateY(-2px); }
.tier:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.tier input { position: absolute; opacity: 0; }
.tier .price { font-size: 22px; font-weight: 700; }
.tier ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.tier .pop { position: absolute; top: -10px; right: 10px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.addon { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.addon span { flex: 1; }
.totals { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals .grand { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line-2); padding-top: 8px; }
.sig { border: 2px dashed var(--line-2); border-radius: 12px; background: var(--panel-2); touch-action: none; width: 100%; height: 130px; display: block; cursor: crosshair; }
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick label { border: 2px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: grid; gap: 2px; position: relative; }
.pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.pick input { position: absolute; opacity: 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.slots button { padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; font-size: 13px; }
.slots button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.video { aspect-ratio: 16 / 9; max-width: 100%; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 70%, #000), #0a2a38); display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.video::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 2px, transparent 2px 40px); }
.video span { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; z-index: 1; }
.video span::before { content: ""; border-left: 18px solid #0a2a38; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.qr { width: 132px; height: 132px; image-rendering: pixelated; border-radius: 8px; background: #fff; padding: 8px; }

/* ---------- palette + toast ---------- */
.palette { position: fixed; inset: 0; z-index: 70; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(4, 13, 18, .45); animation: fade .12s ease-out; }
.palette .box { width: min(620px, 100%); background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); animation: rise .16s ease-out; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 17px; box-shadow: none; }
.palette .res { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette .res button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; border: 0; background: none; border-radius: 9px; text-align: left; font-size: 14.5px; }
.palette .res button[aria-selected="true"] { background: var(--brand-wash); }
.palette .res small { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.palette .grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 8px 12px 4px; }
.toast { position: fixed; left: 50%; bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 72px)); transform: translate(-50%, 16px); background: var(--ink); color: var(--panel); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; transition: .22s; z-index: 80; pointer-events: none; max-width: calc(100% - 32px); display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow-lg); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 12px; flex: none; }

.tabbar { display: none; }
.menu-btn { display: none; }

@keyframes in { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm, .g2, .g3 { grid-template-columns: 1fr; }
  .biz-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .biz-row .hide-sm { display: none; }
  .ops .ops-grid { grid-template-columns: 1fr; }
  .ops .side-panel { border-left: 0; border-top: 1px solid #13303d; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .22s; padding-top: max(14px, env(safe-area-inset-top, 0px)); z-index: 50; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .menu-btn { display: grid; }
  .searchbtn span, .searchbtn kbd, .clock .lbl, .demo-pill { display: none; }
  .searchbtn { flex: none; width: 38px; height: 38px; padding: 0; justify-content: center; }
  .msg-wrap { grid-template-columns: 1fr; }
  .threads { border-right: 0; border-bottom: 1px solid var(--line); max-height: 220px; }
  .tiers, .outcomes { grid-template-columns: 1fr; }
  .set-wrap { grid-template-columns: 1fr; }
  .set-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-nav h4 { grid-column: 1 / -1; }
  .head h1 { font-size: 24px; }
  .form .two { grid-template-columns: 1fr; }
  .view { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; background: var(--panel); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); text-decoration: none; border: 0; background: none; padding: 4px; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--brand); font-weight: 600; }
  .hbar { grid-template-columns: 90px minmax(0, 1fr) 60px; }
}
@media (max-width: 480px) {
  .demo-strip { gap: 0 16px; }
  .demo-strip .long { display: none; }
  .demo-strip .short { display: inline; }
  /* the top bar ran past the screen edge and cut off "+ Create"; the trend lines sat on top of the card labels */
  .top { gap: 6px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .clock { gap: 6px; padding-left: 9px; }
  .clock b { display: none; }
  .kpi svg.spk { display: none; }
  .kpi:has(> svg.spk) > span { padding-right: 0; }
}
@media (max-width: 370px) {
  .searchbtn { display: none; }
  .demo-strip { gap: 0 10px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
