:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #14181d;
  --panel2: #1b2027;
  --line: #29313b;
  --text: #f4f7fa;
  --muted: #9ba8b5;
  --accent: #57e389;
  --accent2: #2ea865;
  --danger: #ff6b6b;
  --warning: #ffd166;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top, #141b22 0, var(--bg) 45%); color: var(--text); min-height: 100vh; }
button, input { font: inherit; }
button { border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 12px; padding: 12px 16px; cursor: pointer; font-weight: 700; }
button.primary { background: var(--accent); color: #08130d; border-color: transparent; }
button.ghost { background: transparent; }
button.small { padding: 8px 11px; font-size: 13px; }
button:active { transform: translateY(1px); }
input { width: 100%; margin-top: 7px; padding: 12px; border: 1px solid var(--line); background: #0f1317; color: var(--text); border-radius: 10px; outline: none; }
input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px #57e38918; }
label { color: var(--muted); font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; letter-spacing: -0.03em; }
h2 { margin-bottom: 6px; font-size: 20px; }
h3 { margin-bottom: 12px; }
.centered { display: grid; place-items: center; padding: 22px; }
.page { margin: 0 auto; padding: 22px 16px 70px; }
.page.narrow { max-width: 680px; }
.page.wide { max-width: 1050px; }
.panel { background: color-mix(in srgb, var(--panel) 95%, transparent); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 14px; box-shadow: 0 12px 40px #00000024; }
.login-panel { width: min(100%, 520px); padding: 26px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .18em; margin-bottom: 5px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; line-height: 1.5; }
.hidden { display: none !important; }
.error { color: #ffd2d2; background: #3a161a; border: 1px solid #6b292f; padding: 10px 12px; border-radius: 10px; margin-top: 14px; }
.error-text { color: var(--danger) !important; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.role-button { min-height: 86px; text-align: left; display: flex; flex-direction: column; justify-content: center; }
.role-button strong { font-size: 18px; }
.role-button span { opacity: .75; font-size: 12px; margin-top: 4px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding: 4px 2px; }
.topbar h1 { margin: 0; }
.hero-status { text-align: center; padding: 32px 18px; }
.hero-status h2 { font-size: 26px; }
.status-dot { font-size: 38px; margin-bottom: 6px; }
.status-dot.waiting { color: var(--warning); }
.status-dot.ok { color: var(--accent); }
.status-dot.bad { color: var(--danger); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats-grid > div, .mini-stats > div { background: #0f1317; border: 1px solid #202731; border-radius: 11px; padding: 10px; }
.stats-grid span, .mini-stats span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.stats-grid strong, .mini-stats b { font-size: 14px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 12px; border-top: 1px solid var(--line); padding: 10px 0; }
.kv span { color: var(--muted); }
.kv code { overflow-wrap: anywhere; }
.log { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; max-height: 220px; overflow: auto; background: #0b0e11; border-radius: 10px; padding: 10px; margin-top: 12px; color: #b9c7d5; }
.log > div { padding: 3px 0; border-bottom: 1px solid #171c22; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-title p { margin-bottom: 0; }
.badge { background: var(--accent); color: #06140c; font-weight: 900; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; }
.speaker-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 10px; margin-top: 16px; }
.speaker-list.empty { color: var(--muted); display: block; }
.speaker-card { background: #101419; border: 1px solid var(--line); border-radius: 14px; padding: 13px; }
.speaker-card.offline { opacity: .55; }
.speaker-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 10px; }
.speaker-head strong { display: block; }
.speaker-head span { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.pill { font-size: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 7px; color: var(--muted); }
.pill.good { color: var(--accent); border-color: #245e3a; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.manual { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.manual input { width: 90px; margin: 0; padding: 7px; }
.callout { margin-top: 14px; background: #0e1318; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 11px; font-size: 13px; color: #c8d3dd; }
.meter { width: 120px; height: 10px; border-radius: 999px; background: #0a0d10; border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 1%; background: var(--accent); transition: width .06s linear; }
.inline-settings { display: flex; gap: 16px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 13px; }
.inline-settings input[type="number"] { width: 80px; display: inline-block; margin: 0 4px; padding: 7px; }
.toggle { display: flex; gap: 7px; align-items: center; }
.toggle input { width: auto; margin: 0; }
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid.two { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .page { padding-left: 10px; padding-right: 10px; }
  .panel { border-radius: 14px; padding: 14px; }
}
