/* EnCRM - mobile first: bottom tab bar on phones, side rail on wide screens. */
:root {
  --bg: #f5f6fa; --card: #fff; --ink: #1d2030; --muted: #6b7083; --line: #e6e8ef; --accent: #4338ca; --accent-soft: #eef0ff;
  --good: #15803d; --good-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fff4e0; --bad: #b91c1c; --bad-soft: #fdecec;
  --radius: 14px; --nav-h: 62px; --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 20px; margin: 0; } h2 { font-size: 16px; margin: 0 0 10px; } h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* layout */
.shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px); }
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 12px 16px 8px; display: flex; align-items: center; gap: 10px; }
.top .title { flex: 1; min-width: 0; } .top .title .sub { font-size: 12px; color: var(--muted); }
.page { padding: 0 16px 16px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #fff; border-top: 1px solid var(--line); display: flex; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--accent); }
.nav a .dot { position: absolute; top: 8px; left: 50%; margin-left: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }
@media (min-width: 900px) {
  .shell { padding-bottom: 20px; padding-left: 92px; }
  .nav { top: 0; bottom: 0; right: auto; width: 84px; height: auto; flex-direction: column; justify-content: flex-start; padding-top: 14px; border-top: 0; border-right: 1px solid var(--line); }
  .nav a { flex: 0 0 72px; }
  .page, .top { padding-left: 20px; padding-right: 20px; }
  .nav-bg, .nav-bub, .top-more { display: none !important; }
}
/* Phones: a floating white bar; the open tab's icon rises into a round bubble sitting in a notch cut into the bar.
   More is at the top right (next to the bell) instead of in the bar. */
@media (max-width: 899px) {
  .shell { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 34px); }
  .nav { background: transparent; border-top: 0; height: calc(64px + var(--safe-b)); filter: drop-shadow(0 -3px 10px rgba(30,30,80,.10)); }
  .nav-bg { position: absolute; inset: 0; background: #fff; border-radius: 24px 24px 0 0;
    -webkit-mask-image: radial-gradient(circle 35px at 50% 4px, transparent 33px, #000 34.5px); mask-image: radial-gradient(circle 35px at 50% 4px, transparent 33px, #000 34.5px);
    -webkit-mask-size: 400% 100%; mask-size: 400% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    transition: -webkit-mask-position .4s cubic-bezier(.45,1.35,.5,1), mask-position .4s cubic-bezier(.45,1.35,.5,1); }
  .nav-bub { position: absolute; left: 0; top: -22px; width: 52px; height: 52px; border-radius: 50%; background: #fff; pointer-events: none;
    box-shadow: 0 6px 16px rgba(30,30,80,.16); transition: left .4s cubic-bezier(.45,1.35,.5,1); }
  .nav.still .nav-bg, .nav.still .nav-bub { transition: none; }
  .nav.no-bub .nav-bub { display: none; }
  .nav.no-bub .nav-bg { -webkit-mask-image: none; mask-image: none; }
  .nav a { z-index: 1; justify-content: flex-end; gap: 6px; padding-bottom: 10px; }
  .nav a .ni { display: flex; color: #a3a8ba; transition: transform .35s cubic-bezier(.45,1.35,.5,1), color .2s; }
  .nav a .nl { font-size: 11px; font-weight: 500; color: #a3a8ba; }
  .nav a.on .ni { transform: translateY(-17px); color: var(--accent); } /* rises once, on the tap; a redrawn bar shows it already up */
  .nav a.on .nl { color: var(--accent); font-weight: 700; font-size: 12px; }
  .nav a.on .dot { display: none; }
  .nav-more { display: none !important; }
  .fab { bottom: calc(var(--nav-h) + var(--safe-b) + 44px); }
  .actionbar { padding-bottom: 32px; }
  .top-more.on { background: var(--accent-soft); color: var(--accent); }
}

/* pieces */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 2px rgba(20,24,40,.05); margin-bottom: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 1px 2px rgba(20,24,40,.05); }
.stat .lbl { font-size: 12px; color: var(--muted); font-weight: 600; } .stat .val { font-size: 21px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; } .stat .hint { font-size: 12px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; min-height: 40px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; } .btn.bad { background: #fff; border-color: #f2c4c4; color: var(--bad); }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
/* Icons inside buttons (Call, WhatsApp…) stay icon-sized; button links are not underlined. */
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.sm svg { width: 16px; height: 16px; }
a.btn { text-decoration: none; color: inherit; } a.btn.primary, a.btn.good { color: #fff; }
.btn:disabled { opacity: .55; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: #fff; display: inline-flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 1px 2px rgba(20,24,40,.06); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef0f5; color: #4b5064; white-space: nowrap; }
.b-good { background: var(--good-soft); color: var(--good); } .b-warn { background: var(--warn-soft); color: var(--warn); } .b-bad { background: var(--bad-soft); color: var(--bad); } .b-acc { background: var(--accent-soft); color: var(--accent); }
.alert { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.alert.warn { background: var(--warn-soft); color: #7a3e06; } .alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.info { background: var(--accent-soft); color: #312a91; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* forms */
.f { display: block; margin-bottom: 12px; }
.f > span { display: block; font-size: 13px; font-weight: 600; color: #464a5c; margin-bottom: 5px; }
.f input, .f select, .f textarea, .search { width: 100%; border: 1px solid #d7dae4; border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; outline: none; }
.f textarea { min-height: 80px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus, .search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint-text { font-size: 12px; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; font-weight: 600; font-size: 14px; }
.check input { width: 20px; height: 20px; }
.seg { display: flex; background: #e9ebf2; border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: 7px 6px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,24,40,.1); }

/* WhatsApp broadcast */
.bc-bubble { background: #dcf8c6; color: #111b21; border-radius: 10px 10px 10px 2px; padding: 8px 10px; white-space: pre-wrap; font-size: 14px; max-width: 520px; }
.bc-bubble.muted { background: #f0f2f5; color: var(--muted); }

/* home charts */
:root { --c1: #4f46e5; --c2: #0d9488; }
.charts2 { display: grid; gap: 0 12px; }
@media (min-width: 900px) { .charts2 { grid-template-columns: 1fr 1fr; } }
.charts2 .seg { flex: none; padding: 2px; } .charts2 .seg button { flex: none; padding: 4px 10px; font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.tick, .ctip i.tick { width: 2px; height: 11px; border-radius: 1px; background: var(--ink) !important; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; } .chart .axis.strong { fill: var(--ink); font-weight: 600; }
.chart .hit { fill: transparent; cursor: pointer; }
.hbars { display: grid; gap: 9px; }
.hb { display: grid; grid-template-columns: minmax(70px, 120px) 1fr auto; align-items: center; gap: 10px; font-size: 13px; color: inherit; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { position: relative; height: 14px; }
.hb-t span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; min-width: 0; }
.hb-t .hb-k { width: 2px; top: -3px; bottom: -3px; background: var(--ink); border-radius: 1px; margin-left: -1px; }
.hb-v { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 38px; text-align: right; }
.ctip { position: fixed; z-index: 90; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; box-shadow: 0 6px 20px rgba(20,24,40,.15); font-variant-numeric: tabular-nums; }
.ctip > b { display: block; margin-bottom: 3px; }
.ctip .trow { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ctip .trow b { margin-left: auto; padding-left: 14px; }
.ctip .trow i { width: 9px; height: 9px; border-radius: 2px; flex: none; } .ctip .trow i.light { opacity: .3; }
.req { color: var(--bad); }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #464a5c; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { opacity: .65; margin-left: 4px; font-weight: 500; }

/* lists */
.item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; }
.item:last-child { border-bottom: 0; }
.item .main { flex: 1; min-width: 0; }
.item .t1 { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t2 { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.item .side { text-align: right; flex: 0 0 auto; }
.item .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.item.off { opacity: .5; } .item.off .amt { text-decoration: line-through; }
.qa { display: flex; gap: 6px; }
.qa a { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.qa a svg { width: 20px; height: 20px; }
.qa .call { background: var(--accent-soft); color: var(--accent); } .qa .wa { background: #e5f8ec; color: #128c4a; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }

/* status colours */
.st-New { background: #e0ecff; color: #1d4ed8; } .st-Contact-Attempted { background: #fff4e0; color: #b45309; } .st-Contacted { background: #e6f4ff; color: #0369a1; }
.st-Qualified { background: #f0e8ff; color: #6d28d9; } .st-Follow-Up { background: #fff1d6; color: #a16207; } .st-Converted { background: var(--good-soft); color: var(--good); }
.st-Bad-Fit, .st-Not-Interested { background: #eef0f5; color: #6b7083; }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); margin-left: 6px; }
.tl li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #c7cbe0; }
.tl li.status::before { background: var(--accent); } .tl li.whatsapp_in::before, .tl li.whatsapp::before { background: #25d366; }
.tl .when { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }

/* floating + action bars */
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 25; width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent); color: #fff;
  box-shadow: 0 6px 18px rgba(67,56,202,.35); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fab svg { width: 28px; height: 28px; }
.actionbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 25; display: flex; gap: 8px; padding: 10px 12px; background: rgba(245,246,250,.96); border-top: 1px solid var(--line); }
.actionbar .btn { flex: 1; }
.has-actionbar { padding-bottom: 70px; }
@media (min-width: 900px) { .fab { bottom: 24px; } .actionbar { left: 84px; bottom: 0; } }

/* sheets (full-screen on phones, centred panel on wide screens) */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15,18,30,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 94vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: up .18s ease-out; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; border-radius: 18px 18px 0 0; }
.sheet-head h2 { flex: 1; margin: 0; }
.sheet-body { overflow-y: auto; padding: 16px; padding-bottom: calc(16px + var(--safe-b)); }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 18px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* duty switch */
.duty { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 6px 12px 6px 6px; font-weight: 700; font-size: 13px; cursor: pointer; background: #e9ebf2; color: #555b70; }
.duty .knob { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.duty.on { background: var(--good); color: #fff; }

/* auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8; max-width: 380px; }
.auth-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.auth .card { width: 100%; max-width: 380px; padding: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; margin-bottom: 18px; }
.brand img { width: 36px; height: 36px; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 80px); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
#toast div { background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 12px; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.2); pointer-events: auto; }
#toast div.err { background: var(--bad); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tbl-wrap { overflow-x: auto; }
.shot { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.sug { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: -8px; margin-bottom: 12px; max-height: 220px; overflow-y: auto; }
.sug div { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; } .sug div:last-child { border-bottom: 0; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
/* Plans: one row, left to right, scrolled sideways (swipe on phones). */
.plans { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.plan { flex: 0 0 152px; scroll-snap-align: start; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-height: 64px; }
.plan b { font-size: 15px; } .plan span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan small { font-size: 12px; color: #4b5064; line-height: 1.35; margin-top: 2px; white-space: pre-line; }
.plan.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); } .plan.on span { color: var(--accent); }
pre.code { background: #f0f1f6; padding: 10px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; font-size: 13px; }

/* ---------- WhatsApp inbox (looks like the WhatsApp app) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wa-list { background: #fff; }
.wa-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: inherit; text-decoration: none; position: relative; min-height: 72px; }
.wa-row + .wa-row::before { content: ''; position: absolute; top: 0; left: 74px; right: 0; border-top: 1px solid #eef0f3; }
.wa-row:hover, .wa-row:focus-visible { background: #f5f6f6; }
.wa-av { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.wa-av.sm { flex-basis: 40px; width: 40px; height: 40px; font-size: 15px; }
.wa-av.lg { flex-basis: 88px; width: 88px; height: 88px; font-size: 30px; }
.wa-row-main { flex: 1; min-width: 0; }
.wa-row-top, .wa-row-bot { display: flex; align-items: center; gap: 6px; }
.wa-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-time { font-size: 12px; color: #667781; white-space: nowrap; }
.wa-row.unread .wa-time { color: #1daa61; font-weight: 600; }
.wa-row-bot { margin-top: 3px; }
.wa-prev { flex: 1; min-width: 0; font-size: 14px; color: #667781; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.wa-row.unread .wa-prev { color: #111b21; font-weight: 500; }
.wa-owner { font-size: 11px; font-weight: 600; color: #54656f; background: #f0f2f5; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.wa-owner.pool { background: var(--warn-soft); color: var(--warn); }
.wa-badge { min-width: 20px; height: 20px; border-radius: 10px; background: #25d366; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.tk { display: inline-flex; color: #8696a0; vertical-align: -1px; }
.tk-read { color: #53bdeb; }
.tk-fail { color: #fff; background: var(--bad); border-radius: 50%; width: 14px; height: 14px; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; }

/* The chat: WhatsApp's beige wallpaper with light doodles (our own drawing), green header, white pill input. */
.wa-screen { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; height: 100vh; height: 100dvh; background-color: #efeae2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%23c8bfae' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='.38'%3E%3Cpath d='M20 22h30a6 6 0 0 1 6 6v14a6 6 0 0 1-6 6H32l-8 7v-7h-4a6 6 0 0 1-6-6V28a6 6 0 0 1 6-6z'/%3E%3Cpath d='M98 30c0-6 9-8 11 0 2-8 11-6 11 0 0 7-11 13-11 13s-11-6-11-13z'/%3E%3Cpath d='M170 18l4 9 10 1-7 7 2 10-9-5-9 5 2-10-7-7 10-1z'/%3E%3Crect x='216' y='20' width='22' height='34' rx='4'/%3E%3Cpath d='M224 49h6'/%3E%3Cpath d='M30 96l14-6v28'/%3E%3Ccircle cx='26' cy='118' r='5'/%3E%3Ccircle cx='40' cy='112' r='5'/%3E%3Crect x='86' y='92' width='34' height='24' rx='4'/%3E%3Ccircle cx='103' cy='104' r='7'/%3E%3Cpath d='M94 92l3-5h12l3 5'/%3E%3Cpath d='M160 96h24v14a12 12 0 0 1-24 0z'/%3E%3Cpath d='M184 100h5a5 5 0 0 1 0 10h-5'/%3E%3Cpath d='M166 88c0-4 4-4 4-8M176 88c0-4 4-4 4-8'/%3E%3Ccircle cx='226' cy='104' r='14'/%3E%3Cpath d='M220 101h.01M232 101h.01M220 109s2 4 6 4 6-4 6-4'/%3E%3Cpath d='M22 168h30l-6 22H28z'/%3E%3Cpath d='M30 168c0-8 14-8 14 0'/%3E%3Cpath d='M92 160l26 12-26 12 6-12z'/%3E%3Cpath d='M160 186c8-4 8-20 16-24 8 4 8 20 16 24-10 6-22 6-32 0z'/%3E%3Ccircle cx='226' cy='176' r='12'/%3E%3Cpath d='M226 168v8l5 4'/%3E%3Cpath d='M18 228h26a8 8 0 0 0 0-16 12 12 0 0 0-23 2 7 7 0 0 0-3 14z'/%3E%3Cpath d='M92 222l8 8 16-16'/%3E%3Cpath d='M158 216h30v20h-30z'/%3E%3Cpath d='M158 216l15 11 15-11'/%3E%3Cpath d='M214 236l12-26 12 26M218 228h16'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 260px; }
.wa-nav { display: none; }
@media (min-width: 900px) { .wa-screen { left: 84px; } .wa-nav { display: flex; } }
.wa-head { display: flex; align-items: center; gap: 6px; padding: 8px 6px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); background: #008069; color: #fff; flex: 0 0 auto; box-shadow: 0 1px 3px rgba(11,20,26,.2); }
.wa-head .icon-btn { background: transparent; box-shadow: none; color: #fff; border-radius: 50%; }
.wa-head .icon-btn:active { background: rgba(255,255,255,.15); }
.wa-head-t { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 4px 2px; cursor: pointer; display: flex; flex-direction: column; color: #fff; }
.wa-head-t b { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-head-t span { font-size: 12.5px; color: rgba(255,255,255,.82); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-msgs { flex: 1; overflow-y: auto; padding: 8px max(10px, 6%) 12px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wa-day { text-align: center; margin: 10px 0 8px; position: sticky; top: 4px; z-index: 2; }
.wa-day span { display: inline-block; background: #fff; color: #54656f; font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-e2e { margin: 6px auto 10px; max-width: 420px; text-align: center; background: #ffeecd; color: #54656f; font-size: 12px; padding: 6px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-more { text-align: center; margin: 6px 0; }
.wa-line { display: flex; flex-direction: column; margin-bottom: 2px; }
.wa-line.out { align-items: flex-end; } .wa-line.in { align-items: flex-start; }
.wa-line.flash .wa-b { box-shadow: 0 0 0 3px #53bdeb; }
.wa-b { position: relative; max-width: min(80%, 560px); padding: 6px 7px 8px 9px; border-radius: 7.5px; font-size: 14.5px; line-height: 1.38; color: #111b21; box-shadow: 0 1px .5px rgba(11,20,26,.13); word-wrap: break-word; overflow-wrap: anywhere; }
.wa-b.in { background: #fff; } .wa-b.out { background: #d9fdd3; }
.wa-b.tail { margin-top: 6px; }
.wa-b.tail.in { border-top-left-radius: 0; } .wa-b.tail.out { border-top-right-radius: 0; }
.wa-b.tail.in::before, .wa-b.tail.out::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; }
.wa-b.tail.in::before { left: -8px; background: linear-gradient(to bottom left, #fff 50%, transparent 50%); }
.wa-b.tail.out::before { right: -8px; background: linear-gradient(to bottom right, #d9fdd3 50%, transparent 50%); }
.wa-b.bare { background: none; box-shadow: none; } .wa-b.bare::before { display: none; }
.wa-b:focus-visible { outline: 2px solid #53bdeb; outline-offset: 2px; }
.wa-text { white-space: pre-wrap; }
.wa-text a { color: #027eb5; }
.wa-sp { display: inline-block; width: 64px; height: 1px; vertical-align: bottom; }
.wa-b.out .wa-sp { width: 82px; }
.wa-meta { position: absolute; right: 7px; bottom: 3px; font-size: 11px; color: #667781; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.wa-by { font-size: 12.5px; font-weight: 700; color: #1f7aec; margin-bottom: 2px; }
.wa-react { position: absolute; bottom: -14px; right: 8px; background: #fff; border-radius: 12px; padding: 0 5px; font-size: 14px; box-shadow: 0 1px 2px rgba(11,20,26,.2); }
.wa-line:has(.wa-react) { margin-bottom: 16px; }
.wa-quote { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; border-left: 4px solid #06cf9c; background: rgba(11,20,26,.05); border-radius: 6px; padding: 5px 8px; margin-bottom: 5px; font-size: 13px; color: #54656f; cursor: pointer; }
.wa-quote.out { border-left-color: #a5b337; } .wa-quote b { color: #1fa855; font-size: 12.5px; } .wa-quote.out b { color: #8a9a1c; }
.wa-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }
.wa-retry { border: 0; background: none; color: var(--bad); font-size: 12px; padding: 4px 2px; cursor: pointer; text-align: right; }
.wa-img { display: block; border: 0; padding: 0; margin: -3px -4px 4px -6px; background: none; cursor: zoom-in; border-radius: 6px; overflow: hidden; }
.wa-img img { display: block; max-width: min(300px, 70vw); max-height: 340px; width: auto; border-radius: 6px; }
.wa-stk { width: 140px; height: 140px; object-fit: contain; }
.wa-vid { display: block; max-width: min(300px, 70vw); border-radius: 6px; margin-bottom: 4px; background: #000; }
.wa-doc { display: flex; align-items: center; gap: 10px; background: rgba(11,20,26,.05); border-radius: 6px; padding: 10px; color: #111b21; text-decoration: none; min-width: 200px; margin-bottom: 4px; }
.wa-doc svg { width: 30px; height: 30px; color: #e5484d; flex: 0 0 30px; }
.wa-doc span { display: flex; flex-direction: column; min-width: 0; } .wa-doc b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wa-doc small { color: #667781; font-size: 12px; }
.wa-loc { color: #027eb5; }
.wa-tpl { font-size: 11px; font-weight: 700; color: #667781; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.wa-file { font-size: 13.5px; padding: 4px 0; }
.wa-audio { display: flex; align-items: center; gap: 8px; width: 260px; max-width: 70vw; padding: 2px 0 6px; }
.wa-audio.voice { width: 280px; }
.wa-play { flex: 0 0 36px; width: 36px; height: 36px; border: 0; background: none; color: #54656f; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 50%; padding: 0; }
.wa-play svg { width: 26px; height: 26px; }
.wa-play:focus-visible, .wa-speed:focus-visible { outline: 2px solid #53bdeb; }
.wa-track { flex: 1; min-width: 0; }
.wa-track input[type=range] { width: 100%; margin: 6px 0 2px; accent-color: #00a884; height: 4px; }
.wa-audio-info { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #667781; }
.wa-speed { border: 0; background: rgba(11,20,26,.08); color: #54656f; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; cursor: pointer; margin-right: 44px; }
.wa-audio-av { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: #dfe5e7; color: #fff; display: flex; align-items: center; justify-content: center; position: relative; }
.wa-b.out .wa-audio-av { background: #b5d8b0; }
.wa-audio-av svg { width: 24px; height: 24px; color: #00a884; }
.wa-audio.playing .wa-play { color: #00a884; }
.wa-jump { position: absolute; right: 16px; bottom: 84px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #54656f; box-shadow: 0 1px 4px rgba(11,20,26,.25); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wa-jump svg { width: 22px; height: 22px; }
.wa-jump span:not(:empty) { position: absolute; top: -6px; right: -4px; background: #25d366; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.wa-foot { flex: 0 0 auto; padding: 6px 6px calc(6px + var(--safe-b)); }
.wa-compose { display: flex; align-items: flex-end; gap: 6px; }
.wa-input { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px; background: #fff; border-radius: 24px; min-height: 48px; padding: 2px 6px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-input .icon-btn { color: #8696a0; flex: 0 0 auto; background: transparent; box-shadow: none; width: 40px; height: 44px; }
.wa-input .icon-btn[hidden] { display: none; }
.wa-input textarea { flex: 1; border: 0; outline: 0; resize: none; background: none; font: inherit; font-size: 16px; line-height: 22px; padding: 11px 2px; max-height: 140px; min-height: 44px; color: #111b21; }
.wa-input textarea::placeholder { color: #8696a0; }
.wa-mic.send svg { margin-left: 3px; }
/* attach menu above the box, emoji panel below it (where the keyboard is) */
.wa-attpop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: #fff; border-radius: 18px; padding: 18px 10px 14px; margin: 0 54px 8px 0; box-shadow: 0 2px 12px rgba(11,20,26,.18); animation: wa-pop .14s ease-out; transform-origin: bottom right; }
.wa-attpop button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 13px; color: #3b4a54; cursor: pointer; padding: 2px 0; }
.wa-attpop button span { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.wa-attpop button span svg { width: 26px; height: 26px; }
@keyframes wa-pop { from { opacity: 0; transform: scale(.9) translateY(8px); } }
.wa-emos { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 2px; max-height: 230px; overflow-y: auto; background: #fff; border-radius: 14px; margin-top: 6px; padding: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-emos[hidden] { display: none; }
.wa-emos button { border: 0; background: none; font-size: 26px; line-height: 1; padding: 6px 0; cursor: pointer; border-radius: 8px; }
.wa-emos button:hover, .wa-emos button:focus-visible { background: #f0f2f5; }
.wa-mic { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #00a884; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s; box-shadow: 0 1px 3px rgba(11,20,26,.2); }
.wa-mic svg { width: 24px; height: 24px; }
.wa-mic:focus-visible { outline: 3px solid #53bdeb; outline-offset: 2px; }
.wa-mic.recording { transform: scale(1.35); background: #00a884; box-shadow: 0 0 0 8px rgba(0,168,132,.18); }
.wa-compose.rec .wa-input { align-items: center; padding: 0 14px; }
.wa-rdot { width: 10px; height: 10px; border-radius: 50%; background: #ea0038; flex: 0 0 10px; animation: wa-blink 1s infinite; margin-right: 8px; }
.wa-rtime { font-size: 16px; font-variant-numeric: tabular-nums; color: #111b21; min-width: 44px; }
.wa-slide { flex: 1; text-align: center; color: #8696a0; font-size: 14px; animation: wa-nudge 1.4s infinite; }
.wa-lockhint { color: #8696a0; display: flex; } .wa-lockhint svg { width: 18px; height: 18px; }
.wa-del { color: #ea0038 !important; }
@keyframes wa-blink { 50% { opacity: .2; } }
@keyframes wa-nudge { 50% { transform: translateX(-6px); } }
.wa-replybar { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 12px 12px 0 0; padding: 6px 6px 0 8px; margin: 0 54px 0 0; }
.wa-replybar .wa-quote { margin: 0; cursor: default; flex: 1; min-width: 0; }
.wa-replybar + .wa-compose .wa-input { border-top-left-radius: 0; border-top-right-radius: 0; }
.wa-closed { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-closed p { margin: 0 0 10px; font-size: 14px; color: #54656f; }
.wa-attach { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wa-attach button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: #54656f; cursor: pointer; padding: 6px 0; }
.wa-attach button span { width: 56px; height: 56px; border-radius: 50%; background: #f0f2f5; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.wa-info { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 14px; text-align: center; }
.wa-info b { font-size: 20px; margin-top: 8px; } .wa-info span { color: #667781; }
@media (prefers-reduced-motion: reduce) { .wa-rdot, .wa-slide { animation: none; } .wa-mic { transition: none; } }
.wa-jump[hidden] { display: none; }
.wa-audio { padding-bottom: 12px; }

/* Incoming call / in-call screen (calls answered in the app) */
.callui { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(48px + env(safe-area-inset-top, 0px)) 24px calc(40px + var(--safe-b)); background: linear-gradient(180deg, #1e1b4b, #312e81); color: #fff; text-align: center; }
.callui .who { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.callui .ava { width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; margin-bottom: 10px; }
.callui .ava.pulse { animation: callpulse 1.6s ease-out infinite; }
@keyframes callpulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 100% { box-shadow: 0 0 0 28px rgba(255,255,255,0); } }
.callui .nm { font-size: 26px; font-weight: 700; } .callui .sub { opacity: .8; font-size: 15px; } .callui .st { margin-top: 10px; font-size: 15px; opacity: .9; }
.callui .open { color: #c7d2fe; font-size: 14px; margin-top: 6px; }
.callui .btns { display: flex; gap: 56px; align-items: flex-end; }
.callui .btns.small { gap: 28px; }
.callui .cb { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: #fff; background: none; border: 0; cursor: pointer; }
.callui .cb span.c { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.callui .cb svg { width: 30px; height: 30px; }
.callui .cb.ans span.c { background: #16a34a; } .callui .cb.dec span.c, .callui .cb.end span.c { background: #dc2626; }
.callui .cb.dec svg, .callui .cb.end svg { transform: rotate(135deg); }
.callui .cb.tog span.c { background: rgba(255,255,255,.16); width: 56px; height: 56px; } .callui .cb.tog.on span.c { background: #fff; color: #312e81; }
.callui .cb:disabled { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .callui .ava.pulse { animation: none; } }
