/* Voice — styles matched to Checkers/VPS/Messages panel */
:root {
  --bg:            #f9f9f9;
  --bg-elevated:   #ffffff;
  --surface:       #ffffff;
  --ink:           #111111;
  --ink-soft:      #3a3a3a;
  --ink-mute:      #6f6f6f;
  --line:          #e5e5e5;
  --line-strong:   #cfcfcf;
  --brand:         #4353ff;
  --brand-hover:   #3342e8;
  --accent:        #ff4500;
  --danger:        #e23b3b;
  --danger-hover:  #c93030;
  --ok:            #1f8c3f;
  --pastel-green:  #bfe3c4;
  --pastel-blue:   #d6e6fb;
  --pastel-peach:  #fadcce;
  --pastel-violet: #e9e5f2;
  --dark:          #141414;
  --dark-line:     #34322e;
  --dark-ink:      #f4f1ea;
  --dark-mute:     #a7a294;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --r-sm: 8px;  --r-md: 14px; --r-lg: 24px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(17,17,17,.04);
  --shadow-md: 0 8px 24px rgba(17,17,17,.07);
  --shadow-lg: 0 18px 40px rgba(17,17,17,.1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(1100px 520px at 0% -8%, rgba(67,83,255,.11), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(255,69,0,.07), transparent 50%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.06; }
p { margin: 0; }
button, label { font-family: inherit; cursor: pointer; }
::selection { background: var(--brand); color: #fff; }
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none; font-size: 22px; line-height: 1;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  padding: 13px 18px; font-size: 14.5px; font-weight: 600;
  transition: transform .12s ease, background .15s, box-shadow .15s, opacity .15s;
  white-space: nowrap; background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-hover); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(17,17,17,.05); }
.btn-ok { background: var(--ok); }
.btn-ok:hover { filter: brightness(1.05); }

/* ----- Login ----- */
.login-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 72px;
}
.logo { text-align: center; padding: 0 0 28px; }
.logo h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 600;
  letter-spacing: -.03em;
}
.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px;
}
.input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg-elevated); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(67,83,255,.18);
}
#key.input {
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  min-height: 18px;
  text-align: center;
  margin-bottom: 10px;
}
.login-panel .btn { width: 100%; }

/* ----- App shell ----- */
.app-logo { text-align: center; padding: 36px 24px 8px; }
.app-logo h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -.03em;
}
.top-meta {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  margin-bottom: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-mute);
  display: inline-block;
}
.status-dot.online { background: var(--ok); }
.status-dot.connecting { background: #e0a100; }
.status-dot.error { background: var(--danger); }

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 28px 72px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  align-items: start;
}

.rail {
  position: sticky; top: 24px;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.rail h2 { font-size: 28px; margin-bottom: 6px; }
.rail .subhead {
  color: var(--ink-mute); font-size: 13.5px; font-weight: 500;
  margin-bottom: 18px;
}

.dial-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 10px;
}
.dial-row .input { flex: 1; }
.call-state {
  text-align: center;
  min-height: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.call-state .timer {
  color: var(--ink-mute);
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 14px;
}
.key {
  aspect-ratio: 1.35;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: background .12s, transform .1s, border-color .12s;
  user-select: none;
}
.key:hover { background: rgba(17,17,17,.04); }
.key:active, .key.pressed {
  transform: scale(.96);
  background: var(--pastel-blue);
  border-color: transparent;
}
.key .digit {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 550;
  line-height: 1;
}
.key .letters {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink-mute);
  margin-top: 2px;
  min-height: 11px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.actions .btn-wide { grid-column: 1 / -1; }
.ctrl-row {
  display: flex; gap: 8px; margin-top: 10px;
}
.ctrl-row .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.ctrl-row .btn:hover { background: rgba(17,17,17,.05); box-shadow: none; }
.ctrl-row .btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.live { min-width: 0; }
.hero {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}
.ring {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--pastel-blue);
  color: var(--brand);
  display: grid; place-items: center;
}
.ring .material-symbols-outlined {
  font-size: 40px;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 40;
}
.hero-copy .eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 8px;
}
.hero-copy h2 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 8px; }
.hero-copy p { color: var(--ink-soft); font-size: 14.5px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 18px 18px 16px;
  transition: transform .18s, box-shadow .18s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat .k {
  font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-mute);
}
.stat .v {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 500; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat.out { background: var(--pastel-blue); }
.stat.in { background: var(--pastel-green); }
.stat.reg { background: var(--pastel-violet); }

.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.history-card {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.history-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 420px; overflow: auto;
}
.history-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .12s;
}
.history-list li:last-child { border-bottom: none; }
.history-list li:hover { background: rgba(17,17,17,.03); }
.history-list .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pastel-violet);
  color: var(--ink-soft);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.history-list .meta { min-width: 0; flex: 1; }
.history-list .num {
  font-weight: 600; font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-list .sub {
  font-size: 12.5px; color: var(--ink-mute); font-weight: 500;
}
.history-list .when {
  font-size: 12px; color: var(--ink-mute); font-weight: 500; white-space: nowrap;
}
.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 14.5px;
  font-weight: 500;
}

.top-actions {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 4px;
}

.incoming-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: none; place-items: center;
  background: rgba(20,20,20,.45);
  padding: 24px;
}
.incoming-overlay.show { display: grid; }
.incoming-card {
  width: min(380px, 100%);
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: var(--r-lg);
  border: 1px solid var(--ink);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.incoming-card .eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}
.incoming-card h2 { font-size: 32px; margin: 10px 0 6px; }
.incoming-card p { color: var(--dark-mute); margin: 0 0 24px; font-size: 14px; }
.incoming-actions { display: flex; gap: 10px; justify-content: center; }
.incoming-actions .btn { min-width: 110px; }

.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translate(-50%, 0);
  background: #fff; color: var(--ink);
  padding: 12px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s;
  z-index: 110;
}
.toast.show { opacity: 1; visibility: visible; }

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; padding: 16px 16px 56px; }
  .rail { position: static; }
  .grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
