:root {
  --bg: #f5f4f0; --panel: #fff; --ink: #14161a; --muted: #666c78; --line: #e6e3dc; --soft: #f0eee8;
  --accent: #2563eb; --accent-ink: #fff; --accent-soft: color-mix(in srgb, var(--accent) 10%, #fff);
  --good: #15803d; --warn: #b45309; --bad: #b91c1c; --note: #fff7d6;
  --side: #101216; --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .05), 0 10px 28px rgba(20, 22, 26, .06);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; font-weight: 500; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 28px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .err { color: var(--bad); font-weight: 700; } .small { font-size: 13px; }
.ic { display: inline-flex; width: 20px; height: 20px; flex: none; } .ic svg { width: 100%; height: 100%; }
.loading { padding: 60px 20px; text-align: center; color: var(--muted); font-weight: 700; }

/* ---------- buttons and form bits ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--panel); font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .06s, box-shadow .15s, background .15s; }
.btn:hover { background: var(--soft); } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.danger { color: var(--bad); } .btn.small { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled, .in:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: var(--soft); }
.in { display: block; width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--panel); outline: none; font-weight: 600; }
.in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea.in { resize: vertical; line-height: 1.4; }
input[type=color].in { padding: 4px; height: 42px; cursor: pointer; }
.field { display: grid; gap: 6px; } .field .label { font-size: 13px; font-weight: 700; color: var(--muted); } .field .hint { font-size: 12.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stack { display: grid; gap: 14px; } .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .grow { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; } .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; width: 100%; height: 100%; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #cfd3da; transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--soft); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.booked { background: var(--accent-soft); color: var(--accent); } .chip.confirmed, .chip.won, .chip.done { background: #e3f4e8; color: var(--good); }
.chip.noshow, .chip.lost, .chip.failed { background: #fde8e8; color: var(--bad); } .chip.cancelled { text-decoration: line-through; }
.chip.test, .chip.pending { background: #fdf0d5; color: var(--warn); }

/* ---------- sign-in ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, #dfe7ff, transparent), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--panel); border-radius: 22px; padding: 34px 30px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.mark { width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.login-card h1 { font-size: 26px; }
.sample-box { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px; font-size: 13.5px; display: grid; gap: 8px; background: #fbfaf7; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100dvh; }
.side { background: var(--side); color: #e8e6e1; padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.biz { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.biz .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.biz-name { font-weight: 800; font-size: 15.5px; line-height: 1.2; }
.biz-select { width: 100%; background: transparent; border: 0; color: inherit; font-weight: 800; font-size: 15px; padding: 4px 0; cursor: pointer; outline: none; text-overflow: ellipsis; }
.biz-select option { color: #14161a; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; font-weight: 700; color: #b9b6ae; position: relative; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.side-sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 8px 6px; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 10px 8px 0; font-size: 13px; color: #a09d96; }
.side-foot strong { color: #fff; font-size: 14px; }
.test-pill { border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 8px 10px; line-height: 1.35; }
.test-pill b { color: #ffd27a; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 700; text-align: left; }
.top, .tabs { display: none; }
#main { padding: 30px 34px 60px; min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-weight: 600; margin-top: 4px; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card > h2 { margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.banner { background: #fff6dd; border: 1.5px solid #f1dfa9; color: #6b4a00; border-radius: 12px; padding: 11px 14px; font-weight: 600; font-size: 14px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty strong { color: var(--ink); font-size: 16px; }

/* ---------- home ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 4px; }
.stat .k { font-size: 13px; font-weight: 700; color: var(--muted); } .stat .v { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; } .stat .d { font-size: 13px; color: var(--muted); }
a.stat:hover { outline: 2px solid var(--accent); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; cursor: pointer; }
.item:first-child { border-top: 0; padding-top: 0; } .item:last-child { padding-bottom: 0; }
.item .t { font-weight: 800; white-space: nowrap; min-width: 74px; }
.item .main { flex: 1; min-width: 0; } .item .main strong { display: block; } .item .main span { display: block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 13.5px; flex: none; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 12px; padding: 6px 0; font-weight: 600; }
.bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

/* ---------- inbox ---------- */
#main[data-view=inbox] { padding: 0; }
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100dvh; }
.inbox-list { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.inbox-head { padding: 22px 18px 12px; display: grid; gap: 12px; }
.thread-list { overflow-y: auto; flex: 1; }
.trow { display: flex; gap: 11px; padding: 12px 18px; border-top: 1px solid var(--line); align-items: flex-start; }
.trow:hover { background: #faf9f6; } .trow.active { background: var(--accent-soft); }
.trow .main { flex: 1; min-width: 0; } .trow .top-line { display: flex; justify-content: space-between; gap: 8px; }
.trow .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .trow.unread .name { font-weight: 800; }
.trow time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.trow .prev { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .trow.unread .prev { color: var(--ink); font-weight: 600; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.thread-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; height: 100dvh; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.thread-head .who { flex: 1; min-width: 120px; } .thread-head .who strong { display: block; font-size: 17px; font-weight: 800; } .thread-head .who span { font-size: 13px; }
.thread-head .back { display: none; }
.log { flex: 1; overflow-y: auto; padding: 22px 22px 10px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: min(560px, 82%); display: grid; gap: 3px; flex-shrink: 0; } /* never squeezed by the scrolling thread: a long message would spill over the next */
.msg.out, .msg.note { align-self: flex-end; justify-items: end; }
.bubble { padding: 10px 14px; border-radius: 16px; background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.msg.in .bubble { border-bottom-left-radius: 5px; }
.msg.out .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.note .bubble { background: var(--note); border: 1px solid #f0e2a4; border-bottom-right-radius: 5px; }
.bubble .body { white-space: pre-wrap; overflow-wrap: anywhere; } .bubble .subj { display: block; margin-bottom: 4px; }
.msg .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag.bad { background: #fde3e1; color: #a12a22; }
.tag { background: #fdf0d5; color: var(--warn); border-radius: 6px; padding: 1px 6px; font-weight: 700; font-size: 11.5px; }
.sys { align-self: center; font-size: 12.5px; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 4px 12px; text-align: center; max-width: 92%; }
.composer { background: var(--panel); border-top: 1px solid var(--line); padding: 12px 18px 16px; display: grid; gap: 10px; }
.composer.note textarea { background: var(--note); }
.composer .send-row { display: flex; gap: 10px; align-items: flex-end; }

/* ---------- tables ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; } .toolbar .in { width: auto; flex: 1; min-width: 180px; } .toolbar select.in { flex: 0 0 180px; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; } .table tbody tr.click:hover { background: #faf9f6; }
.table .name { font-weight: 800; }

/* ---------- pipeline ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(215px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: #ebe9e3; border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; min-height: 160px; align-content: start; }
.col.over { outline: 2px dashed var(--accent); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; } .col-head strong { font-weight: 800; } .col-head .count { background: var(--panel); border-radius: 99px; padding: 0 8px; font-size: 12.5px; font-weight: 800; } .col-head .sum { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.deal { background: var(--panel); border-radius: 12px; padding: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .07); cursor: grab; display: grid; gap: 4px; }
.deal:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .1); } .deal strong { font-weight: 800; } .deal .foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; } .deal .val { color: var(--ink); font-weight: 800; }

/* ---------- calendar ---------- */
.day { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.day.today { outline: 2px solid var(--accent); }
.day-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; } .day-head strong { font-size: 16px; font-weight: 800; } .day-head .pill { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11.5px; font-weight: 800; padding: 1px 8px; }
.appt.cancelled .main, .appt.cancelled .t { opacity: .5; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 220px; overflow-y: auto; padding: 2px; }
.slot { min-height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--panel); font-weight: 700; cursor: pointer; }
.slot:hover { border-color: var(--accent); } .slot.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.linkbar { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.linkbar code { flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--muted); }

/* ---------- automations, settings ---------- */
.recipe { border-top: 1px solid var(--line); padding: 16px 0; display: grid; gap: 10px; } .recipe:first-of-type { border-top: 0; padding-top: 0; }
.recipe-top { display: flex; gap: 14px; align-items: center; } .recipe-top .main { flex: 1; min-width: 0; } .recipe-top strong { font-weight: 800; display: block; }
.editor { display: grid; gap: 12px; background: #faf9f6; border-radius: 12px; padding: 14px; }
pre.snippet { margin: 0; background: #14161a; color: #e9e7e2; border-radius: 12px; padding: 14px; font: 500 12.5px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.hours-row { display: grid; grid-template-columns: 140px 140px 20px 140px; justify-content: start; gap: 10px; align-items: center; }
.svc-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px auto auto; gap: 8px; align-items: center; }
.stars { color: #f5a524; letter-spacing: 1px; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.biz-card { display: grid; gap: 14px; border-top: 5px solid var(--c, var(--accent)); }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; } .mini b { display: block; font-size: 22px; font-weight: 800; } .mini span { font-size: 12px; color: var(--muted); }

/* ---------- modal and toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16, 18, 22, .5); display: grid; place-items: center; padding: 18px; z-index: 50; }
.modal { width: min(520px, 100%); max-height: calc(100dvh - 36px); background: var(--panel); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
.modal.wide { width: min(680px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; } .modal-body { padding: 10px 20px 22px; overflow-y: auto; display: grid; gap: 14px; }
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: min(440px, calc(100% - 28px)); }
.toast { background: #14161a; color: #fff; border-radius: 12px; padding: 12px 16px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); } .toast.bad { background: var(--bad); }

/* ---------- phones ---------- */
@media (max-width: 880px) {
  .shell { display: block; padding-bottom: 68px; }
  .side { display: none; }
  .top { display: flex; align-items: center; gap: 10px; background: var(--side); color: #fff; padding: 10px 14px; position: sticky; top: 0; z-index: 20; }
  .top .dot { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
  .tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .tabs a, .tabs button { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 5px 0; border: 0; background: none; position: relative; cursor: pointer; }
  .tabs .active { color: var(--accent); }
  .tabs .nav-badge { position: absolute; top: 0; left: 54%; min-width: 18px; height: 18px; font-size: 10.5px; }
  #main { padding: 18px 16px 30px; }
  h1 { font-size: 24px; }
  .stats { grid-template-columns: 1fr 1fr; } .stat .v { font-size: 26px; }
  .cols, .grid3 { grid-template-columns: 1fr; }
  .inbox { display: block; height: auto; }
  .inbox .thread-pane { display: none; } .inbox.has-thread .inbox-list { display: none; }
  .inbox.has-thread .thread-pane { display: flex; height: calc(100dvh - 50px - 68px); }
  .inbox-list { border-right: 0; min-height: calc(100dvh - 118px); }
  .thread-head { padding: 10px 12px; } .thread-head .back { display: inline-grid; }
  .thread-actions { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .log { padding: 14px 12px 8px; } .composer { padding: 10px 12px 12px; }
  .hide-sm { display: none; }
  .hours-row { grid-template-columns: 1fr 1fr; } .hours-row .check { grid-column: 1 / -1; } .hours-row .to { display: none; }
  .svc-row { grid-template-columns: 1fr 1fr; } .svc-row .in:first-child { grid-column: 1 / -1; }
  .bar-row { grid-template-columns: 110px 1fr 28px; }
  .board { grid-auto-columns: 82%; }
}
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.login-card { width: min(600px, 100%); }
.login-card .logo { width: 100%; height: auto; margin: 0 auto; display: block; }

/* ---------- all businesses on one screen ---------- */
.biz-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; max-width: 100%; }
.biz-tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.biz-tag.big { font-size: inherit; color: inherit; white-space: normal; gap: 10px; } .biz-tag.big::before { width: 11px; height: 11px; }
.item-side { display: grid; gap: 4px; justify-items: end; font-size: 12.5px; color: var(--muted); white-space: nowrap; flex: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
div.stat { cursor: default; }

/* control center (All businesses): flat colours, plain borders, no motion */
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--panel); font-size: 13px; font-weight: 700; }
.status-pill i { width: 8px; height: 8px; border-radius: 99px; background: var(--muted); }
.status-pill.ok i { background: var(--good); } .status-pill.off i { background: var(--warn); }
.issues { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.issue { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel); }
.issue .btn { justify-self: start; }
.issue-top { display: flex; align-items: baseline; gap: 10px; }
.issue-n { font-size: 30px; font-weight: 800; line-height: 1; }
.issue-k { font-weight: 700; color: var(--muted); }
.issue-list { display: grid; gap: 4px; }
.issue-row { display: grid; gap: 1px; text-align: left; padding: 6px 8px; border: 0; border-radius: 8px; background: var(--soft); cursor: pointer; font: inherit; color: inherit; }
.issue-row span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-row:hover { background: var(--accent-soft); }
.stat .vs { font-weight: 700; } .stat .vs.up { color: var(--good); } .stat .vs.down { color: var(--bad); }
.chart { display: grid; gap: 8px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; gap: 4px; height: 140px; border-bottom: 1.5px solid var(--line); }
.bars.months { grid-template-columns: repeat(6, 1fr); gap: 12px; }
.bar-day { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.bar { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; }
.bar.lead, .legend i.lead { background: var(--accent); } .bar.book, .legend i.book { background: var(--good); } .bar.won { background: var(--good); }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; }
.axis.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; text-align: center; }
.legend { display: flex; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.big-num { font-size: 30px; font-weight: 800; }

/* ---------- owner console (All businesses): dark, blue accents, flat colours, no glow ---------- */
body.console {
  --bg: #0a0f1a; --panel: #111827; --ink: #e5ecf6; --muted: #8a99b2; --line: #1f2a3d; --soft: #172236;
  --accent: #3b82f6; --accent-ink: #fff; --accent-soft: #15233d; --good: #34d399; --warn: #fbbf24; --bad: #f87171;
  --shadow: none;
}
body.console, body.console .shell { background: var(--bg); color: var(--ink); }
body.console .side { background: #0d1320; border-right: 1px solid var(--line); }
body.console .top, body.console .tabs { background: #0d1320; border-color: var(--line); color: var(--ink); }
body.console .card, body.console .stat, body.console .issue, body.console .con-tile { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
body.console .btn { background: var(--soft); border-color: var(--line); color: var(--ink); }
body.console .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; }
body.console .issue-row { background: var(--soft); } body.console .issue-row:hover { background: #1c2c4a; }
body.console .item:hover { background: var(--soft); }
body.console .status-pill { background: var(--panel); border-color: var(--line); color: var(--ink); }
body.console .table th { color: var(--muted); } body.console .table td, body.console .table th { border-color: var(--line); }
body.console .chip { background: var(--soft); color: var(--muted); }
body.console .chip.booked { background: var(--accent-soft); color: #93c5fd; }
body.console .chip.confirmed, body.console .chip.done { background: #10291f; color: var(--good); }
body.console .chip.noshow, body.console .chip.failed { background: #2a1416; color: var(--bad); }
body.console .avatar { background: var(--accent-soft); color: #93c5fd; }
body.console .bar.lead, body.console .legend i.lead { background: var(--accent); }
body.console .bar.won, body.console .bar.book { background: #60a5fa; }
body.console .bars { border-color: var(--line); }
body.console .test-pill { background: #1b2232; color: var(--muted); }
.con-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 6px 2px 4px; }
.con-hero h1 { margin: 2px 0 6px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; line-height: 1.05; }
.con-hello { margin: 0; color: var(--accent); font-weight: 700; }
.con-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.con-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
body.console .con-ic { color: #60a5fa; }
.con-stat .con-ic { margin-bottom: 6px; }
.line-wrap { height: 170px; border-bottom: 1.5px solid var(--line); }
.line-chart { width: 100%; height: 100%; display: block; overflow: visible; }
.line-chart .area { fill: var(--accent); fill-opacity: .14; }
.line-chart .stroke { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.line-chart .pt { fill: var(--panel); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.con-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.donut-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { position: relative; width: 150px; height: 150px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(0deg); }
.donut-bg { fill: none; stroke: var(--soft); stroke-width: 5; }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-mid strong { font-size: 28px; font-weight: 800; line-height: 1; } .donut-mid span { font-size: 12px; color: var(--muted); font-weight: 700; }
.donut-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 140px; }
.donut-key li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.donut-key i { width: 10px; height: 10px; border-radius: 3px; flex: none; } .donut-key b { margin-left: auto; }
.con-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.con-tile { display: grid; gap: 4px; align-content: start; padding: 16px; border-radius: var(--radius); background: var(--panel); }
.con-tile-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .con-tile-top h3 { margin: 0; font-size: 16px; }
.con-tile .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.con-tile .con-btn { margin-top: 10px; justify-self: stretch; }
body.console .con-tile .con-btn { background: transparent; border-color: #2a4a7f; color: #93c5fd; }
body.console .con-tile .con-btn:hover { background: var(--accent-soft); }
@media (max-width: 1100px) { .con-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .con-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .con-three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .con-stats { grid-template-columns: 1fr 1fr; } .con-three { grid-template-columns: 1fr; } .con-tiles { grid-template-columns: 1fr 1fr; } .donut { width: 120px; height: 120px; } }
/* in the three narrow console cards, the business name sits under the person instead of beside them */
.con-three .item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 12px; row-gap: 2px; }
.con-three .item .main strong, .con-three .item .main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.con-three .item-side { grid-column: 2; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; }
/* never let one wide card (charts, the business table) stretch the console past a phone screen */
body.console .page { grid-template-columns: minmax(0, 1fr); }
body.console .page > * { min-width: 0; }
@media (max-width: 1100px) { .con-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .con-stats, .con-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.con-tile, .con-stat { min-width: 0; }
.con-tile .con-btn { white-space: normal; text-align: center; }
/* account switch on the owner console */
.con-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.con-switch-on, .con-switch-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 99px; font: inherit; font-size: 13.5px; font-weight: 700; }
.con-switch-on { background: var(--accent); color: #fff; }
.con-switch-on .ic svg { width: 16px; height: 16px; }
.con-switch-btn { border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.con-switch-btn:hover { border-color: var(--accent); }
.con-switch-btn i { width: 9px; height: 9px; border-radius: 99px; background: var(--c, var(--accent)); }

/* ---------- admin panel (owner console) ---------- */
.admin-nav { display: none; flex-direction: column; gap: 4px; }
body.console .admin-nav { display: flex; }
body.console .side .biz-nav { display: none; }
.con-brand { display: none; }
body.console .side .biz:not(.con-brand), body.console .top > :not(.con-brand) { display: none; }
body.console .side .biz.con-brand { display: flex; }
body.console .top .con-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
body.console .con-brand .dot { background: var(--accent); color: #fff; }
.biz-nav { display: flex; flex-direction: column; gap: 4px; }
.side-label { font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: #6b7a93; padding: 10px 12px 2px; }
.admin-nav .nav-item.active { background: rgba(59, 130, 246, .16); color: #fff; }
.acct-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--accent); flex: none; display: inline-block; }
.admin-nav .nav-item .acct-dot { margin: 0 4px; }
.acct { display: inline-flex; align-items: center; gap: 10px; }
.con-top { display: flex; align-items: center; gap: 12px; }
.con-search { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; max-width: 520px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel); }
.con-search .in { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.con-search > .ic { color: var(--muted); }
.con-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.con-res { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.con-res:hover { background: var(--soft); } .con-res span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.con-res-head { font-size: 11.5px; font-weight: 800; color: var(--muted); padding: 8px 10px 2px; } .con-res-empty { padding: 10px; }
.con-bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; flex: none; }
.con-bell b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.con-me { display: flex; align-items: center; gap: 10px; flex: none; }
.con-me strong { display: block; font-size: 14px; } .con-me span { font-size: 12px; color: var(--muted); font-weight: 700; }
.con-subnav { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1.5px solid var(--line); padding-bottom: 10px; }
.con-subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.con-subnav a:hover { color: var(--ink); background: var(--soft); }
.con-subnav a.on { color: #fff; background: var(--accent); }
.con-subnav .ic svg { width: 16px; height: 16px; }
.con-hero.small h1 { font-size: clamp(26px, 3vw, 34px); }
.con-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.con-badges > span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 700; }
.con-badges .ic { color: var(--accent); } .con-badges .ic { display: inline-flex; flex: none; } .con-badges .ic svg { width: 16px; height: 16px; flex: none; }
.con-system { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.con-sys { display: flex; align-items: center; gap: 12px; min-width: 0; }
.con-sys .k { display: block; font-size: 12px; font-weight: 700; color: var(--muted); } .con-sys strong { display: block; font-size: 20px; }
.card .con-btn { margin-top: 12px; }
.sub-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(0, 1fr)) auto auto; gap: 12px; align-items: end; padding: 12px 0; border-top: 1px solid var(--line); }
.sub-row:first-child { border-top: 0; }
.pay-status { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
@media (max-width: 1100px) { .con-system { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sub-row { grid-template-columns: 1fr 1fr; } .sub-row .acct { grid-column: 1 / -1; } }
@media (max-width: 700px) {
  .con-top { flex-wrap: wrap; } .con-search { order: 3; flex-basis: 100%; max-width: none; } .con-me div { display: none; }
  .con-subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .con-subnav::-webkit-scrollbar { display: none; } .con-subnav a { white-space: nowrap; }
  .con-system { grid-template-columns: 1fr 1fr; }
}

/* Your own automations: the step-by-step flow */
.flow { display: flex; flex-direction: column; align-items: stretch; max-width: 760px; }
.flow-node { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.flow-node.when { border-left-color: var(--good); }
.flow-node.if { border-left-color: var(--line); background: var(--soft); box-shadow: none; }
.flow-node.wait { border-left-color: var(--warn); }
.flow-label { font-weight: 800; font-size: 13px; color: var(--muted); }
.flow-arrow { width: 2px; height: 22px; background: var(--line); margin: 0 auto; position: relative; }
.flow-arrow::after { content: ''; position: absolute; left: -5px; bottom: -2px; border: 6px solid transparent; border-top-color: var(--line); border-bottom: 0; }
.flow-add { display: flex; gap: 8px; justify-content: center; padding: 4px 0 8px; }
.rule-card { display: grid; gap: 12px; }
.flow-mini { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flow-mini .fm { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.flow-mini .fm + .fm::before { content: '→'; margin: 0 6px 0 -2px; color: var(--muted); }
.flow-mini .fm.when { background: var(--soft); color: var(--ink); font-weight: 700; }
.flow-mini .fm.if { background: var(--soft); color: var(--muted); }
.flow-mini .fm.wait { background: var(--soft); color: var(--muted); }

/* Google reviews: star rating over time, replies */
.rating-chart { width: 100%; height: auto; display: block; }
.rating-chart .grid { stroke: var(--line); stroke-width: 1; }
.rating-chart .ax { fill: var(--muted); font-size: 11px; font-weight: 600; }
.rating-chart .cnt { fill: var(--accent-soft); }
.rating-chart .avg { fill: none; stroke: #f5a524; stroke-width: 2.5; }
.rating-chart .dot { fill: #f5a524; }
.legend i.avg-key, .legend i.cnt-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.avg-key { background: #f5a524; } .legend i.cnt-key { background: var(--accent-soft); }
.g-review .main p { color: var(--ink); }
.g-reply { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 0 8px 8px 0; }
.meta-window { padding: 2px 2px 0; }

/* Owner console > Features */
.feat-group { margin-top: 14px; } .feat-group h3 { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.feat-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.feat-row .main { display: grid; gap: 2px; }
.feat-biz summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.feat-biz summary::-webkit-details-marker { display: none; }
.feat-biz[open] summary { margin-bottom: 6px; }
.weekly-preview { white-space: pre-wrap; font: inherit; margin: 0; }

/* Today's jobs */
.job { display: grid; gap: 10px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.seg.wrap { flex-wrap: wrap; height: auto; }

/* Social posts: the week ahead */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.wday { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--soft); font-size: 12px; color: var(--muted); }
.wday.has { background: var(--accent-soft); color: var(--accent-ink); }
.wday strong { font-size: 16px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }

/* Set up by talking */
.talk-log { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 4px 0 10px; }
.talk-msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; line-height: 1.4; }
.talk-msg.fd { background: var(--soft); align-self: flex-start; }
.talk-msg.me { background: var(--accent); color: var(--accent-ink); align-self: flex-end; }
.talk-bar { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.mic { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 28px; cursor: pointer; flex: none; }
.mic.on { animation: pulse 1s infinite; } @keyframes pulse { 50% { transform: scale(1.08); opacity: .8; } }

/* Ask for a review now: a big, plain black-on-white code the customer can scan from the worker's phone. */
.review-qr { width: min(78vw, 360px); background: #fff; padding: 6px; border-radius: 12px; line-height: 0; }
.review-qr svg { width: 100%; height: auto; display: block; }

/* ---------- Business Home: the four key numbers first, then today's work, then the lists ----------
   Everything is scoped to .home: .stats, .card, .item and .bar-row are shared with other screens. */
.home { gap: 28px; font-size: 16px; container: home / inline-size; }
.home .page-head h1 { font-size: 30px; }
.home .page-head .sub { font-size: 16px; }
.home-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.home-num { display: grid; align-content: start; gap: 6px; padding: 22px 24px 24px; min-width: 0; container-type: inline-size; color: inherit; text-decoration: none; transition: background-color .15s; }
.home-num + .home-num { border-left: 1px solid var(--line); }
.home-num:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.home-num:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.home-num .k { font-size: 16px; font-weight: 700; color: var(--ink); }
.home-num .v { font-size: min(44px, 22cqi); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-num .d { font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.home-num .vs { font-weight: 700; } .home-num .vs.up { color: var(--good); } .home-num .vs.down { color: var(--bad); }
.home-num.is-urgent .v { color: var(--bad); }
.home .banner { font-size: 15px; }
.home .card > h2 { font-size: 20px; }
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 48px; align-items: start; }
.home-sec { min-width: 0; }
.home-sec > h2 { font-size: 20px; margin-bottom: 12px; }
.home-sec .h-note { font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.home .item { padding: 13px 0; gap: 14px; }
.home .item .main strong { font-size: 16px; }
.home .item .main span { font-size: 14.5px; }
.home .item .t { font-size: 16px; }
.home .item .chip { font-size: 14px; padding: 3px 10px; }
.home .item-side { font-size: 14px; gap: 2px; }
.home a.item { color: inherit; text-decoration: none; border-radius: 4px; }
.home a.item:hover .main strong { color: var(--accent); }
.home a.item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.home .avatar { font-size: 14px; width: 40px; height: 40px; }
.home .empty { padding: 26px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.home .empty p { margin: 0; font-size: 15px; }
.home > .home-sec:last-child { padding-top: 24px; border-top: 1px solid var(--line); }
.home .bar-row { grid-template-columns: 170px minmax(0, 1fr) 36px; font-size: 16px; padding: 7px 0; }
.home .bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.home .btn.small { font-size: 14px; min-height: 36px; }
/* two numbers per row when the Home window itself is narrow (screen width alone ignores the open bar) */
@container home (max-width: 959px) {
  .home-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-num + .home-num { border-left: 0; }
  .home-num:nth-child(2n) { border-left: 1px solid var(--line); }
  .home-num:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 880px) {
  .home { gap: 22px; }
  .home .page-head h1 { font-size: 26px; }
  .home-num { padding: 16px 16px 18px; gap: 4px; }
  .home-num .k { font-size: 15px; }
  .home-num .v { font-size: min(34px, 22cqi); }
  .home-num .d { font-size: 14px; }
  .home-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .home .bar-row { grid-template-columns: 120px minmax(0, 1fr) 30px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .home-num { transition: none; } }

/* Tasks: a tick box at the start of each row; done ones are crossed out */
.task-row { align-items: center; }
.task-row .task-check { display: flex; align-items: center; padding: 6px 4px 6px 0; cursor: pointer; }
.task-row .task-check input { width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.task-row.is-done strong { text-decoration: line-through; color: var(--muted); }
/* Saved replies: show the start of each reply under its name */
.snippet-row .snippet-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); }
/* Trigger links: the code people put in messages */
.tlink-row { align-items: center; gap: 10px; }
.tlink-row .main span { overflow-wrap: anywhere; }
.tlink-code { font: 600 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; white-space: nowrap; }
/* Seen tracking (public/opens.js): "Opened ..." / "Not opened yet" */
.seen-line { display: block; font-size: 15px; color: var(--muted); }
.seen-line.yes { color: var(--good); font-weight: 600; }
.seen-help { font-size: 14px; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* Calling, WhatsApp and texting registration (public/phone.js): body text 18px, nothing under 14px */
.phone-ui { font-size: 18px; }
.phone-ui .muted, .phone-ui .small, .phone-ui .hint, .phone-ui .field .label, .phone-ui .banner, .phone-ui summary { font-size: 15px; }
.phone-ui .chip { font-size: 14px; }
.phone-ui .in { font-size: 17px; }
.call-steps, .a2p-steps, .a2p-checks { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.a2p-checks li.fix strong { color: var(--bad); } .a2p-checks li.check strong { color: var(--warn); }
.a2p-group { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 12px; margin: 0; }
.a2p-group legend { font-weight: 800; padding: 0 6px; }
.a2p-steps pre, .wa-url { font-size: 14px; white-space: pre-wrap; word-break: break-word; background: var(--soft); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; display: block; }
.wa-preview { background: var(--soft); border-radius: 12px; padding: 12px 14px; margin: 0; white-space: pre-wrap; }
/* The AI receptionist page: bigger, plain type (body 18px, nothing readable under 14px) */
.rcp { font-size: 18px; }
.rcp p { margin: 0; }
.rcp .small, .rcp .muted.small, .rcp .field .hint, .rcp .chip { font-size: 15px; }
.rcp .field .label, .rcp .seg button, .rcp .btn.small { font-size: 16px; }
.rcp .btn { font-size: 17px; }
.rcp .in { font-size: 17px; }
.rcp .rcp-note { color: var(--muted); font-size: 16px; }
.rcp .rcp-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.rcp .rcp-row:first-of-type { border-top: 0; }
.rcp .rcp-row p { color: var(--muted); font-size: 16px; margin-top: 2px; }
.rcp .rcp-chat { display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.rcp .rcp-bubble { max-width: 85%; padding: 11px 15px; border-radius: 14px; white-space: pre-wrap; }
.rcp .rcp-bubble.in { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.rcp .rcp-bubble.out { align-self: flex-start; background: var(--soft); }
.rcp .rcp-did { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.rcp .rcp-log p { color: var(--muted); font-size: 16px; }
.rcp .rcp-when { color: var(--muted); font-size: 15px; white-space: nowrap; }
.rcp .item .main span { font-size: 15px; }
.rcp .snippet { font-size: 15px; }
/* Referrals, partners and lead scores (public/referrals.js): body text 17px, nothing under 14px */
.growth { font-size: 18px; }
.growth .muted, .growth p { font-size: 17px; }
.growth .btn.small { font-size: 14px; }
.growth .item .main span { font-size: 15px; }
.growth .field .label, .growth .field .hint { font-size: 14px; }
.gr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.gr-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.gr-stats b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.gr-stats span { font-size: 14px; color: var(--muted); font-weight: 600; }
.gr-partner { display: grid; gap: 14px; }
.gr-partner details summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.gr-link, .gr-code { font: 600 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; overflow-wrap: anywhere; }
.gr-link { flex: 1; min-width: 0; }
.gr-pill { font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.gr-pill.earned { background: var(--note); color: var(--warn); } .gr-pill.given { color: var(--good); }
.gr-warn { background: var(--note); border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.gr-table td, .gr-table th { font-size: 15px; padding-left: 8px; padding-right: 8px; }
.gr-table td:last-child { white-space: nowrap; }
.gr-rule { display: flex; align-items: center; gap: 12px; } .gr-rule .grow { flex: 1; min-width: 0; } .gr-rule .muted { font-size: 14px; margin-left: 28px; }
.gr-rule-fixed { font-weight: 700; }
.gr-plus { color: var(--good); } .gr-minus { color: var(--bad); }
.gr-score, .gr-score-btn { display: inline-block; vertical-align: middle; font-size: 14px; font-weight: 800; padding: 1px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); line-height: 1.5; }
.gr-score-btn { cursor: pointer; margin-left: 4px; }
.gr-score.hot, .gr-score-btn.hot { background: color-mix(in srgb, var(--good) 14%, #fff); border-color: color-mix(in srgb, var(--good) 35%, #fff); color: var(--good); }
.gr-score.warm, .gr-score-btn.warm { background: var(--note); color: var(--warn); }
/* ---------- funnels (public/funnels.js) ---------- */
.fn-card { gap: 14px; }
.fn-name { margin: 0; font-size: 20px; text-transform: none; letter-spacing: -.01em; color: var(--ink); }
.fn-flow .fm { font-size: 15px; padding: 5px 12px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
.fn-nums span { font-size: 14px; color: var(--muted); }
.fn-link { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; }
.fn-link code { font-size: 14px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); padding: 5px 10px; border-radius: 10px; overflow-wrap: anywhere; }
.fn-help p { font-size: 17px; line-height: 1.5; margin: 0; }
.fn-step { gap: 12px; }
.fn-stepno { font-size: 17px; }
.fn-sub { margin: 10px 0 0; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.fn-table td { font-size: 16px; }
.legal-links { text-align: center; font-size: 15px; margin: 4px 0 0; } .legal-links a { color: var(--muted); }
/* Settings > Close and delete this business */
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: var(--panel); }
.btn.danger-solid:disabled { opacity: .45; cursor: not-allowed; }
.banner.bad-banner { background: transparent; border-color: var(--bad); color: var(--bad); font-size: 16px; }
.close-biz p, .close-card p { font-size: 18px; line-height: 1.5; }
.close-biz .field .label { font-size: 16px; }
.close-biz .close-step { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; border: 1.5px solid var(--line, #e3e6ea); border-radius: 12px; }

/* ---------- Payments page (Stripe Connect): body text ~18px and nothing under 14px, scoped to .pay so
   the shared .small, .chip, .stat and .btn.small sizes on other screens do not change. */
.pay { font-size: 18px; }
.pay .page-head .sub, .pay .banner { font-size: 17px; }
.pay .card p, .pay .item .main span, .pay li { font-size: 17px; }
.pay .small, .pay .card p.small, .pay .item .main span.small, .pay .stat .k, .pay .stat .d, .pay .muted.small { font-size: 15px; }
.pay .chip { font-size: 14px; padding: 3px 10px; }
.pay .btn.small { font-size: 15px; min-height: 36px; }
.pay .item .main strong { font-size: 18px; }
.modal .pay-modal { font-size: 17px; }
.modal .pay-modal .small { font-size: 15px; }
/* an unpaid invoice has up to five buttons: when they do not fit beside the name and amount, they go on their own line */
.pay .item { flex-wrap: wrap; row-gap: 10px; }
.pay .item > .main { flex: 1 1 260px; }
.pay .item > .stack { flex: 0 1 auto; max-width: 100%; margin-left: auto; }
/* ---------- courses, membership offers and communities (public/courses.js): body 18px, nothing under 14px ---------- */
.crs { font-size: 18px; }
.crs p { margin: 0; }
.crs .field .label, .crs .seg button, .crs .btn.small, .crs .check { font-size: 16px; }
.crs .btn, .crs .in { font-size: 17px; }
.crs .field .hint, .crs .chip, .crs .table td, .crs .table th { font-size: 15px; }
.crs .crs-card, .crs .crs-module, .crs .crs-post { gap: 12px; }
.crs .crs-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.crs .crs-top > .field { flex: 1 1 260px; }
.crs .crs-top > .grow { flex: 1 1 220px; min-width: 0; }
.crs .crs-name { margin: 0; font-size: 21px; text-transform: none; letter-spacing: -.01em; color: var(--ink); }
.crs .crs-note, .crs .crs-line { color: var(--muted); font-size: 16px; line-height: 1.45; }
.crs .crs-list { display: flex; flex-direction: column; }
.crs .crs-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.crs .crs-row:first-child { border-top: 0; }
.crs .crs-row a { color: var(--ink); }
.crs .crs-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; margin-top: 6px; }
.crs .crs-lesson { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.crs .crs-when { color: var(--muted); font-size: 15px; }
.crs .crs-body { white-space: pre-wrap; line-height: 1.5; }
.crs .crs-comments { display: flex; flex-direction: column; gap: 8px; padding-left: 14px; border-left: 3px solid var(--line); }
.crs .crs-comment { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.crs .crs-comment p { white-space: pre-wrap; }
.crs .crs-reply .in { flex: 1 1 240px; }
.crs .crs-hidden { opacity: .6; }
.crs .crs-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .crs .crs-cols { grid-template-columns: 1fr; } }

/* Ads (public/ads.js): 18px text, nothing under 14px */
.ads { font-size: 18px; }
.ads p { margin: 0; }
.ads .chip { font-size: 14px; }
.ads .field .label, .ads .btn.small, .ads .seg button { font-size: 16px; }
.ads .field .hint, .ads .ads-note, .ads .empty p { font-size: 15px; color: var(--muted); }
.ads .btn, .ads .in { font-size: 17px; }
.ads .banner { font-size: 16px; }
.ads .stat .k { font-size: 15px; }
.ads .page-head .sub { font-size: 17px; }
.ads-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.ads-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.ads-log > .ads-row:first-child { border-top: 0; padding-top: 0; }
.ads-row p, .ads-camp .ads-head p, .ads-set p, .ads-ad p { color: var(--muted); font-size: 16px; margin-top: 3px; }
.ads .grow { flex: 1 1 260px; min-width: 0; }
.ads-camp { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 12px; background: rgba(255, 255, 255, .5); }
.ads-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ads-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 14px; }
.ads-figs span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
.ads-figs b { font-size: 19px; font-weight: 800; }
.ads-sets { display: grid; gap: 10px; }
.ads-set { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 8px; }
.ads-ad { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding-left: 16px; }

/* ---------- switch business (Eric, 26 Nov: "I can't tap on the name"): the name on Home opens the list */
.biz-switch { font: inherit; color: var(--accent); background: none; border: 0; padding: 2px 4px; margin: -2px -4px; border-radius: 8px; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.biz-switch:hover { background: var(--accent-soft); }
.biz-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.biz-pick-list { display: grid; gap: 8px; }
.biz-pick { display: flex; align-items: stretch; gap: 8px; }
.biz-pick-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; font: inherit; font-size: 18px; font-weight: 600; text-align: left; color: var(--ink); background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.biz-pick-open span { min-width: 0; overflow-wrap: anywhere; }
.biz-pick-open small { margin-left: auto; font-size: 15px; font-weight: 500; color: var(--muted); flex: none; }
.biz-pick-open .acct-dot { width: 12px; height: 12px; }
.biz-pick-open:hover { border-color: var(--accent); }
.biz-pick.here .biz-pick-open { border-color: var(--accent); background: var(--accent-soft); }
.biz-pick-open:focus-visible, .biz-pick-star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.biz-pick-star { flex: none; width: 52px; font-size: 24px; line-height: 1; color: #8a96a2; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.biz-pick-star.on { color: #c98a00; }

/* Eric, 28 Nov: delete one message from a conversation */
/* Eric, 28 Nov: "I don't see the delete key": a clear red button, not a small grey word */
.msg .meta .msg-del { font-size: 14px; font-weight: 650; line-height: 1; padding: 6px 12px; min-height: 30px; border: 1.5px solid #e2a19a; border-radius: 999px;
  background: #fff; color: #b42318; text-decoration: none; cursor: pointer; }
.msg .meta .msg-del:hover { background: #fdecea; border-color: #b42318; }
.msg .meta .msg-del:focus-visible { outline: 3px solid #167bd7; outline-offset: 2px; }
/* Eric, 28 Nov: delete the whole conversation, red like the per-message Delete */
.thread-actions .btn.convo-del { font-size: 14px; color: #b42318; border: 1.5px solid #e2a19a; background: #fff; }
.thread-actions .btn.convo-del:hover { background: #fdecea; border-color: #b42318; }


/* Eric's rule, 28 Nov: nothing readable under 14px. Every rule above (and in theme-white-glass.css, sites.css and
   creator.css) that set text smaller is lifted to 14px here; "html body" makes this win over the original whatever
   order the files load in. New small text belongs at 14px or more in its own rule, not here. */
html body .small,
html body .btn.small,
html body .field .label,
html body .field .hint,
html body .seg button,
html body .chip,
html body .sample-box,
html body .nav-badge,
html body .side-foot,
html body .stat .k,
html body .stat .d,
html body .item .main span,
html body .avatar,
html body .trow time,
html body .trow .prev,
html body .badge,
html body .thread-head .who span,
html body .msg .meta,
html body .tag,
html body .sys,
html body .table th,
html body .col-head .count,
html body .col-head .sum,
html body .deal .foot,
html body .day-head .pill,
html body .linkbar code,
html body pre.snippet,
html body .mini span,
html body .tabs a,
html body .tabs button,
html body .tabs .nav-badge,
html body .biz-tag,
html body .item-side,
html body .status-pill,
html body .issue-row span,
html body .axis,
html body .legend,
html body .donut-mid span,
html body .donut-key li,
html body .con-switch-on,
html body .con-switch-btn,
html body .side-label,
html body .con-res span,
html body .con-res-head,
html body .con-bell b,
html body .con-me span,
html body .con-subnav a,
html body .con-badges > span,
html body .con-sys .k,
html body .pay-status,
html body .flow-label,
html body .flow-mini .fm,
html body .rating-chart .ax,
html body .feat-group h3,
html body .wday,
html body .glass-dock a,
html body .ctl .ctl-log,
html body .glass-dock-bot,
html body .bot-tries .btn,
html body .dra-glass h2,
html body .dra-glass .small,
html body .dra-link,
html body .dra-vital,
html body .dra-glass .dra-btn,
html body .dra-glass .btn.dra-btn,
html body .dra-card-top span,
html body .dra-stats span,
html body .dra-tool,
html body .dra-glass .dra-in,
html body .dra-chip,
html body .dra-gauge-title,
html body .dra-spark-axis,
html body .dra-log li,
html body .dra-log time,
html body .dra-lcd > span,
html body .dra-need em,
html body .cr-tile-foot,
html body .cr-thumb.on::after,
html body .cr-thumb .cr-pick,
html body .cr-dow,
html body .cr-num,
html body .cr-post,
html body .cr-group-name,
html body .cr-step-kind,
html body .cr-step-note,
html body .cr-gap-arrow,
html body .cr-gap-arrow .chip,
html body .cr-look-seg button,
html body .cr-found { font-size: 14px; }
