:root {
  --brand: #0e7c86;
  --brand-ink: #ffffff;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #142028;
  --ink-2: #4a5864;
  --ink-3: #8593a0;
  --line: #e3e8ed;
  --line-2: #eef2f5;
  --soft: #f7f9fb;
  --sms: #2563eb;
  --whatsapp: #16a34a;
  --email: #9333ea;
  --voice: #ea580c;
  --danger: #dc2626;
  --ai: #7c3aed;
  --ai-bg: #f5f0ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 11px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 232px 360px 1fr; grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.app.no-list { grid-template-columns: 232px 1fr; }
.app.no-list .list { display: none; }

.rail { background: #0f1b22; color: #c9d4dc; display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 16.5px; flex: none; }
.brand .name { font-family: var(--display); font-size: 15px; color: #fff; line-height: 1.15; font-weight: 600; }
.brand .sub { font-size: 10px; color: #7f909c; letter-spacing: .02em; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: #61727e; padding: 14px 10px 6px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #c9d4dc; background: none; border: 0; width: 100%; text-align: left; }
.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav.active { background: rgba(255,255,255,.1); color: #fff; }
.nav .ico { width: 20px; text-align: center; opacity: .95; }
.nav .badge { margin-left: auto; background: var(--brand); color: #fff; font-size: 10px; border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.rail .spacer { flex: 1; }
.rail .who { font-size: 11px; color: #8ea0ad; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }
.rail .who b { color: #fff; font-weight: 500; }
.powered { font-size: 10px; color: #5d6e7a; padding: 6px 10px; }

.list { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.list-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line-2); }
.list-head h2 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.list-head .row { display: flex; gap: 8px; }
.search { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: var(--soft); outline: none; }
.search:focus { border-color: var(--brand); background: #fff; }
.convs { overflow-y: auto; flex: 1; }
.conv { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: start; }
.conv:hover { background: var(--soft); }
.conv.active { background: #eef7f8; box-shadow: inset 3px 0 0 var(--brand); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; font-size: 13px; flex: none; }
.conv .top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.conv .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .nm::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }
.conv .pv { color: var(--ink-2); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.conv .meta { font-size: 10.5px; color: var(--ink-3); text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.chips { display: inline-flex; gap: 3px; }
.ch { font-size: 10px; font-weight: 700; border-radius: 5px; padding: 1px 5px; color: #fff; letter-spacing: .02em; }
.ch.sms { background: var(--sms); } .ch.whatsapp { background: var(--whatsapp); } .ch.email { background: var(--email); } .ch.voice { background: var(--voice); }
.ai-chip { font-size: 10px; color: var(--ai); background: var(--ai-bg); border-radius: 6px; padding: 1px 6px; font-weight: 600; white-space: nowrap; }
.empty { padding: 40px 24px; text-align: center; color: var(--ink-3); }

/* ---------- thread ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }
.banner { background: linear-gradient(90deg, #0f1b22, #17323b); color: #dbe7ee; padding: 10px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.banner b { color: #fff; }
.banner .btn { padding: 6px 11px; font-size: 11.5px; }
.banner .live { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.thread-head { background: var(--panel); border-bottom: 1px solid var(--line); padding: 12px 20px; display: flex; align-items: center; gap: 12px; min-height: 66px; }
.thread-head .title { font-weight: 650; font-size: 15px; }
.thread-head .ids { font-size: 11px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.thread-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font-size: 11.5px; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }
.timeline { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px 10px; display: flex; flex-direction: column; gap: 14px; }
.day { text-align: center; font-size: 10.5px; color: var(--ink-3); margin: 6px 0; }
.msg { max-width: min(640px, 78%); display: flex; flex-direction: column; gap: 4px; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.msg.out .bubble { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.msg.out.whatsapp .bubble { background: #dcf8c6; color: #111b21; }
.msg.out.email .bubble { background: #fff; color: var(--ink); border-color: var(--line); }
.msg.email .bubble { border-radius: 10px; }
.msg .subj { font-weight: 650; margin-bottom: 6px; }
.msg .info { font-size: 10px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.msg .fail { color: var(--danger); }
.trans { font-size: 11.5px; color: var(--ink-2); background: #fffbea; border: 1px solid #f6e7a8; border-radius: 10px; padding: 7px 10px; white-space: pre-wrap; }
.trans .lbl { font-size: 10px; font-weight: 700; color: #a07a00; text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 2px; }
.call { align-self: stretch; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--voice); border-radius: 12px; padding: 12px 14px; max-width: 760px; }
.call .h { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.call .sum { margin-top: 6px; color: var(--ink-2); }
.call details { margin-top: 8px; }
.call summary { cursor: pointer; color: var(--brand); font-size: 11.5px; }
.tx { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.tx .t { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.tx .r { font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; padding-top: 2px; }
.pill { font-size: 10px; border-radius: 999px; padding: 2px 8px; background: var(--line-2); color: var(--ink-2); }
.pill.ok { background: #e7f8ee; color: #137a3d; }

/* ---------- composer ---------- */
.composer { background: var(--panel); border-top: 1px solid var(--line); padding: 12px 20px 16px; }
.draft { border: 1px solid #e4d8ff; background: var(--ai-bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.draft .h { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ai); font-weight: 650; }
.draft .body { white-space: pre-wrap; margin-top: 6px; max-height: 180px; overflow-y: auto; }
.draft .tr { margin-top: 6px; font-size: 11.5px; color: var(--ink-2); white-space: pre-wrap; border-top: 1px dashed #d9c9ff; padding-top: 6px; }
.draft .acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.compose-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.compose-row .via { font-size: 11px; color: var(--ink-3); }
.input, textarea.input, select.input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; outline: none; width: 100%; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea.input { resize: vertical; min-height: 74px; }
.send-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.send-row .grow { flex: 1; }

/* ---------- buttons ---------- */
.btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 13px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: #c9d3dc; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ai { background: var(--ai); color: #fff; border-color: var(--ai); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.18); }
.btn.light:hover { background: rgba(255,255,255,.2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 5px 9px; font-size: 11.5px; }
.chan-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.chan-btn.on.sms { background: var(--sms); color: #fff; border-color: var(--sms); }
.chan-btn.on.whatsapp { background: var(--whatsapp); color: #fff; border-color: var(--whatsapp); }
.chan-btn.on.email { background: var(--email); color: #fff; border-color: var(--email); }
.chan-btn:disabled { opacity: .4; }

/* ---------- settings ---------- */
.page { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 32px 60px; }
.page h1 { font-family: var(--display); font-size: 24px; margin: 0 0 4px; font-weight: 600; }
.page .lead { color: var(--ink-2); margin: 0 0 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); max-width: 900px; }
.card h3 { margin: 0 0 12px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.toggle { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv div:nth-child(odd) { color: var(--ink-3); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 27, 34, .55); display: grid; place-items: center; z-index: 50; padding: 16px; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 16px; width: min(440px, 100%); padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 6px; font-family: var(--display); font-size: 20.5px; font-weight: 600; }
.modal p { margin: 0 0 16px; color: var(--ink-2); }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #0f1b22; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--danger); }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- welcome / thread empty ---------- */
.welcome { margin: auto; text-align: center; max-width: 520px; padding: 30px; color: var(--ink-2); }
.welcome h2 { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--ink); margin: 0 0 8px; }
.stats { display: flex; gap: 12px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; min-width: 110px; }
.stat b { display: block; font-size: 20.5px; color: var(--ink); }

.back { display: none; }
@media (max-width: 1080px) {
  .app { grid-template-columns: 72px 320px 1fr; }
  .app.no-list { grid-template-columns: 72px 1fr; }
  .rail .brand .name, .rail .brand .sub, .nav .txt, .nav-label, .rail .who, .powered { display: none; }
  .nav { justify-content: center; position: relative; }
  .nav .badge { position: absolute; top: 2px; right: 4px; font-size: 10px; padding: 0 5px; }
}
/* phone layout: see "Phones (≤820px)" at the end of this file */
}

/* ---------- lead intelligence ---------- */
.score-chip { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.score-chip.hot { background: #fff1e6; color: #c2410c; }
.score-chip.warm { background: #fef9c3; color: #854d0e; }
.score-chip.cold { background: #e0f2fe; color: #075985; }
.score-chip.nolead { background: #f1f5f9; color: #64748b; }
.who-btn { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 4px 6px; margin: -4px -6px; border-radius: 10px; min-width: 0; cursor: pointer; }
.who-btn:hover { background: var(--line-2); }
.profile { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(16,24,40,.12); z-index: 40; overflow-y: auto; padding: 18px 20px 40px; animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.phead { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.pname { font-family: var(--display); font-size: 20.5px; font-weight: 600; line-height: 1.2; }
.pscore { display: flex; align-items: center; gap: 16px; margin: 18px 0 12px; }
.ring { --p: 0; --c: #94a3b8; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); }
.ring span { width: 60px; height: 60px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 20.5px; font-weight: 700; }
.ring.hot { --c: #ea580c; } .ring.warm { --c: #ca8a04; } .ring.cold { --c: #0284c7; } .ring.nolead { --c: #94a3b8; }
.status-pill { display: inline-block; font-weight: 700; font-size: 12px; border-radius: 999px; padding: 3px 11px; background: var(--line-2); }
.status-pill.hot { background: #fff1e6; color: #c2410c; } .status-pill.warm { background: #fef9c3; color: #854d0e; } .status-pill.cold { background: #e0f2fe; color: #075985; } .status-pill.nolead { background: #f1f5f9; color: #64748b; }
.pactions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pblock { margin-top: 16px; }
.pblock h4 { margin: 0 0 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.pblock p { margin: 0; color: var(--ink); }
.pblock ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.pblock ul.good li::marker { content: '✓  '; color: #16a34a; }
.pblock ul.bad li::marker { content: '!  '; color: var(--danger); font-weight: 700; }
.pblock ul.src { padding-left: 16px; font-size: 12px; word-break: break-word; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.fact { display: flex; flex-direction: column; font-size: 12px; min-width: 0; }
.fact span { font-size: 10px; color: var(--ink-3); }
.fact b, .fact a { font-weight: 550; overflow-wrap: anywhere; }
.nba { margin-top: 14px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
@media (max-width: 820px) { .profile { width: 100vw; } .facts { grid-template-columns: 1fr; } }

/* ---------- automations / campaigns / insights ---------- */
.pagehead { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; max-width: 900px; margin-bottom: 8px; }
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); max-width: 900px; }
.acard.off { opacity: .6; }
.ahead { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.aname { font-weight: 650; font-size: 14px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 10px; }
.when { background: #fff7ed; color: #9a3412; border-radius: 8px; padding: 4px 9px; font-size: 11.5px; font-weight: 600; }
.arrow { color: var(--ink-3); }
.stepchip { background: var(--line-2); border-radius: 8px; padding: 4px 9px; font-size: 11.5px; }
.astats { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12px; color: var(--ink-2); }
.astats .fail { color: var(--danger); }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .15s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.jst, .cst { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--line-2); text-transform: capitalize; white-space: nowrap; }
.jst.done, .cst.completed { background: #e7f8ee; color: #137a3d; }
.jst.pending, .cst.scheduled { background: #e0f2fe; color: #075985; }
.jst.running, .cst.sending { background: #fef9c3; color: #854d0e; }
.jst.failed { background: #fee2e2; color: #b91c1c; }
.jst.skipped, .jst.cancelled, .cst.paused, .cst.cancelled { background: #f1f5f9; color: #64748b; }
.cst.draft { background: #f5f0ff; color: var(--ai); }
.modal.wide { width: min(720px, 100%); max-height: 90vh; overflow-y: auto; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.stepbox { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--soft); }
.stepbox .send-row { margin-top: 0; flex-wrap: wrap; }
.stepbox select.input { width: auto; }
.tpl { background: var(--soft); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 11px; font-size: 12px; margin: 10px 0; white-space: pre-wrap; }
.audcount { margin: 8px 0 4px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; padding: 8px 11px; font-size: 12px; }
.insights { text-align: left; margin: 18px auto; max-width: 560px; }
.insights h4, .pblock h4 { margin: 0 0 8px; }
.insight { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ai); border-radius: 10px; padding: 8px 11px; margin-bottom: 8px; }
.insight.alert { border-left-color: var(--danger); } .insight.recommendation { border-left-color: #16a34a; } .insight.forecast { border-left-color: #0284c7; }
.ih { display: flex; align-items: center; gap: 4px; }
.seg.stages { flex-wrap: wrap; }
.line { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.line .num { font-family: var(--display); font-size: 24px; font-weight: 600; }
.chanrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.chanbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink-3); }
.chanbox.on { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
@media (max-width: 820px) { .chanrow { grid-template-columns: 1fr 1fr; } .pagehead { flex-direction: column; } }
.input.code { font: 700 24px ui-monospace, Menlo, monospace; letter-spacing: 8px; text-align: center; }

/* ---------- reseller: admin console, pricing, plan & billing ---------- */
.console { min-height: 100vh; overflow-y: auto; height: 100vh; }
.console-top { position: sticky; top: 0; z-index: 5; background: #0f1b22; color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 24px; height: 56px; }
.console-top .brand-x { font-family: var(--display); font-size: 16.5px; font-weight: 600; white-space: nowrap; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs button { background: none; border: 0; color: #b8c6d0; padding: 18px 12px 16px; font-weight: 600; font-size: 12.5px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: #fff; border-bottom-color: #3ec7cf; }
.tabs .dot { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 10px; line-height: 18px; text-align: center; }
.console-body { max-width: 1180px; margin: 0 auto; padding: 26px 24px 80px; }
.console-body .card { max-width: none; }
.console-body h2 { font-family: var(--display); font-weight: 600; font-size: 22.5px; margin: 0 0 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .k { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi .v { font-family: var(--display); font-size: 24px; font-weight: 600; margin-top: 4px; }
.kpi .s { font-size: 11px; color: var(--ink-2); }
.kpi.warn { border-color: #f5c26b; background: #fff8eb; }
.kpi.bad { border-color: #f3a4a4; background: #fff1f1; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th { text-align: left; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl input.input { padding: 5px 8px; width: 90px; }
.svc { display: inline-block; font-size: 10px; border-radius: 6px; padding: 2px 7px; margin: 1px 2px 1px 0; background: var(--line-2); color: var(--ink-2); font-weight: 600; }
.svc.active { background: #e7f8ee; color: #137a3d; }
.svc.requested { background: #fff4d6; color: #8a5a00; }
.svc.paused { background: #f1f1f1; color: #888; text-decoration: line-through; }
.pos { color: #137a3d; } .neg { color: var(--danger); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; }
.hint { font-size: 11.5px; color: var(--ink-2); background: var(--soft); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.svc-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.svc-card.on { border-color: #9fdcb6; background: #f4fcf7; }
.svc-card .t { font-weight: 700; }
.svc-card .p { font-size: 11.5px; color: var(--ink-2); }
.price-sec h3 { margin-top: 0; }
.big-bal { font-family: var(--display); font-size: 31.5px; font-weight: 600; }
.pricing-hero { background: #0f1b22; color: #fff; padding: 56px 24px 46px; text-align: center; }
.pricing-hero h1 { font-family: var(--display); font-size: clamp(30px, 5vw, 46px); margin: 0 0 10px; font-weight: 600; }
.pricing-hero p { color: #c3d0d8; max-width: 640px; margin: 0 auto; font-size: 15px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; background: #fff; font-weight: 600; font-size: 12px; }
.pick label:has(input:checked) { border-color: var(--brand); background: #e8f6f7; color: var(--brand); }
@media (max-width: 820px) {
  .console-top { padding: 0 12px; gap: 10px; }
  .console-top .brand-x { display: none; }
  .console-body { padding: 18px 16px 60px; }
  .grid2 { grid-template-columns: 1fr; }
}
.num-results { margin-top: 12px; }
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.num-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.num-card:hover { border-color: var(--brand); }
.num-card .nn { font-family: var(--display); font-size: 17.5px; font-weight: 600; letter-spacing: .01em; }
.num-card .np b { font-size: 14px; }

/* ---------- analytics ---------- */
.delta { font-size: 11px; font-weight: 600; }
.delta.up { color: #137a3d; } .delta.down { color: var(--danger); } .delta.flat { color: var(--ink-3); }
.viz-host { position: relative; }
svg.viz { width: 100%; height: auto; display: block; overflow: visible; }
svg.viz .grid { stroke: var(--line-2); stroke-width: 1; }
svg.viz .axis { fill: var(--ink-3); font-size: 10px; }
svg.viz .hit { cursor: crosshair; }
svg.viz .hit:hover { fill: rgba(16, 24, 40, .04); }
.viz-tip { display: none; position: absolute; pointer-events: none; background: #0f1b22; color: #fff; font-size: 11px; line-height: 1.5; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow); white-space: nowrap; z-index: 3; }
.viz-tip .muted { color: #b8c6d0; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: middle; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 900px; }
.an-grid .card { margin-bottom: 0; }
.an-grid + .card, .an-grid + .an-grid { margin-top: 18px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-kpis div { display: flex; flex-direction: column; font-size: 10.5px; color: var(--ink-3); }
.mini-kpis b { font-family: var(--display); font-size: 18.5px; color: var(--ink); font-weight: 600; }
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 8px; align-items: center; font-size: 11.5px; }
.hbar .hl { color: var(--ink-2); text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { background: var(--line-2); border-radius: 4px; height: 10px; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.page .kpis { max-width: 900px; }
.dst { font-size: 10.5px; } .st-q { color: var(--ink-3); } .st-d, .st-r { color: #137a3d; }
@media (max-width: 820px) { .an-grid { grid-template-columns: 1fr; } .mini-kpis { grid-template-columns: repeat(2, 1fr); } }
.draft .checks { margin-top: 10px; background: #fff8eb; border: 1px solid #f5d79e; border-radius: 10px; padding: 8px 12px; font-size: 11.5px; color: #6b4a00; }
.draft .checks ul { margin: 4px 0 4px 18px; padding: 0; }

/* ---------- human approval ---------- */
.approval-chip { margin-top: 8px; width: 100%; border: 1px solid var(--line); background: #f3fbf6; color: #137a3d; border-radius: 9px; padding: 6px 10px; font-size: 11.5px; font-weight: 600; text-align: left; }
.approval-chip.auto { background: #fff8eb; color: #8a5a00; border-color: #f5d79e; }
.appr-list { display: flex; flex-direction: column; gap: 8px; }
.appr-row { display: grid; grid-template-columns: 1fr auto 86px; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.appr-row.auto { background: #fffaf0; border-color: #f5d79e; }
.appr-tag { font-size: 10.5px; font-weight: 700; text-align: center; border-radius: 999px; padding: 3px 8px; }
.appr-tag.on { background: #e7f8ee; color: #137a3d; } .appr-tag.off { background: #fff1d6; color: #8a5a00; }
.appr-guards { margin-top: 12px; padding: 10px 12px; background: var(--soft); border-radius: 12px; }
.draft .held { background: #fff1d6; color: #6b4a00; border-radius: 8px; padding: 6px 10px; font-size: 11.5px; font-weight: 600; margin-bottom: 8px; }
/* ---------- campaign editor ---------- */
.ctabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.ctabs button { border: 0; background: none; padding: 9px 12px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.ctabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.modes label { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--ink-2); }
.modes label b { color: var(--ink); font-size: 12.5px; }
.modes label:has(input:checked) { border-color: var(--brand); background: #eef8f8; }
.modes input { display: none; }
.kbcount { font-size: 10.5px; color: var(--ink-3); text-align: right; }
.cstats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); margin-top: 8px; }
.cstats b { color: var(--ink); }
.credit-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.credit-pack { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.credit-pack .c { font-family: var(--display); font-size: 20.5px; font-weight: 600; }
@media (max-width: 820px) { .modes { grid-template-columns: 1fr; } .appr-row { grid-template-columns: 1fr auto; } .appr-tag { display: none; } }

/* ---------- import, wizard, keywords, contacts ---------- */
.import-modal { width: min(980px, 100%); }
.dropzone { border: 2px dashed #b9c6d0; border-radius: 16px; padding: 38px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; cursor: pointer; background: var(--soft); transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: #eef8f8; }
.hint.err { background: #fff1f1; border-color: #f3a4a4; color: #8a1c1c; }
.imp-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.imp-grid select.input { padding: 5px 8px; }
.imp-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.imp-stat { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 11px; color: var(--ink-2); display: flex; flex-direction: column; }
.imp-stat b { font-size: 18.5px; color: var(--ink); font-family: var(--display); }
.imp-stat.ok { background: #f3fbf6; border-color: #9fdcb6; } .imp-stat.warn { background: #fff8eb; border-color: #f5d79e; }
.consent { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 12px; align-items: flex-start; }
.progress { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.progress span { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.modal.wizard { width: min(1000px, 100%); max-height: 92vh; overflow-y: auto; padding: 0; }
.wiz-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px 0; }
.wiz-name { flex: 1; font-family: var(--display); font-size: 20.5px; font-weight: 600; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; background: none; }
.wiz-name:hover, .wiz-name:focus { border-color: var(--line); outline: none; }
.wiz-steps { display: flex; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.wiz-steps button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.wiz-steps button.on { color: var(--ink); border-bottom-color: var(--brand); }
.wizard.whatsapp .wiz-steps button.on { border-bottom-color: var(--whatsapp); }
.wizard.sms .wiz-steps button.on { border-bottom-color: var(--sms); }
.wiz-body { padding: 18px 22px 20px; }
.card.flat { box-shadow: none; background: var(--soft); max-width: none; }
.acts.wrap { flex-wrap: wrap; }
.msg-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.lbl { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-family: ui-monospace, monospace; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.phone-prev { border: 10px solid #1d2b34; border-radius: 30px; min-height: 420px; background: #f2f2f7; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.phone-prev.wa { background: #efe7dd; }
.pp-head { text-align: center; font-size: 11px; color: #6b7280; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid rgba(0,0,0,.06); }
.pp-bubble { align-self: flex-start; max-width: 88%; background: #e9e9eb; color: #111; border-radius: 18px; padding: 9px 12px; font-size: 13px; line-height: 1.38; white-space: pre-wrap; word-break: break-word; }
.phone-prev.wa .pp-bubble { background: #fff; border-radius: 0 12px 12px 12px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.pp-img { max-width: 70%; border-radius: 14px; }
.bubble-mini { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 12px; white-space: pre-wrap; margin-top: 8px; max-height: 80px; overflow: hidden; }
.bubble-mini.whatsapp { background: #f0faf3; }
.ccard.sms { border-left: 3px solid var(--sms); } .ccard.whatsapp { border-left: 3px solid var(--whatsapp); }
.empty-state { text-align: center; padding: 34px 20px; }
.variant { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; white-space: pre-wrap; font-size: 13px; }
.qr-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; max-width: 900px; }
.qr-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center; max-width: 260px; }
.qr-card img { width: 180px; } .qr-card code { word-break: break-all; text-align: center; }
.bulkbar { position: sticky; top: 0; z-index: 3; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #0f1b22; color: #fff; border-radius: 12px; padding: 8px 14px; margin-bottom: 10px; max-width: 900px; }
.bulkbar .input { background: #fff; color: var(--ink); }
.bulkbar .btn.ghost { color: #cbd5e1; }
.tagchip { display: inline-flex; align-items: center; gap: 3px; background: #eef3f7; border-radius: 999px; padding: 2px 4px 2px 9px; font-size: 10.5px; margin: 1px 3px 1px 0; }
.tagchip button { border: 0; background: none; color: var(--ink-3); padding: 0 4px; font-size: 12px; line-height: 1; }
.tagchip button:hover { color: var(--danger); }
.tagadd { border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--ink-3); }
.muted-row td { opacity: .55; }
@media (max-width: 860px) { .imp-grid, .msg-grid { grid-template-columns: 1fr; } .phone-prev { min-height: 260px; } .imp-summary { grid-template-columns: repeat(2, 1fr); } }

/* sign-in */
.btn.google { background: #fff; color: #1f2933; border: 1px solid #d3dbe2; font-weight: 600; }
.btn.google:hover { background: #f6f8fa; }

/* ---------- shared team inbox ---------- */
.inbox-filters { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.inbox-filters .seg { flex-wrap: wrap; }
.inbox-filters .cnt { display: inline-block; margin-left: 5px; background: #dc2626; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10px; font-weight: 700; }
.sdot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.st-new { background: #2563eb; } .st-reply { background: #dc2626; } .st-pending { background: #d97706; } .st-closed { background: #9aa6b2; }
.sbadge { color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.tri { font-size: 10px; border-radius: 999px; padding: 1px 7px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tri-emergency { background: #fee2e2; color: #991b1b; font-weight: 700; }
.tri-out_of_area { background: #f1f5f9; color: #475569; }
.tri-appointment { background: #dcfce7; color: #166534; }
.conv.urgent { box-shadow: inset 4px 0 0 #dc2626; }
.asg { background: var(--ink-2); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 1px 6px; }
.inbox-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-sel { width: auto; padding: 5px 8px; font-size: 11.5px; max-width: 190px; }
.note { align-self: center; width: min(640px, 92%); background: #fffbeb; border: 1px dashed #f59e0b; border-radius: 10px; padding: 8px 12px; }
.note .nb { white-space: pre-wrap; font-size: 12.5px; }
.note .nlbl { display: block; font-size: 10px; font-weight: 700; color: #b45309; margin-bottom: 2px; }
.note .info { font-size: 10px; color: var(--ink-3); margin-top: 4px; }
.note.sys { background: transparent; border: 0; padding: 2px 12px; text-align: center; }
.note.sys .nb { font-size: 11px; color: var(--ink-3); }
.seg button.note-on { background: #fffbeb; color: #b45309; }
.note-ta { background: #fffbeb; border-color: #f59e0b; }
.btn.note-btn { background: #f59e0b; color: #fff; border-color: #f59e0b; }

/* ---------- FamVet team features (24 Nov 2026): request types, team chat, routing, running late ---------- */
.tri-urgent_visit { background: #fff1e6; color: #9a3412; font-weight: 650; }
.tri-medication_order { background: #eef6ff; color: #1e4f8a; }
.tri-results_request { background: #f2f0ff; color: #4c3a99; }
.tri-case_followup { background: #e9f7f4; color: #0f6b5c; }
.tri-round_visit { background: #eef7ec; color: #2f6b1f; }
.tri-professional, .tri-supplier, .tri-delivery { background: #f1f3f5; color: #46525c; border: 1px dashed #cfd6dc; }
.ai-av { display: inline-grid; place-items: center; border-radius: 50%; background: #fff; border: 1px solid #e4d8ff; line-height: 1; }
.ai-av.sm { width: 22px; height: 22px; font-size: 12px; }
.av-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.av-opt { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 22.5px; display: grid; place-items: center; transition: transform .12s, border-color .12s; }
.av-opt:hover { transform: translateY(-1px); border-color: #c9d3dc; }
.av-opt.on { border: 2px solid var(--ai); background: var(--ai-bg); }

/* chat page */
.chat-page { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.chat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px 28px 14px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.chat-head h1 { font-family: var(--display); font-weight: 600; font-size: 22.5px; margin: 0; }
.chat-head p { margin: 4px 0 0; font-size: 12px; }
.chat-head kbd { font: 600 11.5px ui-monospace, Menlo, monospace; background: var(--line-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.chat-tabs { display: inline-flex; gap: 6px; }
.chat-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; color: var(--ink-2); }
.chat-tab.on { background: #0f1b22; color: #fff; border-color: #0f1b22; }
.chat-tab:disabled { opacity: .55; cursor: not-allowed; }
.chat-tab .lock { font-size: 10px; }
.chat-tab .tab-dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 28px 8px; display: flex; flex-direction: column; gap: 2px; }
.chat-list .day { align-self: center; font-size: 10.5px; color: var(--ink-3); background: var(--line-2); border-radius: 999px; padding: 2px 10px; margin: 12px 0 8px; }
.cmsg { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 5px 8px; border-radius: 10px; }
.cmsg:hover { background: rgba(15, 27, 34, .03); }
.cmsg.grouped { padding-top: 1px; }
.cmsg.mention { background: #fff8e6; box-shadow: inset 3px 0 0 #f2b233; }
.cav { width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 11.5px; display: grid; place-items: center; }
.cav-sp { width: 34px; }
.cmeta { font-size: 12px; margin-bottom: 1px; }
.ctext { white-space: pre-wrap; word-wrap: break-word; color: var(--ink); }
.ref-chip { display: inline-flex; align-items: center; gap: 3px; border-radius: 7px; padding: 0 7px; font-size: 12px; font-weight: 600; line-height: 1.6; vertical-align: baseline; border: 0; }
.ref-chip.client { border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); background: color-mix(in srgb, var(--brand) 9%, #fff); color: var(--brand); cursor: pointer; }
.ref-chip.client:hover { background: color-mix(in srgb, var(--brand) 16%, #fff); }
.ref-chip.user { background: #eef2ff; color: #3730a3; }
.ref-chip.user.me { background: #fde9b0; color: #7a4b00; }
.chat-empty { margin: auto; max-width: 420px; text-align: center; color: var(--ink-2); padding: 40px 16px; }
.chat-empty .ce-ico { font-size: 31.5px; width: 64px; height: 64px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 12px; }
.chat-empty h3 { font-family: var(--display); font-weight: 600; font-size: 17.5px; margin: 0 0 6px; color: var(--ink); }
.chat-compose { position: relative; background: var(--panel); border-top: 1px solid var(--line); padding: 12px 28px 14px; }
.cc-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-ta { resize: none; min-height: 44px; max-height: 160px; }
.cc-hint { margin-top: 6px; }
.mention-pop { position: absolute; left: 28px; bottom: calc(100% - 6px); width: min(420px, calc(100% - 56px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); padding: 6px; z-index: 20; max-height: 300px; overflow-y: auto; }
.mp-item { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 7px 8px; }
.mp-item.on, .mp-item:hover { background: var(--line-2); }
.mp-ico { grid-row: span 2; align-self: center; }
.mp-name { font-weight: 600; }
.mp-sub { font-size: 10.5px; color: var(--ink-3); }
.mp-empty { padding: 10px; color: var(--ink-3); font-size: 12px; }

/* chat message linked inside a client thread */
.chat-ref { align-self: stretch; max-width: 760px; border: 1px solid #dbe4ff; border-left: 4px solid #4f6bed; background: #f6f8ff; border-radius: 12px; padding: 10px 14px; }
.chat-ref.vets { border-color: #cdeee6; border-left-color: #0f8a72; background: #f2fbf8; }
.cr-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-ch { font-weight: 650; font-size: 11.5px; }
.cr-b { margin-top: 4px; white-space: pre-wrap; }
.cr-f { margin-top: 6px; font-size: 10px; color: var(--ink-3); }

/* routing */
.rt-grid { display: grid; gap: 6px; max-width: 640px; }
.rt-group { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-top: 8px; }
.rt-row { display: grid; grid-template-columns: 240px 1fr; gap: 12px; align-items: center; }
.rt-type.tri { font-size: 11.5px; padding: 4px 10px; justify-self: start; }
.rt-default { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.rt-default .rt-type { font-weight: 600; color: var(--ink-2); }

/* running late */
.seg.wrap { flex-wrap: wrap; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.sharebar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 12px; background: #0f1b22; color: #fff; border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: 0 14px 40px rgba(0,0,0,.3); width: min(560px, calc(100vw - 24px)); }
.sharebar .sb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 11.5px; }
.sharebar .sb-t b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sharebar .sb-t span { color: #b8c6d0; }
.sharebar .btn.sm:not(.danger) { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

@media (max-width: 820px) {
  .chat-head, .chat-list, .chat-compose { padding-left: 14px; padding-right: 14px; }
  .mention-pop { left: 14px; width: calc(100% - 28px); }
  .rt-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Phones (≤820px), 24 Nov 2026 — same pattern as Outbound Pulse (.interface-design/system.md):
   top bar + drawer menu, 5-tab bottom bar, list → full-screen thread, sticky composer, bottom-sheet dialogs,
   44px targets, 16px inputs (no iOS zoom), safe areas. Desktop is unchanged. ---------- */
.mbar, .tabbar, .scrim, .draft-more { display: none; }
@media (max-width: 820px) {
  :root { --mbar-h: calc(52px + env(safe-area-inset-top)); --tab-h: calc(58px + env(safe-area-inset-bottom)); --ease: cubic-bezier(.23, 1, .32, 1); }
  .app, .app.no-list { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .app .list, .app .main { grid-row: 2; grid-column: 1; }
  .app.thread-open .list { display: none; }
  .app:not(.thread-open):not(.no-list) .main { display: none; }
  .app.thread-open .mbar, .app.thread-open .tabbar { display: none; }

  /* top bar */
  .mbar { display: flex; grid-row: 1; grid-column: 1; align-items: center; gap: 4px; height: var(--mbar-h); padding: env(safe-area-inset-top) 6px 0; background: #0f1b22; color: #fff; }
  .ibtn { width: 44px; height: 44px; border: 0; background: none; color: inherit; border-radius: 10px; display: grid; place-items: center; font-size: 18.5px; flex: none; transition: background-color .15s; }
  .ibtn:active { background: rgba(255, 255, 255, .12); transform: scale(.97); }
  .mbar .mt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; font-weight: 650; font-size: 15.5px; white-space: nowrap; overflow: hidden; }
  .mbar .mt span { overflow: hidden; text-overflow: ellipsis; }
  .mbar .ms { font-size: 11px; font-weight: 500; color: #8ea0ad; }
  .mbar .mlogo { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; font-family: var(--display); font-weight: 600; margin-right: 6px; flex: none; }

  /* bottom tabs */
  .tabbar { display: grid; grid-row: 3; grid-column: 1; grid-template-columns: repeat(5, 1fr); height: var(--tab-h); padding-bottom: env(safe-area-inset-bottom); background: var(--panel); border-top: 1px solid var(--line); z-index: 30; }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; font-size: 10px; font-weight: 600; color: var(--ink-3); min-height: 44px; transition: color .15s; }
  .tab .ti { font-size: 18.5px; line-height: 1; filter: grayscale(1); opacity: .65; transition: opacity .15s; }
  .tab.on { color: var(--brand); }
  .tab.on .ti { filter: none; opacity: 1; }
  .tab:active { transform: scale(.97); }
  .tab .tb { position: absolute; top: 5px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--panel); font-variant-numeric: tabular-nums; }

  /* the full menu becomes a drawer */
  .rail { position: fixed; top: 0; bottom: 0; left: 0; z-index: 46; width: 300px; max-width: 86vw; flex-direction: column; overflow-y: auto; padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom)); transform: translateX(-104%); transition: transform .24s var(--ease); }
  .app.drawer-open .rail { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(15, 27, 34, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .rail .brand .name, .rail .brand .sub, .nav .txt, .rail .who { display: block; }
  .nav-label { display: block; }
  .rail .spacer { display: block; }
  .nav { justify-content: flex-start; min-height: 44px; width: 100%; padding: 10px 12px; }
  .nav .badge { position: static; margin-left: auto; font-size: 10px; padding: 1px 7px; }

  /* type + controls: 16px inputs stop iOS zooming, 44px targets */
  .input, textarea.input, select.input, .search { font-size: 16px; }
  .btn { min-height: 42px; }
  .btn.sm { min-height: 38px; padding: 6px 11px; }
  .seg button { min-height: 36px; padding: 6px 12px; white-space: nowrap; }
  .btn:active, .seg button:active, .conv:active, .chat-tab:active { transform: scale(.97); }
  .approval-chip { min-height: 40px; }
  .switch::before { content: ''; position: absolute; inset: -10px -6px; }

  /* conversation list */
  .list-head { padding: 10px 12px 8px; }
  .list-head h2 { display: none; }
  .inbox-filters .seg, .list-head > .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .inbox-filters .seg::-webkit-scrollbar { display: none; }
  .conv { padding: 14px 12px; grid-template-columns: 44px 1fr auto; gap: 11px; }
  .conv .top { flex-wrap: wrap; row-gap: 4px; }
  .conv .nm { flex: 0 1 auto; max-width: 100%; }
  .conv .pv { font-size: 13px; }
  .avatar { width: 44px; height: 44px; }

  /* thread: full screen, compact header, controls in one swipeable row */
  .thread-head { flex-wrap: wrap; gap: 6px 6px; padding: calc(6px + env(safe-area-inset-top)) 8px 8px; min-height: 0; }
  .back { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; font-size: 20.5px; flex: none; }
  .who-btn { flex: 1; min-width: 0; margin: 0; padding: 4px; gap: 10px; }
  .who-btn .avatar { width: 36px; height: 36px; font-size: 12px; }
  .thread-head .title { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .thread-head .ids span:nth-child(n + 2) { display: none; }
  .thread-head .actions { order: 3; width: 100%; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 0; gap: 6px; }
  .thread-head .actions::-webkit-scrollbar { display: none; }
  .thread-head .actions > *, .inbox-ctl > * { flex: none; }
  .inbox-ctl { flex-wrap: nowrap; }
  .mini-sel { font-size: 13px; min-height: 38px; max-width: 200px; }
  .timeline { padding: 14px 10px; gap: 12px; }
  .msg { max-width: 88%; }
  .composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); max-height: 56vh; overflow-y: auto; }
  .compose-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .compose-row > * { flex: none; }
  .chan-btn { min-height: 36px; }
  .send-row { flex-wrap: wrap; }
  .send-row #instr { display: none; }
  .composer textarea.input { min-height: 46px; height: 46px; max-height: 28vh; }
  .composer textarea.input:focus { height: 96px; }
  .composer .compose-row { margin-bottom: 6px; }
  .list-head .row .btn.sm { min-width: 42px; min-height: 42px; justify-content: center; }
  .send-row #sendbtn { margin-left: auto; }
  .draft { padding: 10px 12px; }
  .draft .body { max-height: 15vh; font-size: 13px; }
  .draft .h { flex-wrap: wrap; row-gap: 4px; }
  .draft .tr, .draft .checks { display: none; }
  .draft.expanded .tr, .draft.expanded .checks { display: block; }
  .draft-more { display: inline-flex; }
  .draft .acts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .draft .acts > * { flex: none; }
  .banner { display: none; }

  /* pages */
  .page { padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); }
  .page h1, .pagehead h2 { font-size: 19.5px; }
  .card { padding: 14px; border-radius: 12px; }
  .grid2 { grid-template-columns: 1fr; }
  table.team-tbl thead { display: none; }
  .team-tbl tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line-2); align-items: center; }
  table.team-tbl td { border: 0; padding: 0; }
  table.team-tbl tr:last-child { border-bottom: 0; }
  .team-tbl .switch { display: inline-block; vertical-align: middle; }
  .team-tbl td:nth-child(4) { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
  .team-tbl td:nth-child(4)::before { content: 'Vet'; }
  .team-tbl td:nth-child(1) { grid-column: 1; font-size: 14px; }
  .team-tbl td:nth-child(2) { grid-column: 1; color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
  .team-tbl td:nth-child(3) { grid-column: 1; font-size: 12px; }
  .team-tbl td:nth-child(4) { grid-column: 2; grid-row: 1 / span 2; }
  .team-tbl td:nth-child(5) { grid-column: 1; }
  .team-tbl td:nth-child(6) { grid-column: 1 / -1; display: flex; gap: 8px; }

  /* team chat */
  .chat-head { padding: 10px 12px; }
  .chat-head > div:first-child { display: none; }
  .chat-tabs { width: 100%; }
  .chat-tab { flex: 1; justify-content: center; min-height: 44px; }
  .chat-list { padding: 8px 8px 6px; }
  .cmsg { grid-template-columns: 30px 1fr; gap: 8px; padding: 6px; }
  .cav { width: 30px; height: 30px; border-radius: 9px; font-size: 10.5px; }
  .cav-sp { width: 30px; }
  .chat-compose { padding: 8px 10px; }
  .chat-ta { font-size: 16px; }
  .cc-hint { display: none; }
  .mention-pop { left: 10px; width: calc(100% - 20px); }
  .mp-item { min-height: 48px; }

  /* dialogs become bottom sheets */
  .modal-bg { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); animation: sheetup .24s var(--ease); }
  .modal h3 { font-size: 18.5px; }
  .modal .acts { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); background: #fff; padding: 10px 0 calc(4px + env(safe-area-inset-bottom)); margin-bottom: calc(-14px - env(safe-area-inset-bottom)); }
  .modal .acts .btn { flex: 1; justify-content: center; min-height: 46px; }

  /* floating bits sit above the tab bar */
  .toast { bottom: calc(var(--tab-h) + 12px); }
  .sharebar { bottom: calc(var(--tab-h) + 10px); }
  .app.thread-open ~ .sharebar, .app.thread-open ~ .toast { bottom: calc(14px + env(safe-area-inset-bottom)); }
}
@keyframes sheetup { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rail, .scrim, .modal { transition: none; animation: none; }
}

/* Team page: vet option when adding a member · Vets chat members */
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; cursor: pointer; line-height: 1.4; }
.check-row input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--brand); }
.chat-head-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.vm-list { display: flex; flex-direction: column; margin: 8px 0 4px; max-height: 50vh; overflow: auto; }
.vm-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 2px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.vm-row:last-child { border-bottom: 0; }
.vm-row input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.vm-name { min-width: 0; overflow-wrap: anywhere; }

/* Command bar (Ctrl/Cmd+K, "/") */
.omni-open { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; margin: 6px 0 4px; padding: 0 10px; border: 1px solid #24343e; border-radius: 10px; background: #14242d; color: #9fb0bc; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s; }
.omni-open:hover, .omni-open:focus-visible { border-color: var(--brand); color: #fff; outline: none; }
.omni-open .txt { flex: 1; text-align: left; }
.omni-open kbd { font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 5px; border: 1px solid #2c3e49; border-radius: 5px; color: #8aa0ae; }
.omni-bg { position: fixed; inset: 0; z-index: 90; background: rgba(15, 27, 34, .42); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.omni { width: 100%; max-width: 620px; max-height: 70vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 27, 34, .28); overflow: hidden; }
.omni-head { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); }
.omni-mag { color: var(--ink-3); font-size: 18px; }
.omni-input { flex: 1; min-width: 0; height: 52px; border: 0; outline: none; background: none; font: inherit; font-size: 15px; color: var(--ink); }
.omni-x { border: 1px solid var(--line); background: var(--soft); color: var(--ink-3); border-radius: 6px; font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 5px 7px; cursor: pointer; }
.omni-scope:empty { display: none; }
.omni-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.omni-chip button { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 14px; width: 22px; height: 22px; border-radius: 50%; }
.omni-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.omni-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.omni-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: 9px; cursor: pointer; }
.omni-item.on { background: color-mix(in srgb, var(--brand) 10%, transparent); box-shadow: inset 2px 0 0 var(--brand); }
.omni-item.urgent .omni-label { color: #b42318; }
.omni-ico { width: 22px; text-align: center; flex: none; font-size: 15px; }
.omni-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.omni-label { font-size: 14px; font-weight: 550; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.omni-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.omni-badge { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: #d92d20; padding: 3px 7px; border-radius: 999px; }
.omni-hint { color: var(--ink-3); font-size: 18px; }
.omni-empty { padding: 22px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }
.omni-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--soft); font-size: 11.5px; color: var(--ink-3); }
.omni-foot kbd { font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 2px 5px; margin-right: 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink-2); }
@media (max-width: 820px) {
  .omni-bg { padding: 0; align-items: stretch; }
  .omni { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); }
  .omni-input { font-size: 16px; height: 56px; }
  .omni-item { min-height: 52px; }
  .omni-foot { display: none; }
}
@media (min-width: 821px) and (max-width: 1080px) {
  .omni-open { justify-content: center; padding: 0; }
  .omni-open .txt, .omni-open kbd { display: none; }
}

/* ---------- Map widget (public/map.js), vehicles map and client location pins — 24 Nov 2026 */
.omap { position: relative; overflow: hidden; background: #e8ecef; touch-action: none; user-select: none; }
.omap.dragging { cursor: grabbing; }
.omap-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; }
.omap-marks { position: absolute; inset: 0; pointer-events: none; }
.omap-mk { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; background: none; padding: 0; cursor: pointer; }
.omap-mk .dot { position: absolute; transform: translate(-50%, -50%); }
.omap-mk.vehicle .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.omap-mk.vehicle .lbl { position: absolute; transform: translate(-50%, 20px); background: #0f1b22; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.omap-mk.pin .dot { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: translate(-50%, -100%) rotate(-45deg); background: var(--danger); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.omap-mk.stale .dot { background: #8593a0; }
.omap-mk.active { z-index: 2; }
.omap-mk.active .dot { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; }
.omap-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.omap-zoom button { width: 36px; height: 36px; border: 0; background: #fff; font-size: 17px; cursor: pointer; }
.omap-zoom button + button { border-top: 1px solid var(--line); }
.omap-attr { position: absolute; right: 0; bottom: 0; background: rgba(255,255,255,.85); font-size: 10px; padding: 1px 5px; }

.loc-card { padding: 0 !important; overflow: hidden; width: min(300px, 72vw); background: #fff !important; color: var(--ink) !important; }
.loc-map { height: 140px; display: block; }
.loc-t { display: flex; flex-direction: column; gap: 2px; padding: 8px 11px 4px; font-size: 12px; }
.loc-act { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 10px; }

.fleet-page { display: flex; flex-direction: column; padding-bottom: 20px; }
.fleet-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fleet-head p { margin: 0; }
.fleet-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.fleet-share .input { width: auto; min-width: 0; }
.fleet-share input.input { width: 160px; }
.fleet-body { flex: 1; min-height: 420px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.fleet-map { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); min-height: 420px; }
.fleet-map .omap { width: 100%; height: 100%; }
.fleet-side { overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.fleet-side h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 6px 2px 8px; }
.fl-row { border-radius: 10px; padding: 6px; margin-bottom: 4px; }
.fl-row.on { background: #eef7f8; }
.fl-row.closed { opacity: .6; }
.fl-main { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 2px; cursor: pointer; color: inherit; }
.fl-t { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.fl-t b { font-size: 12.5px; }
.fl-t .ok { color: #15803d; }
.fl-pin { width: 32px; text-align: center; font-size: 18px; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.fl-act { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 2px 44px; }
@media (max-width: 820px) {
  .fleet-body { grid-template-columns: 1fr; }
  .fleet-map { min-height: 0; height: 52vh; }
  .fleet-side { overflow: visible; }
  .fleet-share { width: 100%; }
  .fleet-share input.input { flex: 1; width: auto; }
  .fl-act .btn { min-height: 36px; }
}

/* ---------- phone receptionist editor (Telnyx) ---------- */
.rc .rc-lat { margin: 14px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--line-2); font-size: 12px; }
.rc .rc-lat ul { margin: 6px 0 0; padding-left: 18px; }
.rc .rc-lat li { margin: 2px 0; }
.rc .rc-bad { color: #b42318; }
.rc .rc-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.rc .rc-more { margin: 6px 0 4px; }
.rc .rc-more summary { cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 4px 0; }
.rc .rc-hist { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.rc .rc-hist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.rc select.input { width: 100%; }
.rc .rc-target { display: grid; grid-template-columns: 1fr 150px 2fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.rc .rc-test { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.rc .rc-test audio { display: none; }
@media (max-width: 700px) { .rc .rc-target { grid-template-columns: 1fr 1fr auto; } .rc .rc-target input:nth-child(3) { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- assignment alerts (25 Nov 2026) ---------- */
.notif-ibtn { position: relative; }
.notif-dot { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #E5484D; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.notif-panel { max-width: 460px; width: calc(100vw - 32px); padding: 18px 18px 14px; }
.notif-list { max-height: min(60vh, 460px); overflow-y: auto; margin: 0 -6px; }
.notif-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 10px; border-radius: 10px; cursor: pointer; color: inherit; font: inherit; }
.notif-item:hover, .notif-item:focus-visible { background: var(--line-2); }
.notif-item.new { background: #EEF6FD; }
.notif-item.new .ni-top b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1A73E8; margin-right: 6px; vertical-align: middle; }
.notif-item.gone { opacity: .6; }
.ni-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.notif-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 10px; }

/* ---------- Vetlyn self-serve (27 Nov 2026) ---------- */
.saas-start { max-width: 980px; margin: 0 auto; padding: 8vh 20px 40px; overflow-y: auto; height: 100vh; height: 100dvh; box-sizing: border-box; }
.saas-hero { text-align: center; max-width: 640px; margin: 0 auto; }
.saas-logo { font-weight: 800; font-size: 22px; color: #0E7C86; letter-spacing: -.01em; margin-bottom: 18px; }
.saas-hero h1 { font-family: var(--display); font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin: 0 0 12px; color: var(--ink); }
.saas-hero .lead { font-size: 16px; color: var(--ink-2); margin: 0 0 22px; }
.saas-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.saas-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 42px; }
.saas-feature { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; text-align: left; }
.saas-feature .ico { font-size: 22px; margin-bottom: 6px; }
.saas-feature p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.saas-create { max-width: 520px; margin: 0 auto; text-align: left; }
.saas-create h2 { margin: 0 0 4px; }
.plan-banner { margin: 6px 10px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(14,124,134,.18); color: #E6FFFB; font-size: 12px; line-height: 1.4; display: flex; flex-direction: column; gap: 8px; }
.plan-banner.ended { background: rgba(229,72,77,.22); }
.plan-banner .btn { align-self: flex-start; }
.plan-list { margin: 10px 0; padding-left: 18px; font-size: 13px; }
.plan-list li { margin: 4px 0; }
