/* The Voice Solutions — Number Inbox */
:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --ink: #121b3a;
  --ink-2: #44506b;
  --muted: #76819a;
  --line: #e1e6f0;
  --brand: #2b56b4;
  --brand-ink: #ffffff;
  --brand-soft: #e7eefc;
  --brand-2: #1fbfe8;
  --brand-grad: linear-gradient(120deg, #22c3ee 0%, #2b6fd0 48%, #3a45a6 100%);
  --warn: #d9472b;
  --warn-soft: #fdebe6;
  --ok: #1d8a4f;
  --ok-soft: #e4f4ea;
  --info-soft: #e8f4fc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 51, .05), 0 6px 24px rgba(20, 32, 51, .06);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1020;
    --surface: #10182b;
    --surface-2: #152036;
    --ink: #e8eefb;
    --ink-2: #b4c0d8;
    --muted: #8592ad;
    --line: #22304b;
    --brand: #35c4ef;
    --brand-ink: #04202c;
    --brand-soft: #0f2d45;
    --brand-2: #35c4ef;
    --brand-grad: linear-gradient(120deg, #22c3ee 0%, #2b6fd0 48%, #4a52b8 100%);
    --warn: #ff7a5c;
    --warn-soft: #3a1f1a;
    --ok: #4fd18b;
    --ok-soft: #15301f;
    --info-soft: #14263d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1020;
  --surface: #10182b;
  --surface-2: #152036;
  --ink: #e8eefb;
  --ink-2: #b4c0d8;
  --muted: #8592ad;
  --line: #22304b;
  --brand: #35c4ef;
  --brand-ink: #04202c;
  --brand-soft: #0f2d45;
  --brand-2: #35c4ef;
  --brand-grad: linear-gradient(120deg, #22c3ee 0%, #2b6fd0 48%, #4a52b8 100%);
  --warn: #ff7a5c;
  --warn-soft: #3a1f1a;
  --ok: #4fd18b;
  --ok-soft: #15301f;
  --info-soft: #14263d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
h1, h2 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
p { margin: .3em 0 .8em; }
.muted { color: var(--muted); }
.tiny { font-size: .82rem; }
.center { text-align: center; }
.warn { color: var(--warn); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--muted); margin: 0 0 .3em; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; color: var(--brand); flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-weight: 800; font-size: .98rem; }
.brand-text small { color: var(--muted); font-size: .78rem; font-weight: 600; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 .9rem var(--font); padding: 9px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none !important;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--brand); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-block { width: 100%; padding: 12px 16px; font-size: 1rem; }
.btn-tiny { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
input, select, textarea {
  font: 500 .95rem var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
textarea { font-family: var(--mono); font-size: .82rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .88rem; }
label input[type=checkbox] { width: auto; }
label.tiny { flex-direction: row; align-items: center; font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Alerts & tags */
.alert { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; border: 1px solid transparent; }
.alert-error { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert-success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-info { background: var(--info-soft); }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.tag-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* Auth pages */
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 520px; }
.auth-card .brand { margin-bottom: 22px; }
.auth-card h1 { font-size: 1.45rem; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 4px; font-size: .9rem; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--warn); font-weight: 700; }

/* App shell */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 12px max(16px, calc((100vw - 1080px) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 7px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: .9rem; text-decoration: none; }
.topnav a.on, .topnav a:hover { background: var(--surface); color: var(--ink); }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; flex: 1; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ok); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.site-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px 16px 26px; }

/* Customer hero */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.did-number { font-family: var(--mono); font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 600; margin: 0; letter-spacing: -.02em; }
.stats { display: flex; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; min-width: 96px; }
.stat span { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat small { color: var(--muted); font-weight: 600; font-size: .75rem; }
.stat-warn span { color: var(--warn); }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs a { padding: 8px 16px; border-radius: 9px; color: var(--ink-2); font-weight: 700; font-size: .92rem; text-decoration: none; }
.tabs a em { font-style: normal; font-weight: 600; color: var(--muted); font-size: .8rem; margin-left: 4px; }
.tabs a.on { background: var(--ink); color: var(--bg); }
.tabs a.on em { color: inherit; opacity: .7; }
.search { display: flex; gap: 8px; align-items: center; flex: 1; max-width: 460px; }
.search select { width: auto; }
.search input[type=search] { flex: 1; min-width: 0; }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.who { font-family: var(--mono); font-weight: 600; display: flex; flex-direction: column; }
.who small { font-family: var(--font); font-weight: 500; font-size: .8rem; }
time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.sms-body { margin: 8px 0 10px; white-space: normal; word-wrap: break-word; overflow-wrap: anywhere; font-size: 1rem; }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { font: 600 .78rem var(--font); background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px; cursor: pointer; }
.chip:hover { border-color: var(--muted); }
.chip.code { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.code b { font-family: var(--mono); letter-spacing: .06em; }
.chip.copied { background: var(--ok); color: #fff; }
.call { display: flex; gap: 14px; align-items: flex-start; }
.call-main { flex: 1; min-width: 0; }
.call-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 1.1rem; font-weight: 800; background: var(--surface-2); }
.call-missed { border-left: 3px solid var(--warn); }
.call-missed .call-icon { background: var(--warn-soft); color: var(--warn); }
.call-answered .call-icon { background: var(--ok-soft); color: var(--ok); }
.call .item-actions { margin-top: 6px; }
.badge { font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.badge-missed { background: var(--warn-soft); color: var(--warn); }
.badge-answered { background: var(--ok-soft); color: var(--ok); }
.badge-ringing { background: var(--info-soft); color: var(--ink-2); }
.empty { text-align: center; padding: 56px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-icon { font-size: 2rem; opacity: .5; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-weight: 600; }
.new-pill { position: sticky; top: 70px; z-index: 5; text-align: center; margin-bottom: 10px; }
.new-pill a { display: inline-block; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: .88rem; box-shadow: var(--shadow); }

/* Admin */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.add-form { display: grid; grid-template-columns: 1.2fr 1.5fr .8fr auto; gap: 12px; align-items: end; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-off td { opacity: .55; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.actions form { margin: 0; }
.inline-edit { display: flex; gap: 6px; min-width: 190px; }
.inline-edit input { padding: 6px 9px; font-size: .85rem; border-color: transparent; background: transparent; }
.inline-edit input:hover, .inline-edit input:focus { border-color: var(--line); background: var(--surface); }
.inline-edit .btn { visibility: hidden; }
.inline-edit:focus-within .btn { visibility: visible; }
details.more { position: relative; }
details.more summary { list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
.del-form { position: absolute; right: 0; top: 34px; z-index: 3; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; width: 240px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.pin-card { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.pin { font-family: var(--mono); font-size: 2rem; font-weight: 600; letter-spacing: .18em; margin: 0; }
.pin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: start; margin: 8px 0; }
.copy-row input, .copy-row textarea { font-family: var(--mono); font-size: .82rem; background: var(--surface-2); }
.copy-label { font-weight: 700; font-size: .85rem; padding-top: 10px; }
.steps { padding-left: 20px; display: grid; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.row-form { display: flex; gap: 8px; margin-bottom: 12px; }

@media (max-width: 760px) {
  .add-form, .grid-2 { grid-template-columns: 1fr; }
  .copy-row { grid-template-columns: 1fr auto; }
  .copy-label { grid-column: 1 / -1; padding: 0; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topnav { order: 3; width: 100%; }
  .brand-text small { display: none; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; padding: 10px 12px; }
  .search { max-width: none; flex: 1 1 100%; }
  .item-head { flex-direction: column; gap: 2px; }
}

/* v1.1 — call history import */
.history-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: flex-start; }
.history-actions .row-form select { width: auto; }
.history-actions .row-form input { width: 210px; }
.cron-help { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.cron-help summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
@media (max-width: 760px) { .history-actions .row-form { flex-wrap: wrap; } .history-actions .row-form input { width: 100%; } }

/* v2.0 — multi-number, settings, reports, admin */
.container.narrow { max-width: 760px; }
.page-title { font-size: 1.6rem; margin: 0 0 16px; }
.check-row { flex-direction: row !important; align-items: center; gap: 10px !important; font-weight: 600; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.num-switch { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: -6px 0 8px; scrollbar-width: thin; }
.num-switch a { flex: none; display: flex; flex-direction: column; gap: 1px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: .88rem; text-decoration: none; }
.num-switch a small { font-weight: 500; font-size: .74rem; color: var(--muted); }
.num-switch a.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.num-switch a.on small { color: inherit; opacity: .8; }
.to-tag { display: inline-block; width: fit-content; margin-top: 3px; font-family: var(--mono); font-size: .72rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); border-radius: 6px; padding: 1px 6px; }
.num-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.num-list li { padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.export-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.export-form label { flex: 1 1 140px; }
.install-help { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.install-help p { margin: 4px 0 0; font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.form-grid .span-all { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.num-chip { font-family: var(--mono); font-size: .8rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; white-space: nowrap; color: var(--ink); text-decoration: none !important; }
.num-chip.off { opacity: .5; text-decoration: line-through !important; }
.exp-soon { color: var(--warn); font-weight: 700; }
.exp-ok { color: var(--ink-2); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: .84rem; font-weight: 700; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.filters a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi small { display: block; color: var(--muted); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.kpi b { display: block; font-size: 1.7rem; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .8rem; color: var(--muted); }
.chart-wrap { width: 100%; overflow-x: auto; }
.chart-wrap svg { display: block; width: 100%; height: auto; min-width: 560px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--ink-2); margin: 0 0 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.bar-cell .bar { height: 8px; border-radius: 4px; background: var(--brand); min-width: 2px; }
.bar-cell .bar.warn { background: var(--warn); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.heat div { aspect-ratio: 1; border-radius: 4px; background: var(--brand); }
.heat-labels { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: .66rem; color: var(--muted); text-align: center; margin-top: 4px; }
@media (max-width: 760px) {
  .install-help { grid-template-columns: 1fr; }
  .topbar-right .btn { padding: 7px 10px; font-size: .82rem; }
}

/* Reports chart — series colors validated (light vs #fff, dark vs #151d29) */
.viz { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
       --h1: #cde2fb; --h2: #9ec5f4; --h3: #6da7ec; --h4: #3987e5; --h5: #1c5cab; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .viz { --s1: #3987e5; --s2: #d95926; --s3: #199e70;
         --h1: #184f95; --h2: #1c5cab; --h3: #256abf; --h4: #3987e5; --h5: #6da7ec; }
}
:root[data-theme="dark"] .viz { --s1: #3987e5; --s2: #d95926; --s3: #199e70;
       --h1: #184f95; --h2: #1c5cab; --h3: #256abf; --h4: #3987e5; --h5: #6da7ec; }
.line-chart .grid { stroke: var(--line); stroke-width: 1; }
.line-chart .axis { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.line-chart .tick { fill: var(--muted); font: 500 11px var(--font); }
.line-chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .line.s1, .line-chart .dot.s1 { stroke: var(--s1); }
.line-chart .line.s2, .line-chart .dot.s2 { stroke: var(--s2); }
.line-chart .line.s3, .line-chart .dot.s3 { stroke: var(--s3); }
.line-chart .dot { stroke-width: 2; fill: var(--surface); }
.line-chart .dot.s1 { fill: var(--s1); } .line-chart .dot.s2 { fill: var(--s2); } .line-chart .dot.s3 { fill: var(--s3); }
.line-chart .dot { paint-order: stroke; stroke: var(--surface) !important; }
.line-chart .end-label { fill: var(--ink-2); font: 600 12px var(--font); }
.line-chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.line-chart rect:focus { outline: none; }
.viz-tip { position: absolute; z-index: 30; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 10px; font-size: .82rem; min-width: 150px; }
.viz-tip-title { color: var(--muted); font-weight: 700; font-size: .74rem; margin-bottom: 4px; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.viz-tip-row b { font-variant-numeric: tabular-nums; min-width: 26px; color: var(--ink); }
.viz-tip-row span { color: var(--ink-2); }
.viz-tip .key { width: 12px; height: 2px; border-radius: 2px; flex: none; }
.viz-tip .key.s1 { background: var(--s1); } .viz-tip .key.s2 { background: var(--s2); } .viz-tip .key.s3 { background: var(--s3); }
.table-view { margin-top: 10px; }
.table-view summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.heat .heat-cell { background: var(--surface-2); border: 1px solid var(--line); outline-offset: 2px; }
.heat .h1 { background: var(--h1); border-color: transparent; } .heat .h2 { background: var(--h2); border-color: transparent; }
.heat .h3 { background: var(--h3); border-color: transparent; } .heat .h4 { background: var(--h4); border-color: transparent; }
.heat .h5 { background: var(--h5); border-color: transparent; }
.heat .heat-cell:hover, .heat .heat-cell:focus { outline: 2px solid var(--ink); }
.report-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.report-filters .filters { margin: 0 8px 0 0; align-self: center; }
.report-filters label { min-width: 150px; }

/* v2.1 — credit, outbound SMS, prices, two-step verification */
.balance-chip { display: inline-flex; align-items: center; font-weight: 800; font-size: .88rem; padding: 7px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); text-decoration: none !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balance-chip.big { font-size: 1.1rem; padding: 8px 14px; }
.balance-chip.neg { background: var(--warn-soft); color: var(--warn); }
.num.ok { color: var(--ok); font-weight: 700; }
.item.sent { border-left: 3px solid var(--brand); }
.compose-info { min-height: 44px; font-size: .88rem; }
.compose-meta { color: var(--muted); }
.compose-price { font-weight: 700; margin-top: 2px; }
.compose-price.warn { color: var(--warn); }
.price-wrap { max-height: 70vh; overflow: auto; }
.price-wrap thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.price-in { width: 92px; padding: 5px 8px; font-family: var(--mono); font-size: .82rem; text-align: right; }
.price-in.manual { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.price-in:disabled { opacity: .35; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 0 2px; background: linear-gradient(transparent, var(--surface) 40%); }
.row-mine td { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.totp-setup { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; margin: 6px 0 14px; }
.totp-setup .qr { background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); aspect-ratio: 1; }
.totp-setup .qr svg { display: block; width: 100%; height: auto; }
.totp-key { display: inline-block; margin-top: 6px; font-size: .95rem; letter-spacing: .06em; white-space: normal; word-break: break-all; }
.recovery { margin-top: 10px; }
.recovery-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin: 8px 0; }
.code-block { font-family: var(--mono); font-size: .82rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-x: auto; }
@media (max-width: 760px) { .totp-setup { grid-template-columns: 1fr; } .totp-setup .qr { max-width: 220px; } .balance-chip { padding: 6px 9px; font-size: .8rem; } }
#compose textarea { font-family: var(--font); font-size: 1rem; line-height: 1.5; }

/* ---------- phone (v2.2) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.phone-wrap { max-width: 520px; }
.phone { padding: 22px 20px 24px; }
.reg-state { display: inline-flex; align-items: center; gap: 6px; font: 700 .78rem var(--font); color: var(--muted); white-space: nowrap; }
.reg-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.reg-state[data-state="on"] { color: var(--ok); }
.reg-state[data-state="on"]::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.reg-state[data-state="err"] { color: var(--warn); }
.reg-state[data-state="err"]::before { background: var(--warn); }
.dial-input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--line); background: transparent; color: var(--ink); font: 600 1.7rem var(--mono); text-align: center; padding: 8px 4px; letter-spacing: .02em; }
.dial-input:focus { outline: none; border-color: var(--brand); }
.dial-info { min-height: 2.6em; text-align: center; font-size: .85rem; color: var(--muted); margin: 8px 0 4px; }
.dial-info.warn { color: var(--warn); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px auto 14px; max-width: 320px; }
.keypad.small { max-width: 260px; gap: 8px; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 62px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.keypad.small .key { height: 48px; }
.key b { font: 600 1.35rem var(--font); line-height: 1; }
.key small { font: 700 .58rem var(--font); letter-spacing: .12em; color: var(--muted); min-height: .8em; margin-top: 3px; }
.key:hover { border-color: var(--muted); }
.key:active, .key.pressed { background: var(--brand-soft); }
.from-pick { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.from-pick select { max-width: 70%; }
.call-btn { display: block; width: 100%; max-width: 320px; margin: 0 auto; height: 54px; border: 0; border-radius: 99px; background: var(--ok); color: #fff; font: 800 1rem var(--font); cursor: pointer; }
.call-btn:disabled { opacity: .45; cursor: not-allowed; }
.call-btn.decline { background: var(--warn); }
.answer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 320px; margin: 18px auto 0; }
.answer-row .call-btn { max-width: none; }
#screen-call { padding: 8px 0 4px; }
.call-number { text-align: center; font-size: 1.6rem; margin: 6px 0 2px; word-break: break-all; }
.call-timer { text-align: center; font: 600 1.25rem var(--mono); margin: 14px 0 2px; font-variant-numeric: tabular-nums; }
.call-actions { display: flex; justify-content: center; gap: 16px; margin: 18px 0; }
.call-fix { display: block; width: 100%; max-width: 320px; margin: 14px auto 0; padding: 12px 14px; border: 2px solid var(--warn); border-radius: 14px; background: var(--warn-soft); color: var(--text, inherit); font: 600 .95rem var(--font); text-align: center; cursor: pointer; animation: callfix 1.2s ease-in-out infinite alternate; }
.call-fix small { display: block; font-weight: 400; font-size: .8rem; opacity: .8; margin-top: 2px; }
.call-fix[hidden] { display: none; }
@keyframes callfix { from { box-shadow: 0 0 0 0 transparent; } to { box-shadow: 0 0 0 5px var(--warn-soft); } }
@media (prefers-reduced-motion: reduce) { .call-fix { animation: none; } }
.round { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 1.3rem; cursor: pointer; }
.round small { font: 700 .66rem var(--font); color: var(--muted); }
.round[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.round[aria-pressed="true"] small { color: var(--surface); }
#btn-hangup { margin-top: 18px; }
.call-list { list-style: none; margin: 0; padding: 0; }
.call-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.call-list li:first-child { border-top: 0; }
.call-row { display: flex; align-items: center; gap: 12px; }
.call-row .ci { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.call-row.missed .ci { background: var(--warn-soft); color: var(--warn); }
.call-row .cm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.call-row .cm small { overflow-wrap: anywhere; }
.sip-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; align-items: center; margin: 12px 0; }
.sip-grid dt { color: var(--muted); font-size: .85rem; }
.sip-grid dd { margin: 0; font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--ok); }
.kpis-sm .kpi b { font-size: 1.05rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; } }
.cmd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.cmd-row code { flex: 1 1 260px; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.cmd-row form { margin: 0; }
[hidden] { display: none !important; }
.sip-grid dd.plain { font-family: var(--font); }
.topbar > .brand { flex: none; }
.brand-text { white-space: nowrap; }
.topnav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { white-space: nowrap; padding: 7px 10px; }
@media (max-width: 1240px) { .topnav ~ .topbar-right .muted.tiny { display: none; } }
.topbar .btn { white-space: nowrap; }
.add-rate { margin: 12px 0; }
.add-rate summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.add-rate form { margin-top: 10px; align-items: end; }
.add-rate label { font-size: .8rem; }
#rates .tabs { margin: 6px 0 4px; }

/* ===== v2.4 — app layout: sidebar (laptop/tablet), top bar + tab bar (phone) ===== */
:root { --side-w: 236px; --pagebar-h: 60px; --warn-amber: #b26a00; }
.ico { width: 20px; height: 20px; flex: none; }
.shell { display: flex; min-height: 100vh; width: 100%; }
.side {
  position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: none; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; z-index: 30;
}
.side-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 16px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-link, .theme-btn {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--ink-2);
  font: 600 .93rem var(--font); text-decoration: none !important; position: relative; background: none; border: 0; cursor: pointer; width: 100%; text-align: left;
}
.side-nav a:hover, .side-link:hover, .theme-btn:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand); }
.side-group { margin: 14px 12px 4px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side-group:first-child { margin-top: 0; }
.nav-badge { margin-left: auto; font-style: normal; font-size: .7rem; font-weight: 800; background: var(--warn); color: #fff; border-radius: 99px; padding: 1px 7px; line-height: 1.5; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px; color: var(--muted); min-width: 0; }
.side-user span { display: flex; flex-direction: column; min-width: 0; }
.side-user b { color: var(--ink); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pagebar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; min-height: var(--pagebar-h);
  padding: 10px max(20px, calc((100% - 1080px) / 2)); background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.pagebar-title { font-size: 1.15rem; margin: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pagebar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pagebar-brand, .pagebar-theme, .menu-btn { display: none; }
.theme-btn .ico { width: 20px; height: 20px; }
.pagebar-theme .theme-btn { padding: 8px; width: auto; border: 1px solid var(--line); border-radius: 10px; }
.pagebar-theme .theme-label { display: none; }
.menu-btn { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px; color: var(--ink); cursor: pointer; }
.tabbar { display: none; }
.shell .container { max-width: 1080px; }
.shell .site-foot { padding-bottom: 26px; }

@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .admin-shell .side.open { display: flex; position: fixed; left: 0; top: 0; box-shadow: var(--shadow); }
  .pagebar { padding: 8px 14px; gap: 10px; }
  .pagebar-brand { display: block; }
  .pagebar-brand .brand-text { display: none; }
  .pagebar-brand .brand-mark { width: 30px; height: 30px; }
  .pagebar-theme { display: inline-flex; }
  .menu-btn { display: inline-flex; }
  .pagebar-title { font-size: 1.02rem; }
  .pagebar .live-dot { display: none; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border-radius: 10px; color: var(--muted); font-size: .7rem; font-weight: 700; text-decoration: none !important; }
  .tabbar a .ico { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--brand); }
  .tabbar .nav-badge { position: absolute; top: 0; left: 55%; margin: 0; }
  .shell:not(.admin-shell) .shell-main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .shell .container { padding: 16px 14px 28px; }
}
@media (max-width: 420px) { .pagebar .balance-chip { padding: 6px 10px; font-size: .82rem; } }

/* Home */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.home-grid > * { min-width: 0; }
.welcome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.welcome h2 { font-size: 1.5rem; margin: 0; }
.balance-card { background: radial-gradient(120% 140% at 100% 0%, rgba(34, 195, 238, .55) 0%, rgba(34, 195, 238, 0) 55%), linear-gradient(135deg, #2b6fd0 0%, #2d4fae 55%, #2f3a8f 100%); color: #fff; border-radius: 18px; padding: 18px 20px; min-width: 240px; box-shadow: var(--shadow); }
.balance-card small { opacity: .85; font-weight: 700; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.balance-card b { display: block; font-size: 2rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.balance-card a { color: #fff; font-weight: 700; font-size: .85rem; text-decoration: underline; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.checklist .n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--brand-soft); color: var(--brand); }
.checklist li.done { opacity: .62; }
.checklist li.done .n { background: var(--ok); color: #fff; }
.checklist .t { flex: 1; min-width: 0; }
.checklist .t b { display: block; }
.checklist .t small { color: var(--muted); }
.checklist .btn { flex: none; align-self: center; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 14px; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.mini-feed { list-style: none; margin: 0; padding: 0; }
.mini-feed li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.mini-feed li:first-child { border-top: 0; }
.mini-feed .mi { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.mini-feed .mi .ico { width: 17px; height: 17px; }
.mini-feed .mi.missed { background: var(--warn-soft); color: var(--warn); }
.mini-feed .mi.out { background: var(--info-soft); color: var(--ink-2); }
.mini-feed .mc { flex: 1; min-width: 0; }
.mini-feed .mc b { font-family: var(--mono); font-size: .9rem; }
.mini-feed .mc p { margin: 2px 0 0; color: var(--ink-2); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-feed time { font-size: .76rem; }
.perm-card { border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--brand-soft); }
.perm-card .row-form { flex-wrap: wrap; margin: 10px 0 0; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.quick a { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: none !important; }
.quick a .ico { color: var(--brand); width: 22px; height: 22px; }
.quick a:hover { border-color: var(--brand); }
@media (max-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1fr); } .balance-card { flex: 1; } }

/* Settings sub-menu */
.subnav { display: flex; gap: 6px; overflow-x: auto; margin: -4px 0 16px; padding-bottom: 4px; scrollbar-width: none; }
.subnav a { flex: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .85rem; color: var(--ink-2); text-decoration: none !important; }
.subnav a.on, .subnav a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 44px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 6px; opacity: .6; }
.recips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.recips .tag { font-family: var(--mono); font-weight: 600; }
.notif-num { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); display: grid; gap: 8px; }
.toggle-list { display: grid; gap: 4px; }
.toggle-row { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 12px !important; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500 !important; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.toggle-row b { display: block; font-weight: 700; }
.toggle-row small { color: var(--muted); }

/* Price list */
.price-tabs { margin-bottom: 14px; }
.price-big .table { font-size: 1rem; }
.price-big .table td { padding: 13px 10px; }
.price-big .table td.num { font-weight: 800; font-size: 1.05rem; }
.price-search { display: flex; gap: 8px; margin-bottom: 12px; }
.price-search input { max-width: 420px; }
@media (max-width: 640px) {
  .table.cards thead { display: none; }
  .table.cards, .table.cards tbody, .table.cards tr, .table.cards td { display: block; width: 100%; }
  .table.cards tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 6px 12px; background: var(--surface); }
  .table.cards td { border: 0; padding: 4px 0; text-align: left !important; display: flex; justify-content: space-between; gap: 10px; }
  .table.cards td::before { content: attr(data-l); color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
  .table.cards td:first-child { font-weight: 800; font-size: 1rem; }
  .table.cards td:first-child::before { content: none; }
}

/* Calls: outgoing + recordings */
.call-out .call-icon { background: var(--info-soft); color: var(--ink-2); }
.badge-out { background: var(--info-soft); color: var(--ink-2); }
.rec-player { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rec-player audio { height: 34px; max-width: 100%; }
.feed .item { transition: background .6s ease; }
.feed .item.fresh { background: var(--brand-soft); }
.mini-audio { height: 32px; margin-top: 6px; max-width: 100%; }
@media (max-width: 640px) {
  .quick { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick a { padding: 10px 8px; font-size: .8rem; align-items: center; text-align: center; }
  .welcome h2 { font-size: 1.3rem; }
}
label.col-label { flex-direction: column; align-items: stretch; font-size: .82rem; font-weight: 600; }
.check-row > span { min-width: 0; overflow-wrap: anywhere; }

/* v2.5: choice lists (MagnusBilling account mode) */
fieldset.choice { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 6px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
fieldset.choice legend { font-weight: 700; font-size: .86rem; padding: 0 6px; }
.radio-row { display: flex !important; flex-direction: row !important; gap: 10px !important; align-items: flex-start; padding: 6px 2px; cursor: pointer; }
.radio-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.radio-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.radio-row small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.in-price { display: grid; gap: 4px; margin-top: 8px; max-width: 210px; }
.in-price b { font-size: .78rem; }
.in-price label { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 8px !important; font-weight: 500; color: var(--muted); font-size: .78rem; }
.in-price input { width: 80px; padding: 4px 7px; font-size: .82rem; }
@media (max-width: 640px) {
  .table.cards td.stack-cell { display: block; }
  .table.cards td.stack-cell::before { display: block; margin-bottom: 4px; }
  .table.cards td.stack-cell input:not([type=checkbox]) { width: 100%; }
  .table.cards td.stack-cell .in-price { max-width: none; }
  .table.cards td.stack-cell .in-price input { width: 110px; }
}

/* v2.5: phone servers */
.srv h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 12px; }
.srv-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.srv-stats small { color: var(--muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.srv-stats b { font-size: 1.35rem; }
.srv-stats span { color: var(--muted); font-size: .76rem; }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: .82rem; }
.meter span { color: var(--muted); font-weight: 700; }
.meter i { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.meter i em { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter.warm i em { background: #d99a1b; }
.meter.hot i em { background: #d9472b; }
.meter small { grid-column: 1 / -1; color: var(--muted); font-size: .74rem; }
.srv-more { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.srv-more summary { cursor: pointer; font-size: .9rem; }
@media (max-width: 640px) {
  .srv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meters { grid-template-columns: 1fr; }
}
.srv-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.srv-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.in-bulk { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.in-bulk summary { cursor: pointer; }
.in-bulk-form { margin: 8px 0 0; align-items: flex-end; flex-wrap: wrap; }
.in-bulk-form label { display: flex; flex-direction: column; gap: 3px; }
.in-bulk-form input { width: 100px; }
.in-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.in-row label { display: flex !important; flex-direction: row !important; align-items: center; gap: 3px !important; font-weight: 500; color: var(--muted); }
.in-row input { width: 64px; padding: 4px 6px; font-size: .8rem; }
.in-row label:nth-of-type(2) input { width: 74px; }

/* v2.5: reasons and charge details */
.why { color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; flex-basis: 100%; }
.tx-more { margin-top: 4px; }
.tx-more summary { cursor: pointer; color: var(--brand); font-size: .8rem; font-weight: 700; }
.tx-more dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 6px 0 2px; font-size: .82rem; }
.tx-more dt { color: var(--muted); font-weight: 600; }
.tx-more dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .table.cards td.tx-what { display: block; }
  .table.cards td.tx-what::before { display: block; margin-bottom: 2px; }
  .tx-more dl { grid-template-columns: 1fr; gap: 0; }
  .tx-more dd { margin-bottom: 6px; }
}
.pw-grid { align-items: start; }
.pw-grid h3 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
.pin-card .pin-code { font-size: 1.3rem; letter-spacing: .12em; }
.filters a.f-warn:not(.on) { color: var(--muted); }

/* v2.6: logs */
.log-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 12px; font-size: .86rem; color: var(--muted); }
.log-sum b { color: var(--ink); }
.logs .log-ico { display: inline-block; width: 1.2em; text-align: center; color: var(--muted); }
.logs tr.log-bad td:first-child { box-shadow: inset 3px 0 0 #d9472b; }
.logs .why { margin-top: 4px; display: block; }
.logs td { vertical-align: top; }
.logs td:first-child, .logs td[data-l="When"] { white-space: nowrap; }
.logs td[data-l="What"] { min-width: 340px; }
.logs .tx-more dl { grid-template-columns: minmax(96px, max-content) minmax(180px, 1fr); }
@media (max-width: 640px) { .logs td[data-l="What"] { min-width: 0; } .logs .tx-more dl { grid-template-columns: 1fr; } }
.logs td[data-l="Charge"] { white-space: nowrap; }
.hist-more { justify-content: center; display: flex; padding: 8px 0; }

/* v2.6: usage & profit */
.usage-days td[data-l="Sale"] { position: relative; }
.usage-bar { position: absolute; left: 0; bottom: 3px; height: 3px; background: var(--brand); opacity: .35; border-radius: 2px; }
.usage-sum td { border-top: 2px solid var(--line); background: var(--surface-2); }
tr.usage-today td { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.usage-days th small, .usage-prov th small { font-weight: 500; text-transform: none; letter-spacing: 0; }
@media (max-width: 640px) { .usage-bar { display: none; } .usage-sum td:empty { display: none; } }

/* v2.6.2: section tabs (same on every page of a section) + mobile "More" menu */
.section-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 28px 0; scrollbar-width: none; }
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs a { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: .88rem; text-decoration: none !important; position: relative; }
.section-tabs a .ico { width: 17px; height: 17px; }
.section-tabs a.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.section-tabs .nav-badge { margin-left: 2px; }
.tab-more { display: none; }
@media (max-width: 900px) {
  .section-tabs { padding: 10px 14px 0; }
  .tab-more { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border-radius: 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; }
  .tab-more .ico { width: 23px; height: 23px; }
  .tab-more.on { color: var(--brand); }
  .shell .side.open { display: flex; position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; box-shadow: var(--shadow); overflow-y: auto; }
}
.rec-keep { line-height: 1.6; }
.rec-bulk { margin: 0 0 10px; align-items: center; }
.recs td:first-child { width: 28px; }
.recs input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }

/* v2.7: phone notifications */
.push-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.push-box.is-on { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.push-state { margin: 0; font-weight: 700; }
.push-devices { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.push-devices li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.push-devices li span { display: flex; flex-direction: column; }

/* Call forwarding (2.7) */
.fwd-list { display: grid; gap: 10px; }
.fwd-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.3fr) minmax(170px, 1.3fr); gap: 10px 14px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.fwd-row .fwd-num { align-self: center; }
.fwd-row .fwd-price { grid-column: 1 / -1; margin: 0; }
.fwd-row label[hidden] { display: none !important; }
.fwd-admin { display: grid; gap: 4px; margin-top: 8px; max-width: 230px; }
.fwd-admin b { font-size: .78rem; }
.fwd-admin select, .fwd-admin input { font-size: .8rem; padding: 4px 6px; }
@media (max-width: 640px) { .fwd-row { grid-template-columns: 1fr; } }

/* Voicemail (2.8) */
.vm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vm-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.vm-item.is-new { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.vm-item.is-focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.vm-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.vm-who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.vm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); display: inline-block; align-self: center; }
.vm-audio { width: 100%; max-width: 520px; height: 40px; }
.vm-box { display: grid; gap: 8px; grid-column: 1 / -1; padding-top: 10px; border-top: 1px dashed var(--line); }
.vm-box .vm-greet { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vm-box audio { height: 34px; max-width: 260px; }
.vm-rec-state { font-size: .82rem; color: var(--muted); }
.vm-rec-state.rec { color: #d9472b; font-weight: 700; }
.fwd-row .check-row { grid-column: 1 / -1; }

/* Finance history (2.9) */
a.kpi-link { color: inherit; text-decoration: none; display: block; transition: border-color .15s, transform .15s; }
a.kpi-link:hover { border-color: var(--brand); transform: translateY(-1px); }
.kpi-total { background: var(--brand-soft); border-color: transparent; }

/* Business line (2.9) */
.biz-line .panel-head h2 small { font-family: inherit; font-weight: 500; }
.biz-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.biz-audio { display: grid; gap: 10px; margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.biz-audio-row { display: grid; grid-template-columns: minmax(200px, 1fr) auto; gap: 8px 16px; align-items: center; }
.biz-audio-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.biz-audio-ctl audio { height: 34px; max-width: 240px; }
.agent-list { display: grid; gap: 8px; }
.agent-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.agent-item summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; cursor: pointer; }
.agent-new { border-color: var(--brand); }
.group-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.group-list li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.member-pick { display: grid; gap: 6px; }
.member-pick .check-row { align-items: center; }
@media (max-width: 640px) { .biz-audio-row { grid-template-columns: 1fr; } }

/* Business line steps (2.9.2) */
.biz-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.biz-steps a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.biz-steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2, rgba(127,127,127,.15)); flex: none; }
.biz-steps span { display: grid; line-height: 1.2; }
.biz-steps small { color: var(--muted); font-size: .76rem; }
.biz-steps .on a { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.biz-steps .done b { background: var(--brand); color: var(--brand-ink); }
.biz-guide { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.5; }
.agent-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.agent-actions { margin: 8px 0 0; }
.chip-danger { color: #d9472b; }
@media (max-width: 640px) { .biz-steps { grid-template-columns: 1fr; } }

/* Business line destinations (2.9.3) */
.biz-flow { margin: 0; padding-left: 22px; display: grid; gap: 16px; font-size: .9rem; }
.biz-flow > li { padding-left: 4px; }
.biz-flow > li > * + * { margin-top: 8px; }
.biz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.biz-row select, .biz-row input { width: auto; max-width: 100%; }
.biz-row input.biz-num { width: 84px; }
.biz-dest { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 100%; }
.biz-dest input[hidden], [data-route-main][hidden] { display: none; }
.biz-dest input { width: 190px; }
.biz-menu { margin-top: 10px; display: grid; gap: 10px; }
.biz-menu > p { margin: 0; }
.biz-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 14px; }
.biz-key { display: flex; align-items: flex-start; gap: 8px; }
.biz-key > b { flex: none; width: 44px; padding-top: 10px; font-size: .84rem; }
.biz-key .biz-dest { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.biz-key .biz-dest select, .biz-key .biz-dest input { width: 100%; }
@media (max-width: 560px) { .biz-row > select, .biz-row > .biz-dest, .biz-row > span[data-route-main] { width: 100%; } .biz-row .biz-dest select { width: 100%; } }

/* Business line: what callers hear + which sound plays (2.9.4) */
.biz-story { margin: 16px 0 6px; padding: 12px 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; background: var(--soft, rgba(16, 185, 129, .05)); }
.biz-story ol { margin: 8px 0 6px; padding-left: 20px; display: grid; gap: 4px; font-size: .9rem; }
.biz-story-t { font-weight: 600; }
.biz-story-t::after { content: ":"; }
.biz-audio-h { margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); }
.biz-now { margin: 3px 0 0; font-size: .84rem; color: var(--muted, #6b7280); }
.biz-now.own { color: var(--ok, #059669); font-weight: 600; }
.biz-audio-row[hidden] { display: none; }
.biz-unused { margin-top: 6px; }

/* Voicemail filters: number colours, direct / business line (2.9.5) */
.vmc0 { --vmc: #0ea5e9; } .vmc1 { --vmc: #f59e0b; } .vmc2 { --vmc: #ec4899; } .vmc3 { --vmc: #22c55e; } .vmc4 { --vmc: #a855f7; } .vmc5 { --vmc: #ef4444; }
.vm-filters { display: grid; gap: 8px; margin: 0 0 14px; }
.vm-frow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vm-flabel { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 64px; font-weight: 600; }
.vm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .84rem; text-decoration: none; }
.vm-chip small { color: var(--muted); font-weight: 600; }
.vm-chip em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--brand-ink); background: var(--brand); border-radius: 999px; padding: 0 6px; }
.vm-chip.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--ink); font-weight: 600; }
.vm-chip.is-biz.on { border-color: #8b5cf6; background: color-mix(in srgb, #8b5cf6 16%, var(--surface)); }
.vm-num i, .vm-to i { width: 9px; height: 9px; border-radius: 50%; background: var(--vmc); display: inline-block; }
.vm-num.on { border-color: var(--vmc); background: color-mix(in srgb, var(--vmc) 14%, var(--surface)); }
.vm-biz-mini { font-size: .62rem; letter-spacing: .04em; color: #8b5cf6; border: 1px solid color-mix(in srgb, #8b5cf6 50%, transparent); border-radius: 5px; padding: 0 4px; }
.vm-search input[type=search] { width: auto; flex: 1; min-width: 160px; max-width: 260px; padding: 6px 10px; }
.vm-item { border-left: 4px solid var(--vmc, var(--line)); }
.vm-item.is-new { box-shadow: inset 3px 0 0 var(--vmc, var(--brand)); border-left-color: var(--vmc, var(--brand)); }
.vm-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vm-to { display: inline-flex; gap: 5px; align-items: center; font-family: var(--mono); font-size: .72rem; font-weight: 600; background: color-mix(in srgb, var(--vmc) 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--vmc) 45%, var(--line)); color: var(--ink-2); border-radius: 6px; padding: 1px 7px; text-decoration: none; }
.vm-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 6px; padding: 2px 7px; text-decoration: none; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.vm-type.is-biz { background: color-mix(in srgb, #8b5cf6 15%, var(--surface)); color: #8b5cf6; border-color: color-mix(in srgb, #8b5cf6 45%, transparent); }
@media (max-width: 560px) { .vm-flabel { width: 100%; } }

/* Call journeys, number colours, filter chips (2.9.6) */
.num-c0 { --nc: #0ea5e9; } .num-c1 { --nc: #f59e0b; } .num-c2 { --nc: #ec4899; } .num-c3 { --nc: #22c55e; } .num-c4 { --nc: #a855f7; } .num-c5 { --nc: #ef4444; }
.f-chips { display: grid; gap: 8px; margin: 0 0 12px; }
.f-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.f-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 64px; font-weight: 600; }
.f-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .84rem; text-decoration: none; }
.f-chip small { color: var(--muted); font-weight: 600; }
.f-chip.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--ink); font-weight: 600; }
.f-chip.is-biz.on { border-color: #8b5cf6; background: color-mix(in srgb, #8b5cf6 16%, var(--surface)); }
.f-chip.is-fwd.on { border-color: #0ea5e9; background: color-mix(in srgb, #0ea5e9 14%, var(--surface)); }
.f-chip.is-vm.on { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, var(--surface)); }
.f-num i { width: 9px; height: 9px; border-radius: 50%; background: var(--nc); display: inline-block; }
.f-num.on { border-color: var(--nc); background: color-mix(in srgb, var(--nc) 14%, var(--surface)); }
.f-bl { font-size: .62rem; letter-spacing: .04em; color: #8b5cf6; border: 1px solid color-mix(in srgb, #8b5cf6 50%, transparent); border-radius: 5px; padding: 0 4px; }
@media (max-width: 560px) { .f-label { width: 100%; } }

.j-tags { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: middle; }
.j-tag { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 6px; padding: 2px 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.j-tag.is-biz { background: color-mix(in srgb, #8b5cf6 15%, var(--surface)); color: #8b5cf6; border-color: color-mix(in srgb, #8b5cf6 45%, transparent); }
.j-tag.is-fwd { background: color-mix(in srgb, #0ea5e9 14%, var(--surface)); color: #0284c7; border-color: color-mix(in srgb, #0ea5e9 45%, transparent); }
.j-tag.is-vm { background: color-mix(in srgb, #f59e0b 15%, var(--surface)); color: #b45309; border-color: color-mix(in srgb, #f59e0b 45%, transparent); }
.j-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--brand) 60%, var(--line)); color: var(--brand); text-decoration: none; white-space: nowrap; }
.j-chip:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.log-extra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 2px; }
table.logs tr[class*="num-c"] td:first-child { box-shadow: inset 4px 0 0 var(--nc); }
table.logs tr.log-parent td { border-bottom-style: dashed; }
table.logs tr.log-child td { background: color-mix(in srgb, #0ea5e9 5%, transparent); }
table.logs tr.log-child td[data-l="What"] { padding-left: 30px; position: relative; }
table.logs tr.log-child td[data-l="What"]::before { content: "↳"; position: absolute; left: 12px; top: 12px; color: #0ea5e9; font-weight: 700; }

.journey { border: 1px solid var(--line); border-left: 5px solid var(--nc, var(--brand)); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; background: var(--surface); }
.journey-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.journey-total { margin-left: auto; font-size: .88rem; color: var(--muted); }
.journey-total b { color: var(--ink); font-size: 1rem; }
.journey-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.journey-steps li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; position: relative; }
.journey-steps li + li::before { content: ""; position: absolute; left: 14px; top: -8px; height: 16px; border-left: 2px dotted var(--line); }
.j-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; }
.journey-steps li.is-biz .j-ico { background: color-mix(in srgb, #8b5cf6 18%, var(--surface)); border-color: #8b5cf6; }
.journey-steps li.is-fwd .j-ico { background: color-mix(in srgb, #0ea5e9 18%, var(--surface)); border-color: #0ea5e9; }
.journey-steps li.is-vm .j-ico { background: color-mix(in srgb, #f59e0b 18%, var(--surface)); border-color: #f59e0b; }
.journey-steps li.is-ok .j-ico { background: color-mix(in srgb, #22c55e 18%, var(--surface)); border-color: #22c55e; }
.journey-steps li.is-bad .j-ico { background: color-mix(in srgb, #ef4444 15%, var(--surface)); border-color: #ef4444; }
.j-amt { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 4px; }
table.recs tr[class*="num-c"] td:first-child { box-shadow: inset 4px 0 0 var(--nc); }
table.ledger tr[class*="num-c"] td:first-child { box-shadow: inset 4px 0 0 var(--nc); }
table.ledger tr.tx-group-head td { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); font-size: .84rem; padding-top: 10px; padding-bottom: 8px; }
table.ledger tr.tx-group-head td > span { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-right: 8px; }
table.ledger tr.tx-in-group td[data-l="What"] { padding-left: 28px; position: relative; }
table.ledger tr.tx-in-group td[data-l="What"]::before { content: "↳"; position: absolute; left: 10px; top: 12px; color: var(--brand); font-weight: 700; }
@media (max-width: 720px) { table.ledger tr.tx-group-head { display: block; } table.ledger tr.tx-group-head td { display: block; border-radius: 10px; } }

/* App feel on phones (2.9.6): no zoom on fast double taps (dial pad, buttons) or when a box gets focus */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
a, button, .btn, .chip, .key, .f-chip, label, summary, input, select, textarea { touch-action: manipulation; }
.key, .keypad, .call-btn, .btn { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
@media (max-width: 760px) {
  /* iPhone zooms into any box with text smaller than 16px when it is tapped */
  input, select, textarea, .inline-edit input, .in-price input, .in-row input, .fwd-admin select, .fwd-admin input,
  .copy-row input, .copy-row textarea, textarea { font-size: 16px !important; }
}

/* Logo (2.9.7): the full logo in the menu / sign-in, the V mark where space is short; navy text in light mode, white in dark */
.brand { gap: 10px; }
.brand > img.brand-mark { display: none; width: 34px; height: 34px; object-fit: contain; }
.brand-logo { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.brand-logo img { width: 168px; height: auto; display: block; }
.brand-logo small { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding-left: 4px; }
.brand-logo .logo-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo .logo-l { display: none; } :root:not([data-theme="light"]) .brand-logo .logo-d { display: block; } }
:root[data-theme="dark"] .brand-logo .logo-l { display: none; }
:root[data-theme="dark"] .brand-logo .logo-d { display: block; }
.side-brand { padding-top: 6px; }
.side-brand .brand-logo img { width: 176px; }
.topbar .brand-logo img { width: 140px; }
.topbar .brand-logo small { display: none; }
.auth-card > .brand { justify-content: center; width: 100%; margin-bottom: 6px; }
.auth-card .brand-logo { align-items: center; }
.auth-card .brand-logo img { width: 230px; }
@media (max-width: 900px) {
  .pagebar-brand .brand-logo { display: none; }
  .pagebar-brand .brand > img.brand-mark { display: block; width: 32px; height: 32px; }
}
/* brand accents */
.btn-primary { background: var(--brand); }
.kpi-total { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box; border: 1px solid transparent; }
.side-nav a.on, .side-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand-2); }
/* Admin menu: the "Admin" tag goes under the logo (it no longer fits beside it) */
.admin-shell .side-brand { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px; }
.admin-shell .side-brand > .tag { margin-left: 4px; font-size: .68rem; padding: 2px 9px; letter-spacing: .06em; text-transform: uppercase; background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.side-brand .brand { max-width: 100%; }
.side-brand .brand-logo img { max-width: 100%; }

/* Security (2.9.9) */
.sec-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.sec-facts > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); display: grid; gap: 2px; }
.sec-facts small { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.sec-facts b { font-size: 1.15rem; }
.sec-facts span { font-size: .8rem; color: var(--muted); }
.srv-more .checklist small { display: block; font-weight: 400; margin-top: 2px; } .srv-more .checklist li.done b { color: var(--ink); }

/* 2.9.11: a long SMS (links) never pushes the page wider */
.panel, .kpi, .main { min-width: 0; }
.mini-feed .mc b, .mini-feed .to-tag { overflow-wrap: anywhere; }
/* 2.9.11: business line on/off */
.biz-switch { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 14px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); }
.biz-switch p { margin: 2px 0 0; }
.biz-switch form { flex: none; }
.biz-switch.is-off { background: var(--warn-soft); border-color: transparent; }
.biz-is-off .biz-route, .biz-is-off .biz-story, .biz-is-off .biz-audio { opacity: .55; }
@media (max-width: 640px) { .biz-switch { flex-direction: column; align-items: stretch; } }

/* 2.9.12: help button, guided tours, What's new, Help center */
.help-wrap { position: relative; display: inline-flex; }
.help-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand); font: 800 1rem/1 var(--font); cursor: pointer; display: grid; place-items: center; padding: 0; }
.help-btn:hover, .help-btn[aria-expanded="true"] { background: var(--brand-soft); border-color: var(--brand); }
.help-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(10, 20, 50, .18); padding: 6px; display: grid; }
.help-menu[hidden] { display: none; }
.help-menu > a, .help-menu > button { display: grid; gap: 1px; text-align: left; padding: 9px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.help-menu > a:hover, .help-menu > button:hover, .help-menu > a:focus-visible, .help-menu > button:focus-visible { background: var(--brand-soft); outline: none; }
.help-menu small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.help-hint { position: fixed; z-index: 70; width: min(300px, calc(100vw - 20px)); background: var(--ink); color: var(--surface); border-radius: 12px; padding: 12px 14px; font-size: .88rem; box-shadow: 0 14px 40px rgba(0, 0, 0, .25); animation: tour-in .25s ease; }
.help-hint::before { content: ""; position: absolute; top: -6px; left: var(--arrow, 50%); width: 12px; height: 12px; background: inherit; transform: rotate(45deg); }
.help-hint .row-form { margin: 8px 0 0; }
.help-hint .btn-ghost { color: var(--surface); border-color: rgba(255, 255, 255, .35); background: transparent; }

html.tour-on { overflow-anchor: none; }
.tour-layer { position: fixed; inset: 0; z-index: 1000; }
.tour-block { position: fixed; inset: 0; background: transparent; }
.tour-layer.is-center .tour-block { background: rgba(8, 14, 30, .58); }
.tour-spot { position: fixed; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 3px var(--brand-2), 0 0 0 9999px rgba(8, 14, 30, .58); transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease; }
.tour-pop { position: fixed; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); padding: 14px 16px 12px; transition: top .3s ease, left .3s ease; }
.tour-pop h3 { margin: 4px 0 6px; font-size: 1.08rem; }
.tour-body { font-size: .92rem; color: var(--ink-2); line-height: 1.5; }
.tour-body p { margin: 0 0 8px; }
.tour-body ul, .tour-body ol { margin: 0 0 8px; padding-left: 20px; }
.tour-body b { color: var(--ink); }
.tour-top { display: flex; align-items: center; justify-content: space-between; }
.tour-count { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.tour-x { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.tour-x:hover { background: var(--surface-2); color: var(--ink); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.tour-btns { display: flex; gap: 8px; margin-left: auto; }
.tour-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots i.done { background: var(--brand-2); }
.tour-dots i.on { background: var(--brand); width: 16px; border-radius: 4px; }
.tour-in { animation: tour-in .28s ease; }
.tour-nudge { animation: tour-nudge .35s ease; }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tour-nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-pop { transition: none; } .tour-in, .tour-nudge, .help-hint { animation: none; } }
.news-modal { width: min(460px, calc(100vw - 24px)); }
.news-mark { width: 26px; height: 26px; vertical-align: -6px; margin-right: 4px; border-radius: 6px; }
.news-list { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 12px; }
.news-list li { border-left: 3px solid var(--brand-2); padding: 2px 0 2px 12px; font-size: .9rem; color: var(--ink-2); }
.news-list small { display: block; color: var(--muted); font-size: .74rem; }
.news-list li > b { display: block; color: var(--ink); margin-bottom: 2px; }
.news-list p b { color: var(--ink); }
.news-list p { margin: 0 0 4px; }

.help-hero { background: var(--brand-grad); color: #fff; border-radius: var(--radius); padding: 26px 24px 18px; margin-bottom: 18px; }
.help-hero h2 { margin: 0 0 4px; font-size: 1.45rem; }
.help-hero .muted { color: rgba(255, 255, 255, .85); margin: 0 0 14px; }
.help-search input { width: 100%; font-size: 1.02rem; padding: 12px 16px; border-radius: 12px; border: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.help-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.help-cats .f-chip { cursor: pointer; font: inherit; font-size: .84rem; background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .25); }
.help-cats .f-chip.on { background: #fff; color: var(--brand); }
.help-cats .f-chip small { opacity: .75; }
.help-group h2 { margin-bottom: 6px; }
.help-art { border-top: 1px solid var(--line); }
.help-art:first-of-type { border-top: 0; }
.help-art summary { cursor: pointer; padding: 12px 4px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 10px; }
.help-art summary::-webkit-details-marker { display: none; }
.help-art summary::before { content: "+"; width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.help-art[open] summary::before { content: "–"; }
.help-art summary:hover { color: var(--brand); }
.help-body { padding: 0 4px 14px 36px; color: var(--ink-2); line-height: 1.55; }
.help-body p { margin: 0 0 8px; }
.help-body ul, .help-body ol { margin: 0 0 8px; padding-left: 20px; }
.help-body li { margin: 3px 0; }
.help-actions { margin: 8px 0 0; }
.help-tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.help-tour { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none !important; color: var(--ink); background: var(--surface-2); }
.help-tour:hover { border-color: var(--brand); background: var(--brand-soft); }
.help-tour small { color: var(--brand); font-weight: 600; }
.help-contact .btn { margin-top: 4px; }
@media (max-width: 640px) { .help-hero { padding: 20px 16px 14px; } .help-body { padding-left: 4px; } .help-menu { position: fixed; left: 10px; right: 10px; top: 58px; min-width: 0; } }
.help-cats .f-chip small { color: inherit; opacity: .8; }
/* admin: Help & tours */
.help-admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-admin-list { display: grid; gap: 4px; position: sticky; top: 76px; }
.help-admin-list a { display: grid; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.help-admin-list a small { color: var(--muted); font-size: .76rem; }
.help-admin-list a:hover { background: var(--surface-2); }
.help-admin-list a.on { background: var(--brand-soft); border-color: var(--brand); }
.help-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.help-step { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; background: var(--surface); }
.help-step.is-off, .help-news-item.is-off { opacity: .6; }
.help-step-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.help-sort { width: 72px; }
.help-title { flex: 1 1 220px; font-weight: 700; }
.help-step-btns { margin: 0; }
.help-step-btns:empty { display: none; }
.help-fmt code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.help-preview { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.help-pre { white-space: pre-wrap; font-size: .82rem; background: var(--surface-2); padding: 10px; border-radius: 10px; }
.help-news-item { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.help-save { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0; margin: 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .help-admin { grid-template-columns: minmax(0, 1fr); } .help-admin-list { position: static; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.shell-main > div.container { flex: none; }   /* notices above the page never stretch */

/* 2.9.13: opening hours, extension dialing, contacts, blocked numbers, invoices */
.biz-more { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.biz-more > summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.biz-more[open] > summary { margin-bottom: 10px; }
.hours-grid { display: grid; gap: 6px; }
.hours-row { display: grid; grid-template-columns: 130px 130px auto 130px; gap: 8px; align-items: center; justify-content: start; }
.hours-row .check-row { margin: 0; }
.hours-row input[type=time] { padding: 6px 8px; }
.hours-row:has(input[type=checkbox]:not(:checked)) input[type=time], .hours-row:has(input[type=checkbox]:not(:checked)) .muted { opacity: .35; }
.biz-hours-now { margin: 6px 0; font-size: .9rem; }
.ext-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.biz-is-off .biz-more { opacity: .55; }
.who-name { font-weight: 700; }
.who-num { color: var(--muted); font-size: .82em; }
.inline-form { display: inline; }
.chip-danger:hover { border-color: var(--bad, #c0392b); color: var(--bad, #c0392b); }
.contact-form { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 8px; align-items: end; }
.inv-list a.btn { white-space: nowrap; }
@media (max-width: 640px) { .hours-row { grid-template-columns: 1fr 1fr auto 1fr; } .hours-row .check-row { grid-column: 1 / -1; } .contact-form { grid-template-columns: 1fr; } }

/* 2.9.14: contact import */
.import-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.import-way { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); display: grid; gap: 6px; align-content: start; min-width: 0; }
.import-way[hidden] { display: none; }
.import-way p { margin: 0; }
.import-way input[type=file] { max-width: 100%; font-size: .85rem; }
.cc-in { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.cc-in input { width: 64px; padding: 5px 8px; }
.import-help { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; color: var(--ink-2); }

/* 2.9.15: contacts plans */
.ct-usage { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ct-bar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.ct-bar i { display: block; height: 100%; background: var(--brand-grad, var(--brand)); border-radius: 6px; }
.ct-usage.is-near .ct-bar i { background: #e6a23c; }
.ct-usage.is-full .ct-bar i { background: #d9472b; }
.ct-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ct-plan { position: relative; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); margin: 0; }
.ct-plan input { position: absolute; opacity: 0; pointer-events: none; }
.ct-plan b { font-size: 1.02rem; }
.ct-plan span { color: var(--brand); font-weight: 700; font-size: .9rem; }
.ct-plan small { color: var(--muted); font-weight: 500; }
.ct-plan em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.ct-plan:hover { border-color: var(--brand); }
.ct-plan:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px var(--brand) inset; }
.ct-plan:has(input:focus-visible) { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.ct-plan.is-unl { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.ct-plan-go { grid-column: 1 / -1; margin: 4px 0 0; }
@media (max-width: 640px) { .ct-usage { grid-template-columns: 1fr auto; } .ct-usage .ct-bar { grid-column: 1 / -1; grid-row: 2; } }

/* 2.9.16: digits pressed during a call */
.dtmf-typed { text-align: center; font-size: 1.6rem; font-weight: 600; letter-spacing: .12em; min-height: 2.1rem; margin: 6px auto 0; max-width: 300px;
  white-space: nowrap; overflow-x: auto; scrollbar-width: none; color: var(--ink); }
.dtmf-typed::-webkit-scrollbar { display: none; }
.dtmf-typed.dtmf-wait { color: var(--muted); }
#btn-keys[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); }

/* 2.9.17: browse other pages during a call */
html.is-embed .shell > .side, html.is-embed .pagebar, html.is-embed .tabbar { display: none !important; }
html.is-embed .shell-main { padding-bottom: 0 !important; }
html.is-embed body { padding-bottom: 0 !important; }
html.is-browsing, html.is-browsing body { overflow: hidden; }
.call-bar { position: fixed; right: 0; z-index: 45; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #1c7c3c; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.call-bar.cb-ended { background: #5b6577; }
.cb-back { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 2px 0; }
.cb-dot { width: 10px; height: 10px; border-radius: 50%; background: #7dff9c; flex: none; animation: cb-pulse 1.4s ease-in-out infinite; }
.cb-ended .cb-dot { animation: none; background: #c9d1de; }
@keyframes cb-pulse { 50% { opacity: .35; } }
.cb-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cb-who b { font-family: var(--mono); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-who small { font-size: .75rem; opacity: .9; }
.cb-who small::before { content: "Tap to go back to the call · "; }
.cb-btn { flex: none; border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: 7px 12px; font: 600 .82rem var(--font); cursor: pointer; }
.cb-btn[aria-pressed="true"] { background: #fff; color: #1c7c3c; }
.cb-end { background: #d9472b; border-color: #d9472b; }
.call-browse { position: fixed; right: 0; z-index: 44; background: var(--bg); }
.call-browse iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
@media (max-width: 640px) { .cb-who small::before { content: ""; } .cb-btn { padding: 7px 10px; } }
@media (prefers-reduced-motion: reduce) { .cb-dot { animation: none; } }
html.is-browsing .help-hint, html.is-browsing .tour-layer { display: none !important; }
.cb-blocked { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; padding: 24px; background: var(--bg); }
.cb-blocked .row-form { justify-content: center; }
.help-hint-off { background: none; border: 0; color: inherit; opacity: .75; font: 600 .78rem var(--font); text-decoration: underline; cursor: pointer; padding: 4px 2px; }
.paste-box { font-size: .82rem; line-height: 1.45; }

/* 2.9.22: invoice viewer (Close / Download / Share), menu above a page opened during a call */
.pdfv { min-height: 100vh; background: var(--surface-2); display: flex; flex-direction: column; }
.pdfv-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.pdfv-title { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfv-pages { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 8px max(24px, env(safe-area-inset-bottom)); }
.pdfv-page { max-width: 100%; height: auto; background: #fff; box-shadow: 0 6px 24px rgba(10, 20, 50, .18); border-radius: 4px; }
.pdfv-frame { width: 100%; max-width: 900px; height: calc(100vh - 90px); border: 0; background: #fff; }
@media (max-width: 480px) { .pdfv-bar .btn { padding: 6px 10px; } .pdfv-title { font-size: .9rem; } }
html.is-browsing .shell .side.open { z-index: 60; }
/* 2.9.22: big numbers never run out of their card */
.kpi { min-width: 0; }
.kpi b { overflow-wrap: anywhere; }
.kpi-unit { font-style: normal; font-size: .55em; font-weight: 600; color: var(--muted); margin-left: 2px; }
@media (max-width: 480px) { .kpi b { font-size: clamp(1.15rem, 6.2vw, 1.7rem); } }

/* 2.9.23: period chips; number colour on phone cards as a left border (it covered the date) */
.period-label { font-size: .8rem; color: var(--brand); }
@media (max-width: 720px) {
  table.ledger tr[class*="num-c"] td:first-child, table.logs tr[class*="num-c"] td:first-child, table.recs tr[class*="num-c"] td:first-child { box-shadow: none; }
  table.ledger tr[class*="num-c"], table.logs tr[class*="num-c"], table.recs tr[class*="num-c"] { border-left: 4px solid var(--nc); }
  table.logs tr.log-bad td:first-child { box-shadow: none; }
  table.logs tr.log-bad { border-left: 4px solid #d9472b; }
}

/* 2.9.23 — the phone is online on every page: a small status chip, and the call screen opens over any page */
.reg-mini { text-decoration: none; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.reg-mini:hover { border-color: var(--ok); }
@media (max-width: 720px) {
  .reg-mini { padding: 6px; border-color: transparent; background: none; }
  .reg-mini span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.phone-dock { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 18, 30, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.phone-dock[hidden] { display: none; }
.phone-dock .phone { position: relative; width: 100%; max-width: 400px; max-height: calc(100vh - 32px); overflow: auto; margin: 0; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
html.has-call:not(.is-browsing) body { overflow: hidden; }
html.is-browsing .phone-dock { display: none; }
.call-min { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: 600 .82rem var(--font); cursor: pointer; }
.call-min:hover { border-color: var(--brand); }
@media (max-width: 720px) {
  .phone-dock { padding: 0; align-items: stretch; }
  .phone-dock .phone { max-width: none; max-height: none; border-radius: 0; display: flex; flex-direction: column; justify-content: center; }
}
.phone-dock .phone { padding-top: 58px; }
.phone-dock .call-min { position: absolute; top: 14px; left: 14px; margin: 0; }
/* the app frame: holds the phone; the page opens inside it and moving between pages never disconnects the phone */
html.is-host, html.is-host body { margin: 0; height: 100%; overflow: hidden; background: var(--surface); }
.app-frame { position: fixed; border: 0; display: block; background: var(--bg);
  top: calc(env(safe-area-inset-top) + var(--bar-h, 0px)); left: env(safe-area-inset-left);
  width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right));
  height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--bar-h, 0px)); }
.call-bar.cb-host { left: 0; top: 0; padding-top: max(8px, env(safe-area-inset-top)); }
.call-bar[hidden] { display: none; }
/* 2.9.25 — the 24-hour boxes open the list they count */
a.stat { color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.stat:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow); }
a.stat:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
a.stat.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.day-chip { margin-left: 6px; }
#list { scroll-margin-top: 84px; }

/* 2.9.26 — phones: "More" is a sheet from the bottom (everything on one screen, in reach of the thumb) */
.more-sheet { position: fixed; inset: 0; z-index: 65; }
.more-sheet[hidden] { display: none; }
.ms-backdrop { position: absolute; inset: 0; background: rgba(6, 12, 24, .55); opacity: 0; transition: opacity .2s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.more-sheet.in .ms-backdrop { opacity: 1; }
.ms-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: min(88vh, 760px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line); box-shadow: 0 -18px 50px rgba(0, 0, 0, .3);
  transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
.more-sheet.in .ms-panel { transform: translateY(0); }
.ms-grab { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 9px auto 2px; flex: none; }
.ms-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid var(--line); flex: none; }
.ms-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 1.05rem; }
.ms-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ms-who b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-who small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-who small:empty { display: none; }
.ms-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; flex: none; }
.ms-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 8px; }
.ms-group { margin: 12px 4px 6px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ms-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 4px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; text-align: center; }
.ms-tile .ico { width: 24px; height: 24px; color: var(--brand); }
.ms-tile span { font-size: .74rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.ms-tile:active { transform: scale(.97); }
.ms-tile.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.ms-tile .nav-badge { position: absolute; top: 6px; right: 8px; margin: 0; }
.ms-foot { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); flex: none; }
.ms-foot > * { flex: 1; justify-content: center; margin: 0; border: 1px solid var(--line); border-radius: 12px; min-height: 44px; }
.ms-foot .theme-label { display: inline; }
.ms-out { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.ms-out .ico { width: 17px; height: 17px; }
.ms-out:hover { color: var(--warn); border-color: var(--warn); }
html.ms-open, html.ms-open body { overflow: hidden; }
@media (max-width: 360px) { .ms-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 901px) { .more-sheet { display: none !important; } }

/* 2.10.0 — number store, sign-up, modules */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .35em; text-align: center; }
.signup-cta { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.is-muted { opacity: .55; }
.crumbs { font-size: .86rem; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; }
.admin-tabs { margin: 4px 0 16px; }
.store-hero { text-align: center; padding: 18px 8px 8px; }
.store-hero h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.store-search { display: flex; gap: 8px; align-items: center; max-width: 520px; }
.store-search input { flex: 1; min-width: 0; }
.store-search.big { margin: 16px auto 4px; }
.store-search.big input { font-size: 1.02rem; padding: 13px 16px; border-radius: 12px; }
.store-sub { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.store-h { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0 0 4px; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.country-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.country-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.country-card[hidden] { display: none; }
.cc-flag { grid-row: 1 / 3; font-size: 1.7rem; line-height: 1; }
.country-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-card small { color: var(--muted); font-size: .78rem; }
.store-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 12px 0; }
.store-filter .f-row { margin: 0; }
.store-buy { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.store-buy > .panel { margin: 0; }
.store-sum { position: sticky; top: 84px; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 12px; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sum .sum-total { font-weight: 800; color: var(--ink); font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 8px; }
.store-bal { margin: 0; font-size: .92rem; }
.store-feats { margin: 8px 0 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.pick-nums { border: 0; padding: 0; margin: 0; }
.pick-nums legend { font-weight: 700; margin-bottom: 8px; }
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; padding: 2px; }
.num-opt { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface-2); }
.num-opt:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.store-order { text-align: center; padding: 34px 20px; max-width: 620px; margin: 10px auto; }
.so-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800;
  border: 3px solid var(--line); border-top-color: var(--brand); animation: so-spin 1s linear infinite; }
.store-order[data-status="done"] .so-icon { animation: none; border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.store-order[data-status="refunded"] .so-icon, .store-order[data-status="failed"] .so-icon { animation: none; border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
@keyframes so-spin { to { transform: rotate(360deg); } }
.so-title { margin: 0 0 6px; }
.so-number { font-size: 1.6rem; font-weight: 800; margin: 4px 0; }
.so-number:empty { display: none; }
.so-actions, .so-again { justify-content: center; margin-top: 16px; }
.module-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.module-list .panel { margin: 0; }
.module.is-on { border-color: var(--ok); }
.module-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.module-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.module-ico .ico { width: 22px; height: 22px; }
.module-name { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.module-name h2 { margin: 0; }
.req { border-top: 1px solid var(--line); padding: 12px 0; }
.req:first-of-type { border-top: 0; }
.public-numbers { max-width: 980px; margin: 0 auto; padding: 20px 16px 40px; }
.pn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pn-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 0; margin: 20px 0 0; list-style: none; counter-reset: s; }
.pn-steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 14px 52px; position: relative; font-size: .92rem; }
.pn-steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: .85rem; }
@media (max-width: 860px) {
  .store-buy { grid-template-columns: minmax(0, 1fr); }
  .store-sum { position: static; }
}
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
label.num-opt { flex-direction: row; font-weight: 500; font-size: .95rem; }
.num-opt input { margin: 0; flex: none; }
.so-actions .btn { flex: 1 1 150px; }
.area-list { display: grid; gap: 8px; }
.area-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.area-row:hover { border-color: var(--brand); }
.ar-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-main small { color: var(--muted); font-size: .8rem; }
.ar-main .tag { margin-left: 4px; font-size: .68rem; padding: 1px 7px; }
.ar-price { text-align: right; white-space: nowrap; }
.ar-price b { font-size: 1.05rem; }
.ar-price small { display: block; color: var(--muted); font-size: .76rem; }
@media (max-width: 520px) { .area-row { grid-template-columns: minmax(0, 1fr) auto; } .area-row > .btn { grid-column: 1 / -1; justify-content: center; } }
label.store-search { flex-direction: row; font-weight: 400; }
/* 2.10.1 — choose a number: digits search, premium numbers, holds */
.num-opt input[type=radio] { width: auto; flex: none; margin: 0; accent-color: var(--brand); }
label.num-opt { align-items: center; justify-content: flex-start; text-align: left; min-width: 0; }
.no-main { display: flex; flex-direction: column; min-width: 0; }
.no-main .mono { font-size: .95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-main small { color: var(--muted); font-size: .74rem; font-weight: 500; }
.num-opt.is-premium { border-color: color-mix(in srgb, #d4a017 55%, var(--line)); background: color-mix(in srgb, #d4a017 8%, var(--surface-2)); }
.num-opt.is-premium small { color: #a67c00; font-weight: 700; }
:root[data-theme="dark"] .num-opt.is-premium small { color: #f0c24b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .num-opt.is-premium small { color: #f0c24b; } }
.tag-prem { background: color-mix(in srgb, #d4a017 16%, transparent); color: #a67c00; border-color: transparent; }
.area-row.is-premium { border-color: color-mix(in srgb, #d4a017 55%, var(--line)); }
.digit-search { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; }
.digit-search.panel { padding: 14px 16px; }
.digit-search .store-search { flex: 1 1 260px; max-width: 420px; }
.sum-num { margin: -4px 0 10px; font-weight: 800; font-size: 1.05rem; }
.sum-num:empty { display: none; }
.held-row { align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.held-row:first-of-type { border-top: 0; }
.store .pager { justify-content: center; flex-wrap: wrap; gap: 6px; }
/* 2.10.1: coupon at checkout */
.ok { color: var(--ok); }
.store-sum .coupon { margin: 10px 0; border-top: 1px solid var(--line); padding-top: 10px; }
.store-sum .coupon summary { cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--brand); }
.store-sum .coupon summary .tiny { font-weight: 400; color: var(--muted); }
.store-sum .coupon .row-form { margin: 8px 0 4px; flex-wrap: nowrap; }
.store-sum .coupon input[name=cp] { flex: 1; min-width: 0; text-transform: uppercase; }

/* 2.10.2: cancel & refund (admin) */
.svc-list { display: grid; gap: 10px; }
.svc-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) 1fr 1.2fr 1fr; gap: 10px 14px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.svc-row.is-on { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 5%, transparent); }
.svc-row .svc-what { display: flex; flex-direction: column; gap: 2px; align-self: center; }
.svc-row label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); }
.svc-row label[hidden] { display: none; }
.svc-row .svc-amt { margin-top: 6px; }
@media (max-width: 860px) { .svc-row { grid-template-columns: 1fr; } }
.danger-zone { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.danger-zone summary { cursor: pointer; color: var(--warn); font-weight: 600; }
.sub-opts { margin: 4px 0 8px 26px; display: grid; gap: 6px; }

/* 2.10.2: documents */
.docs-need { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; background: var(--surface-2); font-size: .92rem; line-height: 1.5; }
.docs-need ul { margin: 8px 0 0; padding-left: 20px; }
.docs-page .page-title .tag { vertical-align: middle; font-size: .8rem; }
.docs-form h2 { display: flex; align-items: center; gap: 10px; }
.docs-form .step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; }
.docs-form .form-grid .wide { grid-column: 1 / -1; }
.docs-form .chip.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.doc-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 10px 0; }
.doc-slot { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.doc-slot.has-file { border-style: solid; border-color: var(--ok); }
.doc-slot select { width: 100%; }
.file-pick { position: relative; display: block; text-align: center; padding: 12px; border-radius: 10px; background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.docs-actions { margin-top: 4px; }
.docs-reuse .row-form { justify-content: space-between; }
.docs-state h2 { margin-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.doc-files li { padding: 4px 0; }
.doc-thumb { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); margin-top: 6px; }
/* 2.10.2: show other numbers */
.pick-nums .nums-more { display: inline-flex; margin: 0 0 10px; }

/* 2.10.4: smooth page updates (soft.js) */
.soft-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--brand); z-index: 9999; opacity: 0; pointer-events: none; box-shadow: 0 0 8px var(--brand); }
.soft-bar.on { opacity: 1; width: 70%; transition: width 6s cubic-bezier(.1, .7, .3, 1), opacity .2s; }
.soft-bar.done { width: 100%; opacity: 0; transition: width .2s ease-out, opacity .3s .15s; }
main.soft-busy { opacity: .55; pointer-events: none; transition: opacity .15s; }
main { transition: opacity .15s; }
.is-busy { position: relative; color: transparent !important; }
.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid var(--brand); border-right-color: transparent; border-radius: 50%; animation: soft-spin .6s linear infinite; }
.btn-primary.is-busy::after { border-color: #fff; border-right-color: transparent; }
@keyframes soft-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .soft-bar.on { transition: none; } .is-busy::after { animation-duration: 1.5s; } }

/* 2.10.5: incoming call plans */
.plan-pick { border: 0; padding: 0; margin: 14px 0 6px; }
.plan-pick legend { font-weight: 700; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .plan-cards { grid-template-columns: 1fr; } }
.plan-card { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.plan-card input[type=radio] { width: auto; margin-top: 4px; accent-color: var(--brand); }
.plan-card.on, .plan-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan-body { display: flex; flex-direction: column; gap: 4px; }
.plan-price { font-weight: 700; color: var(--brand); }
.plan-body .tiny { color: var(--muted); line-height: 1.45; }
.plan-one { margin: 10px 0 0; }
.cap-box { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0 14px; display: grid; gap: 4px; }

/* ---------------- Numbers hub (2.11) ---------------- */
.nh-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.nh-top h2 { margin: 0 0 2px; }
.nh-top p { margin: 0; }
.nh-find input { min-width: 220px; }
.nh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 18px; }
.nh-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius, 14px); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.nh-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.nh-card[hidden] { display: none; }
.nh-cardlink { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.nh-go, .nh-go a { position: relative; z-index: 2; }
.nh-head { display: flex; align-items: center; gap: 10px; }
.nh-flag { font-size: 1.5rem; line-height: 1; width: 1.6em; text-align: center; flex: none; }
.nh-flag.big { font-size: 2.2rem; }
.nh-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nh-id b { font-size: 1.08rem; }
.nh-hero .nh-id b { font-size: 1.45rem; }
.nh-id small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nh-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.nh-chip .ico { width: 13px; height: 13px; }
.nh-chip.on { color: var(--ink-2); }
.nh-chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.nh-bill { margin: 0; color: var(--ink-2); }
.nh-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.nh-go { display: flex; gap: 4px; }
.nh-go a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.nh-go a:hover { filter: brightness(.95); }
.nh-go .ico { width: 17px; height: 17px; }
.nh-prow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.nh-prow:first-of-type { border-top: 0; }
.nh-pmain { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.nh-off summary { cursor: pointer; }
.nh-off[open] summary { margin-bottom: 8px; }
.nh-back { margin: 0 0 10px; }
.nh-hero { display: flex; flex-direction: column; gap: 12px; }
.nh-name { margin: 0; }
.nh-name input { max-width: 300px; }
.nh-remark { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--info-soft); }
.nh-quick a small { font-weight: 500; color: var(--muted); font-size: .76rem; }
.nh-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.nh-h3 { font-size: .9rem; margin: 18px 0 6px; }
.nh-pay { list-style: none; margin: 0; padding: 0; }
.nh-pay li { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); align-items: baseline; }
.nh-pay li small { display: block; }
.nh-pay b.pos { color: var(--ok); }
.nh-svc { list-style: none; margin: 0; padding: 0; }
.nh-svc li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.nh-svc li:first-child { border-top: 0; }
.nh-svc li > span:first-child { display: flex; align-items: center; gap: 8px; }
.nh-svc li > span:last-child { text-align: right; }
.nh-svc .ico { width: 17px; height: 17px; color: var(--brand); }
.nh-act { list-style: none; margin: 0; padding: 0; }
.nh-act li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.nh-act li:first-child { border-top: 0; }
.nh-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); flex: none; }
.nh-amain { flex: 1; min-width: 0; }
.nh-amain small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nh-aside { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.nh-link { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; }
.nh-link > .ico { width: 26px; height: 26px; color: var(--brand); flex: none; }
.nh-link > span:first-of-type { flex: 1; display: flex; flex-direction: column; }
.nh-link:hover { border-color: var(--brand); }
.nh-arrow { font-size: 1.3rem; color: var(--brand); }
.fwd-row:target { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 10px; }
@media (max-width: 640px) {
  .nh-grid { grid-template-columns: 1fr; }
  .nh-find input { min-width: 0; width: 100%; }
  .nh-top .row-form { width: 100%; }
  .nh-svc li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nh-svc li > span:last-child { text-align: left; }
  .nh-30 { display: none; }
}
.nh-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .nh-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 2.11.1: recordings — who is recorded, bulk delete */
.rec-bulk { margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface-2); }
.rec-bulk summary { cursor: pointer; }
.rec-bulk form { margin-top: 10px; }
.rec-rules { margin: 10px 0 0; padding-left: 18px; line-height: 1.55; }
.rec-warn { border-left: 4px solid var(--warn); padding: 6px 10px; background: var(--surface-2); border-radius: 8px; }
.rec-who td { vertical-align: top; }
.rec-num { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; flex-wrap: wrap; }
.rec-num .rec-sel { padding: 2px 6px; min-height: 0; width: auto; font-size: .8rem; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.rec-dot.on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.rec-save { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0; margin: 0; border-top: 1px solid var(--line); z-index: 2; }
.rec-admin > .tabs { flex-wrap: wrap; overflow: visible; }
.rec-admin .row-form .btn { white-space: normal; text-align: left; }
@media (max-width: 640px) {
  .rec-admin #rec-settings .row-form label { flex: 1 1 100%; }
  .rec-admin #rec-settings .row-form select, .rec-admin #rec-settings .row-form input { width: 100%; }
}
.rec-admin .row-form { flex-wrap: wrap; } .rec-admin .row-form .btn { max-width: 100%; }
.srv-ctl { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--surface-2); }
.srv-healed { border-left: 4px solid var(--warn); padding: 4px 10px; background: var(--surface-2); border-radius: 8px; }
.plan-be { margin: 10px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--brand-soft); font-size: .9rem; line-height: 1.45; }
.ar-price small.ar-alt { font-size: .72rem; opacity: .85; }

/* ---------- phone: Connection details (2.12.1) ---------- */
.reg-tap { cursor: pointer; border-radius: 999px; padding: 2px 6px; margin: -2px -6px; }
.reg-tap:hover, .reg-tap:focus-visible { background: var(--surface-2); outline: none; }
.conn-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; width: 100%; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warn); border-left-width: 4px; border-radius: 12px; background: var(--warn-soft); color: inherit; font: 500 .9rem var(--font); text-align: left; cursor: pointer; }
.conn-note span { font-size: .8rem; opacity: .8; text-decoration: underline; }
.conn-note[hidden] { display: none; }
.conn-sheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 14, 30, .45); }
.conn-sheet[hidden] { display: none; }
.conn-box { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 18px; border-radius: 18px; background: var(--surface); color: var(--text, inherit); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.conn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.conn-head h2 { margin: 0; font-size: 1.1rem; }
.conn-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: inherit; font-size: 1rem; cursor: pointer; flex: none; }
.conn-state { margin: 4px 0 10px; font-size: .85rem; overflow-wrap: anywhere; }
.conn-prob { padding: 10px 12px; border-left: 4px solid var(--warn); border-radius: 10px; background: var(--warn-soft); font-size: .9rem; }
.conn-prob p { margin: 4px 0; }
.conn-prob ol { margin: 4px 0 0; padding-left: 20px; }
.conn-prob li { margin: 2px 0; }
.conn-good { margin: 0; padding: 10px 12px; border-left: 4px solid var(--ok); border-radius: 10px; background: var(--ok-soft); font-size: .9rem; }
.conn-wait { margin: 0; font-size: .9rem; }
.conn-sub { margin: 10px 0 4px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.conn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.conn-test { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; }
.conn-checks { list-style: none; margin: 0; padding: 0; }
.conn-checks li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.conn-checks li:last-child { border-bottom: 0; }
.conn-checks .ck-ok b { color: var(--ok); }
.conn-checks .ck-no b { color: var(--warn); }
.conn-checks span { opacity: .8; }
.conn-verdict { margin: 8px 0 0; font-weight: 700; }
.conn-verdict.ok { color: var(--ok); }
.conn-verdict.no { color: var(--warn); }
.conn-log { list-style: none; margin: 0; padding: 0; font-size: .8rem; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.conn-log li { display: flex; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.conn-log li:last-child { border-bottom: 0; }
.conn-log time { flex: none; font-family: var(--mono, monospace); opacity: .65; }
.conn-log span { overflow-wrap: anywhere; }
.conn-log .cl-ok span { color: var(--ok); }
.conn-log .cl-warn span, .conn-log .cl-err span { color: var(--warn); }
.conn-log .cl-err span { font-weight: 600; }
html.conn-open { overflow: hidden; }
@media (max-width: 600px) {
  .conn-sheet { align-items: flex-end; padding: 0; }
  .conn-box { max-width: none; max-height: 88vh; max-height: 88dvh; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
.conn-log .cl-n { font-weight: 700; opacity: .7; }

/* ---------- call screen 2.13: quality bars, call waiting, call on hold ---------- */
.call-q { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 0; font-size: .8rem; color: var(--warn); min-height: 18px; }
.call-q[hidden] { display: none; }
.cq-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.cq-bars i { width: 4px; border-radius: 1px; background: var(--line); }
.cq-bars i:nth-child(1) { height: 5px; } .cq-bars i:nth-child(2) { height: 9px; } .cq-bars i:nth-child(3) { height: 14px; }
.call-q[data-q="3"] .cq-bars i { background: var(--ok); }
.call-q[data-q="2"] .cq-bars i:nth-child(-n+2) { background: var(--warn); }
.call-q[data-q="1"] .cq-bars i:nth-child(1) { background: var(--warn); }
.cw-box, .cw-parked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; max-width: 360px; margin: 12px auto 0; padding: 10px 12px; border-radius: 14px; font-size: .9rem; text-align: left; }
.cw-box[hidden], .cw-parked[hidden] { display: none; }
.cw-box { border: 2px solid var(--ok); background: var(--ok-soft); animation: callfix 1.2s ease-in-out infinite alternate; }
.cw-box p { margin: 0; } .cw-box small { opacity: .75; }
.cw-parked { border: 1px solid var(--line); background: var(--surface-2); }
.cw-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .cw-box { animation: none; } }
.xfer-box { max-width: 360px; margin: 12px auto 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); text-align: left; font-size: .9rem; }
.xfer-box[hidden] { display: none; }
.xfer-row { display: flex; gap: 8px; margin: 6px 0 4px; }
.xfer-row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font-size: 1rem; }
.xfer-box p { margin: 0; }

/* ---------- admin pages: tour button + "How this page works" (2.14) ---------- */
.adm-help { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; margin: 0 0 12px; }
.adm-guide { flex: 1 1 320px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.adm-guide summary { padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.adm-guide-body { padding: 0 14px 12px; font-size: .88rem; }
.adm-guide-body h4 { margin: 12px 0 4px; font-size: .9rem; }
.adm-guide-body p, .adm-guide-body ul { margin: 4px 0; }
/* profit report */
.pf-loss { color: var(--warn); font-weight: 600; }
.pf-warn { margin: 0; padding-left: 18px; }
.pf-warn li { margin: 4px 0; }
.pf-table td.num, .pf-table th.num { text-align: right; white-space: nowrap; }
.pf-bar { display: block; height: 4px; border-radius: 2px; background: var(--ok); margin-top: 3px; }
.pf-bar.neg { background: var(--warn); }

/* ---------- Admins: rights grid (2.15) ---------- */
.perm-grid { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.perm-grid[hidden] { display: none; }
.perm-row { display: grid; grid-template-columns: 1fr 64px 64px 64px; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.perm-row:last-of-type { border-bottom: 0; }
.perm-row > span:first-child small { display: block; font-size: .78rem; opacity: .7; }
.perm-row > span:not(:first-child), .perm-cell { text-align: center; }
.perm-head { background: var(--surface-2); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.perm-cell { display: block; padding: 6px 0; cursor: pointer; }
.perm-cell input { width: 18px; height: 18px; cursor: pointer; }
.perm-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; background: var(--surface-2); }
@media (max-width: 560px) { .perm-row { grid-template-columns: 1fr 44px 44px 44px; padding: 8px; } }
/* 2.15.1: digits sent by themselves after the call is answered */
.post-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; max-width: 360px; margin: 12px auto 0; padding: 10px 12px; border: 2px solid var(--brand, var(--ok)); border-radius: 14px; background: var(--surface-2); font-size: .9rem; text-align: left; }
.post-bar[hidden] { display: none; }
.tel-link { display: block; margin: 6px auto 0; }

/* ---------- Notifications page (2.16) ---------- */
.nt-group { margin: 18px 0 6px; font-size: .95rem; }
.nt-group:first-child { margin-top: 0; }
.nt-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.nt-row { display: grid; grid-template-columns: 1fr 76px 112px; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.nt-row:last-child { border-bottom: 0; }
.nt-row > span:first-child small { display: block; font-size: .8rem; opacity: .72; margin-top: 1px; }
.nt-head { background: var(--surface-2); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: 7px; padding-bottom: 7px; }
.nt-head span:not(:first-child), .nt-cell { text-align: center; }
.nt-low { margin: 6px 0 0; align-items: center; font-size: .85rem; }
.nt-low input { width: 80px; }
@media (max-width: 560px) { .nt-row { grid-template-columns: 1fr 54px 64px; padding: 9px 10px; } .nt-head span:last-child { font-size: .66rem; } }
/* a small on/off switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch i, .switch i::after { transition: none; } }

/* 2.16.2 books check */
.bk-list { list-style: none; margin: 0; padding: 0; }
.bk-list > li { padding: 7px 0; border-top: 1px solid var(--line); }
.bk-list > li:first-child { border-top: 0; }
.bk-list > li.ok > b { color: var(--ok); font-weight: 600; }
.bk-list > li.bad > b { color: var(--warn); }
.bk-list ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.adm-tabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.adm-tabs a.chip { text-decoration: none; padding: 6px 13px; }
.adm-tabs a.chip.on { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.help-reach { display: flex; flex-wrap: wrap; gap: 8px; }
.help-reach a.chip { text-decoration: none; padding: 6px 12px; }

/* 2.17.4 release notes */
.foot-ver { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cl-item { padding: 16px 18px; }
.cl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.cl-head h2 { margin: 0; font-size: 1.02rem; flex: 1; min-width: 180px; }
.cl-group { margin-top: 10px; }
.cl-group h3 { display: inline-block; margin: 0 0 4px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.cl-new h3 { background: var(--ok-soft); color: var(--ok); }
.cl-improved h3 { background: var(--brand-soft); color: var(--brand); }
.cl-fix h3 { background: rgba(217, 71, 43, .12); color: var(--warn); }
.cl-security h3 { background: rgba(178, 106, 0, .14); color: #b26a00; }
.cl-item ul { margin: 0; padding-left: 18px; }
.cl-item li { margin: 4px 0; line-height: 1.5; }
.cl-adm { font-size: .64rem; background: var(--brand-soft); color: var(--brand); border-color: transparent; }

/* 2.18 payments */
.pay-form { display: flex; flex-direction: column; gap: 10px; }
.pay-amount { display: flex; flex-direction: column; gap: 4px; max-width: 220px; }
.pay-amount input { font-size: 1.3rem; font-weight: 700; }
.pay-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-methods { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pay-method { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.pay-method:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.pay-method input { margin-top: 3px; }
.pay-method span { display: flex; flex-direction: column; gap: 2px; }
.pay-method small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.pay-calc { margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.pay-calc.warn { color: var(--warn); }
.pay-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pay-sum > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.pay-sum small { color: var(--muted); font-size: .72rem; }
.pay-sum b { font-size: 1.25rem; }
.pay-sum b.ok { color: var(--ok); }
.pay-instr { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: .88rem; line-height: 1.6; word-break: break-word; background: var(--surface-2); }
.pay-off h2 { margin: 16px 0 8px; font-size: 1rem; }
.pay-risk { margin: 0; padding-left: 18px; font-size: .86rem; }
.pay-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; margin: 0; }
.pay-facts div { display: flex; flex-direction: column; }
.pay-facts dt { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pay-facts dd { margin: 0; font-weight: 600; word-break: break-word; }
.pay-form .pay-method { flex-direction: row !important; align-items: flex-start; font-weight: 400; }
.pay-form .pay-method input[type=radio] { width: auto; flex: 0 0 auto; margin: 3px 0 0; }
.welcome:has(.pay-form) { align-items: flex-start; }
.auto-box.is-on { border-color: var(--ok); }

.refund-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.refund-quick form { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.refund-other summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* 2.20.1 payment states in colour: green paid · violet refunded · amber partly / being checked · red disputed, failed */
.tag-refund { background: rgba(124, 92, 255, .16); color: #7c5cff; border-color: transparent; }
.tag-part { background: rgba(214, 137, 16, .18); color: #c77d0a; border-color: transparent; }

.inv-list td[data-l=Status] .tag { white-space: nowrap; }

/* 2.21 spam and blocking */
.tag-spam { background: rgba(217, 71, 43, .14); color: var(--warn); border-color: transparent; font-weight: 800; }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.addon-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.addon-card.is-on { border-color: var(--ok); }
.addon-card p { margin: 4px 0 0; }
.addon-card form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 2.22 renewals */
.rn-group td { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding-top: 6px; padding-bottom: 6px; }
.rn-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rn-form select { min-width: 170px; }
.tiny.warn { color: var(--warn); }

/* 2.23 SMS text: links open, codes copy */
.sms-link { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.sms-code { font: inherit; font-family: var(--mono); font-weight: 700; letter-spacing: .04em; color: var(--brand); background: var(--brand-soft); border: 0; border-radius: 7px; padding: 1px 7px; cursor: pointer; }
.sms-code:hover { filter: brightness(.96); }
.sms-code.copied { background: var(--ok-soft); color: var(--ok); }

/* 2.24: Spam / Blocked next to the tabs of Messages and Calls */
.section-tabs a.tab-side { border-style: dashed; color: var(--ink-3, var(--ink-2)); font-weight: 600; }
.section-tabs a.tab-side:first-of-type { margin-left: 6px; }

.call-actions.ring-only .round:not(#btn-speaker) { display: none; }

/* 2.28: Prices → Numbers by country */
.pg-country { border: 1px solid var(--line, rgba(128,128,128,.25)); border-radius: 12px; margin: 8px 0; overflow: hidden; }
.pg-country > summary { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.pg-country > summary::-webkit-details-marker { display: none; }
.pg-country > summary::before { content: '▸'; opacity: .6; }
.pg-country[open] > summary::before { content: '▾'; }
.pg-country .pg-name { font-weight: 700; }
.pg-country .pg-kinds { flex: 1 1 160px; }
.pg-country .pg-from { margin-left: auto; white-space: nowrap; }
.pg-country .table-wrap { margin: 0; border-top: 1px solid var(--line, rgba(128,128,128,.25)); }
.pg-table td { vertical-align: top; }

/* 2.29: tabs of long admin pages — one tab's sections at a time, full width */
.page-tabs { margin: 0 0 14px; flex-wrap: wrap; position: sticky; top: 0; z-index: 3; background: var(--bg, inherit); padding: 6px 0; }
.ptabs-on .grid-2 { grid-template-columns: 1fr; }
.ptabs-on [data-ptab][hidden] { display: none !important; }

/* 2.29: note boxes inside a page (same look as the messages on top) */
.flash { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; border: 1px solid transparent; }
.flash.error { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.flash.success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash.info { background: var(--info-soft); }

/* 2.30: Prices → one block per kind of number, one line per plan */
.pg-kind { border-top: 1px solid var(--line, rgba(128,128,128,.25)); padding: 12px 14px 6px; }
.pg-kind-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.pg-kind-name { font-size: 1.05em; }
.pg-kind-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pg-kind .table-wrap { border-top: 0; }
.pg-price { font-size: 1.1em; white-space: nowrap; }

/* 2.32: admin menu — groups that open and close, and "Find a setting" */
.side-grp { margin: 0; }
button.side-group.side-toggle { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 24px); background: none; border: 0; padding: 6px 0; cursor: pointer; text-align: left; font-family: inherit; }
button.side-group.side-toggle::after { content: '▾'; font-size: .9em; opacity: .7; letter-spacing: 0; }
.side-grp.shut button.side-group.side-toggle::after { content: '▸'; }
.side-grp.shut .side-items { display: none; }
.tour-on .side-grp.shut .side-items { display: block; }
.side-find { padding: 0 10px 8px; }
.side-find input { width: 100%; font-size: .9rem; padding: 8px 10px; border-radius: 10px; }
.side-found { padding: 0 6px 8px; }
.side-found a { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; line-height: 1.25; }
.side-found a:hover, .side-found a:focus { background: var(--info-soft, rgba(128,128,128,.15)); }
.side-found a b { display: block; font-weight: 600; font-size: .9rem; }
.side-found a small { color: var(--muted); font-size: .75rem; }
.side-found p { margin: 6px 10px; color: var(--muted); font-size: .85rem; }
.side-nav.finding .side-grp { display: none; }
/* a tour shows every section of a tabbed page */
.tour-on.ptabs-on [data-ptab][hidden] { display: block !important; }

.side-hint { margin: 0 12px 6px; font-size: .72rem; line-height: 1.3; color: var(--muted); }

/* 3.3 — the bell in the top bar and the notification list */
.bell-btn { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand); display: grid; place-items: center; text-decoration: none; flex: 0 0 auto; }
.bell-btn svg { width: 18px; height: 18px; }
.bell-btn.on { background: var(--brand-soft); border-color: var(--brand); }
.bell-btn em { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--warn); color: #fff; font: 800 .66rem/18px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.inbox-tabs { margin: 6px 0 10px; display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.inbox-tabs::-webkit-scrollbar { display: none; }
.inbox-tabs a { white-space: nowrap; flex: 0 0 auto; }
.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-day { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 2px 6px; }
.inbox-item a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 10px; border-radius: 12px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.inbox-item:last-child a { border-bottom: 0; }
.inbox-item a:hover { background: var(--brand-soft); }
.inbox-item.is-new a { background: var(--brand-soft); }
.inbox-item.is-new .inbox-text b::after { content: "new"; margin-left: 8px; font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--warn); border-radius: 99px; padding: 1px 7px; vertical-align: 2px; }
.inbox-ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--brand); }
.inbox-ico svg { width: 18px; height: 18px; }
.inbox-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-text b { font-size: .95rem; overflow-wrap: anywhere; }
.inbox-text small { color: var(--muted); font-size: .84rem; line-height: 1.4; overflow-wrap: anywhere; }
.inbox-time { flex: 0 0 auto; font-size: .74rem; color: var(--muted); white-space: nowrap; padding-top: 2px; }

/* 3.4: Admin → Devices & apps */
.dev-tabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 4px 0 10px; }
.dev-tabs a { white-space: nowrap; }
.table tr.dev-note td { border-top: 0; padding-top: 0; }
.table tr.dev-note summary { cursor: pointer; font-weight: 600; font-size: .8rem; }

/* 3.7: tariffs on the dial pad */
.tariff-box { margin: 10px auto 12px; max-width: 420px; text-align: center; }
.tariff-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tariff-chip { flex: 1 1 84px; max-width: 130px; padding: 8px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; line-height: 1.25; }
.tariff-chip b { display: block; font-size: .92rem; }
.tariff-chip small { display: block; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tariff-chip.on { border-color: var(--brand, #2b56b4); background: var(--brand-soft, rgba(43, 86, 180, .1)); box-shadow: 0 0 0 1px var(--brand, #2b56b4) inset; }
.tariff-chip.off { opacity: .55; }
.tariff-chip.off small { color: var(--warn); }
.tariff-desc { margin: 8px 0 4px; }
.tariff-auto select, .xfer-tariff select { display: inline-block; width: auto; padding: 4px 8px; font-size: .82rem; margin-left: 4px; }
.xfer-tariff { display: block; margin: 8px 0 2px; }
.tariff-retry { margin: 8px auto; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); max-width: 420px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.tariff-retry p { flex-basis: 100%; margin: 0; }

/* LAST LINE — the page checks this to know the whole file arrived (2.19.1). Keep it at the very end. */
:root { --tvs-css-end: 1; }

/* 3.12: an admin looks at a customer's account ("Open as customer") */
.as-admin { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; padding: 9px 16px; background: #5a3d00; color: #fff3d6; font-size: .86rem; line-height: 1.4; border-bottom: 1px solid #8a6200; position: sticky; top: 0; z-index: 40; }
.as-admin b { color: #fff; }
.as-admin .btn { background: #fff3d6; color: #3a2700; border-color: transparent; white-space: nowrap; }

/* 3.14: admin — the customer page in tabs, the sub-menu of long pages, the "?" help */
.cust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.cust-grid > .wide { grid-column: 1 / -1; }
.cust-grid > #invoices { order: 3; }
.cust-grid > #history { grid-row: span 2; }
.cust-grid > #calling { grid-row: span 4; }   /* the long box left, the short ones stacked on the right */
.cust-grid > .panel > h2 small, .panel > h2 small { font-size: .78rem; font-weight: 500; }
@media (max-width: 900px) { .cust-grid { grid-template-columns: 1fr; } }
.sub-on .grid-2 { grid-template-columns: 1fr; }
.sub-hide { display: none !important; }
.page-tabs.sub-auto { display: flex; gap: 2px; }
.page-tabs.sub-auto a { padding: 7px 12px; font-size: .86rem; white-space: nowrap; }
.tip-q { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand); font: 800 .78rem/1 var(--font); cursor: pointer; display: inline-grid; place-items: center; padding: 0; vertical-align: middle; margin-left: 4px; }
.tip-q:hover, .tip-q[aria-expanded="true"] { background: var(--brand-soft); border-color: var(--brand); }
.tip-q.tip-page-btn { width: 32px; height: 32px; font-size: 1rem; margin: 0; }
.tip-box { position: relative; background: var(--brand-soft); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: .9rem; line-height: 1.55; color: var(--ink); font-weight: 400; }
.tip-box p { margin: 0 0 4px; }
.tip-box p:last-child { margin-bottom: 0; }
.tip-box b { display: block; margin-bottom: 4px; }
.tip-box.tip-page { padding-right: 40px; margin-bottom: 18px; }
.tip-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 4px 6px; }
.more-menu { position: absolute; right: 0; top: 34px; z-index: 4; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 220px; display: grid; gap: 6px; box-shadow: var(--shadow); text-align: left; }
.more-menu form { margin: 0; }
.more-menu .btn { width: 100%; justify-content: flex-start; text-align: left; }
.more-menu .del-form { position: static; width: auto; border: 0; box-shadow: none; padding: 6px 0 0; border-top: 1px solid var(--line); border-radius: 0; }
.actions-row { flex-wrap: nowrap; }
@media (max-width: 700px) { .actions-row { flex-wrap: wrap; } }
.cust-grid .srv-move { flex-wrap: wrap; align-items: center; }
.cust-grid #tariffs .row-form { flex-wrap: wrap; }

/* 3.16: the number's page in tabs (same grid as the customer page) */
.nh-grid > #settings { grid-row: span 3; }
.nh-grid > #billing { grid-row: span 2; }
.nh-grid .panel > h2 { margin-top: 0; }
.nh-grid #settings .recips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nh-hero .row-form, .nh-grid .row-form { flex-wrap: wrap; }

/* 3.17: the owner's "Delete" under a message */
.chip-del { color: #b3261e; border-color: rgba(179, 38, 30, .35); }
.chip-del:hover { background: rgba(179, 38, 30, .08); }

/* 3.18: the number at the provider - what happens now, what to do; the renewal guide */
.prov-now { border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: .9rem; line-height: 1.5; }
.prov-now.is-warn { border-left-color: #c2410c; background: rgba(194, 65, 12, .06); }
.prov-now.is-ok { border-left-color: #15803d; background: rgba(21, 128, 61, .06); }
.prov-now p { margin: 0 0 4px; }
.prov-now p:last-child { margin: 0; }
.prov-guide { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.prov-guide summary { cursor: pointer; }
.prov-guide ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.5; }

/* 3.18: customers and numbers found by the menu's search box (above the pages and settings) */
.side-live { border-bottom: 1px dashed var(--line); margin-bottom: 4px; padding-bottom: 4px; }

/* 3.19: incoming calls - the provider's side against what the customer pays */
.tag-bad { background: rgba(179, 38, 30, .14); color: #b3261e; border-color: transparent; font-weight: 700; }
.plan-check { display: grid; gap: 6px; }
.plan-check dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.plan-check dt { color: var(--muted); }
.plan-check dd { margin: 0; }
.plan-res { border-radius: 12px; padding: 10px 14px; border: 1px solid var(--line); border-left-width: 3px; line-height: 1.5; font-size: .92rem; }
.plan-res.ok { border-left-color: #15803d; background: rgba(21, 128, 61, .06); }
.plan-res.warn { border-left-color: #c2410c; background: rgba(194, 65, 12, .06); }
.plan-res.bad { border-left-color: #b3261e; background: rgba(179, 38, 30, .07); }
.plan-res p { margin: 0 0 4px; }
.plan-res p:last-child { margin: 0; }
.nh-grid > #plancheck { grid-column: 1 / -1; }

/* 3.20 — Admin → Live calls */
.live-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.live-head h2 { margin: 0 0 4px; }
.live-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.lv-dot.on { background: var(--ok); animation: live-pulse 2s ease-in-out infinite; }
.lv-dot.off { background: var(--warn); }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); } 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .lv-dot.on { animation: none; } }
.live-stats { flex-wrap: wrap; margin-bottom: 10px; }
.live-stats .stat.live-on { border-color: var(--ok); }
.live-stats .stat.live-on span { color: var(--ok); }
.live-srv { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.live-srv a.tag { text-decoration: none; }
.live-empty { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 34px 16px; border: 1px dashed var(--line); border-radius: 14px; }
.live-dir { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.live-in { background: var(--ok-soft); color: var(--ok); }
.live-out { background: var(--brand-soft); color: var(--brand); }
.live-fwd { background: var(--warn-soft); color: var(--warn); }
.live-table td { vertical-align: middle; }
.live-table .live-len { font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-table form.live-end { margin: 0; }
.live-about { margin-top: 14px; }
.live-about summary { cursor: pointer; font-weight: 700; font-size: .88rem; }
.live-about ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.live-table form.live-end .btn { white-space: nowrap; }
@media (max-width: 560px) { .live-stats .stat { flex: 1 1 40%; } }

/* 3.21 — Admin → Live calls → History (call records) */
.live-tabs { position: static; padding: 0; margin: 0 0 14px; }
.cdr-period { flex-wrap: wrap; }
.cdr-period a { padding: 6px 12px; font-size: .85rem; }
.cdr-stats { flex-wrap: wrap; margin-bottom: 12px; }
.cdr-stats .stat { flex: 1 1 118px; }
.cdr-stats .stat span { font-size: 1.35rem; white-space: nowrap; }
.cdr-okn { color: var(--ok); }
.cdr-badn { color: var(--warn); }
.cdr-split { margin-bottom: 8px; }
.cdr-mini td, .cdr-mini th { padding-top: 7px; padding-bottom: 7px; font-size: .88rem; }
.cdr-notes { margin: 0 0 14px; line-height: 1.5; }
.cdr-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.cdr-top a.tag { text-decoration: none; }
.cdr-filter { flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.cdr-filter label { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.cdr-filter select, .cdr-filter input[type=text] { min-width: 0; max-width: 100%; }
.cdr-filter .cdr-csv { margin-left: auto; }
.cdr-table .cdr-why { max-width: 260px; }
.cdr-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 560px) { .cdr-stats .stat { flex: 1 1 40%; } .cdr-filter label { flex: 1 1 100%; } .cdr-filter .cdr-csv { margin-left: 0; } }
.cdr-table .tag, .cdr-table .cdr-when, .cdr-table td[data-l="Charged"], .cdr-table td[data-l="Your cost"] { white-space: nowrap; }
.cdr-table .cdr-when { margin-top: 5px; }
.cdr-table td { vertical-align: top; }
.cdr-table .cdr-prov { margin-top: 4px; font-size: .7rem; cursor: help; }

/* 3.22 — Calling → Call prices: the cost is a field too */
.price-in.cost-in { width: 84px; color: var(--ink-2); background: transparent; border-style: dashed; }
.price-in.cost-in:hover, .price-in.cost-in:focus { border-style: solid; background: var(--surface); color: var(--ink); }
.price-in.cost-in.below { border-color: var(--warn); color: var(--warn); border-style: solid; }
/* the import form above the price list was wider than a phone screen */
@media (max-width: 720px) {
  #rates .panel-head { flex-wrap: wrap; }
  #rates .panel-head > div, #rates .panel-head > form.row-form { min-width: 0; max-width: 100%; flex: 1 1 100%; }
  #rates .panel-head > form.row-form { flex-wrap: wrap; }
  #rates .panel-head > form.row-form > * { min-width: 0; max-width: 100%; }
  #rates .panel-head .check-row { white-space: normal; }
}

/* 3.23 — an offline payment method with a QR code; USDT (TRC20) that is checked on the blockchain */
.pay-qr { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pay-qr-code { width: 190px; max-width: 60vw; flex: none; background: #fff; border-radius: 12px; padding: 8px; line-height: 0; }
.pay-qr-code svg { width: 100%; height: auto; display: block; }
.pay-qr-info { flex: 1 1 220px; min-width: 0; display: grid; gap: 10px; }
.pay-qr-info > div { display: grid; gap: 3px; justify-items: start; }
.pay-qr-info small { color: var(--muted); font-size: .72rem; }
.pay-qr-addr { font-family: var(--mono); font-size: .86rem; word-break: break-all; background: var(--surface-2); border-radius: 8px; padding: 6px 8px; max-width: 100%; }
.pay-qr-amt { font-size: 1.2rem; }
.pay-qr-warn { margin: 0 0 10px; }
.pay-chain-note { margin: 0 0 10px; font-size: .9rem; }
.pay-wait { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); }
.pay-wait .lv-dot { margin-top: 6px; }
.pay-wait.done { outline: 2px solid var(--ok); }
