/* What the live CRM needs that the demo never had: a login screen, dialogs, form controls, real
   charts. styles.css is the demo's stylesheet, byte for byte; everything added lives here so
   "verbatim" stays checkable (diff web/styles.css against the demo). Same tokens, same language. */

[hidden] { display: none !important; }
.muted { color: var(--ink-3); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--side); }
.login form { width: 100%; max-width: 380px; background: var(--surface); border-radius: 12px; padding: 28px; box-shadow: var(--shadow-lg); }
.login .brand { padding: 0; margin-bottom: 20px; }
.login .brand-name { color: var(--ink); }
.login .brand-sub { color: var(--ink-3); }
.login h1 { font-size: 20px; margin: 0 0 16px; letter-spacing: -.01em; }
.login .btn { width: 100%; justify-content: center; padding: 10px; margin-top: 4px; }
.login .note { margin: 14px 0 0; }
.err { color: var(--o-notinterested); font-size: 13px; min-height: 18px; }
.login .err { margin: 2px 0 8px; }

/* ---------- Form controls ---------- */
.field textarea { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: #fff; font: inherit; resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.field input[type=file] { padding: 6px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13.5px; }
.btn.danger { background: var(--o-notinterested); border-color: var(--o-notinterested); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.d-more { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.side-foot .out { display: inline-block; margin-top: 6px; color: var(--side-ink); background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; text-decoration: underline; }
.side-foot .out:hover { color: #fff; }
.toast.bad svg { color: #ffb4a8; }
.banner { background: #fff6e0; border: 1px solid #f5dfa8; color: #8a5a00; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }

/* ---------- Dialog ---------- */
dialog.dlg { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.dlg.wide { width: min(860px, calc(100vw - 32px)); }
dialog.dlg::backdrop { background: rgba(15, 26, 43, .45); }
.dlg .dh { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.dlg .dh h2 { margin: 0; font-size: 16px; }
.dlg .dh .d-close { margin-left: auto; }
.dlg .db { padding: 16px 20px 4px; max-height: 68vh; overflow: auto; }
.dlg .df { display: flex; align-items: center; gap: 8px; padding: 12px 20px 16px; }
.dlg .df .err { margin-right: auto; }
.dlg .df .btn.ghost { margin-left: auto; }
.dlg .df .err + .btn.ghost { margin-left: 0; }
.dlg p { margin: 0 0 12px; }
.dlg .once { font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; user-select: all; word-break: break-all; }

/* ---------- Tables inside dialogs and cards ---------- */
.t td.bad { color: var(--o-notinterested); }
.t tbody tr.plain, .t tbody tr.plain:hover td { cursor: default; background: none; }
.tx.on { display: block; }
audio.rec { width: 100%; margin-top: 8px; height: 36px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }

/* ---------- Charts (web/js/charts.js) ---------- */
.chart-host { position: relative; }
.chart .ax { font-size: 10.5px; fill: var(--ink-3); }
.chart .lbl { font-size: 12px; font-weight: 600; fill: var(--ink); }
.tip { position: absolute; top: 20px; background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 140px; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.tip div { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.tip div b { margin-left: auto; }
.tip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sk-rib { fill-opacity: .4; transition: fill-opacity .15s; }
.sk-rib.drop { fill-opacity: .2; }
.sk-flow:hover .sk-rib { fill-opacity: .66; }
.sk-l { font-size: 13px; font-weight: 600; fill: var(--ink); stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; }
.sk-v { font-size: 11px; fill: var(--ink-3); stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; }
.legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.legend .lg i { width: 18px; height: 8px; border-radius: 4px; display: inline-block; margin: 0; }
.sk-table { margin-top: 14px; }
.scroll { overflow-x: auto; }
@media (max-width: 760px) { .sk-wide { display: none; } }
@media (min-width: 761px) { .sk-table { display: none; } }

/* 100% bars with a labelled legend: identity is never colour alone. */
.stack.thin { height: 22px; }
.stack div { min-width: 0; overflow: hidden; white-space: nowrap; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- WhatsApp thread ---------- */
.thread { display: flex; flex-direction: column; gap: 8px; padding: 16px; max-height: 52vh; overflow: auto; background: var(--surface-2); }
.msg { max-width: 76%; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.out { align-self: flex-end; background: #e7f6ec; border-color: #cfe9d6; }
.msg .meta { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.people { max-height: 260px; overflow: auto; border: 1px solid var(--line-2); border-radius: 6px; }
.chart-host svg.chart { display: block; }

/* ---------- AI Agent: tabs, the draft bar, per-tab forms ---------- */
.agent-pick { align-items: center; margin-bottom: 12px; }
.agent-pick .link { margin-left: 6px; font-size: 12.5px; }
.agent-tabs { border-bottom: 1px solid var(--line-2); padding-bottom: 12px; }
.dot-draft { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0a100; margin-left: 4px; vertical-align: middle; }
.draft-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.draft-bar > div:first-child { flex: 1; min-width: 220px; }
.draft-actions { display: flex; gap: 8px; }
.live-bar { margin-bottom: 16px; }
.live-bar .card-b { padding: 10px 14px; }
.banner .btn.sm { margin-left: 6px; vertical-align: baseline; }
.banner .var { white-space: normal; }
.save-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
form[data-save] > .save-row { margin-top: 16px; }
.checks li svg { width: 16px; height: 16px; flex: none; color: var(--o-registered); }
.checks li { align-items: flex-start; }
.checks li > span { min-width: 0; overflow-wrap: anywhere; }
.retry-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.retry-row input, .retry-row select, .hours-t input[type=time], .capture-t input { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; font: inherit; }
.retry-row input { width: 84px; }
.capture-t td { white-space: normal; vertical-align: top; }
.capture-t td:first-child input { width: 100%; min-width: 150px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.field input[type=range] { padding: 0; border: 0; }
.dlg .quote { margin-bottom: 8px; }

/* ---------- Import: the column mapping and the checked preview ---------- */
.map-t td { white-space: normal; vertical-align: middle; }
.map-t select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; font: inherit; max-width: 100%; }
.imp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
.imp-kpis .kpi .v { font-size: 22px; }
@media (max-width: 760px) { .imp-kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- Fit: nothing may push the page wider than the screen ---------- */
/* A grid child is as wide as its widest table unless told it may shrink; the table then scrolls inside its card. */
.grid > *, .g-main > *, .g-2 > *, .g-3 > * { min-width: 0; }
.card { min-width: 0; }
.t td.wrap { white-space: normal; }
.t td.wrap .next { white-space: normal; }
.page-head .actions { flex-wrap: wrap; }
.card-h { flex-wrap: wrap; }
.bars .b { min-width: 0; }
.bars .vl, .bars .lb { white-space: nowrap; }
.stack { max-width: 100%; }
@media (max-width: 760px) {
  .bars { gap: 2px; }
  .bars .vl { font-size: 9px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .kv { grid-template-columns: 104px minmax(0, 1fr); }
  .kv dd { overflow-wrap: anywhere; }
  .table-foot { flex-wrap: wrap; gap: 8px; }
}
.hours-t td, .hours-t th { padding: 8px 8px; }
@media (max-width: 760px) { .hours-t input[type=time] { width: 92px; padding: 5px 4px; } .hours-t td, .hours-t th { padding: 8px 4px; } .hours-t .check { font-size: 12.5px; gap: 4px; } }
@media (max-width: 760px) { .bars.many .vl { display: none; } }
.t td.wrap .next svg { flex: none; }
.t td.wrap { padding-right: 18px; }

/* ---------- Team and roles (Settings) ---------- */
.role-can ul { margin: 0 0 12px; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
.role-can li { margin: 3px 0; }
.matrix th, .matrix td.yn { text-align: center; }
.matrix td.wrap { min-width: 220px; }
.matrix .yes svg { width: 15px; height: 15px; color: var(--o-registered); vertical-align: -3px; }
.matrix .no { color: var(--ink-3); }
.matrix tr.grp td { background: var(--surface-2); font-size: 12.5px; }
.team-act { text-align: right; }
.team-act .link { margin-left: 10px; }
.reassign-f { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.reassign-f select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; font: inherit; max-width: 100%; }

/* ---------- One student's own page (#student/<id>): the drawer's cards, laid out as a page ---------- */
.sp-back { margin: 0 0 10px; }
.sp-back .link svg { width: 14px; height: 14px; vertical-align: -2px; transform: rotate(180deg); margin-right: 4px; }
.sp .d-head { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-main, .sp-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sp-calls { display: flex; flex-direction: column; gap: 14px; }
.sp-call { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.sp-call:last-child { border-bottom: 0; padding-bottom: 0; }
.sp-call-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.sp-sum { margin: 6px 0 0; color: var(--ink-2); font-size: 13.5px; }
.sp .tx { max-width: none; }
.sp .tx .rec, .dlg .tx .rec { width: 100%; margin: 4px 0 8px; }
#sp-chat .thread { max-height: 46vh; }
#sp-tpl select { min-width: 0; flex: 1 1 180px; }
@media (max-width: 980px) { .sp-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Unseen WhatsApp messages: the bell, and its list ---------- */
.bell { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.bell svg { width: 17px; height: 17px; }
.bell .count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--o-notinterested); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.nts { display: flex; flex-direction: column; }
.nt { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.nt:last-child { border-bottom: 0; }
.nt span:last-child { grid-column: 1 / -1; color: var(--ink-3); font-size: 12.5px; }

/* ---------- One call's own page (web/js/views/call.js) ---------- */
.cv-head { padding: 18px 20px; margin-bottom: 16px; }
.cv-top { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cv-top h2 { margin: 0; font-size: 22px; letter-spacing: -.015em; }
.cv-about { color: var(--ink-2); margin-top: 3px; font-size: 13.5px; }
.cv-pills { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.cv-facts > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-width: 0; }
.cv-facts span { display: block; color: var(--ink-3); font-size: 12px; }
.cv-facts b { display: block; font-weight: 600; font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.cv-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cv-main, .cv-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cv .rec { width: 100%; margin: 0; }
.cv-speed { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cv-tools { display: flex; gap: 8px; align-items: center; }
.cv-tools input { height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 13px; width: 200px; max-width: 46vw; background: var(--surface); color: inherit; }
.cv-talk { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; max-height: 620px; overflow-y: auto; }
.cv-line { max-width: 82%; }
.cv-line[hidden] { display: none; }
.cv-line.ai { align-self: flex-start; }
.cv-line.parent { align-self: flex-end; }
.cv-line.aside { align-self: flex-start; opacity: .7; }
.cv-who { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; display: flex; gap: 8px; }
.cv-line.parent .cv-who { justify-content: flex-end; }
.cv-say { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cv-line.parent .cv-say { background: #e8f1ff; border-color: #cfe0fb; }
.cv-line.aside .cv-say { font-style: italic; border-style: dashed; }
.cv-rel { display: flex; flex-direction: column; }
.cv-rel-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.cv-rel-row:first-child { border-top: 0; }
.cv-rel-row:hover { background: var(--surface-2); }
.cv-rel-row > div { flex: 1; min-width: 0; }
.cv-rel-row b { display: block; font-size: 13.5px; }
.cv-rel-row span { color: var(--ink-3); font-size: 12.5px; }
.t td .btn.sm { white-space: nowrap; }
@media (max-width: 980px) { .cv-grid { grid-template-columns: minmax(0, 1fr); } .cv-line { max-width: 94%; } }

/* ---------- "This parent has written in" on a student's row (web/js/views/students.js) ---------- */
.msg-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #e7f7ee; border: 1px solid #b7e4c7; color: #0f6b3a; font-size: 11.5px; font-weight: 600; text-decoration: none; vertical-align: 1px; white-space: nowrap; }
.msg-badge svg { width: 12px; height: 12px; }
.msg-badge:hover { background: #d6f0e1; }
.t tbody tr.has-msg td:first-child { box-shadow: inset 3px 0 0 #25a55f; }
.chip-n { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #25a55f; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.chip-n[hidden] { display: none; }
.filters #sort { margin-left: auto; }

/* ---------- Do not call (web/js/views/dnc.js) ---------- */
.dnc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dnc-h { margin: 0; font-size: 15px; }
.dnc-why { white-space: normal; max-width: 360px; }
.dnc-others { margin-top: 16px; }
.dnc-foot { margin-top: 14px; }
@media (max-width: 760px) { .dnc-kpis { grid-template-columns: 1fr; } }

/* ---------- AI Agent: the tab bar, and short list boxes (web/js/views/agent*.js) ---------- */
.agent-tabs { margin: 0 0 16px; padding: 6px 0 0; border-bottom: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.agent-tabs .chip { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 12px 10px; white-space: nowrap; color: var(--ink-2); font-weight: 500; }
.agent-tabs .chip:hover { color: var(--ink); background: none; }
.agent-tabs .chip.on { background: none; color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.field textarea.short { min-height: 60px; }
.live-bar .card-b { padding-top: 10px; padding-bottom: 10px; }

/* ---------- The whole page is wider on a wide screen, and the sidebar is a menu on a phone ---------- */
.page { max-width: 1760px; }
.nav-toggle, .nav-scrim { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
  .nav-toggle svg { width: 20px; height: 20px; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: min(280px, 84vw); height: 100dvh; z-index: 70; flex-direction: column; flex-wrap: nowrap; overflow-x: hidden; overflow-y: auto; transform: translateX(-102%); transition: transform .18s ease; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .side .brand { display: flex; }
  .side .nav-group { display: block; }
  .side .side-foot { display: block; }
  .side .nav { display: block; }
  .nav-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(16, 24, 40, .45); }
  body.nav-open .nav-scrim { display: block; }
  body.nav-open { overflow: hidden; }
  .top { position: sticky; top: 0; z-index: 20; gap: 10px; flex-wrap: nowrap; }
  .top-right { gap: 8px; }
  .top h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-head { align-items: flex-start; }
  .page-head .actions { margin-left: 0; flex-wrap: wrap; width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .toolbar { flex-wrap: wrap; }
  .filters select { flex: 1 1 140px; min-width: 0; }
  .filters #sort { margin-left: 0; }
  .d-actions, .cv-acts { gap: 6px; }
  .d-actions .btn, .cv-acts .btn { flex: 1 1 auto; justify-content: center; }
  .cv-facts { grid-template-columns: 1fr 1fr; }
  .cv-tools input { width: 130px; }
  .thread .msg, .msg { max-width: 88%; }
  .kv { grid-template-columns: 108px 1fr; }
  .dlg { width: calc(100vw - 24px); max-width: none; }
  .agent-tabs { margin-left: -16px; margin-right: -16px; padding-left: 12px; padding-right: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 26px; }
  .top .crumb, #today, .top-right > .chip { display: none; }
  .cv-top h2, .d-top h2 { font-size: 19px; }
  .card-h { flex-wrap: wrap; row-gap: 6px; }
  .table-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- Plan and credits (web/js/views/billing.js) ---------- */
.pay-wait { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff6e0; border: 1px solid #f5dfa8; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.pay-wait > div { flex: 1 1 320px; min-width: 0; }
.pay-wait b { display: block; color: #8a5a00; font-size: 15px; }
.pay-wait span { display: block; color: #8a5a00; font-size: 12.5px; margin-top: 2px; }
.pay-plan { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--surface-2); }
.pay-plan-main { display: flex; flex-direction: column; min-width: 150px; }
.pay-kicker { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.pay-plan-main b { font-size: 20px; letter-spacing: -.01em; }
.pay-price { color: var(--ink-2); font-size: 13.5px; }
.pay-plan-facts { display: flex; gap: 28px; flex: 1 1 260px; flex-wrap: wrap; }
.pay-plan-facts span { display: block; font-size: 12px; color: var(--ink-3); }
.pay-plan-facts b { display: block; font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.pay-plan + .note { margin-top: 10px; }
.pay-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; align-items: stretch; }
.pay-pack { justify-content: center; }
.pay-pack { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 14px 16px; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
button.pay-pack:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.pay-pack:disabled { opacity: .55; cursor: not-allowed; }
.pay-pack b { font-size: 19px; letter-spacing: -.01em; }
.pay-pack span { font-size: 12.5px; color: var(--ink-3); }
.pay-custom { cursor: default; border-style: dashed; }
.pay-custom b { font-size: 14px; }
.pay-custom-row { display: flex; align-items: center; gap: 6px; width: 100%; }
.pay-custom-row > span { font-size: 16px; color: var(--ink-2); }
.pay-custom-row input { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 15px; background: var(--surface); color: inherit; }
@media (max-width: 520px) { .pay-plan-facts { gap: 16px; } .pay-plan .btn { width: 100%; justify-content: center; } }

/* ---------- WhatsApp: the step-by-step guide on Settings (web/js/views/whatsapp.js) ---------- */
.wa-guide { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 16px; background: var(--surface-2); }
.wa-guide > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-weight: 600; list-style: none; user-select: none; }
.wa-guide > summary::-webkit-details-marker { display: none; }
.wa-guide > summary::after { content: "Show"; margin-left: auto; font-weight: 500; font-size: 12.5px; color: var(--accent); }
.wa-guide[open] > summary::after { content: "Hide"; }
.wa-steps { margin: 0; padding: 0 16px 14px 34px; display: grid; gap: 12px; }
.wa-steps li { padding-left: 4px; }
.wa-steps b { display: block; }
.wa-steps span { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.wa-steps code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }

/* Calls right now: the conversation so far, under each call on the line. */
.lcw { border-bottom: 1px solid var(--line-2); }
.lcw:last-child { border-bottom: 0; }
.lcw .lc { border-bottom: 0; }
.lc-talk { padding: 0 0 12px; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; }
.lc-talk p { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--line-2); overflow-wrap: anywhere; }
.lc-talk p.c { background: transparent; border: 1px solid var(--line-2); }
.lc-talk p b { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-right: 6px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--o-registered); margin-right: 7px; animation: live-pulse 1.6s infinite ease-in-out; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Add credits: an amount is chosen first, and paid for only when Pay is pressed. */
.pay-pack.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pay-go { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
