/* Orbitrix 1.4 Lead Capture & Follow-up demo
   Design tokens match the 1.1 Booking & Scheduling demo so the demos feel like one product family. */
:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eff2f5;
  --ink: #0f1a24;
  --ink-2: #34424f;
  --muted: #6a7784;
  --line: #e2e7ec;
  --line-2: #edf0f3;
  --brand: #0e7490;
  --brand-2: #14a5b8;
  --brand-soft: #e3f4f7;
  --brand-ink: #0b5568;
  --obx: #4338ca;
  --obx-2: #6366f1;
  --obx-soft: #eef0ff;
  --obx-dark: #0b0d1f;
  --hot: #e2581b;
  --hot-soft: #fff0e6;
  --ok: #138a55;
  --ok-soft: #e4f6ec;
  --warn: #b87a12;
  --warn-soft: #fbf3e1;
  --amber: #f5a524;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(15, 26, 36, .06), 0 1px 1px rgba(15, 26, 36, .03);
  --sh-2: 0 10px 30px -12px rgba(15, 26, 36, .22), 0 2px 6px rgba(15, 26, 36, .05);
  --sh-3: 0 30px 70px -24px rgba(15, 26, 36, .45), 0 6px 18px rgba(15, 26, 36, .08);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; height: 100%; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
.ico { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--obx-2) 50%, transparent); outline-offset: 2px; border-radius: 8px; }

/* ------------------------------------------------ buttons, chips, pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 650; font-size: 14px;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, filter .2s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(14, 116, 144, .65), inset 0 1px 0 rgba(255,255,255,.15); }
.btn-primary:hover { background: #0b6580; }
.btn-obx { background: linear-gradient(135deg, var(--obx-2), var(--obx)); color: #fff; box-shadow: 0 10px 24px -10px rgba(67, 56, 202, .7); }
.btn-obx:hover { filter: brightness(1.07); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { background: #d3edf2; }
.btn-ok { background: var(--ok); color: #fff; box-shadow: 0 8px 20px -8px rgba(19, 138, 85, .6); }
.btn-ok:hover { filter: brightness(1.06); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-xs { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-xs .ico { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 12.5px; color: var(--ink-2);
  transition: background .2s, color .2s, box-shadow .2s, transform .15s; white-space: nowrap; flex: none;
}
.chip:hover { box-shadow: inset 0 0 0 1px #c9d2da; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip .n { font-size: 11px; background: var(--hot); color: #fff; border-radius: 999px; padding: 0 6px; line-height: 17px; }
.chip.ghosty { color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.active { background: var(--brand-soft); color: var(--brand-ink); }
.pill.hot { background: var(--hot-soft); color: var(--hot); }
.pill.hot::before { animation: pulse 1.4s infinite; }
.pill.paid { background: var(--ok-soft); color: var(--ok); }
.pill.talking { background: var(--obx-soft); color: var(--obx); }
.pill.done, .pill.stopped { background: var(--surface-3); color: var(--muted); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 88, 27, .5); } 50% { box-shadow: 0 0 0 4px rgba(226, 88, 27, 0); } }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c, var(--brand)) 15%, white); color: color-mix(in srgb, var(--c, var(--brand)) 82%, black);
  font-weight: 750; font-size: 13px; letter-spacing: .02em; position: relative;
}
.avatar.lg { width: 50px; height: 50px; font-size: 16px; }
.avatar .src-dot { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 2px #fff; color: var(--muted); }
.avatar .src-dot .ico { width: 12px; height: 12px; }

/* ------------------------------------------------ Orbitrix bar */
.obx-bar {
  flex: none; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px max(16px, env(safe-area-inset-left)); padding-top: max(9px, env(safe-area-inset-top));
  background: #0b0d1f; color: #e7e9ff; border-bottom: 1px solid rgba(255,255,255,.06);
}
.obx-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.obx-mark { width: 30px; height: 30px; flex: none; }
.obx-brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.obx-brand b { font-size: 15px; letter-spacing: -.01em; color: #fff; }
.obx-brand small { font-size: 11.5px; color: #a3a8d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obx-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.obx-btn, .obx-cta {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 10px;
  font-size: 13px; font-weight: 650; transition: background .2s, transform .15s, filter .2s;
}
.obx-btn { color: #d9dcff; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.obx-btn:hover { background: rgba(255,255,255,.13); }
.obx-btn.spin .ico { animation: spin .6s var(--ease); }
.obx-cta { color: #fff; background: linear-gradient(135deg, #7c7ff5, var(--obx)); box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .8); }
.obx-cta:hover { filter: brightness(1.08); }
.obx-btn:active, .obx-cta:active { transform: scale(.96); }
.obx-cta .short { display: none; }
.obx-btn .ico, .obx-cta .ico { width: 16px; height: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ toolbar */
.toolbar {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--line); z-index: 30;
}
.tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 12px; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 650; font-size: 13.5px; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; }
.tabs button .ico { width: 16px; height: 16px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lbl-short { display: none; }

.clock-wrap { position: relative; }
.clock {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px;
  background: var(--obx-dark); color: #fff; transition: box-shadow .3s, transform .15s; min-width: 168px;
}
.clock:active { transform: scale(.98); }
.clock-ico { font-size: 17px; line-height: 1; }
.clock-txt { display: flex; flex-direction: column; line-height: 1.1; text-align: left; flex: 1; }
.clock-txt small { font-size: 10.5px; color: #a3a8d6; font-weight: 600; }
.clock-txt b { font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.clock-chev { color: #a3a8d6; }
.clock-chev .ico, .clock .clock-chev { width: 15px; height: 15px; }
.clock.ff { box-shadow: 0 0 0 3px var(--amber), 0 0 24px rgba(245, 165, 36, .55); }
.clock.ff .clock-txt b { color: #fde68a; }
.clock-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--surface); border-radius: 14px; box-shadow: var(--sh-3);
  padding: 8px; z-index: 60; opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.clock-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.clock-menu p { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px 4px; }
.clock-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; font-weight: 600; font-size: 13.5px; }
.clock-menu button:hover { background: var(--surface-3); }
.clock-menu button .ico { color: var(--obx); width: 17px; height: 17px; }
.clock-menu small { display: block; padding: 6px 8px 2px; font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------ views & panels */
main { flex: 1; min-height: 0; position: relative; }
.view { display: none; height: 100%; }
body[data-tab=capture] #view-live, body[data-tab=inbox] #view-live, body[data-tab=lead] #view-live { display: grid; }
body[data-tab=seq] #view-seq, body[data-tab=results] #view-results { display: block; overflow: auto; }
#view-live { gap: 14px; padding: 14px; grid-template-columns: 360px minmax(320px, .9fr) minmax(400px, 1.15fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.enter { animation: enter .38s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.p-head { padding: 13px 16px 11px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.p-head h2 { font-size: 15px; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.p-head h2 .step { width: 22px; height: 22px; border-radius: 7px; background: var(--obx-soft); color: var(--obx); font-size: 12px; display: grid; place-items: center; flex: none; }
.p-head .back { display: none; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { height: 30px; padding: 0 11px; border-radius: 8px; font-weight: 650; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, box-shadow .2s; }
.seg button .ico { width: 15px; height: 15px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico { width: 34px; height: 34px; color: #b8c2cc; }

/* ------------------------------------------------ capture panel */
.via { display: flex; gap: 6px; align-items: center; padding: 10px 16px 0; overflow-x: auto; scrollbar-width: none; font-size: 12px; color: var(--muted); }
.via::-webkit-scrollbar { display: none; }
.via > span { white-space: nowrap; font-weight: 600; }
.device-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 12px 16px 16px; }
.device {
  width: 316px; height: 100%; max-height: 680px; border: 9px solid #10131f; border-radius: 36px; background: #fff; overflow: hidden;
  display: flex; flex-direction: column; position: relative; box-shadow: 0 18px 40px -18px rgba(16, 19, 31, .5); transition: box-shadow .3s;
}
.device::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 86px; height: 20px; background: #10131f; border-radius: 12px; z-index: 3; }
.d-scroll { flex: 1; overflow: auto; min-height: 0; scroll-behavior: smooth; }
.urlbar { flex: none; background: #f1f3f6; font-size: 11px; color: var(--muted); padding: 32px 12px 8px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; }
.urlbar .ico { width: 12px; height: 12px; color: var(--ok); }
.urlbar b { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }

.lp-hero { position: relative; padding: 18px 16px 20px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #22c3d6 0%, transparent 55%), linear-gradient(150deg, #0e7490, #0b4a63); overflow: hidden; }
.lp-hero::after { content: '🦷'; position: absolute; right: -8px; bottom: -18px; font-size: 92px; opacity: .14; transform: rotate(-14deg); }
.lp-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; }
.lp-logo i { width: 28px; height: 28px; border-radius: 9px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-style: normal; font-size: 15px; }
.lp-eyebrow { display: inline-block; margin-top: 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #fde68a; color: #6b4b00; border-radius: 999px; padding: 3px 9px; }
.lp-hero h3 { margin: 8px 0 6px; font-size: 21px; line-height: 1.15; letter-spacing: -.025em; }
.lp-hero p { font-size: 12px; opacity: .88; }
.lp-rating { margin-top: 10px; font-size: 11.5px; font-weight: 600; opacity: .95; }
.lp-form { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.lp-form .t { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.lp-form .t small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 650; color: var(--ink-2); }
.fld em { font-style: normal; font-weight: 500; color: var(--muted); }
.fld input, .fld select, .fld textarea, .inp {
  width: 100%; border: 1px solid #d5dce3; border-radius: 10px; padding: 9px 11px; font-size: 14px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus, .inp:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20, 165, 184, .18); }
.fld.bad input { border-color: var(--hot); box-shadow: 0 0 0 3px rgba(226, 88, 27, .12); }
.fld .err { font-size: 11.5px; color: var(--hot); font-weight: 600; display: none; }
.fld.bad .err { display: block; }
.lp-submit { height: 46px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 750; font-size: 15px; box-shadow: 0 10px 22px -10px rgba(14, 116, 144, .8); transition: transform .15s, filter .2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.lp-submit:hover { filter: brightness(1.06); }
.lp-submit:active { transform: scale(.98); }
.lp-submit .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.lp-fine { font-size: 11px; color: var(--muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 5px; }
.lp-fine .ico { width: 13px; height: 13px; color: var(--ok); }

.thanks { padding: 24px 18px 8px; text-align: center; animation: enter .45s var(--ease) both; }
.thanks .check { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; animation: pop .5s var(--spring) both; }
.thanks .check .ico { width: 30px; height: 30px; }
.thanks h3 { font-size: 19px; }
.thanks p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.sms { margin: 14px 12px 10px; border-radius: 18px; overflow: hidden; background: #f6f7f9; border: 1px solid var(--line); animation: enter .5s .15s var(--ease) both; }
.sms-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.sms-head .avatar { width: 26px; height: 26px; font-size: 13px; }
.sms-head b { display: block; font-size: 12px; }
.sms-head small { color: var(--muted); }
.sms-list { padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }

.chat-head { flex: none; padding: 32px 12px 10px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-head .avatar { background: linear-gradient(140deg, #14a5b8, #0e7490); color: #fff; font-size: 17px; }
.chat-head b { display: block; font-size: 13.5px; line-height: 1.2; }
.chat-head small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ok); font-weight: 600; }
.chat-head small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.chat-head .btn { margin-left: auto; }
.chat-msgs { flex: 1; overflow: auto; padding: 14px 10px 8px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.chat-quick { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; justify-content: flex-end; }
.chat-quick button { border: 1.5px solid #bfdbfe; color: #1d4ed8; background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 650; animation: enter .3s var(--ease) both; transition: background .2s; }
.chat-quick button:hover { background: #eff6ff; }
.chat-quick .lbl { width: 100%; text-align: right; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.chat-input { flex: none; display: flex; gap: 6px; padding: 8px 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-input input { flex: 1; min-width: 0; border: 0; background: var(--surface-3); border-radius: 999px; padding: 9px 14px; font-size: 14px; outline: none; }
.chat-input button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #2563eb; flex: none; transition: transform .15s; }
.chat-input button:active { transform: scale(.92); }

/* bubbles */
.b { max-width: 84%; padding: 8px 12px; border-radius: 18px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; animation: bubble .35s var(--ease) both; }
.b.in { align-self: flex-start; background: #eef0f4; border-bottom-left-radius: 6px; }
.b.out { align-self: flex-end; background: #2563eb; color: #fff; border-bottom-right-radius: 6px; }
.b.sms-in { align-self: flex-start; background: #e7e8ec; border-bottom-left-radius: 6px; }
.b.sms-out { align-self: flex-end; background: #30c75a; color: #fff; border-bottom-right-radius: 6px; }
.bmeta { font-size: 10px; color: var(--muted); margin: -1px 6px 3px; }
.bmeta.r { align-self: flex-end; }
.note { align-self: center; font-size: 10.5px; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 3px 10px; text-align: center; max-width: 94%; margin: 2px 0; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 11px 14px !important; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa3b2; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes bubble { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------ inbox */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.ms { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 11px; }
.ms span { display: block; font-size: 11px; color: var(--muted); font-weight: 650; }
.ms b { font-size: 19px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ms.teal b { color: var(--brand); }
.ms.hot b { color: var(--hot); }
.filters { display: flex; gap: 6px; padding: 11px 16px 6px; overflow-x: auto; scrollbar-width: none; flex: none; }
.filters::-webkit-scrollbar { display: none; }
.lead-list { flex: 1; overflow: auto; padding: 4px 8px 12px; min-height: 0; }
.lead {
  display: flex; gap: 11px; width: 100%; text-align: left; border-radius: 14px; padding: 10px; align-items: flex-start;
  transition: background .2s, box-shadow .2s; position: relative;
}
.lead:hover { background: var(--surface-2); }
.lead.sel { background: var(--obx-soft); box-shadow: inset 0 0 0 1px #d9dcff; }
.lead.fresh { animation: leadIn .9s var(--spring) both, glow 2.4s ease-out; }
@keyframes leadIn { from { opacity: 0; transform: translateX(-16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 30% { background: #fff4cc; } 100% { background: transparent; } }
.lead.sel.fresh { animation: leadIn .9s var(--spring) both; }
.lead-main { flex: 1; min-width: 0; }
.r1 { display: flex; align-items: baseline; gap: 8px; }
.r1 b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r1 .when { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.r2 { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.r2 span { color: var(--muted); }
.r3 { display: flex; align-items: center; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #c3cbd3; transition: background .3s; }
.dots i.on { background: var(--brand-2); box-shadow: none; }
.dots i.x { background: transparent; box-shadow: inset 0 0 0 1.5px #dfe4e8; position: relative; }
.fast { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--brand); }
.fast .ico { width: 12px; height: 12px; }
.night { font-size: 11px; color: #6d5bd0; font-weight: 650; }
.p-foot { flex: none; padding: 10px 16px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.p-foot .btn { margin-left: auto; }

/* ------------------------------------------------ lead detail */
.d-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px 10px; }
.d-head h3 { font-size: 18px; }
.d-head .sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.d-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px 10px; }
.fact { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 7px 10px; min-width: 0; }
.fact span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.fact b { font-weight: 650; font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact.wide { grid-column: span 2; }
.speed { margin: 0 16px 10px; display: flex; align-items: center; gap: 8px; background: linear-gradient(90deg, var(--brand-soft), #effafb); color: var(--brand-ink); border-radius: 11px; padding: 8px 12px; font-size: 12.5px; }
.speed .ico { color: var(--brand); width: 16px; height: 16px; }
.banner { margin: 0 16px 10px; border-radius: 11px; padding: 9px 12px; font-size: 12.5px; display: flex; gap: 10px; align-items: center; animation: enter .4s var(--ease) both; }
.banner .ico { width: 17px; height: 17px; flex: none; }
.banner.hot { background: var(--hot-soft); color: #9a3412; }
.banner.ok { background: var(--ok-soft); color: #14532d; }
.banner.gray { background: var(--surface-3); color: var(--ink-2); }
.banner .btn { margin-left: auto; flex: none; }
.timeline { flex: 1; overflow: auto; padding: 10px 16px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; min-height: 0; scroll-behavior: smooth; }
.day { align-self: center; font-size: 10.5px; font-weight: 750; color: var(--muted); margin: 10px 0 2px; text-transform: uppercase; letter-spacing: .06em; }
.sys { align-self: center; font-size: 12px; color: var(--ink-2); background: #fff; border: 1px dashed #cdd5dd; border-radius: 12px; padding: 7px 12px; text-align: center; max-width: 94%; }
.m { display: flex; flex-direction: column; max-width: 86%; margin-top: 5px; }
.m.biz, .m.owner { align-self: flex-start; }
.m.lead { align-self: flex-end; align-items: flex-end; }
.m .meta { font-size: 10.5px; color: var(--muted); margin: 0 4px 3px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.m .bb { padding: 9px 13px; border-radius: 16px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.m.biz .bb { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--sh-1); }
.m.owner .bb { background: var(--obx-soft); border: 1px solid #d9dcff; border-bottom-left-radius: 6px; }
.m.lead .bb { background: #fff4eb; border: 1px solid #fed7b5; border-bottom-right-radius: 6px; }
.m.pend .bb { background: transparent; border: 1.5px dashed #c3ccd5; color: var(--muted); max-height: 4.6em; overflow: hidden; box-shadow: none; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.m.pend.off { opacity: .55; }
.m.pend.off .bb { text-decoration: line-through; text-decoration-color: rgba(106, 119, 132, .5); }
.m.new .bb { animation: bubble .5s var(--spring) both; }
.tag { display: inline-flex; align-items: center; height: 17px; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; border-radius: 5px; padding: 0 5px; }
.tag.auto { background: var(--brand-soft); color: var(--brand-ink); }
.tag.ch { background: var(--surface-3); color: var(--muted); }
.tag.cancel { background: var(--surface-3); color: var(--muted); }
.compose { flex: none; border-top: 1px solid var(--line-2); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.compose .chips { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.compose .chips::-webkit-scrollbar { display: none; }
.compose .chips .lbl { font-size: 11px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose textarea { flex: 1; min-width: 0; border: 1px solid #d5dce3; border-radius: 12px; padding: 9px 12px; font-size: 14px; min-height: 42px; max-height: 140px; resize: none; transition: border-color .2s, box-shadow .2s; }
.compose textarea:focus { outline: none; border-color: var(--obx-2); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }

/* ------------------------------------------------ sequence builder */
.page { max-width: 1240px; margin: 0 auto; padding: 22px 18px 40px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 24px; }
.page-head p { color: var(--muted); margin-top: 3px; max-width: 640px; }
.page-head .seg { margin-left: auto; }
.seq-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 18px; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.rule { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.rule small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #cbd3db; transition: background .25s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--spring); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }
.channel-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 12px 0 4px; }
.channel-row .chip.on { background: var(--brand); }
.steps { display: flex; flex-direction: column; margin-top: 16px; }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; animation: enter .35s var(--ease) both; }
.rail { display: flex; flex-direction: column; align-items: center; }
.rail .n { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, var(--obx-2), var(--obx)); color: #fff; font-weight: 750; display: grid; place-items: center; font-size: 13px; flex: none; box-shadow: 0 6px 14px -6px rgba(67, 56, 202, .7); }
.rail .ln { flex: 1; width: 2px; background: repeating-linear-gradient(#cfd4ff 0 6px, transparent 6px 10px); margin: 4px 0; }
.step:last-child .rail .ln { display: none; }
.scard { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; background: var(--surface); transition: box-shadow .2s, border-color .2s; }
.scard:focus-within { border-color: #c7cbff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .1); }
.stop { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; font-size: 13px; }
.stop select, .stop input { border: 1px solid #d5dce3; border-radius: 9px; padding: 6px 9px; background: #fff; font-size: 13px; height: 34px; }
.stop input { flex: 1; min-width: 130px; font-weight: 650; }
.stop .muted { font-size: 12px; }
.iconbtn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; flex: none; }
.iconbtn:hover { background: #fde8e8; color: #c0392b; }
.iconbtn .ico { width: 16px; height: 16px; }
.scard textarea { width: 100%; border: 1px solid #d5dce3; border-radius: 11px; padding: 9px 11px; font-size: 13.5px; line-height: 1.5; resize: vertical; min-height: 110px; }
.scard textarea:focus { outline: none; border-color: var(--obx-2); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; align-items: center; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tags button { border-radius: 7px; padding: 3px 8px; font-size: 11.5px; font-weight: 650; background: var(--obx-soft); color: var(--obx); transition: background .2s, transform .15s; }
.tags button:hover { background: #e0e3ff; }
.tags button:active { transform: scale(.95); }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-left: 46px; }
.side { position: sticky; top: 0; }
.side-t { font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; margin-bottom: 10px; }
.side .device { height: 640px; margin: 0 auto; }
.prev { flex: 1; overflow: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; min-height: 0; background: #fff; }
.small-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.55; }
.linkish { color: var(--obx); font-weight: 650; }
.linkish:hover { text-decoration: underline; }

.ans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ans { display: flex; flex-direction: column; gap: 7px; }
.ans h4 { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ans code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; background: var(--obx-soft); color: var(--obx); border-radius: 6px; padding: 2px 7px; font-weight: 600; }
.ans textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.ans small { color: var(--muted); font-size: 12px; }
.saved { font-size: 12px; color: var(--ok); font-weight: 650; opacity: 0; transition: opacity .3s; display: inline-flex; align-items: center; gap: 4px; }
.saved.show { opacity: 1; }
.saved .ico { width: 14px; height: 14px; }

/* ------------------------------------------------ results */
.res-top { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; margin-bottom: 16px; }
.roi {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px 24px; color: #fff;
  background: radial-gradient(90% 120% at 100% 0%, rgba(99, 102, 241, .55), transparent 60%), radial-gradient(70% 90% at 0% 100%, rgba(20, 165, 184, .45), transparent 60%), #0b0d1f;
  box-shadow: var(--sh-3);
}
.roi .k { font-size: 12px; font-weight: 700; color: #a3a8d6; text-transform: uppercase; letter-spacing: .06em; }
.roi .big { font-size: clamp(34px, 5vw, 50px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.roi .line { color: #d9dcff; font-size: 14px; }
.roi .line b { color: #fff; }
.roi-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.roi-chip { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 9px 12px; min-width: 130px; flex: 1; }
.roi-chip span { display: block; font-size: 11px; color: #a3a8d6; font-weight: 650; }
.roi-chip b { font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.roi-chip.gold b { color: #fde68a; }
.spend { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12.5px; color: #c9cdf3; flex-wrap: wrap; }
.spend label { display: flex; align-items: center; background: rgba(255,255,255,.1); border-radius: 10px; padding: 0 4px 0 10px; border: 1px solid rgba(255,255,255,.15); }
.spend input { width: 92px; background: none; border: 0; color: #fff; font-weight: 700; padding: 7px 6px; font-size: 14px; outline: none; }
.saved-card { border-radius: var(--r-lg); padding: 20px; background: linear-gradient(160deg, #fff7ed, #fff); border: 1px solid #fed7aa; box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 10px; }
.saved-card .k { font-size: 12px; font-weight: 750; color: var(--hot); text-transform: uppercase; letter-spacing: .06em; }
.saved-card h3 { font-size: 22px; }
.saved-card p { color: var(--ink-2); font-size: 13.5px; }
.saved-list { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.saved-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #fde1c8; border-radius: 12px; padding: 8px 10px; font-size: 12.5px; animation: enter .4s var(--ease) both; }
.saved-item .avatar { width: 30px; height: 30px; font-size: 11px; }
.saved-item div { flex: 1; min-width: 0; }
.saved-item b { display: block; font-size: 13px; }
.saved-item span { color: var(--muted); }
.saved-item .amt { font-weight: 750; color: var(--ok); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--sh-1); transition: box-shadow .3s, transform .3s var(--ease); }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.kpi .k .ico { width: 15px; height: 15px; color: var(--obx); }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.bump { box-shadow: 0 0 0 3px rgba(19, 138, 85, .25), var(--sh-2); transform: translateY(-2px); }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card h3 { font-size: 15px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fbar { display: grid; grid-template-columns: 150px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.fbar .lbl { font-weight: 600; color: var(--ink-2); }
.fbar .track { height: 26px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.fbar .fill { height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 1s var(--ease); }
.fbar .fill.obx { background: linear-gradient(90deg, var(--obx), var(--obx-2)); }
.fbar .fill.ok { background: linear-gradient(90deg, #0f7a4a, #22b573); }
.fbar .fill.hot { background: linear-gradient(90deg, #e2581b, #f59e0b); }
.fbar .num { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.fbar .num small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; }
.res-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.res-foot p { color: var(--muted); font-size: 12.5px; flex: 1; min-width: 220px; }

/* ------------------------------------------------ bottom nav (phones) */
.bottom-nav { display: none; }

/* ------------------------------------------------ toasts */
.toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 32px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; background: rgba(11, 13, 31, .96); color: #d9dcff; padding: 10px 12px 10px 10px;
  border-radius: 14px; box-shadow: var(--sh-3); font-size: 13px; max-width: 380px; animation: toastIn .45s var(--spring) both;
}
.toast.out { animation: toastOut .3s var(--ease) both; }
.toast b { color: #fff; }
.toast-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(20, 165, 184, .25); color: #67e0ee; flex: none; }
.toast.hot .toast-ico { background: rgba(226, 88, 27, .25); color: #ffb07c; }
.toast.ok .toast-ico { background: rgba(34, 197, 94, .22); color: #6ee7a0; }
.toast.obx .toast-ico { background: rgba(99, 102, 241, .28); color: #a5b4fc; }
.toast-ico .ico { width: 16px; height: 16px; }
.toast-act { margin-left: 4px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font-weight: 650; font-size: 12.5px; white-space: nowrap; }
.toast-act:hover { background: rgba(255,255,255,.2); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ------------------------------------------------ modal */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(9, 12, 24, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--ease); }
.modal {
  position: relative; width: min(460px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 22px; padding: 26px 24px 22px;
  box-shadow: var(--sh-3); opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .3s var(--ease), transform .4s var(--spring);
}
.modal-wrap.in .modal-backdrop { opacity: 1; }
.modal-wrap.in .modal { opacity: 1; transform: none; }
.modal-wrap.out .modal { transition-duration: .2s; opacity: 0; transform: translateY(10px) scale(.98); }
.modal-wrap.out .modal-backdrop { opacity: 0; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .2s; }
.modal-x:hover { background: var(--surface-3); color: var(--ink); }
.modal h3 { font-size: 20px; padding-right: 30px; }
.modal .lead-p { color: var(--muted); margin: 6px 0 16px; font-size: 14px; }
.modal .m-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: var(--obx-soft); color: var(--obx); }
.modal .m-ico.ok { background: var(--ok-soft); color: var(--ok); }
.modal .m-ico .ico { width: 24px; height: 24px; }
.modal .m-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.modal .m-actions .btn { flex: 1; }
.fv-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fv-list li { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.fv-list li .ico { width: 17px; height: 17px; color: var(--ok); margin-top: 2px; }
.fv-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 750; color: var(--obx); background: var(--obx-soft); border-radius: 999px; padding: 4px 10px; margin-bottom: 10px; }
.fv-badge .ico { width: 14px; height: 14px; }
.form-grid { display: flex; flex-direction: column; gap: 12px; }
.peso-inp { position: relative; }
.peso-inp::before { content: '₱'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.peso-inp input { padding-left: 26px; font-weight: 700; }

/* ------------------------------------------------ guided demo caption */
.caption {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; width: min(720px, calc(100vw - 24px));
  background: rgba(11, 13, 31, .97); color: #fff; border-radius: 18px; padding: 13px 16px 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; animation: toastIn .4s var(--spring) both;
}
.caption[hidden] { display: none; }
.cap-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.cap-step { font-size: 11px; font-weight: 800; color: var(--amber); letter-spacing: .06em; white-space: nowrap; }
.cap-bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.cap-bar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .6s var(--ease); }
.cap-txt { font-size: 15.5px; line-height: 1.42; }
.cap-txt b { color: #fde68a; font-weight: 700; }
.cap-txt.swap { animation: capSwap .4s var(--ease); }
@keyframes capSwap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cap-actions { display: flex; gap: 8px; }
.cap-actions .btn-ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; }
.spot { position: relative; z-index: 5; box-shadow: 0 0 0 3px var(--amber), 0 0 0 9px rgba(245, 165, 36, .22) !important; transition: box-shadow .35s var(--ease); }
.device.spot { box-shadow: 0 0 0 3px var(--amber), 0 0 0 10px rgba(245, 165, 36, .22), 0 18px 40px -18px rgba(16, 19, 31, .5) !important; }
body.touring .toasts { display: none; }

/* ------------------------------------------------ responsive */
@media (min-width: 900px) and (max-width: 1279px) {
  #view-live { grid-template-columns: 340px minmax(0, 1fr); }
  body[data-tab=lead] #p-inbox { display: none; }
  body:not([data-tab=lead]) #p-lead { display: none; }
  .p-head .back { display: inline-flex; }
  .seq-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Short laptop screens: the lead panel scrolls as one page so the timeline always has room. */
@media (min-width: 900px) and (max-height: 860px) {
  #p-lead { overflow-y: auto; }
  #p-lead .timeline { flex: none; overflow: visible; min-height: 0; }
  #p-lead .compose { position: sticky; bottom: 0; box-shadow: 0 -8px 20px -14px rgba(15, 26, 36, .35); }
  #p-lead .p-head { position: sticky; top: 0; background: var(--surface); z-index: 2; }
}
@media (max-width: 1279px) {
  #p-capture .p-head h2 { display: none; }
  #p-capture .p-head .seg { width: 100%; }
  #p-capture .p-head .seg button { flex: 1; justify-content: center; }
}
@media (max-width: 1100px) {
  .res-top, .res-grid { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  body { font-size: 15px; }
  .obx-brand small { display: none; }
  .obx-btn span:not(.ico):not([data-ico]) { display: none; }
  .obx-btn { width: 36px; padding: 0; justify-content: center; }
  .obx-cta .long { display: none; }
  .obx-cta .short { display: inline; }
  .toolbar { padding: 8px 12px; gap: 8px; }
  .tabs { display: none; }
  .tb-right { margin-left: 0; width: 100%; }
  .clock { min-width: 0; flex: 1; }
  .clock-wrap { flex: 1; display: flex; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  #view-live { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  #view-live .panel { display: none; border: 0; border-radius: 0; box-shadow: none; }
  body[data-tab=capture] #p-capture, body[data-tab=inbox] #p-inbox, body[data-tab=lead] #p-lead { display: flex; }
  .p-head .back { display: inline-flex; }
  .device-wrap { padding: 0; }
  .device { width: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .device::before { display: none; }
  .urlbar, .chat-head { padding-top: 9px; }
  .via { padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
  .facts { grid-template-columns: 1fr 1fr; }
  #p-lead { overflow-y: auto; }
  #p-lead .timeline { flex: none; overflow: visible; min-height: 0; padding-bottom: 20px; }
  #p-lead .compose { position: sticky; bottom: 0; box-shadow: 0 -8px 20px -14px rgba(15, 26, 36, .35); }
  #p-lead .p-head { position: sticky; top: 0; background: var(--surface); z-index: 2; }
  .fact.wide { grid-column: span 2; }
  .d-head { flex-wrap: wrap; }
  .d-actions { width: 100%; justify-content: flex-start; }
  .seq-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side .device { height: 520px; border: 8px solid #10131f; border-radius: 30px; max-width: 320px; }
  .rules { grid-template-columns: 1fr; }
  .add-row { margin-left: 0; }
  .page { padding: 16px 12px 28px; }
  .page-head h1 { font-size: 21px; }
  .page-head .seg { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .v { font-size: 25px; }
  .fbar { grid-template-columns: 104px 1fr 54px; font-size: 12px; }
  .bottom-nav {
    display: flex; flex: none; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); z-index: 30;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 650; color: var(--muted); padding: 4px 0; border-radius: 10px; position: relative; transition: color .2s; }
  .bottom-nav button .ico { width: 21px; height: 21px; transition: transform .3s var(--spring); }
  .bottom-nav button.on { color: var(--obx); }
  .bottom-nav button.on .ico { transform: translateY(-1px) scale(1.08); }
  .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 999px; background: var(--hot); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
  .badge:empty { display: none; }
  .toasts { left: 12px; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }
  .caption { bottom: calc(72px + env(safe-area-inset-bottom)); padding: 11px 13px 12px; }
  .cap-txt { font-size: 14px; }
  .modal-wrap { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; transform: translateY(40px); padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); }
  .clock-menu { left: 0; right: auto; }
}
@media (max-width: 380px) {
  .mini-stats { gap: 6px; padding: 10px 12px; }
  .ms b { font-size: 17px; }
  .obx-brand b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
