:root {
  --bg: #F4F7FC;
  --surface: #FFFFFF;
  --ink: #262A43;
  --ink-2: #3D4260;
  --muted: #6E7593;
  --faint: #A3A9C2;
  --line: #E5E9F3;
  --line-2: #EEF1F8;
  --brand: #3B73CA;
  --brand-2: #2F62B3;
  --brand-soft: #EAF1FC;
  --brand-tint: #F3F7FE;
  --green: #12A15A;
  --green-2: #0E8C4D;
  --green-soft: #E5F7EE;
  --red: #E5484D;
  --red-soft: #FDEDEE;
  --amber: #C77700;
  --amber-soft: #FFF4DF;
  --sky: #E4F3FF;
  --mint: #E3FAF1;
  --peach: #FFF0E6;
  --lilac: #F0EDFF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(38, 42, 67, .05), 0 6px 20px rgba(38, 42, 67, .06);
  --shadow-lg: 0 10px 40px rgba(38, 42, 67, .16);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
a { color: var(--brand); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.brand b { display: block; font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; color: var(--ink); }
.brand small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.logo { width: 36px; height: 36px; flex: none; display: block; }
.logo svg { width: 100%; height: 100%; display: block; }
.brand.big .logo { width: 48px; height: 48px; }
.brand.big b { font-size: 20px; }

/* ---------- login ---------- */
.login {
  min-height: 100%; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 10% -10%, #DCEBFF 0%, transparent 60%),
    radial-gradient(700px 500px at 110% 110%, #DFF7EC 0%, transparent 60%),
    var(--bg);
}
.login-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 22px; padding: 30px; box-shadow: var(--shadow-lg); }
.login-card form { margin-top: 26px; display: grid; gap: 10px; }
.login-card label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.err { color: var(--red); min-height: 20px; margin: 4px 0 0; font-size: 13px; }

/* ---------- inputs & buttons ---------- */
.input, .login-card input, select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 10px 12px; outline: none; transition: border .15s, box-shadow .15s;
}
.input:focus, .login-card input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 14px; border-radius: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border .15s, transform .05s;
}
.btn:hover { background: var(--brand-tint); border-color: #D5E1F5; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: var(--green-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #F7CACC; }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.wide { width: 100%; padding: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none;
}
.icon-btn:hover { background: var(--brand-tint); color: var(--brand); }
.icon-btn.call { color: var(--green); }
.icon-btn.call:hover { background: var(--green-soft); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh;
}
#nav { display: grid; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; position: relative;
}
.nav-item:hover { background: var(--line-2); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); }
.nav-item .badge { margin-left: auto; }
.badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 99px; padding: 0 6px; display: inline-grid; place-items: center; }
.side-foot { margin-top: auto; }

.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; background: var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status-pill.ready { background: var(--green-soft); color: var(--green-2); }
.status-pill.ready i { background: var(--green); box-shadow: 0 0 0 4px rgba(18, 161, 90, .15); }
.status-pill.connecting { background: var(--amber-soft); color: var(--amber); }
.status-pill.connecting i { background: var(--amber); animation: blink 1s infinite; }
.status-pill.error { background: var(--red-soft); color: var(--red); }
.status-pill.error i { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 28px 6px; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.from-chip { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px; }
.from-chip span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.from-chip select { border: 0; padding: 6px 8px; min-width: 170px; font-weight: 600; background: var(--brand-tint); }
.from-chip select:focus { box-shadow: none; }
.view { padding: 16px 28px 40px; flex: 1; min-height: 0; }
.mobile-only { display: none; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 6px; }
.card-h h2 { margin: 0; font-size: 15.5px; font-weight: 700; }
.card-b { padding: 10px 18px 18px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty .i { width: 34px; height: 34px; color: var(--faint); margin-bottom: 6px; }

/* ---------- dialer ---------- */
.dial-grid { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.dial-grid > * { min-width: 0; }
.dialer { padding: 22px; }
.dial-display {
  background: linear-gradient(135deg, var(--sky), var(--mint));
  border-radius: 14px; padding: 16px 16px 12px; margin-bottom: 18px; position: relative;
}
.dial-display input {
  width: 100%; border: 0; background: transparent; font-size: 28px; font-weight: 700; letter-spacing: .01em;
  text-align: center; outline: none; color: var(--ink); padding: 4px 34px;
}
.dial-display input::placeholder { color: #93A4C4; font-weight: 600; font-size: 20px; }
.dial-display .who { text-align: center; font-size: 13px; color: var(--ink-2); min-height: 19px; font-weight: 600; }
.dial-display .clear { position: absolute; right: 10px; top: 18px; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.dial-display .clear:hover { background: rgba(255,255,255,.6); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key {
  height: 62px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; display: grid; place-items: center; align-content: center; gap: 0;
  transition: background .1s, border .1s, transform .05s;
}
.key:hover { background: var(--brand-tint); border-color: #D5E1F5; }
.key:active { transform: scale(.97); background: var(--brand-soft); }
.key b { font-size: 22px; font-weight: 700; line-height: 1.1; }
.key small { font-size: 10px; letter-spacing: .14em; color: var(--muted); font-weight: 600; height: 12px; }
.dial-actions { display: grid; grid-template-columns: 1fr 72px 1fr; align-items: center; margin-top: 18px; }
.call-btn {
  width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--green); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(18, 161, 90, .35); transition: transform .1s, background .15s;
}
.call-btn:hover { background: var(--green-2); transform: translateY(-1px); }
.call-btn .i { width: 28px; height: 28px; }
.call-btn.red { background: var(--red); box-shadow: 0 8px 22px rgba(229, 72, 77, .35); }
.dial-actions .side-act { justify-self: center; }
.mic-hint { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }

.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; }
.row + .row { border-top: 1px solid var(--line-2); }
.row:hover { background: var(--brand-tint); }
.row .grow { flex: 1; min-width: 0; }
.row .t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .acts { display: flex; gap: 6px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: 13.5px; color: var(--brand-2); background: var(--brand-soft);
}
.avatar.c1 { background: var(--sky); color: #1F6FB2; }
.avatar.c2 { background: var(--mint); color: #13865A; }
.avatar.c3 { background: var(--peach); color: #C25A12; }
.avatar.c4 { background: var(--lilac); color: #5B48C9; }
.dir { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.dir.out { background: var(--brand-soft); color: var(--brand); }
.dir.in { background: var(--green-soft); color: var(--green); }
.dir.missed { background: var(--red-soft); color: var(--red); }
.dir .i { width: 16px; height: 16px; }

/* ---------- messages ---------- */
.msg-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - 110px); min-height: 480px; overflow: hidden; }
.threads { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.threads-h { padding: 14px; display: flex; gap: 8px; border-bottom: 1px solid var(--line-2); }
.threads-list { overflow: auto; flex: 1; padding: 6px; }
.thread { display: flex; gap: 11px; padding: 11px 10px; border-radius: 12px; cursor: pointer; align-items: center; }
.thread:hover { background: var(--line-2); }
.thread.active { background: var(--brand-soft); }
.thread .grow { flex: 1; min-width: 0; }
.thread .top { display: flex; justify-content: space-between; gap: 8px; }
.thread .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .time { font-size: 11.5px; color: var(--muted); flex: none; }
.thread .snip { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.unread .snip { color: var(--ink); font-weight: 600; }
.thread .dot { width: 9px; height: 9px; background: var(--brand); border-radius: 50%; flex: none; }
.convo { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: linear-gradient(180deg, var(--brand-tint), #fff 30%); }
.convo-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.convo-h .grow { flex: 1; min-width: 0; }
.convo-h .t1 { font-weight: 700; font-size: 15.5px; }
.convo-h .t2 { font-size: 12.5px; color: var(--muted); }
.bubbles { flex: 1; overflow: auto; padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 6px; }
.day-sep { align-self: center; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; margin: 10px 0 6px; }
.bubble { max-width: min(520px, 78%); padding: 9px 13px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; position: relative; }
.bubble.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.out { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.bubble.out.failed { background: var(--red-soft); color: var(--red); border: 1px solid #F7CACC; }
.bubble a { color: inherit; }
.meta { font-size: 11px; color: var(--muted); margin: 0 4px 6px; }
.meta.out { align-self: flex-end; }
.meta.in { align-self: flex-start; }
.composer { border-top: 1px solid var(--line-2); padding: 12px 14px; background: var(--surface); }
.composer .box { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { resize: none; min-height: 46px; max-height: 160px; border-radius: 14px; }
.composer .send { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .send:hover { background: var(--brand-2); }
.composer .send[disabled] { opacity: .5; }
.composer .foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.new-to { padding: 14px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface); display: flex; gap: 10px; align-items: center; }
.new-to b { font-size: 13px; color: var(--muted); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:hover td { background: var(--brand-tint); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); }
.tag.green { background: var(--green-soft); color: var(--green-2); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.blue { background: var(--brand-soft); color: var(--brand); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { max-width: 320px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- contacts ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ccard { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ccard .top { display: flex; gap: 12px; align-items: center; }
.ccard .acts { display: flex; gap: 8px; }

/* ---------- usage ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; border-radius: var(--radius); }
.kpi .lab { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); opacity: .8; }
.kpi .val { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.kpi .sub { font-size: 12.5px; color: var(--ink-2); opacity: .85; }
.kpi.k1 { background: var(--sky); }
.kpi.k2 { background: var(--lilac); }
.kpi.k3 { background: var(--peach); }
.kpi.k4 { background: var(--mint); }
.kpi.k4.bad { background: var(--amber-soft); }
.usage-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.compare { display: grid; gap: 14px; }
.cmp-row { display: grid; gap: 6px; }
.cmp-row .top { display: flex; justify-content: space-between; font-weight: 600; }
.bar { height: 14px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.verdict { padding: 14px; border-radius: 12px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.verdict.good { background: var(--green-soft); color: var(--green-2); }
.verdict.bad { background: var(--amber-soft); color: var(--amber); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding: 8px 0 0; border-bottom: 1px solid var(--line); }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 4px; position: relative; }
.chart .col i { display: block; border-radius: 4px 4px 0 0; background: var(--brand); min-height: 0; }
.chart .col i.in { background: #5CC79A; border-radius: 0; }
.chart .col:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11.5px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; z-index: 2; }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--brand); }
.legend span.in::before { background: #5CC79A; }
.breakdown td:last-child, .breakdown th:last-child { text-align: right; }

/* ---------- settings ---------- */
.set-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.check { display: flex; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line-2); }
.check:first-child { border-top: 0; }
.check .ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.check .ok.y { background: var(--green-soft); color: var(--green); }
.check .ok.n { background: var(--red-soft); color: var(--red); }
.check .ok.o { background: var(--line-2); color: var(--muted); }
.check .ok .i { width: 15px; height: 15px; stroke-width: 3; }
.check .fix { font-size: 12.5px; color: var(--amber); margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--line-2); padding: 10px 12px; border-radius: 10px; word-break: break-all; }

/* ---------- call panel ---------- */
.call-panel {
  position: fixed; right: 24px; bottom: 24px; width: 330px; z-index: 40; border-radius: 22px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.cp-top { background: linear-gradient(135deg, #3B73CA, #4C8BE0 60%, #5BB8D9); color: #fff; padding: 18px 18px 16px; text-align: center; }
.cp-top .state { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.cp-top .who { font-size: 20px; font-weight: 800; margin-top: 6px; }
.cp-top .num { font-size: 13px; opacity: .9; }
.cp-top .timer { font-size: 28px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.cp-body { padding: 14px 16px 18px; }
.cp-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cp-ctl { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 4px; cursor: pointer; display: grid; place-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cp-ctl:hover { background: var(--brand-tint); }
.cp-ctl.on { background: var(--brand-soft); border-color: #C9DAF4; color: var(--brand); }
.cp-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.cp-keypad button { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-size: 18px; font-weight: 700; cursor: pointer; }
.cp-keypad button:hover { background: var(--brand-tint); }
.cp-hang { display: flex; justify-content: center; margin-top: 16px; }
.cp-hang .call-btn { width: 60px; height: 60px; }
.cp-dtmf { text-align: center; font-weight: 700; letter-spacing: .2em; min-height: 20px; margin-top: 8px; color: var(--ink-2); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; background: rgba(38, 42, 67, .38); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 60; padding: 18px; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 440px; padding: 22px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 14px; font-size: 18px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ring-card { background: var(--surface); border-radius: 26px; width: 100%; max-width: 360px; padding: 30px 24px 26px; text-align: center; box-shadow: var(--shadow-lg); }
.ring-card .pulse { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 14px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; animation: pulse 1.4s infinite; }
.ring-card .pulse .i { width: 40px; height: 40px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18,161,90,.35); } 70% { box-shadow: 0 0 0 26px rgba(18,161,90,0); } 100% { box-shadow: 0 0 0 0 rgba(18,161,90,0); } }
.ring-card .lab { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); }
.ring-card .who { font-size: 24px; font-weight: 800; margin-top: 4px; }
.ring-card .num { color: var(--muted); }
.ring-card .to { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.ring-card .acts { display: flex; justify-content: center; gap: 46px; margin-top: 24px; }
.ring-card .acts div { display: grid; gap: 6px; justify-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }

.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: max-content; max-width: 92vw; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13.5px; animation: tin .2s ease-out; }
.toast.error { background: var(--red); }
.toast.ok { background: var(--green); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); color: var(--amber); font-weight: 600; margin-bottom: 16px; }
.banner .grow { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .usage-grid, .set-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding-bottom: 72px; }
  .side { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 30; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .side .brand, .side-foot { display: none; }
  #nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; gap: 2px; }
  .nav-item { flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 10.5px; justify-content: center; text-align: center; }
  .nav-item .badge { position: absolute; top: 2px; right: 50%; margin-right: -22px; }
  .topbar { padding: 14px 16px 4px; flex-wrap: wrap; }
  .topbar h1 { font-size: 21px; }
  .view { padding: 12px 14px 24px; }
  .mobile-only { display: inline-flex; }
  .dial-grid { grid-template-columns: minmax(0, 1fr); }
  .dialer { padding: 16px; }
  .key { height: 56px; }
  .msg-wrap { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .msg-wrap.has-convo .threads { display: none; }
  .msg-wrap:not(.has-convo) .convo { display: none; }
  .threads { border-right: 0; }
  .call-panel { right: 10px; left: 10px; bottom: 82px; width: auto; }
  .from-chip select { min-width: 140px; }
  .form-grid { grid-template-columns: 1fr; }
  .hide-m { display: none; }
  .kpi .val { font-size: 22px; }
}
@media (min-width: 861px) { .back-btn { display: none; } }
.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0; }
.table-wrap { overflow-x: auto; }
@media (max-width: 860px) { .table td, .table th { padding: 10px 8px; } }

/* ================= v2: safety, outcomes, health, settings ================= */
.nav-item .short { display: none; }
.cp-controls { grid-template-columns: repeat(4, 1fr); }
.cp-script { margin-top: 12px; background: var(--brand-tint); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.cp-script b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.cp-script p { margin: 3px 0 8px; color: var(--ink-2); }

.dial-guard { display: grid; gap: 8px; margin: -6px 0 14px; min-height: 0; }
.tchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; width: max-content; max-width: 100%; }
.tchip .i { width: 14px; height: 14px; }
.tchip.green { background: var(--green-soft); color: var(--green-2); }
.tchip.amber { background: var(--amber-soft); color: var(--amber); }
.tchip.red { background: var(--red-soft); color: var(--red); }
.guard-strip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.guard-strip .i { width: 18px; height: 18px; margin-top: 2px; }
.guard-strip.stop, .guard-strip.block { background: var(--red-soft); color: var(--red); }
.guard-strip.warn { background: var(--amber-soft); color: var(--amber); }
.guard-strip.tip { background: var(--sky); color: #1F6FB2; }
.guard-strip .small { color: inherit; opacity: .9; }

.banner.red { background: var(--red-soft); color: var(--red); }
.banner.info { background: var(--sky); color: #1F6FB2; }
.banner .small { font-weight: 500; }
.th-info { padding: 10px 16px 0; background: var(--surface); }
.first-tip { display: flex; gap: 10px; align-items: flex-start; margin: 10px 16px 0; padding: 10px 12px; border-radius: 12px; background: var(--mint); color: #13865A; font-size: 12.5px; font-weight: 600; }
.first-tip .i { width: 18px; height: 18px; flex: none; }
#thBanner .banner { margin: 10px 16px 0; }

.composer .box { align-items: flex-end; }
.composer #cmpTpl { width: 46px; height: 46px; border-radius: 14px; }
.tpl-pop { position: relative; margin-bottom: 10px; max-height: 260px; overflow: auto; display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.tpl-pop.hidden { display: none; }
.tpl { text-align: left; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 9px 11px; cursor: pointer; display: grid; gap: 3px; }
.tpl:hover { background: var(--brand-tint); border-color: #D5E1F5; }
.tpl b { font-size: 13px; }
.tpl span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-more { font-size: 12.5px; font-weight: 600; padding: 4px 6px; }

.overlay .modal.guard { max-width: 480px; padding: 0; overflow: hidden; }
.g-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; }
.g-head .i { width: 26px; height: 26px; flex: none; margin-top: 2px; }
.g-head.red { background: var(--red-soft); color: var(--red); }
.g-head.amber { background: var(--amber-soft); color: var(--amber); }
.g-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.g-head .small { color: var(--ink-2); font-weight: 500; }
.g-items { display: grid; gap: 0; max-height: 52vh; overflow: auto; }
.g-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 20px; border-top: 1px solid var(--line-2); }
.g-item .grow { min-width: 0; }
.g-item .btn { flex: none; }
.lvl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 99px; flex: none; margin-top: 2px; }
.lvl.red { background: var(--red-soft); color: var(--red); }
.lvl.amber { background: var(--amber-soft); color: var(--amber); }
.lvl.blue { background: var(--sky); color: #1F6FB2; }
.g-ack { display: flex; gap: 10px; align-items: center; padding: 12px 20px; font-weight: 600; font-size: 13px; background: var(--brand-tint); border-top: 1px solid var(--line-2); cursor: pointer; }
.g-ack input { width: 18px; height: 18px; flex: none; }
.guard .acts { padding: 14px 20px 18px; margin-top: 0; }
.btn.danger-fill { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-fill:hover { background: #CF3A3F; }
.btn.danger-fill[disabled] { background: #E9A3A6; border-color: #E9A3A6; }

.oc { background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 16px 16px 14px; }
.oc-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 4px; }
.oc-name { font-size: 18px; font-weight: 800; }
.oc-q { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 7px; }
.oc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.oc-grid.three { grid-template-columns: repeat(2, 1fr); }
.oc-chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 11px; padding: 8px 8px; font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.oc-chip:hover { background: var(--brand-tint); }
.oc-chip.g.on { background: var(--green-soft); border-color: #9BDDBB; color: var(--green-2); }
.oc-chip.a.on { background: var(--amber-soft); border-color: #F2D49B; color: var(--amber); }
.oc-chip.b.on { background: var(--brand-soft); border-color: #C9DAF4; color: var(--brand); }
.oc-chip.r.on { background: var(--red-soft); border-color: #F7CACC; color: var(--red); }
.oc-chip.on { font-weight: 800; }
.oc .input { margin-top: 12px; }
.oc-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.hcard { padding: 18px; display: grid; gap: 14px; align-content: start; border-top: 5px solid var(--green); }
.hcard.watch { border-top-color: var(--amber); }
.hcard.risk { border-top-color: var(--red); }
.h-top { display: flex; gap: 16px; align-items: center; }
.h-top .grow { min-width: 0; }
.h-num { font-size: 19px; font-weight: 800; margin: 2px 0 6px; }
.ring { --c: var(--green); width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 9px; background: var(--surface); border-radius: 50%; }
.ring b { position: relative; font-size: 24px; font-weight: 800; }
.hcard.watch .ring { --c: var(--amber); }
.hcard.risk .ring { --c: var(--red); }
.h-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h-metrics > div { background: var(--brand-tint); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.h-metrics span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.h-metrics b { font-size: 19px; font-weight: 800; }
.h-metrics small { font-size: 11.5px; color: var(--muted); }
.red-t { color: var(--red); }
.green-t { color: var(--green-2); }
.h-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.h-list li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; padding: 9px 11px; border-radius: 11px; }
.h-list li .i { width: 16px; height: 16px; margin-top: 2px; }
.h-list li.bad { background: var(--red-soft); color: #A62F33; }
.h-list li.good { background: var(--green-soft); color: var(--green-2); }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-top: 1px solid var(--line-2); cursor: pointer; }
.chk:first-of-type { border-top: 0; }
.chk input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--green); }
.chk a { font-size: 12.5px; font-weight: 600; }
.tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; }

.tpl-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 8px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line-2); }
.tpl-row:first-child { border-top: 0; }
.tpl-row textarea { min-height: 60px; }
.tpl-row .icon-btn { margin-top: 2px; }

.ccard .tag { font-size: 11px; }
@media (max-width: 860px) {
  .nav-item .full { display: none; }
  .nav-item .short { display: inline; }
  .nav-item { font-size: 10px; }
  .hgrid { grid-template-columns: minmax(0, 1fr); }
  .h-metrics { grid-template-columns: 1fr 1fr; }
  .tpl-row { grid-template-columns: 1fr auto; }
  .tpl-row textarea { grid-column: 1 / -1; order: 3; }
  .oc-grid { grid-template-columns: repeat(2, 1fr); }
  .cp-controls { grid-template-columns: repeat(4, 1fr); }
  .cp-ctl { font-size: 11px; }
}
@media (min-width: 861px) { .nav-item .short { display: none; } }

/* ================= v3: team logins & recordings ================= */
.cp-hint { margin-top: 12px; font-size: 12.5px; background: var(--amber-soft); color: var(--amber); border-radius: 12px; padding: 9px 11px; font-weight: 600; }
.rec-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; background: var(--sky); color: #1F6FB2; border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.rec-note .i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.user-form select { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; }
#teamBox .avatar { width: 34px; height: 34px; font-size: 12px; }

/* ================= v4: premium polish, logo, guide ================= */
.logo {
  background: #fff; border-radius: 12px; padding: 3px;
  box-shadow: 0 1px 2px rgba(38,42,67,.08), 0 4px 14px rgba(59,115,202,.18);
  overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand b { letter-spacing: -.02em; }
.brand small { letter-spacing: .01em; }

/* login */
.login-card {
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(38,42,67,.05), 0 24px 60px rgba(38,42,67,.14);
}
.login-card .brand.big { margin-bottom: 4px; }
.login-card .btn.primary.wide {
  height: 46px; border-radius: 12px; font-weight: 700; letter-spacing: .01em;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 8px 22px rgba(59,115,202,.32);
}

/* sidebar and topbar */
.side {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FE 100%);
  border-right: 1px solid var(--line);
}
.nav-item { transition: background .18s ease, color .18s ease, transform .18s ease; border-radius: 12px; }
.nav-item:hover { transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(90deg, var(--brand-soft), #F6F9FF);
  box-shadow: inset 3px 0 0 var(--brand);
}
.topbar h1 { letter-spacing: -.02em; font-weight: 800; }
.from-chip { box-shadow: var(--shadow); border: 1px solid var(--line); }

/* cards and buttons: a touch more depth, smooth motion */
.card, .panel, .tile, .hcard { transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: 0 2px 4px rgba(38,42,67,.06), 0 12px 28px rgba(38,42,67,.09); }
.btn { transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn:active { transform: scale(.98); }
.btn.primary {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 6px 16px rgba(59,115,202,.28);
}

/* ---------- first-time guide ---------- */
.guide { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; animation: fadeUp .45s ease both; }
.guide-hero {
  display: flex; gap: 18px; align-items: center; padding: 22px 24px;
  border-radius: 20px; color: #fff;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(255,255,255,.22), transparent 60%),
    linear-gradient(135deg, #262A43 0%, #3B73CA 100%);
  box-shadow: 0 18px 40px rgba(38,42,67,.22);
}
.guide-hero h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; font-weight: 800; }
.guide-hero p { margin: 0; opacity: .88; font-size: 14px; }
.guide-logo {
  width: 64px; height: 64px; flex: none; background: #fff; border-radius: 16px; padding: 5px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.guide-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.guide-step {
  display: grid; grid-template-columns: 34px 40px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--shadow); animation: fadeUp .5s ease both;
}
.guide-step:nth-child(2) { animation-delay: .05s; }
.guide-step:nth-child(3) { animation-delay: .1s; }
.guide-step:nth-child(4) { animation-delay: .15s; }
.guide-step:nth-child(5) { animation-delay: .2s; }
.guide-step:nth-child(6) { animation-delay: .25s; }
.guide-step:nth-child(7) { animation-delay: .3s; }
.guide-num {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-2); font-weight: 800; font-size: 13px;
}
.guide-ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #EAF1FC, #F3F7FE); color: var(--brand);
}
.guide-ic .i { width: 20px; height: 20px; }
.guide-step b { font-size: 15px; letter-spacing: -.01em; }
.guide-step p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 6px 0 10px; }
.guide-actions .btn { min-height: 46px; padding: 0 22px; border-radius: 12px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .guide-hero { padding: 18px; }
  .guide-logo { width: 52px; height: 52px; }
  .guide-step { grid-template-columns: 30px 1fr; }
  .guide-ic { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================= v5: native-feel redesign (iPhone / Android style) ================= */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Plus Jakarta Sans", system-ui, sans-serif;
  --glass: rgba(255,255,255,.72);
  --glass-line: rgba(255,255,255,.7);
  --radius: 20px;
  --shadow: 0 1px 1px rgba(20,24,46,.04), 0 8px 24px rgba(20,24,46,.07);
}
html, body { background: var(--wall, #F4F7FC) fixed; background-attachment: fixed; }
body { min-height: 100%; }

/* frosted surfaces */
.side {
  background: rgba(255,255,255,.66) !important;
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-right: 1px solid rgba(255,255,255,.7) !important;
}
.topbar {
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-radius: 18px; padding: 10px 14px; margin: 0 0 14px;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 1px 2px rgba(20,24,46,.04);
}
.topbar h1 { font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.card, .login-card, .modal {
  background: var(--glass) !important;
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--glass-line) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}
.card-h h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

/* nav: iOS sidebar pills */
.nav-item { border-radius: 14px; padding: 10px 12px; font-weight: 550; }
.nav-item.active { background: rgba(59,115,202,.12); box-shadow: none; color: var(--brand-2); }
.nav-item.active::before { display: none; }

/* buttons: iOS-like */
.btn { border-radius: 14px; font-weight: 600; min-height: 42px; }
.btn.primary {
  background: linear-gradient(180deg, #4A82DA 0%, #3B73CA 100%);
  box-shadow: 0 6px 18px rgba(59,115,202,.30), inset 0 1px 0 rgba(255,255,255,.25);
}
.wall-btn { width: 40px; height: 40px; border-radius: 13px; background: rgba(255,255,255,.8); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* dialer: phone keypad */
.dialer { padding: 22px 22px 18px !important; }
.dial-display { background: rgba(255,255,255,.8); border-radius: 20px; border: 1px solid var(--line-2); }
.dial-display input { font-size: 26px; font-weight: 600; letter-spacing: .02em; }
.keypad { gap: 14px 22px !important; justify-items: center; }
.keypad .key {
  width: 78px; height: 78px; border-radius: 50%; padding: 0;
  display: grid; place-content: center; text-align: center; line-height: 1;
  background: rgba(255,255,255,.9); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20,24,46,.05), 0 6px 14px rgba(20,24,46,.06);
  transition: transform .12s ease, background .12s ease;
}
.keypad .key:active { transform: scale(.92); background: #EEF3FC; }
.keypad .key b { font-size: 30px; font-weight: 500; }
.keypad .key small { font-size: 10px; letter-spacing: .18em; color: var(--muted); }
.dial-actions { gap: 26px; }
.call-btn {
  width: 78px !important; height: 78px !important; border-radius: 50% !important;
  background: linear-gradient(180deg, #2BC06F 0%, #12A15A 100%) !important;
  box-shadow: 0 10px 24px rgba(18,161,90,.38) !important;
}
.call-btn:active { transform: scale(.94); }
.side-act { width: 58px !important; height: 58px !important; border-radius: 50% !important; background: rgba(255,255,255,.9) !important; border: 1px solid var(--line) !important; }

/* lists and rows: iOS grouped style */
.list li, .row { border-radius: 14px; }
.list li:hover { background: rgba(59,115,202,.05); }
.empty { padding: 22px 10px; }
.tag, .badge { border-radius: 999px; }
.status-pill { border-radius: 999px; backdrop-filter: blur(10px); }

/* modals as sheets */
.overlay { background: rgba(20,24,46,.28) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wall-modal { max-width: 420px; width: calc(100% - 32px); padding: 22px; }
.wall-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.wall-h h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.wall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wall-opt { border: 2px solid transparent; background: rgba(255,255,255,.7); border-radius: 16px; padding: 8px; cursor: pointer; display: grid; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: transform .15s ease, border-color .15s ease; }
.wall-opt:hover { transform: translateY(-2px); }
.wall-opt.on { border-color: var(--brand); }
.wall-swatch { height: 64px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.wall-foot { margin-top: 16px; display: flex; justify-content: flex-end; }

/* mobile: bottom tab bar, like iPhone/Android */
@media (max-width: 860px) {
  .side {
    position: fixed; left: 10px; right: 10px; bottom: 10px; top: auto;
    height: auto; width: auto; border-radius: 22px; padding: 6px;
    z-index: 50; box-shadow: 0 12px 30px rgba(20,24,46,.18);
  }
  .side .brand, .side-foot { display: none !important; }
  #nav { display: flex; justify-content: space-around; gap: 2px; }
  .nav-item { flex-direction: column; gap: 3px; padding: 8px 4px; border-radius: 16px; min-width: 0; flex: 1; align-items: center; }
  .nav-item .short { font-size: 10.5px; font-weight: 600; }
  .nav-item .badge { position: absolute; margin: -22px 0 0 22px; }
  .nav-item { position: relative; }
  .main { padding-bottom: 96px; }
  .topbar h1 { font-size: 21px; }
}
@media (max-width: 560px) {
  .keypad .key { width: 72px; height: 72px; }
  .call-btn { width: 72px !important; height: 72px !important; }
  .wall-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) { #view { padding-bottom: 120px; } .main { padding-bottom: 0; } }
