/* Layout: calm app shell. Quiet sidebar on the left, a serif greeting, then the inbox of text conversations. */
:root {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #EEF1F6;
  --side: #EBEFF5;
  --fg: #18202C;
  --muted: #5D6A7C;
  --faint: #8C97A7;
  --line: #DCE2EA;
  --accent: #2C6BE6;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3ECFC;
  --accent-text: #1E4FB0;
  --good: #1F8A5B;
  --good-soft: #DDF2E7;
  --warn: #A86A0A;
  --warn-soft: #FBEFD8;
  --shadow: 0 1px 2px rgba(20,32,52,.05), 0 4px 16px rgba(20,32,52,.05);
  --glow: rgba(44,107,230,.10);
  --bubble-2: #4A86F5;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13171D; --surface: #1A1F27; --surface-2: #222833; --side: #0F1217;
    --fg: #E5EAF1; --muted: #98A4B5; --faint: #6D7889; --line: #2A313C;
    --accent: #5B8FFA; --accent-ink: #0D1526; --accent-soft: #1D2A42; --accent-text: #9DBDFF;
    --good: #4CC18A; --good-soft: #17302A; --warn: #E3A846; --warn-soft: #352A17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --glow: rgba(91,143,250,.12); --bubble-2: #3F74E0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #13171D; --surface: #1A1F27; --surface-2: #222833; --side: #0F1217;
  --fg: #E5EAF1; --muted: #98A4B5; --faint: #6D7889; --line: #2A313C;
  --accent: #5B8FFA; --accent-ink: #0D1526; --accent-soft: #1D2A42; --accent-text: #9DBDFF;
  --good: #4CC18A; --good-soft: #17302A; --warn: #E3A846; --warn-soft: #352A17;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --glow: rgba(91,143,250,.12); --bubble-2: #3F74E0;
  color-scheme: dark;
}
html, body { height: 100%; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.app { display: grid; grid-template-columns: 248px minmax(0,1fr); min-height: 100%; }

/* Sidebar */
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px;
  padding-block: 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 16px; position: sticky; top: 0; height: 100vh; box-sizing: border-box; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(145deg, var(--bubble-2), var(--accent)); display: grid; place-items: center; color: #fff; box-shadow: 0 2px 8px var(--glow); }
.brand-name { font-family: var(--font-display); font-size: 25px; font-weight: 500; letter-spacing: -.02em; }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 0 10px; margin-bottom: 4px; }
.line-card { border-radius: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.line-card .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.line-card .num { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--good); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.nav svg { width: 17px; height: 17px; flex: none; }
.nav .count { margin-left: auto; font-size: 12px; background: var(--accent-soft); color: var(--accent-text); border-radius: 99px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.side-foot-card { margin-top: auto; }
.side-foot { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.side-foot .who { min-width: 0; }
.side-foot strong { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot span { font-size: 12px; color: var(--muted); }

/* Main */
main { min-width: 0; padding-block: 40px 56px; padding-left: max(16px, 48px); padding-right: max(16px, env(safe-area-inset-right, 0px), 48px);
  background: radial-gradient(900px 360px at 20% -80px, var(--glow), transparent 70%), radial-gradient(700px 300px at 95% 0, var(--glow), transparent 70%); }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.demo-note { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; align-self: flex-start; }
.demo-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); display: block; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
h1 em { font-style: italic; color: var(--accent-text); }
.sub { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: linear-gradient(180deg, var(--bubble-2), var(--accent)); color: #fff; border-color: transparent; padding: 11px 18px; border-radius: 12px; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 18px var(--glow); }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn svg { width: 16px; height: 16px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; }
.stat .label { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; }
.stat .value { font-family: var(--font-display); font-size: 40px; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .hint { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); }
.stat .trend { font-size: 12px; font-weight: 500; color: var(--good); }
.stat svg.spark { grid-row: 2; grid-column: 2; width: 96px; height: 34px; overflow: visible; }
.spark .area { fill: var(--accent-soft); }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.spark .end { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.stat.feature { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 75%); }
.stat.feature .value { color: var(--accent-text); }

/* Inbox */
.inbox { display: grid; grid-template-columns: 300px minmax(0,1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 560px; box-shadow: var(--shadow); }
.list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.list-head { padding: 16px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 19px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.list-head span { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 12.5px; }
.convos { overflow-y: auto; flex: 1; }
.convos { padding: 6px; }
.convo { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 1px 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 11px 12px; margin-bottom: 2px; }
.convo:hover { background: var(--surface-2); }
.convo[aria-selected="true"] { background: var(--accent-soft); }
.convo .av { grid-row: span 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.av.c0 { background: var(--accent-soft); color: var(--accent-text); }
.av.c1 { background: var(--good-soft); color: var(--good); }
.av.c2 { background: var(--warn-soft); color: var(--warn); }
.av.c3 { background: var(--surface-2); color: var(--muted); }
.convo[aria-selected="true"] .av.c0 { background: var(--surface); }
.convo .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo .time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.convo .preview { grid-column: 2 / -1; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo .pill { grid-column: 2 / -1; justify-self: start; margin-top: 5px; }
.convo.fresh { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } }

.pill { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 99px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.booked { background: var(--good-soft); color: var(--good); }
.pill.talking { background: var(--accent-soft); color: var(--accent-text); }
.pill.waiting { background: var(--warn-soft); color: var(--warn); }
.pill.closed { background: var(--surface-2); color: var(--muted); }

.thread { display: flex; flex-direction: column; min-width: 0; }
.thread-head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.thread-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.thread-title strong { font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -.01em; }
.thread-title .phone { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 8px; font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.fact { background: var(--surface-2); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.fact .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.fact .v { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact .v.empty { color: var(--faint); font-weight: 400; }
.messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); max-height: 520px; }
.msg { max-width: 70%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; animation: rise .3s cubic-bezier(.2,.8,.2,1); }
.msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(20,32,52,.04); }
.msg.us { align-self: flex-end; background: linear-gradient(170deg, var(--bubble-2), var(--accent)); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 4px 14px var(--glow); }
.msg .meta { display: block; font-size: 11px; opacity: .7; margin-top: 3px; }
.event { align-self: center; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); animation: rise .25s ease-out; }
.event svg { width: 13px; height: 13px; }
.event.good { color: var(--good); background: var(--good-soft); }
.typing { align-self: flex-end; background: var(--accent-soft); padding: 10px 14px; border-radius: 16px; display: flex; gap: 4px; }
.typing.left { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%,60%,100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.composer { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 8px; align-items: center; }
.composer input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; }
.composer .ai-on { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Bookings */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }
td .muted { color: var(--muted); font-size: 12.5px; display: block; }

/* Setup */
.setup { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 20px; align-items: start; }
.form { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; }
.field .help { font-size: 12.5px; color: var(--muted); }
.field input, .field textarea, .field select { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.phone-prev { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.phone-prev h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin: 0; }
.phone-prev .screen { background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.phone-prev .msg { max-width: 88%; }

.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); }

/* Customers (CRM) */
.btn.small { padding: 6px 11px; font-size: 13px; box-shadow: none; text-decoration: none; }
.t-actions { display: flex; align-items: center; gap: 10px; }
.crm-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 280px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px 10px 36px; box-shadow: var(--shadow); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 99px; font-size: 13px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; font-weight: 500; }
.crm { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.3fr); gap: 20px; align-items: start; }
.cust-list { padding: 6px; max-height: 720px; overflow-y: auto; }
.cust { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 1px 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 11px 12px; margin-bottom: 2px; }
.cust:hover { background: var(--surface-2); }
.cust[aria-selected="true"] { background: var(--accent-soft); }
.cust .av { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.cust .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust .meta { grid-column: 2; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust .ltv { grid-row: span 2; font-variant-numeric: tabular-nums; font-weight: 500; font-size: 13px; color: var(--muted); }
.empty-note { padding: 28px 16px; text-align: center; color: var(--muted); }
.detail { padding: 26px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.detail input, .detail select, .detail textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; min-width: 0; width: 100%; box-sizing: border-box; }
.d-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.d-head .av { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 18px; flex: none; }
.d-head .who { flex: 1; min-width: 0; }
.d-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 0; letter-spacing: -.02em; overflow-wrap: anywhere; }
.d-head .co { color: var(--muted); }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.d-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d-sec h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin: 0; font-weight: 500; }
.kv { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 7px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; border: 0; }
.tag button { border: 0; background: none; padding: 0; color: inherit; font-size: 14px; line-height: 1; }
.notes { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; margin: 0; }
.jobs { display: flex; flex-direction: column; }
.job { display: grid; grid-template-columns: 64px minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job .dt { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.job .val { font-variant-numeric: tabular-nums; font-weight: 500; }
.ltv-box { display: flex; gap: 22px; flex-wrap: wrap; }
.ltv-box div span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.ltv-box div strong { font-family: var(--font-display); font-weight: 400; font-size: 26px; font-variant-numeric: tabular-nums; }
.multi { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: grid; grid-template-columns: 124px minmax(0,1fr) 38px; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; display: grid; place-items: center; color: var(--muted); padding: 0; }
.icon-btn:hover { color: var(--fg); border-color: var(--faint); }
.link-btn { background: none; border: 0; color: var(--accent-text); font-weight: 500; padding: 2px 0; align-self: flex-start; }
.addr { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; align-self: flex-start; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 18px; }
.form-actions .spacer { flex: 1; }
.btn.danger { color: var(--warn); }
.err { color: var(--warn); font-size: 13px; font-weight: 500; }
.confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 12px; width: 100%; box-sizing: border-box; }

@media (max-width: 1000px) {
  .facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .setup { grid-template-columns: 1fr; }
  .crm { grid-template-columns: 1fr; }
  .cust-list { max-height: 320px; }
}
@media (max-width: 560px) {
  .d-grid { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 96px minmax(0,1fr) 38px; }
  .addr { grid-template-columns: 1fr 1fr; }
  .addr input:first-child { grid-column: 1 / -1; }
  .detail { padding: 18px; }
  .job { grid-template-columns: 54px minmax(0,1fr) auto; }
  .job .pill { display: none; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line);
    padding-block: 10px; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav .count { display: none; }
  .side-foot, .side-foot-card, .side-label { display: none; }
  main { padding-block: 22px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .inbox { grid-template-columns: 1fr; }
  .list { border-right: 0; border-bottom: 1px solid var(--line); }
  .convos { max-height: 240px; }
  .stats { grid-template-columns: 1fr; }
  .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .msg { max-width: 86%; }
  .row2 { grid-template-columns: 1fr; }
}

/* Leads pipeline */
.toast { z-index: 60; }
.stats.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.lead-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.board-wrap { overflow-x: auto; padding: 2px 2px 10px; margin: -2px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(184px, 1fr); gap: 10px; min-width: min-content; }
.col { background: var(--side); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 6px 4px; }
.col-head strong { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.col-head .n { font-size: 11.5px; font-weight: 500; background: var(--surface); color: var(--muted); border-radius: 99px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.col-head .tot { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.col[data-stage="New"] .dot { background: var(--accent); }
.col[data-stage="Contacted"] .dot { background: var(--bubble-2); opacity: .7; }
.col[data-stage="Quoted"] .dot { background: var(--warn); }
.col[data-stage="Booked"] .dot, .col[data-stage="Won"] .dot { background: var(--good); }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 96px; border-radius: 12px; transition: background .15s; }
.col-body.over { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-empty { font-size: 12.5px; color: var(--faint); text-align: center; padding: 20px 8px; border: 1px dashed var(--line); border-radius: 12px; }
.lead { text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); cursor: grab; }
.lead:hover { border-color: var(--faint); }
.lead.dragging { opacity: .45; }
.lead.fresh { animation: flash 1.6s ease-out; }
.lead-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.src { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.src.missed { background: var(--accent-soft); color: var(--accent-text); }
.age { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.lead strong { font-size: 14px; overflow-wrap: anywhere; }
.lead .ljob { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; flex: none; }
.lead-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.lead .val { font-weight: 600; font-variant-numeric: tabular-nums; }
.due { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.due.over { background: var(--warn-soft); color: var(--warn); }
.due.today { background: var(--accent-soft); color: var(--accent-text); }
.due.later { background: var(--surface-2); color: var(--muted); }
.due.lostr { background: var(--surface-2); color: var(--muted); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10,16,28,.38); z-index: 40; animation: fade .2s ease-out; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--surface); z-index: 41; box-shadow: -12px 0 40px rgba(10,16,28,.2); display: flex; flex-direction: column;
  animation: slide .28s cubic-bezier(.2,.8,.2,1); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); box-sizing: border-box; }
.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 27px; line-height: 1.1; margin: 0; letter-spacing: -.02em; overflow-wrap: anywhere; }
.drawer-head .sub { font-size: 13px; margin-top: 4px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 22px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.drawer-foot .spacer { flex: 1; }
.drawer input, .drawer select, .drawer textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; min-width: 0; width: 100%; box-sizing: border-box; }
.drawer textarea { resize: vertical; line-height: 1.5; }
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px; }
.stepper button { border: 0; background: var(--surface-2); color: var(--muted); padding: 8px 2px; font-size: 12px; font-weight: 500; border-radius: 8px; }
.stepper button.done { background: var(--accent-soft); color: var(--accent-text); }
.stepper button.cur { background: var(--accent); color: #fff; }
.stepper-note { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.lost-box { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.converted { font-size: 13px; color: var(--good); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
@keyframes slide { from { transform: translateX(28px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 1000px) { .stats.four { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px) { .stats.four { grid-template-columns: 1fr 1fr; gap: 10px; } .stats.four .stat { display: block; padding: 14px 16px; } .stats.four .stat .value { font-size: 30px; } .board { grid-auto-columns: minmax(250px, 80vw); } }


/* Calls */
.call-panel { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); overflow: hidden; }
.call-main { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.call-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.call-head .who-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.call-head strong { font-family: var(--font-display); font-weight: 500; font-size: 23px; letter-spacing: -.015em; line-height: 1.15; }
.call-head .who-b span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.caller-av { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 600; position: relative; flex: none; }
.caller-av.ringing::after, .caller-av.ringing::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); animation: ringout 1.4s ease-out infinite; }
.caller-av.ringing::before { animation-delay: .7s; }
@keyframes ringout { from { transform: scale(.95); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.transcript { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; height: 430px; overflow-y: auto; background: var(--bg); box-sizing: border-box; }
.transcript.static .tl, .transcript.static .event { animation: none; }
.tl { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; animation: rise .3s ease-out; }
.tl .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.tl.ai .ic { background: linear-gradient(145deg, var(--bubble-2), var(--accent)); color: #fff; }
.tl.caller .ic { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tl .spk { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.tl.ai .spk { color: var(--accent-text); }
.tl p { margin: 2px 0 0; font-size: 14.5px; line-height: 1.55; min-height: 1.55em; }
.wave { display: inline-flex; gap: 2px; align-items: center; height: 12px; }
.wave i { width: 2px; height: 4px; background: currentColor; border-radius: 2px; animation: wv .8s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .12s; } .wave i:nth-child(3) { animation-delay: .24s; } .wave i:nth-child(4) { animation-delay: .36s; }
@keyframes wv { 50% { height: 12px; } }
.call-actions { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.call-actions a.btn { text-decoration: none; color: var(--fg); }
.profile { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.profile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.profile-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.profile-head > span { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px var(--accent-soft); } }
.pf-bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.pf-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--bubble-2), var(--accent)); transition: width .5s ease; }
.pf-list { display: flex; flex-direction: column; margin: 0; }
.pf { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.pf:last-child { border-bottom: 0; }
.pf dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.pf dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.pf dd.wait { color: var(--faint); font-weight: 400; font-style: italic; }
.pf.new { animation: pfflash 1.8s ease-out; }
@keyframes pfflash { from { background: var(--accent-soft); } }
.ai-sum { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; animation: rise .3s ease-out; }
.ai-sum strong { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.calls-card .card-title { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; padding: 16px 18px 8px; }
.calls-card .card-title h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin: 0; }
.calls-card .card-title span { color: var(--muted); font-size: 12.5px; }
.call-list { padding: 0 6px 6px; }
.crow { display: grid; grid-template-columns: 76px minmax(0,1fr) 110px 110px; gap: 14px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 12px; border-radius: 12px; }
.crow:hover { background: var(--surface-2); }
.crow[aria-selected="true"] { background: var(--accent-soft); }
.crow .t, .crow .d { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.crow .mid { min-width: 0; display: flex; flex-direction: column; }
.crow .nm { font-weight: 600; }
.crow .sm { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .pill { justify-self: end; }
@media (max-width: 960px) {
  .call-panel { grid-template-columns: 1fr; }
  .call-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .transcript { height: 360px; }
}
@media (max-width: 600px) {
  .crow { grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; }
  .crow .t { grid-row: 2; grid-column: 1; }
  .crow .d { display: none; }
  .crow .mid { grid-column: 1; grid-row: 1; }
  .crow .pill { grid-column: 2; grid-row: 1 / span 2; }
  .call-head, .transcript, .profile, .call-actions { padding-left: 16px; padding-right: 16px; }
  .pf { grid-template-columns: 96px minmax(0,1fr); }
}


.pf-group { display: flex; flex-direction: column; }
.pf-group + .pf-group { margin-top: 12px; }
.pf-group h5 { margin: 0 0 2px; padding: 0 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.transcript .msg { max-width: 78%; }
.transcript .event { animation: rise .3s ease-out; }
.crow .d { font-size: 12px; }


/* Connect existing number */
.connect { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.connect h2 { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin: 0; letter-spacing: -.02em; }
.connect .lead-in { color: var(--muted); margin: 4px 0 0; max-width: 62ch; }
.connect-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 16px; align-items: end; }
.connect .field input { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; font-variant-numeric: tabular-nums; }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.method { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.method:hover { border-color: var(--faint); }
.method[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.method .mt { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.method strong { font-size: 15px; }
.method .rec { font-size: 11px; font-weight: 600; color: var(--good); background: var(--good-soft); padding: 2px 8px; border-radius: 99px; }
.method p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.method .facts-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.method .facts-row span { font-size: 11.5px; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 99px; }
.steps { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.steps h3 { margin: 0; font-size: 15px; }
.steps ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.steps li { padding-left: 4px; line-height: 1.5; }
.code-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 17px; letter-spacing: .04em; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; user-select: all; overflow-wrap: anywhere; }
.steps .note { font-size: 12.5px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; background: var(--good-soft); color: var(--good); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; font-weight: 500; }
@media (max-width: 900px) { .methods { grid-template-columns: 1fr; } .connect-top { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; } }

/* Real app additions */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: radial-gradient(900px 360px at 20% -80px, var(--glow), transparent 70%), var(--bg); box-sizing: border-box; }
.auth-card { width: min(400px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; }
.auth-card .brand { padding: 0; }
.auth-card h1 { font-size: 30px; }
.auth-card input { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
.conv-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 16px; align-items: start; }
.conv-list-card { max-height: 760px; overflow-y: auto; padding: 6px; }
.empty-state { padding: 40px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty-state h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--fg); margin: 0; }
.msg img { display: block; max-width: 220px; border-radius: 10px; margin-top: 6px; }
.composer-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.composer-row #reply-input { flex: 1; min-width: 160px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.err-banner { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-weight: 500; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: start; }
.settings-grid .card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.settings-grid h2 { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 0; }
.field input, .field textarea, .field select { box-sizing: border-box; width: 100%; }
.admin-table td, .admin-table th { padding: 10px 14px; }
@media (max-width: 1000px) { .conv-layout, .settings-grid { grid-template-columns: minmax(0, 1fr); } .conv-list-card { max-height: 320px; } }

/* Signup */
.start-wrap { place-items: start center; }
.start { width: min(620px, 100%); display: flex; flex-direction: column; gap: 18px; }
.start .brand { padding: 0; text-decoration: none; color: var(--fg); }
.start .card { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.start h1 { font-size: 32px; }
.start .sub { margin: -8px 0 0; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: p; }
.progress li { counter-increment: p; font-size: 12.5px; color: var(--faint); font-weight: 500; padding-top: 8px; border-top: 3px solid var(--line); }
.progress li::before { content: counter(p) ". "; }
.progress li.done { color: var(--muted); border-color: var(--accent-soft); }
.progress li[aria-current] { color: var(--accent-text); border-color: var(--accent); }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-opt { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.plan-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.po-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.po-tag { font-size: 11.5px; color: var(--accent-text); background: var(--accent-soft); border-radius: 99px; padding: 1px 8px; }
.po-tag:empty { display: none; }
.po-price { color: var(--muted); font-size: 14px; }
.po-price b { font-family: var(--font-display); font-weight: 400; font-size: 36px; color: var(--fg); letter-spacing: -.02em; }
.po-note { font-size: 13px; color: var(--muted); }
.guarantee-sm { background: var(--good-soft); color: var(--good); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; font-weight: 500; }
.btn.big { justify-content: center; padding: 13px 20px; font-size: 15px; }
.step-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.agreement-box { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; background: var(--bg); font-size: 13.5px; line-height: 1.6; }
.agreement-box h3, .agreement-page h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin: 16px 0 6px; }
.agreement-box p, .agreement-page p { margin: 0 0 10px; color: var(--muted); }
.agreement-box strong, .agreement-page strong { color: var(--fg); }
.agreement-page { max-width: 720px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.signature { font-family: var(--font-display); font-size: 22px !important; font-style: italic; }
.summary { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.sum-row:last-of-type { border-top: 1px solid var(--line); padding-top: 8px; font-size: 17px; }
.summary .help { margin: 0; color: var(--muted); font-size: 13px; }
.wallets { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.wallets span { font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; color: var(--muted); }
.billing-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .plan-pick { grid-template-columns: 1fr; } .progress li { font-size: 11px; } }

[hidden] { display: none !important; }

/* Logo */
.logo-icon { width: 44px; height: 44px; border-radius: 11px; display: block; box-shadow: 0 4px 14px var(--glow); }
.contact-hint { background: var(--accent-soft); color: var(--accent-text); border-radius: 12px; padding: 10px 14px; font-weight: 500; }
#carrier { flex-wrap: wrap; }

/* Google */
.appt { background: var(--good-soft); color: var(--good); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.appt .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.appt strong { color: var(--fg); }
.appt a { color: var(--accent-text); font-weight: 500; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row a.btn, .g-head + * a.btn { text-decoration: none; color: var(--fg); }
#google-card { gap: 14px; }
#google-card a.btn.primary { color: #fff; text-decoration: none; align-self: flex-start; }
.g-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.g-list { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.g-list strong { color: var(--fg); }
.times { display: flex; flex-wrap: wrap; gap: 6px; }
.times span { font-size: 12.5px; background: var(--accent-soft); color: var(--accent-text); border-radius: 99px; padding: 3px 10px; font-weight: 500; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; font-size: 13px; cursor: pointer; }
.days input { accent-color: var(--accent); }
.google-btn { display: flex; justify-content: center; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* Lead details: wrap at word boundaries in the narrow column */
.pf { grid-template-columns: 84px minmax(0,1fr); }
.pf dd { overflow-wrap: break-word; word-break: normal; }

/* Signup walkthrough */
.progress { grid-template-columns: repeat(5, 1fr); }
.tour { gap: 18px; }
.tour-slide { display: flex; flex-direction: column; gap: 12px; }
.tour-k { font-size: 12px; font-weight: 600; color: var(--accent-text); text-transform: uppercase; letter-spacing: .08em; }
.tour-art { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.phone-art .b { max-width: 82%; padding: 8px 12px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; }
.phone-art .us { align-self: flex-end; background: linear-gradient(170deg, var(--bubble-2), var(--accent)); color: #fff; border-bottom-right-radius: 5px; }
.phone-art .them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.ev-mini { align-self: center; font-size: 11.5px; padding: 2px 10px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.la-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.la-head strong { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.lead-art dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.lead-art dt { color: var(--muted); }
.lead-art dd { margin: 0; font-weight: 500; }
.ca-row { display: grid; grid-template-columns: 96px minmax(0,1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; padding: 6px 0; border-top: 1px solid var(--line); }
.ca-row:first-child { border-top: 0; }
.ca-row span:nth-child(2) { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-nav { display: flex; align-items: center; gap: 8px; }
.tour-nav .spacer { flex: 1; }
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); width: 22px; border-radius: 99px; }
@media (max-width: 560px) { .progress li { font-size: 10px; } .ca-row { grid-template-columns: 80px minmax(0,1fr); } .ca-row .pill { display: none; } }

/* Paused account */
.paywall { position: fixed; inset: 0; z-index: 70; background: rgba(10,16,28,.55); display: grid; place-items: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.paywall .card { width: min(440px, 100%); padding: 26px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.paywall h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin: 0; }

/* Stripe's checkout form inside the Pay step */
.embedded-checkout { min-height: 420px; border-radius: 14px; overflow: hidden; }

/* Support */
.support-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.support-card a.btn.primary { color: #fff; text-decoration: none; align-self: flex-start; }
.support-email { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 17px; }
.support-email strong { user-select: all; }
.help-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.help-item summary { cursor: pointer; font-weight: 600; }
.help-item p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.auth-help { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- Estimates ---------- */
.es-defaults { margin-top: 8px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.es-def-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.es-def-head h2, .es-block h2 { margin: 0; font-size: 16px; font-weight: 600; }
.es-def-head .help { font-size: 13px; color: var(--muted); }
.es-def-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.es-list { display: flex; flex-direction: column; gap: 10px; }
.es-item { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 14px 18px; text-align: left; width: 100%; font: inherit; color: inherit; cursor: pointer; }
.es-item:hover { border-color: var(--faint); }
.es-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.es-item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-item-main .sub { font-size: 13px; margin: 0; }
.es-item-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; }
.es-title { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 30px; border: 0; border-bottom: 1px dashed transparent; background: none; color: var(--fg); padding: 2px 0; width: min(560px, 100%); }
.es-title:hover, .es-title:focus { border-bottom-color: var(--line); outline: none; }
.es-saved { font-size: 13px; color: var(--muted); }
#es-status { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 10px; padding: 8px 10px; font: inherit; }
.es-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.es-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.es-block { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.es-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.es-cols { display: grid; gap: 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px; }
.es-cols-labor { grid-template-columns: minmax(0, 1fr) 64px 72px 88px 88px 28px; }
.es-cols-mat { grid-template-columns: minmax(0, 1fr) 64px 72px 96px 88px 28px; }
.es-cols-other { grid-template-columns: minmax(0, 1fr) 110px auto 28px; }
.es-line { display: grid; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.es-line:first-child { border-top: 0; }
.es-line input:not([type=checkbox]) { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 14px; min-width: 0; }
.es-line input[type=number] { font-variant-numeric: tabular-nums; }
.es-item-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.es-line input.es-spec { font-size: 12.5px; color: var(--muted); padding: 5px 9px; }
.es-money { position: relative; display: block; }
.es-money::before { content: "$"; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.es-money input:not([type=checkbox]) { padding-left: 18px; }
.es-guess { position: absolute; right: 4px; top: -8px; font-style: normal; font-size: 10.5px; background: var(--accent-soft, #E7EEFC); color: var(--accent); border-radius: 6px; padding: 0 5px; }
.es-lt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.es-rm { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px; border-radius: 6px; }
.es-rm:hover { color: var(--warn); background: var(--bg); }
.es-check-prices { grid-column: 1 / -1; font-size: 13px; }
.es-check-prices summary { cursor: pointer; color: var(--accent); width: fit-content; }
.es-links { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 8px 8px 0 0; }
.es-links a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; text-decoration: none; color: var(--fg); background: var(--bg); }
.es-links a:hover { border-color: var(--accent); color: var(--accent); }
.es-line input.es-store { margin-top: 8px; max-width: 320px; font-size: 13px; }
.es-check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.es-side { position: sticky; top: 16px; }
.es-knobs { display: flex; flex-direction: column; gap: 10px; }
.es-sum { margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.es-sum div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.es-sum dt, .es-sum dd { margin: 0; }
.es-sum dd { font-variant-numeric: tabular-nums; }
.es-sum .minor { font-size: 12.5px; color: var(--muted); padding-left: 10px; }
.es-sum .minor .sub { margin: 0; font-size: inherit; }
.es-sum .grand { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 18px; font-weight: 600; }
.es-sum .grand dt { font-family: var(--font-display); font-weight: 500; }
.es-profit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.es-profit div { display: flex; flex-direction: column; gap: 2px; }
.es-profit span { font-size: 11.5px; color: var(--muted); }
.es-profit strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.es-profit strong.neg { color: var(--warn); }
.es-warn { margin: 0; font-size: 13px; color: var(--warn); }
.es-actions { display: flex; flex-direction: column; gap: 8px; }
.es-actions .btn { justify-content: center; }
@media (max-width: 1100px) { .es-layout { grid-template-columns: 1fr; } .es-side { position: static; } }
@media (max-width: 720px) {
  .es-def-grid { grid-template-columns: 1fr 1fr; }
  .es-cols { display: none; }
  .es-cols-labor.es-line, .es-cols-mat.es-line { grid-template-columns: 1fr 1fr 1fr 28px; }
  .es-cols-labor.es-line > :first-child, .es-cols-mat.es-line > :first-child { grid-column: 1 / -1; }
  .es-cols-labor.es-line .es-lt, .es-cols-mat.es-line .es-lt { grid-column: 1 / 4; text-align: left; font-size: 13px; color: var(--muted); }
  .es-cols-other.es-line { grid-template-columns: 1fr auto 28px; }
  .es-cols-other.es-line > :first-child { grid-column: 1 / -1; }
  .es-title { font-size: 24px; }
  .es-item { grid-template-columns: 1fr auto; }
  .es-item .pill { display: none; }
}

/* ---------- Business card ---------- */
.bc-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.bc-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bc-qr-card, .bc-form, .bc-how { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.bc-form h2, .bc-how h2 { margin: 0; font-size: 16px; font-weight: 600; }
.bc-qr { background: #fff; border-radius: 16px; padding: 14px; border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center; }
.bc-qr img { width: 100%; height: 100%; display: block; }
.bc-link { display: flex; gap: 8px; align-items: center; justify-content: space-between; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 12px; font-size: 13.5px; }
.bc-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bc-btns { display: flex; flex-direction: column; gap: 8px; }
.bc-btns .btn { justify-content: center; text-decoration: none; color: var(--fg); }
.btn.wallet { font-weight: 600; padding: 11px 16px; }
.btn.wallet svg { width: 18px; height: 18px; }
.btn.wallet.apple { background: #000; color: #fff; border-color: #000; }
.btn.wallet.google { background: #fff; color: #1f1f1f; border-color: #747775; }
.bc-wallet-note { margin: 0; font-size: 13px; color: var(--muted); }
.bc-slug { display: flex; align-items: center; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; overflow: hidden; }
.bc-slug span { padding: 9px 0 9px 12px; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.field .bc-slug input { border: 0; background: none; padding-left: 0; min-width: 0; }
.bc-how ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 14px; }
.bc-how strong { color: var(--fg); font-weight: 600; }
@media (max-width: 900px) { .bc-layout { grid-template-columns: 1fr; } .bc-qr-card { max-width: 420px; } }
.bc-link .btn { white-space: nowrap; flex: none; }

.pro-up { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 14px; padding: 12px 14px; }
.pro-up > div { display: flex; flex-direction: column; gap: 2px; max-width: 460px; }
.bc-locked { padding: 28px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 640px; }
.bc-locked h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.bc-locked p { margin: 0; color: var(--muted); }

/* Live prices */
.pro-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }
.es-check-prices .pro-btn { margin-top: 8px; }
.es-live { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.es-live:empty { display: none; }
.lp-best { border: 1px solid var(--good); background: var(--good-soft); border-radius: 12px; padding: 8px 10px; }
.lp-best .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--good); }
.lp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; }
.lp-row + .lp-row { border-top: 1px solid var(--line); }
.lp-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13.5px; }
.lp-title { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-title a { color: inherit; }
.lp-why { font-size: 12px; color: var(--warn); }
.lp-why.ok { color: var(--good); }
.lp-no { opacity: .7; }
.lp-more summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.es-live-note { margin: 0; }

/* Invoices */
.iv-pay-card { padding: 16px 18px; margin: 8px 0 14px; }
.iv-pc { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.iv-pc > div, .iv-pc.ok { display: flex; flex-direction: column; gap: 3px; max-width: 620px; }
.iv-pc.ok strong { color: var(--good); }
.iv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.iv-stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.iv-stat .k { font-size: 12.5px; color: var(--muted); }
.iv-stat strong { font-family: var(--font-display); font-weight: 400; font-size: 26px; font-variant-numeric: tabular-nums; }
.iv-num { font-size: 13px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.iv-cols { grid-template-columns: minmax(0, 1fr) 70px 100px 64px 88px 28px; }
.iv-mark, .iv-confirm { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.iv-confirm { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
#iv-view { justify-content: center; text-decoration: none; color: var(--fg); }
@media (max-width: 720px) {
  .iv-stats { grid-template-columns: 1fr; }
  .iv-cols.es-line { grid-template-columns: 1fr 1fr auto 28px; }
  .iv-cols.es-line > :first-child { grid-column: 1 / -1; }
  .iv-cols.es-line .es-lt { grid-column: 1 / 4; text-align: left; font-size: 13px; color: var(--muted); }
}
.iv-pc.ok { align-items: flex-start; }

/* Company dashboard */
.og-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.og-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.og-table th, .og-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.og-table th { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.og-sub { display: block; color: var(--muted); font-size: 12.5px; }
.og-actions { white-space: nowrap; text-align: right !important; }
.og-actions .btn + .btn { margin-left: 6px; }
.og-invite { display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 12px 14px; }
.side-foot-card .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 820px) { .og-row { grid-template-columns: minmax(0, 1fr); } .settings-grid { grid-template-columns: minmax(0, 1fr); } }
#c-secret { overflow-wrap: anywhere; min-width: 0; font-variant-numeric: tabular-nums; }
.settings-grid .card, .settings-grid form { min-width: 0; }
.seats-pick { margin-top: 4px; max-width: 360px; }
.og-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.og-foot .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.og-foot .btn { margin-top: 6px; }
@media (max-width: 820px) { .og-foot { display: none; } }

/* ---------- Estimate editor, reworked layout ---------- */
.es-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.es-head .es-title { display: block; width: 100%; max-width: 100%; box-sizing: border-box; resize: none; overflow: hidden; line-height: 1.2; font-family: var(--font-display); font-size: 32px; border: 0; border-bottom: 1px dashed transparent; background: none; color: var(--fg); padding: 2px 0; margin: 4px 0 0; }
.es-head .es-title:hover, .es-head .es-title:focus { border-bottom-color: var(--line); outline: none; }
.es-head-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.es-status-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.es-stores { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.es-stores-label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.es-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.es-chips .chip { font-size: 13px; }
/* Material rows: one grid, so every box lines up. */
.es-mat-cols, .es-mat { grid-template-columns: minmax(0, 1fr) 72px 84px 112px 92px 32px; column-gap: 8px; }
.es-mat-cols { display: grid; }
.es-mat { display: grid; grid-template-areas: "name qty unit cost total rm" "spec spec spec spec spec ." "tools tools tools tools tools tools"; row-gap: 6px; align-items: center; padding: 12px 0; }
.es-mat .m-name { grid-area: name; } .es-mat .m-qty { grid-area: qty; } .es-mat .m-unit { grid-area: unit; }
.es-mat .m-cost { grid-area: cost; position: relative; } .es-mat .m-total { grid-area: total; text-align: right; } .es-mat .m-rm { grid-area: rm; text-align: right; }
.es-mat .m-spec { grid-area: spec; } .es-mat .m-tools { grid-area: tools; }
.es-mat .m-lab { display: none; }
.es-mat .es-guess { position: static; display: inline-block; margin-top: 3px; }
.es-mat input.es-spec { font-size: 13px; color: var(--muted); }
.es-mat .m-tools summary { font-size: 13px; }
.m-from { color: var(--muted); }
.m-tools-body { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.m-tools-body .pro-btn { align-self: flex-start; }
.m-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.m-links .es-links { margin: 0; }
.m-tools-body .field { max-width: 320px; gap: 4px; }
.m-tools-body input.es-store { margin-top: 0; max-width: none; }
.lp-row { flex-wrap: wrap; }
.lp-main { flex: 1 1 220px; }
.lp-title { white-space: normal; }
/* Profit summary: one row each, so the numbers never squeeze together. */
.es-profit { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.es-profit div { flex-direction: row; justify-content: space-between; align-items: baseline; }
.es-profit span { font-size: 13px; }
.es-profit strong { font-size: 16px; }
@media (max-width: 1100px) { .es-mat-cols { display: none; } .es-mat .m-lab { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; } }
@media (max-width: 1100px) and (min-width: 721px) {
  .es-mat { grid-template-columns: minmax(0, 1fr) 80px 90px 120px 96px 32px; align-items: end; }
}
@media (max-width: 720px) {
  .es-head .es-title { font-size: 24px; }
  .es-mat { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "name name rm" "spec spec spec" "qty unit cost" "total total total" "tools tools tools"; align-items: end; }
  .es-mat .m-rm { align-self: center; }
  .es-mat .m-total { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .es-mat .m-total .m-lab { display: inline; margin: 0; }
}
/* AI-guess tag sits inside the price box, so the row stays level. */
.es-mat .m-total .es-guess { position: static; display: block; width: fit-content; margin: 3px 0 0 auto; font-size: 10.5px; color: var(--warn); background: var(--warn-soft); }
.es-mat:has(.es-guess) .m-cost input { border-color: var(--warn); }
@media (max-width: 720px) { .es-mat .m-total .es-guess { display: inline-block; margin: 0 0 0 6px; } }
.es-sec-head { flex-wrap: wrap; }
@media (max-width: 720px) {
  .es-mat { grid-template-areas: "name name name" "spec spec spec" "qty unit cost" "total total rm" "tools tools tools"; }
}

/* Tidy-up: two-line boxes for longer text; stack email and website when narrow */
textarea.tidy-area { resize: vertical; min-height: 0; line-height: 1.45; }
.field textarea.tidy-area { min-height: 0; }
@media (max-width: 1300px) { .bc-row { grid-template-columns: 1fr; } }

/* Call history on leads */
.lcalls { display: block; font-size: 12px; color: var(--accent-text); margin-top: 2px; }
.calls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.calls li { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.calls li:first-child { border-top: 0; }
.c-when { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 120px; }
.c-what { flex: 1 1 160px; }
.c-crm { font-size: 12px; color: var(--good); }

/* Numbers Rung won't text */
.scr-card { display: flex; flex-direction: column; gap: 12px; }
.scr-card h2 { margin: 0; }
.scr-h { font-size: 13px; font-weight: 600; margin: 4px 0 0; }
.scr-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(150px, 1.3fr) auto; gap: 8px; align-items: end; }
.scr-add .field { min-width: 0; }
.scr-add select { width: 100%; }
@media (max-width: 720px) { .scr-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .scr-add .field:nth-of-type(3) { grid-column: 1 / -1; } .scr-add .btn { grid-column: 1 / -1; justify-self: start; } }
.scr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.scr-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.scr-list li:first-child { border-top: 0; }
.scr-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.scr-who .help { overflow-wrap: anywhere; }
.scr-list .btn, .scr-list .link-btn { flex: none; align-self: center; }

/* Add a lead by voice */
.head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.head-btns .btn svg { width: 18px; height: 18px; }
.vl { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; margin-bottom: 4px; }
@media (max-width: 520px) { .vl { padding: 16px; } }
.vl-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.vl-top h2 { margin: 0 0 4px; }
.vl-top > div { min-width: 0; }
.vl-say { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.vl-field { flex: 1 1 260px; min-width: 0; }
.vl-mic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 112px; min-height: 96px; border-radius: 18px; border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent-text); font-weight: 500; font-size: 13px; cursor: pointer; padding: 10px; text-align: center; }
.vl-mic svg { width: 30px; height: 30px; }
.vl-mic[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: transparent; }
@media (prefers-reduced-motion: no-preference) { .vl-mic[aria-pressed="true"] svg { animation: vl-pulse 1.2s ease-in-out infinite; } }
@keyframes vl-pulse { 50% { transform: scale(1.12); } }
.vl-job { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.vl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vl-pick { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.vl-pick:hover { border-color: var(--accent); }
.vl-pick strong { grid-column: 1; overflow-wrap: anywhere; }
.vl-pick .help { grid-column: 1; overflow-wrap: anywhere; }
.vl-src { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; color: var(--accent-text); white-space: nowrap; }
@media (max-width: 520px) { .vl-src { grid-column: 1; grid-row: auto; } .vl-mic { width: 100%; min-height: 64px; flex-direction: row; } }
.vl-top .icon-btn { flex: none; }

/* Put Rung on your home screen */
.a2hs { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 4px; }
.a2hs-icon { border-radius: 12px; flex: none; }
.a2hs-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.a2hs-body h2 { margin: 0; font-size: 18px; }
.a2hs-body .help { margin: 0; line-height: 1.5; }
.a2hs-ico { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent-text); }

/* Rung Sales Pro: how the CRM knows each rep */
.og-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.og-table .link-btn { display: block; font-size: 13px; margin-top: 2px; }
.og-edit td { background: var(--surface-2); }
.og-crm { display: flex; flex-direction: column; gap: 10px; white-space: normal; }
.og-crm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.og-crm-grid .field { min-width: 0; }
.og-route { display: flex; flex-direction: column; gap: 6px; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.og-route strong { color: var(--accent-text); }
.og-table.og-mini { min-width: 0; width: 100%; }
.row2 .field.full { grid-column: 1 / -1; }
@media (min-width: 1001px) and (max-width: 1280px) { .settings-grid .row2 { grid-template-columns: minmax(0, 1fr); } }
/* Conversations used this month */
.usage { display: flex; flex-direction: column; gap: 6px; }
.usage-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.usage-top strong { font-variant-numeric: tabular-nums; }
.usage-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.usage-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.usage-bar i.over { background: var(--warn); }
