:root {
  --bg: #07101b;
  --panel: #101b2a;
  --panel2: #0b1420;
  --line: #26384f;
  --text: #eef6ff;
  --muted: #8ea4c3;
  --air: #34d8c3;
  --air2: #35a8ff;
  --good: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top left, #0d1a2a, var(--bg) 42%); color: var(--text); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
.app-shell { width: min(1920px, 100%); margin: 0 auto; padding: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--air), var(--air2)); color: #041018; font-weight: 950; }
.eyebrow { color: var(--air); font-size: 11px; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.top-status { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.status-pill, .status-box, .badge { min-height: 42px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); display: inline-flex; align-items: center; gap: 9px; padding: 0 12px; }
.status-pill { font-weight: 900; }
.status-pill:before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-pill.online:before { background: var(--good); box-shadow: 0 0 0 6px rgba(34,197,94,.12); }
.status-box { display: grid; align-content: center; min-width: 106px; }
.status-box span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.status-box strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.operator-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr) 420px; gap: 14px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, rgba(16,27,42,.96), rgba(11,20,32,.96)); box-shadow: 0 22px 55px rgba(0,0,0,.25); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid rgba(148,163,184,.14); }
.guests-panel, .return-panel { position: sticky; top: 16px; }
.room-controls { padding: 12px 16px; display: grid; grid-template-columns: 1fr; gap: 8px; border-bottom: 1px solid rgba(148,163,184,.12); }
.room-controls input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); color: var(--text); padding: 0 12px; outline: none; }
.quick-row, .studio-actions, .srt-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-row { padding: 12px 16px; border-bottom: 1px solid rgba(148,163,184,.12); }
.btn, .tiny-btn { min-height: 40px; padding: 0 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--text); font-weight: 850; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: linear-gradient(135deg, var(--air), var(--air2)); color: #041018; border-color: transparent; }
.btn.danger { background: rgba(239,68,68,.15); color: #fecaca; border-color: rgba(239,68,68,.45); }
.btn.block { width: 100%; margin-top: 8px; }
.tiny-btn { min-height: 30px; font-size: 12px; padding: 0 9px; }
button:disabled { opacity: .55; cursor: wait; }
.guest-list { padding: 12px; display: grid; gap: 10px; max-height: calc(100vh - 260px); overflow: auto; }
.empty { border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); padding: 22px; text-align: center; font-weight: 800; }
.guest-card { border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); padding: 10px; display: grid; gap: 9px; }
.guest-card.in-studio { border-color: rgba(52,216,195,.85); box-shadow: 0 0 0 1px rgba(52,216,195,.18) inset; }
.guest-top { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; align-items: center; }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #020617; border: 1px solid rgba(148,163,184,.22); border-radius: 16px; }
.video-frame video, .video-frame canvas, .video-frame iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; background: #000; }
.video-frame.large { border-radius: 20px; }
.video-frame.small { border-radius: 14px; }
.placeholder, .video-wait { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 18px; }
.placeholder strong { display: block; color: var(--text); font-size: 22px; }
.placeholder span { display: block; margin-top: 6px; }
.guest-name { font-weight: 950; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-status { color: var(--muted); font-size: 12px; margin-top: 3px; }
.meter-wrap { height: 7px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 8px; }
.meter { height: 100%; width: 0%; background: linear-gradient(90deg, var(--air), var(--good)); }
.guest-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge { min-height: 30px; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; padding: 0 10px; }
.badge.idle { color: var(--muted); }
.badge.ready { color: var(--air); background: rgba(52,216,195,.10); border-color: rgba(52,216,195,.32); }
.badge.live { color: #bbf7d0; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.45); }
.badge.kicked { color: #fecaca; background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.45); }
.studio-panel { padding-bottom: 14px; }
.studio-panel .video-frame.large { margin: 14px; }
.studio-actions { padding: 0 14px 14px; }
.srt-section { padding: 14px; border-top: 1px solid rgba(148,163,184,.13); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.srt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.srt-card { border: 1px solid var(--line); border-radius: 16px; padding: 10px; background: rgba(255,255,255,.02); }
.srt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.srt-log { margin: 10px 0 0; min-height: 58px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: #bfdbfe; background: rgba(2,6,23,.42); font-size: 12px; white-space: pre-wrap; }
.return-video { margin: 14px; }
.status-stack { padding: 0 14px 14px; display: grid; gap: 9px; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(148,163,184,.14); border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,.02); }
.status-line span { color: var(--muted); font-size: 12px; }
.status-line strong { font-size: 13px; text-align: right; }
.hidden-url { position: absolute !important; left: -99999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.qr-modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(2,6,23,.76); backdrop-filter: blur(8px); }
.qr-modal.open { display: flex; }
.qr-card { width: min(92vw, 420px); border: 1px solid var(--line); border-radius: 22px; background: var(--panel); padding: 16px; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qr-frame { min-height: 250px; border-radius: 18px; background: #fff; display: grid; place-items: center; padding: 16px; }
.qr-frame canvas, .qr-frame img { max-width: 100%; height: auto; }
@media (max-width: 1360px) { .operator-layout { grid-template-columns: 340px minmax(0, 1fr); } .return-panel { position: static; grid-column: 1 / -1; } .return-video { max-width: 760px; } }
@media (max-width: 980px) { .operator-layout { grid-template-columns: 1fr; } .guests-panel { position: static; } .srt-grid { grid-template-columns: 1fr; } .topbar { align-items: flex-start; flex-direction: column; } .top-status { justify-content: flex-start; } .guest-list { max-height: none; } }
@media (max-width: 560px) { .app-shell { padding: 10px; } .guest-top { grid-template-columns: 1fr; } .guest-actions, .studio-actions, .quick-row, .srt-buttons { display: grid; grid-template-columns: 1fr; } .btn { width: 100%; } }

#srtDiagBtn { border-color: rgba(56,189,248,.55); color: #7dd3fc; }
.srt-log { line-height: 1.45; }
