@font-face { font-family: "Commissioner"; src: url("/admin/fonts/Commissioner-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("/admin/fonts/Commissioner-ExtraBold.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/admin/fonts/Onest-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/admin/fonts/Onest-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/admin/fonts/Onest-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --surface: #F6F2FA;
  --surface-raised: #FDFBFF;
  --surface-sunken: #ECE4F5;
  --ink: #230C33;
  --ink-muted: #5E4C70;
  --on-ink: #F6F2FA;
  --line: #E2D7EE;
  --line-strong: #8B7AA0;
  --pulse: #B27C66;
  --on-pulse: #230C33;
  --pulse-text: #8A513C;
  --pulse-tint: #F3E5DD;
  --calm: #592E83;
  --calm-tint: #EAE0F8;
  --danger: #8E2C34;
  --on-danger: #FDFBFF;
  --focus: #7558B8;
  --shadow-dock: 0 -1px 0 rgba(35,12,51,0.06), 0 -12px 32px rgba(35,12,51,0.08);
  --bg: var(--surface); --muted: var(--ink-muted);
  --accent: var(--calm); --accent-ink: var(--on-ink); --ok: var(--calm); --warn: var(--pulse-text); --bad: var(--danger);
  --ai: var(--calm-tint); --caller: var(--surface-raised); --you: var(--pulse-tint);
  --clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  --font-display: "Commissioner", "SF Pro Display", system-ui, sans-serif;
  --font-sans: "Onest", "SF Pro Text", system-ui, sans-serif;
  --font-mono: "Onest", "SF Pro Text", system-ui, sans-serif; /* numbers: always with tabular-nums */
  font: 15px/1.5 var(--font-sans);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #170B21;
    --surface-raised: #22132F;
    --surface-sunken: #0F0617;
    --ink: #F2EBFA;
    --ink-muted: #B4A6C7;
    --on-ink: #170B21;
    --line: #35244A;
    --line-strong: #7C6C95;
    --pulse: #C99480;
    --on-pulse: #170B21;
    --pulse-text: #DDB3A2;
    --pulse-tint: #3B2620;
    --calm: #CAA8F5;
    --calm-tint: #2F1D47;
    --danger: #E0868B;
    --on-danger: #170B21;
    --focus: #9984D4;
    --shadow-dock: 0 -1px 0 rgba(242,235,250,0.06), 0 -12px 32px rgba(0,0,0,0.5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
#remote-audio { display: none; }
[hidden] { display: none !important; }
button { font: inherit; border: 0; border-radius: 999px; min-height: 44px; padding: 10px 16px; background: var(--ink); color: var(--on-ink); font-weight: 600; cursor: pointer; }
a.button { display: inline-block; text-align: center; text-decoration: none; font: inherit; border-radius: 999px; min-height: 44px; padding: 10px 16px; background: var(--ink); color: var(--on-ink); font-weight: 600; }
button.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
button.take { background: var(--pulse); color: var(--on-pulse); font-weight: 600; }
#hangup-btn { background: var(--danger); color: var(--on-danger); }
button.danger { color: var(--danger); border-color: var(--danger); }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface-sunken); border: 1px solid var(--line-strong); border-radius: 22px; padding: 10px 14px; width: 100%; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }

.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login .card { width: min(400px, 100%); display: grid; gap: 8px; border-radius: 32px; padding: 40px 32px 28px; }
.login-logo { justify-self: center; margin-bottom: 12px; }
.login h1 { margin: 0; font: 800 28px/34px var(--font-display); }
.login .login-wordmark { text-align: center; font: 600 20px/26px var(--font-display); letter-spacing: .22em; }
.login-description { text-align: center; margin: 4px 0 16px; }
.login .button { min-height: 52px; }
.login .legal-links { text-align: center; margin: 16px 0 0; }
a.button.google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: var(--on-ink); border: 0; }

.app { display: grid; grid-template-columns: 352px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
.top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 65px; padding: 10px 32px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 16px/20px var(--font-display); letter-spacing: .3em; }
.brand img { flex: none; }
#live { margin-right: auto; color: var(--muted); font: 600 11px/16px var(--font-display); font-variant-numeric: tabular-nums; }
#live.on { color: var(--calm); }
#live.on::after { content: " LIVE"; letter-spacing: .1em; }
.menu, .menu-group { display: contents; }
#menu-btn, .menu-head, .menu-label, #push-state, .page-legal, .tokens-note { display: none; }
@media (min-width: 721px) { .top #me, .top #logout-btn { order: 1; } }
.top button.ghost { white-space: nowrap; min-height: 36px; padding: 6px 10px; border: 0; font-size: 13px; font-weight: 500; }
.top .legal-links { font-size: 10px; }
.top #me { border-left: 1px solid var(--line); padding-left: 16px; margin-left: 8px; font-size: 12px; max-width: 200px; overflow-wrap: anywhere; }
.top #plan { font-size: 12px; }
.top #plan.warn { color: var(--bad); font-weight: 600; }
.list { min-height: 0; min-width: 0; overflow-y: auto; padding: 24px 0 24px 32px; }
.list h1 { margin: 0 0 20px; font: 800 40px/44px var(--font-display); letter-spacing: -.02em; }
.list ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface-raised); }
.list ul:empty { display: none; }
.list li:last-child { border-bottom: 0; }
.list li { padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; gap: 4px; }
.list section { margin-bottom: 24px; }
.list .day { margin: 0 0 8px; font: 600 12px/16px var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.call-card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 6px; cursor: pointer; margin-bottom: 24px; }
.call-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.call-card[aria-current="true"] { background: var(--surface-sunken); }
.call-card .status { display: flex; justify-content: space-between; gap: 8px; color: var(--pulse-text); font-size: 15px; line-height: 20px; }
.call-card .name { font: 800 22px/28px var(--font-display); overflow-wrap: anywhere; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill.dur { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-sunken); border-color: transparent; color: var(--ink); }
.pill.dur::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--clock) center / contain no-repeat; mask: var(--clock) center / contain no-repeat; }
.list li:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.list li[aria-current="true"] { background: var(--surface-sunken); }
.list .who { font-size: 17px; line-height: 22px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; min-width: 0; }
.caller-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-dot { color: var(--pulse); font-size: 10px; }
.list .sum { color: var(--muted); font-size: 15px; line-height: 21px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.list .when { color: var(--muted); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; flex: none; }
.list li .sum { -webkit-line-clamp: 1; }
.pill { color: var(--muted); font: 600 13px/18px var(--font-display); letter-spacing: .01em; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); white-space: nowrap; flex: none; }
.pill.live { color: var(--pulse-text); background: var(--pulse-tint); border-color: transparent; }
.pill.ai { color: var(--calm); background: var(--calm-tint); border-color: transparent; }
.pill.you { color: var(--ink); background: var(--surface-sunken); border-color: transparent; }
.pill.bad { color: var(--bad); border-color: var(--danger); }

.detail { min-width: 0; min-height: 0; margin: 24px 32px 24px 24px; overflow-y: auto; display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 32px; }
.placeholder { margin: auto; padding: 24px; }
.call-head { padding: 32px 32px 24px; display: grid; gap: 8px; }
.call-nav { display: none; }
.call-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.summary-card { margin-top: 8px; padding: 16px; display: grid; gap: 8px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; }
.call-head .summary-card .summary { margin: 0; }
.call-head .phone { color: var(--muted); font-size: 13px; line-height: 18px; }
.call-head h2 { margin: 0; font: 800 32px/38px var(--font-display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.call-head .meta { color: var(--muted); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.call-head .summary { font-size: 17px; line-height: 24px; margin: 8px 0 0; }
.call-head .callback { justify-self: start; margin-top: 8px; }
.call-head .details { font-size: 15px; line-height: 21px; margin: 0; }
.transcript { flex: 1; padding: 0 32px 32px; display: flex; flex-direction: column; gap: 16px; }
.transcript-line { max-width: 80%; display: flex; flex-direction: column; gap: 4px; align-self: flex-start; }
.transcript-line.ai, .transcript-line.you { align-self: flex-end; }
.back::before { content: "‹" / ""; display: inline-block; margin-right: 6px; font-size: 1.5em; line-height: 1; vertical-align: -.08em; }
.speaker { color: var(--muted); font-family: var(--font-display); font-weight: 600; font-size: 13px; line-height: 18px; padding: 0 4px; }
.transcript-line.ai .speaker, .transcript-line.you .speaker { text-align: right; }
.bubble { padding: 10px 14px; border-radius: 22px; font-size: 17px; line-height: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.caller { background: var(--caller); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.ai { background: var(--ai); border-bottom-right-radius: 6px; }
.bubble.you { background: var(--you); border-bottom-right-radius: 6px; }
.actions { position: sticky; bottom: 0; flex: none; background: var(--surface-raised); border-top: 1px solid var(--line); padding: 16px 24px 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.actions .row, dialog .row { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { display: flex; gap: 8px; min-width: 0; align-items: flex-start; }
.actions button { min-height: 52px; font-size: 17px; line-height: 22px; }
.actions form button { flex: none; }
.actions .row button { flex: 1 1 120px; }
.actions .row .take { flex-grow: 1.7; }
.actions .row #ai-btn { flex-grow: 1.2; }
.actions textarea { min-width: 0; min-height: 52px; max-height: 160px; border-color: var(--line); border-radius: 26px; padding: 14px 16px; resize: vertical; }

dialog { border: 1px solid var(--line); border-radius: 32px; background: var(--surface-raised); color: var(--ink); width: min(440px, calc(100% - 32px)); padding: 32px; }
dialog::backdrop { background: rgb(0 0 0 / .4); }
dialog h2 { margin: 0 0 20px; font: 800 28px/34px var(--font-display); }
dialog .row { margin-top: 16px; }
#settings { --pad: 32px; padding: var(--pad); overflow: auto; }
#settings .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
#settings .field-voice { grid-column: 1 / -1; }
#settings .voice-pick { display: flex; gap: 8px; }
#voice-play { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; }
#settings .fields label { margin-top: 0; }
#settings .fields :is(input, select) { height: 44px; }
#settings .toggles { margin-top: 20px; border-top: 1px solid var(--line); }
#settings .toggles > * { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
#settings .toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 12px 0 8px; font-size: 15px; color: var(--ink); cursor: pointer; }
#settings .toggle input { appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background-color .15s ease-out; }
#settings .toggle input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-raised); transition: transform .15s ease-out; }
#settings .toggle input:checked { background: var(--calm); }
#settings .toggle input:checked::before { transform: translateX(18px); }
#settings .toggle input:disabled { opacity: .4; cursor: default; }
#settings .note { margin: 0 60px 8px 0; font-size: 13px; line-height: 18px; color: var(--muted); }
#settings h3 { margin: 24px 0 4px; font: 600 12px/16px var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
#settings h3:has(+ #blocked-numbers:empty) { display: none; }
#blocked-numbers .row { align-items: center; justify-content: space-between; margin-top: 4px; }
#blocked-numbers button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
#vip-numbers .row { align-items: center; justify-content: space-between; margin-top: 4px; }
#vip-numbers button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
#delete-account-btn { margin-top: 24px; border: 0; padding-left: 0; padding-right: 0; min-height: 36px; }
#settings .settings-actions { position: sticky; bottom: calc(-1 * var(--pad)); margin: 16px calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding: 16px var(--pad) var(--pad); background: var(--surface-raised); border-top: 1px solid var(--line); }
#settings .settings-actions button { flex: 1; }
@media (max-width: 720px) { #settings { --pad: 24px; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; max-width: calc(100% - 32px); }

.top button { white-space: nowrap; }

/* analytics */
.app.analytics .list, .app.analytics .detail, .app.costs .list, .app.costs .detail, .app.numbers .list, .app.numbers .detail, .app.users .list, .app.users .detail, .app.suggestions .list, .app.suggestions .detail, .app.quality .list, .app.quality .detail { display: none; }
.stats { grid-column: 1 / -1; min-height: 0; overflow-y: auto; padding: 32px; }
.stats-head, .stats-body { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; }
.stats-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.stats-head h2 { margin: 0; font: 800 32px/38px var(--font-display); margin-right: auto; }
div.seg { display: inline-flex; border: 1px solid var(--line); background: var(--surface-sunken); padding: 4px; border-radius: 999px; flex-wrap: wrap; }
.seg button.ghost { border: 0; border-radius: 999px; padding: 8px 16px; min-height: 36px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.top button[aria-pressed="true"] { background: var(--ai); }
.stats-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; transition: opacity .15s; }
.stats .card { min-width: 0; overflow-wrap: anywhere; }
.stats .scroll { overflow-x: auto; }
.stats-body.loading { opacity: .55; }
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px; }
@media (max-width: 1279px) {
  .tiles-users { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-users > :last-child { grid-column: 1 / -1; }
}
.tile { padding: 24px; min-width: 0; display: grid; gap: 2px; align-content: start; }
.tile .label { font-size: 13px; color: var(--muted); }
.tile .value { font: 800 36px/42px var(--font-display); overflow-wrap: anywhere; }
.tile .hint { font-size: 12px; color: var(--muted); }
.stats h3 { margin: 0 0 20px; font-size: 17px; font-weight: 600; }
.stats h3 .muted { font-weight: 400; }
.stats h4 { margin: 20px 0 8px; font-size: 14px; font-weight: 600; }
.stats .card .tiles { margin-bottom: 4px; }
.outcome-bar { display: flex; gap: 2px; height: 16px; }
.outcome-bar span { min-width: 2px; }
.outcome-bar span:first-child { border-radius: 4px 0 0 4px; }
.outcome-bar span:last-child { border-radius: 0 4px 4px 0; }
.outcome-bar span:only-child { border-radius: 4px; }
.outcome-bar .none { flex: 1; background: var(--line); border-radius: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .key { width: 10px; height: 10px; border-radius: 2px; }
.legend b { font-weight: 600; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart svg:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); opacity: .85; }
.chart .bar.on { opacity: 1; }
.chart .hit { fill: transparent; }
.tip { position: absolute; pointer-events: none; transform: translate(-50%, -100%); background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; display: grid; gap: 1px; z-index: 2; }
.tip b { font-size: 14px; }
.tip span { opacity: .8; }
table.breakdown { width: 100%; border-collapse: collapse; font-size: 14px; }
table.breakdown th, table.breakdown td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
table.breakdown th { font-weight: 500; color: var(--muted); font-size: 13px; }
table.breakdown td:not(:first-child), table.breakdown th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; }
table.breakdown tr:last-child td { border-bottom: 0; }
details.days { margin-top: 12px; font-size: 13px; }
details.days summary { cursor: pointer; color: var(--muted); }
details.days .scroll { max-height: 240px; overflow-y: auto; margin-top: 8px; }
.stats .note { font-size: 13px; color: var(--muted); margin: 0; }
.qchart { width: 100%; height: 260px; }
.qchart.short { height: 150px; }
.qchart.tall { height: 380px; }
.stats .scroll table.breakdown :is(td, th):last-child { padding-right: 3px; }
.qbanner { margin: 0; padding: 16px 20px; }
.qdetail { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.qdetail h4 { margin: 0; font-size: 16px; }
.qdetail h4:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.qissues { margin: 0; padding-left: 20px; overflow-wrap: anywhere; }
.stats .warnmsg { color: var(--bad); font-weight: 600; margin: 8px 0 0; }
.qbanner.warn { border-color: var(--warn); color: var(--warn); }
.stats progress { display: block; width: 100%; height: 12px; margin-bottom: 12px; accent-color: var(--accent); }
.stats table + .note, .stats .note + .scroll { margin-top: 12px; }
/* costs */
.month { display: inline-flex; align-items: center; gap: 8px; }
.month span { min-width: 8.5em; text-align: center; font-weight: 600; }
.balance { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 14px 16px; }
.recording { padding: 0 24px 8px; }
.recording audio { width: 100%; }
.storage { display: flex; flex-direction: column; gap: 8px; }
.storage h3 { margin: 0; }
.storage .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.storage .bar span { display: block; height: 100%; background: var(--muted); }
.storage.low .bar span { background: var(--bad); }
.balance-edit { margin-left: auto; }
.balance-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.balance-form input { width: 9em; }
.balance.low { border-color: var(--bad); }
.balance.low b, .balance .warnmsg { color: var(--bad); }
.balance .warnmsg { font-weight: 600; }
.muted-tile .value { color: var(--muted); }
table.breakdown td.left, table.breakdown th.left { text-align: left; }
.costs-table td.rowerr { padding-top: 0; font-size: 13px; text-align: left; }
.chart .seg { opacity: .85; }
.chart .stack.on .seg { opacity: 1; }
.cost-legend { margin: 0 0 8px; }
/* numbers */
.offer label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.offer input { width: auto; margin: 0; }
.offer .n-num, .numbers-table .n-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.numbers-table .n-num { white-space: nowrap; }
.numbers-all, .m-only { display: none; }
.offer .row { display: flex; gap: 8px; margin-top: 12px; }
/* suggestions */
#suggestions-count:not(:empty) { margin-left: 6px; }
#suggest textarea { width: 100%; resize: vertical; }
.suggestions-table td { white-space: nowrap; }
.suggestions-table td.sug-body { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 260px; }

/* users */
.users-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.users-filters label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.users-filters input { width: auto; }
.users-table button.ghost { min-height: 32px; padding: 4px 10px; border: 0; font-size: 14px; }
.users-table button[aria-pressed="true"], .users-table tr.on { background: var(--surface-sunken); }
.users-table td { white-space: nowrap; }
.users-detail { display: grid; gap: 12px; }
.users-detail h3, .users-detail h4, .users-detail p { margin: 0; }
.users-form, .users-form fieldset { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 0; padding: 0; margin: 0; min-width: 0; }
.users-form > *, .users-form fieldset > * { flex: 1 1 160px; width: auto; }
.users-form:has(fieldset) { display: block; }
.users-history td { white-space: normal; overflow-wrap: anywhere; }
.users-history td:first-child { white-space: nowrap; }
@media (max-width: 720px) {
  .login { padding: 0; }
  #login { display: block; }
  #login .card { width: 100%; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 8px; background: none; border: 0; border-radius: 0; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
  #login .login-logo { width: 150px; height: auto; align-self: center; margin: auto 0 12px; }
  #login .login-description { margin: 4px 0 auto; }
  #login .legal-links { margin-top: 16px; }
  #login-error { text-align: center; margin: 8px 0 0; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .top { gap: 4px; padding-left: 16px; padding-right: 16px; border-bottom: 0; }
  #live.on::after { content: none; }
  #live { margin: 0 auto 0 4px; font-size: 14px; }
  #menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; padding: 0; }
  .menu { display: none; }
  .app.menu-open .menu { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 20; overflow-y: auto; background: var(--surface); padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
  .menu-group { display: block; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
  .menu-label { display: block; margin: 24px 0 8px 4px; font: 600 12px/16px var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .top .menu-group button.ghost { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0 20px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 17px; font-weight: 400; text-align: left; }
  .top .menu-group button.ghost[aria-pressed="true"] { background: var(--surface-sunken); }
  .top .menu-group #logout-btn { color: var(--danger); }
  .top .menu-group > * + * { border-top: 1px solid var(--line); }
  .top #calls-btn { display: flex; }
  #push-state { display: inline; }
  .top .menu #me { display: flex; align-items: center; min-height: 56px; margin: 0; padding: 0 20px; max-width: none; border: 0; font-size: 17px; color: var(--ink); }
  .menu .legal-links { margin-top: auto; padding-top: 24px; text-align: center; }
  .menu .legal-links a, .page-legal a { color: var(--muted); }
  .page-legal { display: block; margin: 32px 0 0; text-align: center; }
  .stats .page-legal { max-width: 1200px; margin-left: auto; margin-right: auto; }
  .top button.ghost { min-height: 44px; padding: 6px 8px; }
  .app.has-call .list { display: none; }
  .app:not(.has-call) .detail { display: none; }
  .list { padding: 8px 16px 24px; }
  .list h1 { font-size: 44px; line-height: 48px; font-weight: 600; }
  .list ul { border: 0; border-radius: 0; background: transparent; }
  .list li { padding: 14px 0; }
  .detail { margin: 0; border: 0; border-radius: 0; background: var(--surface); }
  .call-head { padding: 16px; }
  .call-head h2 { font-size: 28px; line-height: 34px; }
  .call-nav { display: flex; align-items: center; justify-content: space-between; }
  button.back { min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--ink); font-weight: 500; }
  .live-tag { font: 500 13px/16px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--muted); }
  .live-tag::before { content: "●"; color: var(--calm); margin-right: 6px; font-size: 10px; }
  .transcript { padding: 0 16px 24px; }
  .transcript-line { max-width: 90%; }
  .actions { padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); background: var(--surface-raised); border-top: 0; border-radius: 32px 32px 0 0; box-shadow: var(--shadow-dock); }
  .actions .row .take { flex-basis: 100%; }
  .actions .row #ai-btn, .actions .row .destructive { flex: 1 1 0; }
  .actions button { font-size: 15px; }
  .actions form button { padding: 10px 14px; }
  .actions textarea { resize: none; }
  .tiles { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { padding: 8px 16px 24px; }
  .stats-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .stats-head .back { align-self: flex-start; }
  .app.has-call .top, .app.costs .top, .app.numbers .top, .app.users .top, .app.suggestions .top, .app.quality .top { display: none; }
  .app.has-call, .app.costs, .app.numbers, .app.users, .app.suggestions, .app.quality { grid-template-rows: minmax(0, 1fr); }
  .stats-head h2 { font: 800 44px/48px var(--font-display); margin: 0; }
  div.seg { display: flex; width: 100%; }
  .seg button.ghost { flex: 1; }
  .month { display: flex; width: 100%; background: var(--surface-sunken); border-radius: 999px; padding: 4px; }
  .month button.ghost { border: 0; min-width: 44px; }
  .month span { flex: 1; min-width: 0; }
  .tile .label { font: 600 12px/16px var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
  .tile .hint { font: 500 12px/16px var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .08em; text-transform: uppercase; }
  .tile .value { font: 800 32px/38px var(--font-display); }
  .stats h3 { font: 800 22px/28px var(--font-display); }
  .outcome-bar + .legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: 15px; }
  .outcome-bar + .legend b { margin-left: auto; }
  table.stack, .stack tbody { display: block; }
  .stack thead { display: none; }
  table.breakdown.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.breakdown.stack tr:last-child, table.breakdown.stack tr:has(+ .errrow) { border-bottom: 0; }
  table.breakdown.stack tr > td { display: block; padding: 0; border: 0; text-align: left; }
  table.breakdown.stack tr > td:first-child { font-weight: 600; }
  table.breakdown.stack tr > td:first-child::after { content: attr(data-sub); display: block; margin-top: 2px; font-weight: 400; font-size: 14px; color: var(--muted); }
  table.breakdown.stack tr > td.amt { text-align: right; font: 500 14px/22px var(--font-mono); font-variant-numeric: tabular-nums; }
  table.breakdown.stack tr > td.m { display: none; }
  table.breakdown.stack tr > td.rowerr { grid-column: 1 / -1; }
  table.breakdown.stack tr > td.rowerr::after { content: none; }
  #numbers-rent { width: 100%; min-height: 52px; border: 0; background: var(--pulse); color: var(--on-pulse); font-size: 17px; }
  .offer { display: grid; gap: 12px; }
  .offer h3 { margin: 0 0 4px; }
  .offer label { margin: 0; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: 10px; color: var(--ink); font-size: 17px; gap: 12px; cursor: pointer; }
  .offer label:has(input:checked) { border: 2px solid var(--calm); padding: 13.5px 15.5px; }
  .offer input { width: 20px; height: 20px; margin: 0; accent-color: var(--calm); }
  .offer .row { margin-top: 0; }
  .offer .row button { flex: 1; min-height: 52px; font-size: 17px; }
  .numbers-card { background: none; border: 0; padding: 0; }
  .stats .numbers-all { display: block; margin: 8px 0 4px; font: 600 12px/16px var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .numbers-table thead { display: none; }
  .numbers-table, .numbers-table tbody { display: block; }
  .numbers-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .numbers-table tr:last-child { border-bottom: 0; }
  table.breakdown.numbers-table td { padding: 0; border: 0; text-align: left; font-size: 15px; }
  table.breakdown.numbers-table td:empty { display: none; }
  table.breakdown.numbers-table .n-num { flex: 1; font-size: 19px; font-weight: 500; color: var(--ink); }
  table.breakdown.numbers-table .n-fee { order: 1; font: 500 13px/18px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--muted); }
  table.breakdown.numbers-table .n-user { order: 2; flex-basis: 100%; font-size: 17px; color: var(--muted); }
  .numbers-table .n-routed { order: 3; color: var(--calm); }
  .numbers-table .n-state { order: 4; }
  .numbers-table .n-state.warn { color: var(--pulse-text); }
  .numbers-table .n-routed.bad, .numbers-table .n-state.bad { color: var(--danger); }
  .numbers-table .n-stop { order: 5; color: var(--muted); }
  .numbers-table .n-act { order: 6; flex-basis: 100%; }
  .numbers-table .n-act button { margin-top: 6px; min-height: 44px; }
  .m-only { display: inline; }
  .tokens-note { display: block; margin-top: 16px; font: 600 12px/16px var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
}
@media (max-width: 720px) and (max-height: 650px) {
  .app { height: auto; min-height: 100vh; min-height: 100dvh; grid-template-rows: auto auto; }
  .list, .stats { overflow: visible; }
  .detail { overflow: visible; min-height: 360px; }
  .actions { position: static; border-radius: 0; }
}
button, a.button, .list li { transition: opacity .15s ease-out, background-color .15s ease-out; }
@media (hover: hover) {
  button:not(:disabled):hover, a.button:hover { opacity: .8; }
  .list li:hover { background: var(--surface-sunken); }
  .list li[aria-current="true"]:hover { background: var(--calm-tint); }
}
button:not(:disabled):active, a.button:active, .list li:active { opacity: .8; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.legal-links { font-size: 13px; }
.legal-links a { color: var(--accent); }
#acceptance .row { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-agreement { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; text-align: left; }
.legal-agreement input { width: auto; margin-top: 4px; flex: none; }
.setup-card { margin: 0 0 16px; padding: 16px; }
.setup-card h3 { margin: 0 0 8px; }
.setup-card code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; background: var(--bg); padding: 2px 6px; border-radius: 6px; }

.list .when, .call-head .meta, .call-head .phone, .chart .tick, .setup-card code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }


button.destructive, #logout-btn, #acceptance-logout { color: var(--danger); border-color: var(--danger); }

.password-login { display: grid; gap: 6px; }
.password-login p { margin: 0; }
.password-login label { text-align: left; margin: 8px 0 0; }
.password-login label:first-of-type { margin-top: 0; }
.password-login input { min-height: 44px; }
.password-login button { margin-top: 8px; min-height: 44px; }
.password-login .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.login-divider { display: none; align-items: center; gap: 12px; color: var(--muted); margin: 8px 0; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.password-login:not([hidden]) ~ .login-divider { display: flex; }
.password-login:not([hidden]) ~ a.button.google { min-height: 44px; background: var(--surface-sunken); color: var(--ink); }
