:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #161b22;
  --panel2: #21262d;
  --border: #30363d;
  --blue: #58a6ff;
  --blue2: #1f6feb;
  --green: #3fb950;
  --red: #f85149;
  --muted: #8b949e;
  --text: #f0f6fc;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: radial-gradient(circle at top, #172033 0, var(--bg) 38%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.shell { width: min(760px, 100%); margin: 0 auto; padding: 22px 16px 42px; }
.brand { text-align: center; padding: 14px 0 20px; }
.brand-mark {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 22px;
  display: grid; place-items: center; font-size: 34px;
  background: linear-gradient(145deg, var(--blue2), #7c3aed);
  box-shadow: 0 14px 45px rgba(31,111,235,.3);
}
h1 { margin: 0; font-size: clamp(28px, 7vw, 42px); letter-spacing: .02em; }
.subtitle { color: var(--muted); margin: 8px 0 0; line-height: 1.45; }
.card {
  background: rgba(22,27,34,.94); border: 1px solid var(--border); border-radius: 22px;
  padding: 20px; box-shadow: 0 18px 55px rgba(0,0,0,.3); margin-bottom: 16px;
}
.card h2, .card h3 { margin-top: 0; }
button, input, textarea { font: inherit; }
button {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 0; border-radius: 14px;
  font-weight: 700; color: white; background: var(--blue2); cursor: pointer;
  touch-action: manipulation;
}
button.secondary { background: var(--panel2); border: 1px solid var(--border); }
button.success { background: #238636; }
button.danger { background: #da3633; }
button:disabled { opacity: .48; cursor: not-allowed; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input, textarea {
  width: 100%; border: 1px solid var(--border); background: var(--bg); color: white;
  border-radius: 13px; padding: 13px 14px; outline: none;
}
textarea { min-height: 95px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(88,166,255,.14); }
label { display: block; color: var(--muted); font-size: 14px; margin: 12px 0 7px; }
.status {
  min-height: 50px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg); color: var(--muted); line-height: 1.45;
}
.status.live { border-color: var(--green); color: #7ee787; }
.status.error { border-color: var(--red); color: #ff7b72; }
.hidden { display: none !important; }
.meter { height: 9px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 14px 0; }
.meter > div { width: 0%; height: 100%; background: var(--green); transition: width .2s linear; }
.call-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--blue); word-break: break-all; }
.small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: var(--panel2); color: var(--muted); font-size: 12px; }
.call-list { display: grid; gap: 12px; }
.call-item { border: 1px solid var(--border); border-radius: 16px; padding: 15px; background: var(--bg); }
.call-item.new { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.call-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.call-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 10px; }
audio { width: 100%; margin-top: 8px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.top-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.top-actions button { width: auto; min-height: 40px; padding: 8px 12px; }
@media (max-width: 520px) {
  .button-row, .call-actions { grid-template-columns: 1fr; }
  .shell { padding-top: 10px; }
  .card { padding: 17px; border-radius: 18px; }
}
