: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; }

/* ---------- FamiVet 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: minmax(0, 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 */

.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; }
/* routing options (28 Nov 2026) */
.rt-opts { display: grid; gap: 8px; margin: 10px 0 14px; }
.rt-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.rt-opt input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- Inventory (29 Nov 2026) */
.inv-page { position: relative; }
.inv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-head p { margin: 0; }
.inv-where { display: flex; align-items: center; gap: 8px; }
.inv-where .input { width: auto; min-width: 160px; }
.ic-btn.rec { background: var(--danger); border-color: var(--danger); color: #fff; animation: invpulse 1.2s ease-in-out infinite; }
@keyframes invpulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 25%, transparent); } }
.inv-alerts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; }
.inv-alerts.ok { color: #137a3d; }
.inv-alert { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 7px 11px; text-align: left; font-weight: 600; max-width: 100%; }
.inv-alert.warn { border-color: #f3d38b; background: #fff8e6; color: #8a5a00; }
.inv-alert.bad { border-color: #f5b5b5; background: #fff1f1; color: #a11d1d; }
.inv-alerts-home { margin: 10px auto 0; display: block; border: 1px solid #f3d38b; background: #fff8e6; color: #8a5a00; border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 12px; }
.inv-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.inv-dot { display: inline-block; margin-left: 5px; background: var(--danger); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 6px; }
.inv-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.inv-search { width: 220px; }
.inv-tbl th { text-align: left; font-size: 11px; color: var(--ink-2); padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.inv-tbl th.mine { color: var(--brand); }
.inv-td { width: 1%; white-space: nowrap; }
.inv-name { border: 0; background: none; padding: 0; text-align: left; color: var(--ink); cursor: pointer; }
.inv-name:hover b { text-decoration: underline; }
.inv-cell { min-width: 58px; min-height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--soft); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 8px; font-size: 13px; cursor: pointer; }
.inv-cell.mine { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.inv-cell.ok { background: #effaf3; border-color: #cdeedb; color: #137a3d; }
.inv-cell.warn { background: #fff8e6; border-color: #f3d38b; color: #8a5a00; }
.inv-cell.bad { background: #fff1f1; border-color: #f5b5b5; color: #a11d1d; }
.inv-cell.zero { color: var(--ink-3); }
.inv-exp { font-size: 10px; color: #a11d1d; }
.inv-cards { display: none; }
.inv-pos { color: #137a3d; } .inv-neg { color: var(--danger); }
.inv-warn { background: #fff8e6; border: 1px solid #f3d38b; color: #8a5a00; border-radius: 9px; padding: 8px 10px; font-size: 12px; }
.inv-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inv-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inv-empty { text-align: center; }
.inv-empty .inv-row { justify-content: center; }
.inv-menu { display: flex; flex-direction: column; gap: 8px; }
.inv-menu .btn { justify-content: flex-start; }
.inv-kinds { flex-wrap: wrap; margin-bottom: 12px; }
.inv-qty { width: 84px !important; flex: 0 0 auto; }
.inv-confirm .inv-heard { background: var(--soft); border-radius: 10px; padding: 9px 11px; color: var(--ink); }
.inv-line { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; }
.inv-line.off { opacity: .45; }
.inv-line > input[type=checkbox] { margin-top: 9px; }
.inv-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.inv-line-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.inv-line-top select.input { flex: 1 1 180px; width: auto; min-width: 0; }
.inv-after { margin: 0; }
.inv-kind { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.inv-kind.k-use, .inv-kind.k-wastage { background: #fff1f1; color: #a11d1d; }
.inv-kind.k-delivery, .inv-kind.k-return { background: #effaf3; color: #137a3d; }
.inv-kind.k-transfer { background: #eef5ff; color: #1d4fb8; }
.inv-kind.k-request { background: var(--ai-bg); color: var(--ai); }
.inv-req-box { border: 1px dashed color-mix(in srgb, var(--ai) 40%, var(--line)); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; }
.inv-rq { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 9px; max-width: 900px; }
.inv-rq.late { border-color: #f5b5b5; }
.inv-rq-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-rq-lines { margin: 8px 0; padding-left: 18px; }
.inv-move { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.pill.warn { background: #fff8e6; color: #8a5a00; } .pill.info { background: #eef5ff; color: #1d4fb8; } .pill.muted { color: var(--ink-3); }
.inv-done summary { cursor: pointer; color: var(--ink-2); margin: 10px 0; }
.inv-usage { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-width: 1000px; }
.inv-use-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.inv-use-card h4, .inv-sub { margin: 0 0 6px; font-size: 13px; }
.inv-sub { margin-top: 18px; }
.inv-use-card ul { margin: 0; padding-left: 16px; }
.inv-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.inv-levels label { display: flex; flex-direction: column; gap: 3px; color: var(--ink-2); }
.inv-setup .card .inv-line-top b { min-width: 120px; }
@media (max-width: 820px) {
  .inv-desk { display: none; }
  .inv-cards { display: flex; flex-direction: column; gap: 8px; padding-bottom: 80px; }
  .inv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; }
  .inv-card-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; margin-top: 8px; }
  .inv-card-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .inv-card-cell > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .inv-card-cell .inv-cell { width: 100%; min-height: 44px; }
  .inv-where { width: 100%; } .inv-where .input { flex: 1; font-size: 16px; }
  .inv-search { width: 100%; font-size: 16px; }
  .inv-2 { grid-template-columns: 1fr; }
  .inv-line-top select.input, .inv-qty { font-size: 16px; }
}

/* Stock assistant chat (29 Nov 2026): beside the stock on desktop, on top on phones. Small controls, like a chat app. */
.inv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.inv-main { min-width: 0; }
.inv-side { position: sticky; top: 0; }
.ic { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; height: calc(100vh - 90px); max-height: 760px; min-height: 360px; }
.ic-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.ic-log { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ic-empty p { margin: 0 0 8px; }
.ic-chip { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 7px 10px; margin-bottom: 6px; color: var(--ink-2); font-size: 12px; }
.ic-msg { max-width: 92%; padding: 8px 11px; border-radius: 12px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ic-msg.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.ic-msg.ai { align-self: flex-start; background: var(--soft); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.ic-msg.ai.err { background: #fff1f1; border-color: #f5b5b5; color: #a11d1d; }
.ic-v { opacity: .8; }
.ic-card { margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; white-space: normal; }
.ic-card.done { color: #137a3d; background: #effaf3; border-color: #cdeedb; font-size: 12px; }
.ic-card.done.cancelled, .ic-card.done.replaced { color: var(--ink-3); background: var(--soft); border-color: var(--line); }
.ic-line { display: flex; gap: 6px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.ic-line.off { opacity: .45; }
.ic-line > input[type=checkbox] { margin-top: 8px; }
.ic-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ic-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ic-qty { width: 62px !important; flex: 0 0 auto; padding: 5px 7px; }
.ic-sel { flex: 1 1 120px; width: auto; min-width: 0; padding: 5px 7px; font-size: 12px; }
.ic-date { width: 140px; padding: 5px 7px; font-size: 12px; }
.ic-note { margin-top: 6px; padding: 6px 8px; font-size: 12px; }
.ic-after { margin: 0; }
.ic-acts { justify-content: flex-end; margin-top: 8px; }
.ic-acts .muted { margin-right: auto; }
.ic-box { border-top: 1px solid var(--line-2); padding: 8px 10px; display: flex; align-items: flex-end; gap: 6px; }
.ic-input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: none; font: inherit; font-size: 13px; line-height: 1.4; max-height: 120px; outline: none; background: #fff; }
.ic-input:focus { border-color: var(--brand); }
.ic-tools { display: flex; align-items: center; gap: 4px; }
.ic-rec { min-width: 0; color: var(--danger); }
.ic-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 15px; padding: 0; color: var(--ink-2); }
.ic-btn:hover { border-color: #c9d3dc; }
.ic-send { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
@media (max-width: 1080px) { .inv-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 820px) {
  .inv-layout { display: flex; flex-direction: column-reverse; gap: 12px; }
  .inv-side { position: static; width: 100%; }
  .ic { height: auto; max-height: none; min-height: 0; }
  .ic-log { max-height: 42vh; min-height: 0; }
  .ic-empty .ic-chip { display: inline-block; width: auto; margin-right: 6px; }
  .ic-input, .ic-qty, .ic-sel, .ic-date, .ic-note { font-size: 16px; }
  .ic-btn { width: 38px; height: 38px; }
}

/* Voice messages (29 Nov 2026): small mic + review/auto-send switch, shared by composer, team chat, stock chat. */
.vc { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.vc-mic { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 15px; padding: 0; color: var(--ink-2); }
.vc-mic:hover { border-color: #c9d3dc; }
.vc-mic.rec { background: var(--danger); border-color: var(--danger); color: #fff; animation: invpulse 1.2s ease-in-out infinite; }
.vc-mic:disabled { opacity: .6; }
.vc-rec { font-size: 11px; color: var(--danger); min-width: 0; white-space: nowrap; }
.vc-mode { border: 1px solid var(--line); background: var(--soft); color: var(--ink-2); border-radius: 999px; font-size: 10.5px; padding: 3px 8px; white-space: nowrap; }
.vc-mode.auto { background: #fff8e6; border-color: #f3d38b; color: #8a5a00; }
.dict-said { margin-top: 6px; font-size: 12px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 9px; color: var(--ink-2); overflow-wrap: anywhere; }
.cc-row .vc { align-self: center; }
@media (max-width: 820px) { .vc-mic { width: 38px; height: 38px; } }

/* Language switch (29 Nov 2026): Français (default) / English, in the menu. */
.lang-sw { display: inline-flex; gap: 2px; margin-top: 8px; background: rgba(255,255,255,.08); border-radius: 8px; padding: 2px; }
.lang-sw button { border: 0; background: none; color: #8fa3b0; font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.lang-sw button.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }

/* Translated chat messages (29 Nov 2026) */
.tr-flag { display: block; margin-top: 3px; border: 0; background: none; padding: 0; font-size: 10.5px; color: var(--ink-3); cursor: pointer; text-align: left; }
.tr-flag:hover { color: var(--brand); text-decoration: underline; }

/* Stock import (29 Nov 2026) */
.imp-modal .seg { flex-wrap: wrap; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed var(--line); border-radius: 12px; padding: 18px 12px; margin: 12px 0 8px; cursor: pointer; text-align: center; background: var(--soft); }
.imp-drop.over, .imp-drop:focus { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); outline: none; }
.imp-file { display: none; }
.imp-paste summary { cursor: pointer; color: var(--ink-2); font-size: 12px; margin-bottom: 6px; }
.imp-status { margin: 8px 0; }
.imp-map-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.imp-map-row label { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.imp-map-row .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.imp-tbl-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line-2); border-radius: 10px; }
.imp-tbl th { position: sticky; top: 0; background: #fff; text-align: left; font-size: 11px; color: var(--ink-2); padding: 6px; }
.imp-tbl td { padding: 4px 6px; vertical-align: top; }
.imp-tbl tr.off { opacity: .45; }
.imp-tbl .input { padding: 5px 7px; font-size: 12px; }
.imp-tbl select.input { min-width: 170px; }
.imp-name { min-width: 160px; } .imp-num { width: 74px; } .imp-unit { width: 90px; } .imp-date { width: 138px; }
@media (max-width: 820px) { .imp-tbl .input { font-size: 16px; } }
.imp-conv { white-space: nowrap; color: #8a5a00; }

/* ---- clients & animals (30 Nov 2026): import preview, overview figures, animals in the client panel */
.cl-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cl-chip { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.cl-chip.new { background: #e6f4f5; color: #0b5f67; }
.cl-chip.upd { background: #eef1f4; color: var(--ink-2); }
.cl-chip.bad { background: #fff1f1; color: #a12b2b; }
.cl-st { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cl-tbl td { vertical-align: top; }
.cl-progress { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin: 8px 0; }
.cl-progress > div { height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cl-card { margin: 0; max-width: none; }
.cl-ch { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cl-ch h3 { margin: 0; font-size: 14px; }
.cl-bars { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cl-bar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; border: 0; background: none; padding: 5px 6px; border-radius: 8px; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.cl-bar:hover, .cl-bar:focus-visible { background: var(--line-2); }
.cl-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.cl-bt { height: 8px; background: transparent; position: relative; }
.cl-bf { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand); border-radius: 0 4px 4px 0; }
.cl-bv { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.cl-actrow { display: flex; align-items: center; gap: 6px; }
.cl-age { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; align-items: center; gap: 10px; padding: 6px; }
.cl-stack { display: flex; gap: 2px; height: 10px; }
.cl-seg { border-radius: 2px; min-width: 3px; }
.cl-seg:first-child { border-radius: 4px 2px 2px 4px; } .cl-seg:last-child { border-radius: 2px 4px 4px 2px; }
.b0 { background: #8fd1d6; } .b1 { background: #2b9aa3; } .b2 { background: #0b4f56; } .b3 { background: #c9d1d8; }
.cl-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--ink-2); }
.cl-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.cl-mini { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 10px; }
.cl-mini b { font-variant-numeric: tabular-nums; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.linkbtn:hover b { color: var(--brand); text-decoration: underline; }
.cl-months { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 6px; }
.cl-mo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.cl-mb { width: 100%; max-width: 26px; background: var(--brand); border-radius: 4px 4px 0 0; }
.cl-mv { font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cl-ml { white-space: nowrap; }
.kpi.cl-click { cursor: pointer; text-align: left; font: inherit; color: inherit; }
.kpi.cl-click:hover { border-color: var(--brand); }
.cl-empty { max-width: 560px; }
.cl-segchip { font-size: 12px; padding: 4px 6px 4px 11px; background: #e6f4f5; color: #0b5f67; font-weight: 600; }
.cl-animals .cl-ah { display: flex; align-items: center; justify-content: space-between; }
.cl-animals .cl-ah h4 { margin: 0; }
.cl-alist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-alist li.off { opacity: .55; }
.cl-arow { display: flex; gap: 8px; align-items: flex-start; width: 100%; border: 0; background: none; padding: 6px; border-radius: 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cl-arow:hover, .cl-arow:focus-visible { background: var(--line-2); }
.cl-aic { font-size: 18px; line-height: 1.1; }
@media (max-width: 820px) { .cl-grid { grid-template-columns: 1fr; } .cl-bar, .cl-age { grid-template-columns: minmax(80px, 42%) 1fr auto; } }
.btn.danger { color: var(--danger); }
.cl-actrow .cl-bar { grid-template-columns: minmax(150px, 58%) 1fr auto; }
.cl-actrow .cl-bl { white-space: normal; }

/* Internal chat per client (30 Nov 2026) */
.ic-seg { position: relative; }
.ic-seg button { position: relative; white-space: nowrap; }
.seg button.ic-on { background: #fffbeb; color: #b45309; }
.ic-seg .ic-n { font-weight: 400; opacity: .75; }
.ic-seg .tab-dot { position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.ic-bar { position: sticky; top: -1px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 7px 10px; margin-bottom: 10px; font-size: 12px; }
.ic-lbl { color: #b45309; font-weight: 600; }
.ic-mem { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px 2px 2px; }
.ic-mem.me { border-color: #f2b233; }
.ic-av { width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.ic-why { color: var(--ink-3); font-size: 10.5px; }
.ic-x { border: 0; background: none; color: var(--ink-3); font-size: 14px; line-height: 1; padding: 0 2px; cursor: pointer; }
.ic-x:hover { color: var(--danger); }
.ic-add { width: auto; max-width: 230px; flex: 0 1 auto; padding: 3px 8px; font-size: 12px; min-height: 0; }
.ic-sys { align-self: center; text-align: center; font-size: 11px; color: var(--ink-3); margin: 4px 0; }
.ic-msg { background: transparent; }
.ic-ta { resize: none; min-height: 52px; max-height: 160px; background: #fffdf5; }
.ic-foot { padding: 4px 2px; }
@media (max-width: 820px) { .ic-add { font-size: 16px; } .ic-ta { font-size: 16px; } }

/* Photos and documents (30 Nov 2026) */
.att-chip { display: flex; align-items: center; gap: 8px; background: var(--line-2); border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; font-size: 12.5px; min-width: 0; }
.att-chip .att-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.att-chip .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.att-ico { font-size: 20px; }
.att-btn { font-size: 15px; padding: 4px 9px; }
.att-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.msg.out .att-list { align-items: flex-end; }
.att-photo img { max-width: min(260px, 70vw); max-height: 260px; border-radius: 12px; display: block; border: 1px solid var(--line); }
.att-doc { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.att-doc:hover { border-color: var(--brand); }
.att-audio { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.att-audio audio { max-width: min(260px, 70vw); height: 36px; }

/* New-client intake (30 Nov 2026) */
.intake-card { border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.ik-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ik-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ik-animal { background: #fff; border: 1px solid #dbeafe; border-radius: 999px; padding: 1px 8px; }
.ik-act { display: flex; gap: 8px; flex-wrap: wrap; }
.ik-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.ik-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 70px 24px; gap: 6px; align-items: center; }
.ik-pc { display: flex; gap: 6px; margin-top: 6px; }
@media (max-width: 820px) { .ik-row { grid-template-columns: 1fr 1fr; } .ik-row .ic-x { justify-self: end; } }

/* Merge clients (30 Nov 2026) */
.dup-card { border: 1px solid #e9d5ff; background: #faf5ff; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.dup-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dup-row .btn { margin-left: auto; }
.dup-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 300px; overflow-y: auto; }
.dup-pick { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.dup-pick:hover { border-color: var(--brand); }

/* One-tap colour status + co-owners (30 Nov 2026) */
.st-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.st-pill { --c: #64748b; display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid color-mix(in srgb, var(--c) 35%, transparent); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.st-pill .st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.st-pill.on { background: var(--c); border-color: var(--c); color: #fff; }
.st-pill.on .st-dot { background: #fff; }
.st-pill.p-new { --c: #2563eb; } .st-pill.p-needs_reply { --c: #dc2626; } .st-pill.p-pending { --c: #d97706; } .st-pill.p-closed { --c: #6b7785; }
.co-chip { font-size: 11.5px; color: var(--ink-2); background: var(--line-2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.rt-co { margin: 10px 0 4px; }
.rt-co-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.rt-co-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
@media (max-width: 820px) { .st-pill { padding: 7px 12px; font-size: 13px; } }
.thread-head { flex-wrap: wrap; }
.thread-head .st-row { order: 9; width: 100%; margin: 6px 0 0; }
.thread-head .st-pills { flex-wrap: nowrap; }
@media (max-width: 820px) {
  .thread-head .st-row { order: 4; width: 100%; margin: 6px 0 0; }
  .thread-head .st-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; }
  .thread-head .st-pill { justify-content: center; padding: 8px 4px; font-size: 12px; }
}

/* Inventory on/off (30 Nov 2026) */
.inv-off { max-width: 560px; margin: 24px auto; padding: 22px; }
.inv-off h1 { margin: 0 0 8px; }
.inv-off .acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.inv-off-req { font-weight: 600; margin-bottom: 4px; }
.inv-owner { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; }

/* Leave / stand-ins (Team page) */
.leave-cell { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.leave-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #fff4e0; color: #8a5300; width: fit-content; }
.leave-chip.planned { background: #eef2ff; color: #3b4a9c; }
.leave-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* Inventory: sold to client, To bill, undo, phone mic (1 Dec 2026) */
.ic-from { font-size: 15px; padding: 2px 0 6px; }
.ic-from b { font-size: 16px; }
.ic-kind { width: auto; min-width: 0; font-weight: 600; }
.inv-kind.k-sale, .ic-kind.k-sale { background: #eaf7ee; color: #1e6b3a; }
.inv-kind.k-client { background: #eef2ff; color: #3b4a9c; }
.ic-client { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; }
.ic-check { margin: 4px 0 0; }
.ic-card.done { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.ic-card.done.undone { opacity: .75; }
.ic-queue { background: #fff4e0; color: #8a5300; border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.ic-pulse { animation: icpulse 1.2s ease-in-out 4; box-shadow: 0 0 0 0 rgba(37, 99, 235, .5); }
@keyframes icpulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .5); } 70% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }
.tb-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; position: sticky; top: 0; background: var(--bg, #f7f8fa); padding: 6px 0; z-index: 2; }
.tb-card { padding: 10px 12px; margin-bottom: 8px; }
.tb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.tb-check { font-size: 11.5px; font-weight: 600; background: #fff4e0; color: #8a5300; border-radius: 999px; padding: 1px 8px; }
.tb-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0 4px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.tb-qty { font-weight: 700; min-width: 56px; }
.tb-name { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ic-pulse { animation: none; } }

/* Voice notes and videos in the reply box and threads (1 Dec 2026) */
.vn { display: inline-flex; align-items: center; gap: 4px; }
.vn-btn.rec { background: #d93025; color: #fff; border-color: #d93025; }
.vn-time { font-size: 12px; color: #d93025; font-variant-numeric: tabular-nums; }
.vn-cancel[hidden] { display: none; }
.att-video { max-width: min(300px, 75vw); max-height: 320px; border-radius: 12px; display: block; background: #000; }
.att-prev-audio { height: 32px; max-width: 220px; }

/* Voice library in the receptionist editor (2 Dec 2026): listen, then choose */
.rc .voice-lib { margin: 4px 0 10px; }
.rc .vc-group h5 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #6b7280); }
.rc .voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.rc .voice-card { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rc .voice-card.on { border-color: var(--accent, #2563eb); box-shadow: 0 0 0 1px var(--accent, #2563eb) inset; }
.rc .vc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rc .vc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.rc .vc-on { font-size: 12px; font-weight: 600; color: var(--accent, #2563eb); }
.rc .vc-adv { margin-top: 10px; }
.rc .vc-adv summary { cursor: pointer; font-size: 13px; color: var(--muted, #6b7280); margin-bottom: 6px; }
@media (max-width: 480px) { .rc .voice-grid { grid-template-columns: 1fr; } }

/* Unsaved receptionist changes (2 Dec 2026): a bar that stays at the bottom of the screen until saved */
.rc .rc-savebar { position: sticky; bottom: 8px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fff7e6; border: 1px solid #f5c26b; box-shadow: 0 4px 14px rgba(0,0,0,.08); font-size: 13px; }
.rc .rc-savebar[hidden] { display: none; }
.rc .rc-bar-text { flex: 1 1 220px; min-width: 0; }
.rc .rc-bar-acts { display: flex; gap: 6px; }
.rc .vc-unsaved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: #fff7e6; font-size: 12px; }

/* ---------- Tablets (2 Dec 2026): FamiVet uses a tablet at the clinic ----------
   Any width: a long name pushes the AI tag under it instead of shrinking to one letter, and the conversation
   header controls keep their size and wrap to a new line instead of being squeezed or pushed off screen. */
.conv .top { flex-wrap: wrap; row-gap: 4px; }
.conv .nm { flex: 0 1 auto; max-width: 100%; }
@media (min-width: 821px) {
  .thread-head .actions { flex-wrap: wrap; min-width: 0; row-gap: 6px; }
  .thread-head .actions > *, .inbox-ctl > * { flex: none; }
  .inbox-ctl { flex: none; flex-wrap: nowrap; }
  /* reply bar: on a narrow thread (tablet upright) the buttons wrap and Send stays on screen, to the right */
  .send-row { flex-wrap: wrap; row-gap: 6px; }
  .send-row #instr { flex: 1 1 140px; min-width: 140px; }
  .send-row #sendbtn { margin-left: auto; }
}
/* Touch screens wider than a phone (tablets held either way, touch laptops): finger-sized controls, and 16px text
   in fields so iPad Safari does not zoom in when a field is tapped. Phones keep their own rules (≤820px). */
@media (pointer: coarse) and (min-width: 821px) {
  .input, textarea.input, select.input, .search, .chat-ta, .omni-input, .inv-search, .ic-input, .ic-qty, .ic-sel, .ic-date, .ic-note, .ic-add, .ic-ta { font-size: 16px; }
  .btn { min-height: 40px; }
  .btn.sm { min-height: 36px; }
  .nav { min-height: 48px; }
  .seg button, .st-pill, .mini-sel { min-height: 36px; }
  .conv { padding-top: 14px; padding-bottom: 14px; }
}

/* ---------- Phones: more room for the messages (2 Dec 2026) ----------
   Header = 2 rows (who + one swipeable row of status buttons and actions), a smaller draft card that opens on tap,
   and a reply area that stays one line high until the box is tapped. */
.head-bar { display: contents; }
@media (max-width: 820px) {
  .thread-head { gap: 4px 6px; padding: calc(4px + env(safe-area-inset-top)) 6px 6px; }
  .back { width: 38px; height: 38px; font-size: 19px; }
  .who-btn { padding: 2px 4px; gap: 8px; }
  .who-btn .avatar { width: 32px; height: 32px; font-size: 11.5px; }
  .thread-head .title { font-size: 14px; }
  .thread-head .ids { font-size: 11px; }
  .thread-head .head-bar { display: flex; order: 3; width: 100%; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-items: center; padding: 2px 0 0; }
  .thread-head .head-bar::-webkit-scrollbar { display: none; }
  .thread-head .head-bar > .st-row { order: 0; width: auto; margin: 0; flex: none; }
  .thread-head .head-bar .st-pills { display: flex; gap: 4px; width: auto; }
  .thread-head .head-bar .st-pill { padding: 4px 9px; font-size: 12px; min-height: 30px; }
  .thread-head .head-bar > .actions { order: 1; width: auto; flex: none; overflow: visible; padding: 0; gap: 6px; }
  .thread-head .head-bar .btn.sm { min-height: 30px; padding: 4px 9px; font-size: 12px; }
  .thread-head .head-bar .seg button { padding: 4px 9px; font-size: 12px; }
  .thread-head .head-bar .mini-sel { min-height: 30px; font-size: 12.5px; padding-top: 2px; padding-bottom: 2px; }

  /* draft card: 3 lines, tap the text to read it all */
  .draft { padding: 8px 10px; margin-bottom: 6px; }
  .draft .h { font-size: 11px; gap: 6px; }
  .draft .h .pill { display: none; }
  .draft .body { font-size: 13.5px; margin-top: 4px; max-height: none; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; cursor: pointer; }
  .draft.open .body { display: block; max-height: 30vh; overflow-y: auto; }
  .draft .acts { margin-top: 6px; gap: 6px; }
  .draft .acts .btn { min-height: 34px; padding: 4px 10px; font-size: 12.5px; }

  /* reply area */
  .composer { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); max-height: 46vh; }
  .composer:not(.open) .compose-row { display: none; }
  .composer .compose-row { margin-bottom: 4px; }
  .composer .chan-btn { min-height: 32px; }
  .composer textarea.input { min-height: 40px; height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .composer.open textarea.input, .composer textarea.input:focus { height: 88px; }
  .composer .send-row { flex-wrap: nowrap; gap: 6px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
  .composer .send-row::-webkit-scrollbar { display: none; }
  .composer .send-row #sendbtn { position: sticky; right: 0; box-shadow: -8px 0 8px var(--panel); }
  .composer .send-row > * { flex: none; }
  .composer .send-row .btn { min-height: 36px; padding: 4px 10px; font-size: 13px; }
  .composer .vn-btn:not(.rec) .vn-word { display: none; }
}
/* Draft card on larger screens too (2 Dec 2026): 4 lines (click to read it all); translation and checks behind "Details". */
@media (min-width: 821px) {
  .draft .tr, .draft .checks { display: none; }
  .draft.expanded .tr, .draft.expanded .checks { display: block; }
  .draft-more { display: inline-flex; }
  .draft .body { max-height: none; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; cursor: pointer; }
  .draft.open .body { display: block; max-height: 260px; overflow-y: auto; }
}

/* Folded AI draft (2 Dec 2026): one line; tap to open */
.draft-bar { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid #e4d8ff; background: var(--ai-bg); border-radius: 10px; padding: 5px 10px; margin-bottom: 6px; font-size: 12px; color: var(--ai); cursor: pointer; text-align: left; min-height: 34px; }
.draft-bar .db-txt { font-weight: 650; flex: none; }
.draft-bar .db-prev { flex: 1; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-bar .db-open { flex: none; font-weight: 650; }
.draft-bar .ai-av, .draft-bar img { width: 20px; height: 20px; }

/* Phones, round 2 (2 Dec 2026): the conversation gets the screen — one-line header details, tighter messages */
@media (max-width: 820px) {
  .thread-head { padding: calc(2px + env(safe-area-inset-top)) 6px 4px; gap: 2px 4px; }
  .back { width: 34px; height: 34px; font-size: 18px; }
  .who-btn .avatar { width: 28px; height: 28px; font-size: 10.5px; }
  .thread-head .ids { display: none; }
  .thread-head .title { font-size: 14px; }
  .thread-head .head-bar { padding: 0; }
  .thread-head .head-bar .st-pill, .thread-head .head-bar .btn.sm, .thread-head .head-bar .seg button, .thread-head .head-bar .mini-sel { min-height: 28px; font-size: 11.5px; }
  .timeline { padding: 8px 8px 6px; gap: 6px; }
  .bubble { padding: 7px 10px; font-size: 14px; line-height: 1.38; border-radius: 12px; }
  .msg { gap: 2px; }
  .msg .info { font-size: 10px; }
  .day { margin: 2px 0; }
  .loc-map { height: 96px; }
  .draft-bar .db-txt { display: none; }
}
/* Larger screens (2 Dec 2026): status buttons flow next to the actions instead of taking a row of their own */
@media (min-width: 821px) {
  .thread-head { padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
  .thread-head .st-row { width: auto; margin: 0; }
}
/* English only (2 Dec 2026) */
.trans-flip { align-self: inherit; background: none; border: 0; padding: 0 2px; font-size: 10.5px; color: var(--ink-3); cursor: pointer; text-align: left; }
.msg.out .trans-flip { text-align: right; }
.trans-flip:hover { color: var(--ink); text-decoration: underline; }
.lang-wrap { display: flex; flex-direction: column; gap: 6px; }
.en-only { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 8px; padding: 5px 8px; font-size: 11.5px; cursor: pointer; text-align: left; }
.en-only.on { border-color: var(--brand); font-weight: 600; }

/* ---------- Mia for the team + Hours (2 Dec 2026) ---------- */
.mia-av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ai-bg); color: var(--ai); font-size: 15px; flex: none; }
.mia-av.big { width: 44px; height: 44px; font-size: 22px; }
.mia-welcome { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: min(380px, calc(100vw - 24px)); background: #fff; border: 1px solid #e4d8ff; border-radius: 14px; box-shadow: 0 14px 40px rgba(16,24,40,.18); padding: 14px 16px; animation: slidein .2s ease-out; }
.mia-welcome .mw-top { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.mia-welcome .mw-x { margin-left: auto; border: 0; background: none; font-size: 16px; cursor: pointer; color: var(--ink-3); width: 32px; height: 32px; }
.mia-welcome .mw-lines p { margin: 6px 0 0; font-size: 13.5px; }
.mia-welcome .mw-q { margin: 10px 0 6px; font-weight: 600; font-size: 13.5px; }
.mia-welcome .mw-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mia-page { display: flex; flex-direction: column; height: 100%; max-width: 760px; margin: 0 auto; width: 100%; }
.mia-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.mia-head h1 { margin: 0; }
.mia-head p { margin: 2px 0 0; }
.mia-list { flex: 1; min-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 2px; }
.mia-msg { max-width: 86%; display: flex; flex-direction: column; gap: 4px; }
.mia-msg.user { align-self: flex-end; align-items: flex-end; }
.mia-msg .mb { white-space: pre-wrap; padding: 9px 12px; border-radius: 14px; background: var(--ai-bg); font-size: 14px; }
.mia-msg.user .mb { background: var(--brand); color: var(--brand-ink); }
.mia-msg .ma { display: flex; flex-wrap: wrap; gap: 6px; }
.mia-sug { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.mia-sug .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }
.mia-compose { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
.mia-compose .mia-ta { flex: 1; resize: none; min-height: 42px; max-height: 140px; }
.mia-mic .vc-mode { display: none; }
.hours-page { max-width: 820px; }
.hr-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.hr-range { font-weight: 600; }
.hr-stats { justify-content: flex-start; margin: 6px 0 12px; }
.hr-day { margin-bottom: 10px; padding: 12px 14px; }
.hr-dh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-tot { font-weight: 700; font-size: 15px; }
.hr-corr { background: #fff7e6; color: #8a5a00; }
.hr-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.hr-e { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; text-align: left; width: 100%; border: 1px solid var(--line); border-left-width: 4px; background: #fff; border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; min-height: 40px; }
.hr-e:hover { background: var(--soft); }
.hr-e.k-app_work { border-left-color: #2563eb; } .hr-e.k-on_call_work { border-left-color: #7c3aed; } .hr-e.k-on_call { border-left-color: #a78bfa; background: #faf7ff; }
.hr-e.k-travel { border-left-color: #d97706; } .hr-e.k-on_site { border-left-color: #059669; } .hr-e.k-office { border-left-color: #0891b2; } .hr-e.k-break { border-left-color: #9ca3af; }
.hr-e .hr-k { font-weight: 600; min-width: 170px; }
.hr-e .hr-t { font-variant-numeric: tabular-nums; }
.hr-e .hr-m { font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.hr-e .hr-note { flex-basis: 100%; }
.hr-changes { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.hr-changes li { margin: 4px 0; }
@media (max-width: 820px) {
  .mia-welcome { right: 8px; left: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); width: auto; }
  .mia-page { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .hr-e .hr-k { min-width: 0; }
  .mia-compose .mia-ta { font-size: 16px; }
}

/* ✨ Mia: my tasks, any time (2 Dec 2026) */
.mia-open { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid rgba(255,255,255,.14); background: rgba(124,58,237,.18); color: inherit; border-radius: 10px; padding: 8px 10px; margin: 6px 0; cursor: pointer; font-size: 13px; text-align: left; min-height: 40px; }
.mia-open:hover { background: rgba(124,58,237,.3); }
@media (max-width: 1080px) { .mia-open { justify-content: center; padding: 8px 0; } .mia-open .txt { display: none; } }

/* AI agents page (2 Dec 2026) */
.agents-page { max-width: 1100px; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ag-card { display: flex; flex-direction: column; gap: 6px; }
.ag-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-top h3 { margin: 0; }
.ag-job { margin: 0; font-size: 13.5px; }
.ag-inst { border-top: 1px solid var(--line-2); padding-top: 8px; margin-top: 4px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ag-il { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: 13px; }
.ag-sees { margin: 0; }
.ag-edited { background: #fff7e6; color: #8a5a00; }
.ag-on { background: #e8f7ee; color: #067647; } .ag-off { background: #f1f5f9; color: #64748b; }
.ag-switch { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.ag-switch input { margin-top: 3px; width: 18px; height: 18px; }
.ag-switch span { display: flex; flex-direction: column; }
.ag-flow ol { margin: 6px 0 0; padding-left: 20px; font-size: 13.5px; } .ag-flow li { margin: 3px 0; }
.ag-ta { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.45; min-height: 260px; }
.ag-pre { white-space: pre-wrap; word-break: break-word; background: var(--soft); border-radius: 8px; padding: 8px 10px; font-size: 12px; max-height: 260px; overflow: auto; }
.ag-det { margin: 8px 0; } .ag-det summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.ag-hist { padding-left: 18px; font-size: 12.5px; } .ag-hist li { margin: 4px 0; }
.ag-out { margin: 8px 0; }
.ag-modal { max-width: 900px; }
@media (max-width: 820px) { .ag-ta { font-size: 16px; min-height: 200px; } .ag-grid { grid-template-columns: 1fr; } }

/* What the codes mean (2 Dec 2026) */
.list-legend { margin-top: 6px; font-size: 10.5px; line-height: 1.35; color: var(--ink-3); }
@media (max-width: 820px) { .list-legend { font-size: 10.5px; margin-top: 4px; } }

/* Style guide on the AI agents page (2 Dec 2026) */
.ag-style { border-top: 1px solid var(--line-2); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }

/* Prices page (2 Dec 2026) */
.prices-page { max-width: 900px; }
.pr-quote { padding: 10px 14px; }
.pr-list { display: flex; flex-direction: column; gap: 10px; }
.pr-group h3 { margin: 0 0 6px; }
.pr-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pr-row:first-of-type { border-top: 0; }
.pr-name { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.pr-price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pr-acts { display: flex; gap: 4px; }
.pr-ai { display: flex; flex-direction: column; gap: 6px; }
.pr-ai h3 { margin: 0; }
.pr-chat { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.pr-ta { flex: 1; resize: vertical; min-height: 44px; }
.pr-prop { border: 1.5px solid #e4d8ff; background: var(--ai-bg); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.pr-pl { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.pr-pl input { margin-top: 3px; }
@media (max-width: 820px) { .pr-ta { font-size: 16px; } }
