
:root {
  --bg: #07101b;
  --bg2: #0b1624;
  --panel: #101b2a;
  --panel2: #0b1420;
  --line: #24364d;
  --text: #eef6ff;
  --muted: #8ea4c3;
  --air: #34d8c3;
  --air2: #35a8ff;
  --good: #27c282;
  --danger: #ef4444;
}
body.theme-light {
  --bg: #edf3fb;
  --bg2: #f8fbff;
  --panel: #ffffff;
  --panel2: #f7faff;
  --line: #d7e4f1;
  --text: #102033;
  --muted: #64748b;
  --air: #06b6a3;
  --air2: #1593ff;
  --good: #0d9f6e;
}
html, body { min-height: 100%; background: radial-gradient(circle at top left, var(--bg2), var(--bg) 42%); color: var(--text); }
body.layout-boxed .studio-root { max-width: 1600px; }
body.layout-full .studio-root { max-width: none; }
.studio-root { margin: 0 auto; padding: 18px 22px 28px; }
.studio-shell { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 18px; align-items: start; }
.side-rail { position: sticky; top: 18px; display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, var(--panel), var(--panel2)); box-shadow: 0 22px 55px rgba(0,0,0,.26); }
.side-link { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: 24px; cursor: pointer; }
.side-link.active { color: #03131c; background: linear-gradient(135deg, var(--air), var(--air2)); border-color: transparent; }
.top-status { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(52,216,195,.08); font-weight: 800; }
.status-pill:before { content: ""; width: 9px; height: 9px; border-radius: 999px; background: var(--muted); }
.status-pill.online:before { background: var(--good); box-shadow: 0 0 0 6px rgba(39,194,130,.13); }
.panel { border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(180deg, var(--panel), var(--panel2)); box-shadow: 0 22px 55px rgba(0,0,0,.25); }
.btn-air, .btn-soft, .btn-danger { min-height: 42px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-air { background: linear-gradient(135deg, var(--air), var(--air2)); color: #03131c; border-color: transparent; }
.btn-soft { background: rgba(255,255,255,.035); color: var(--text); }
.btn-danger { background: rgba(239,68,68,.16); color: #fecaca; border-color: rgba(239,68,68,.42); }
.field { width: 100%; min-height: 46px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.025); padding: 0 14px; color: var(--text); outline: none; }
.field:focus { border-color: var(--air); box-shadow: 0 0 0 3px rgba(52,216,195,.12); }
.metric-card { border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); padding: 12px 14px; }
.metric-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.metric-card strong { display: block; font-size: 20px; line-height: 1.1; margin-top: 5px; }
.video-box, .preview, .video-wrap, .video-stage, .main-stage, .panel-stage { aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 18px; border: 1px solid rgba(148,163,184,.22); position: relative; }
.video-box video, .preview video, .video-wrap video, .video-stage video, .main-stage video,
.video-box canvas, .preview canvas, .video-wrap canvas, .video-stage canvas, .main-stage canvas {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.canvas-clean * { max-width: 100%; }
.hidden-url { position: absolute !important; left: -99999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.tooltip { position: relative; }
.tooltip:hover:after { content: attr(data-tip); position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 10px); background: #020617; color: #e2e8f0; border: 1px solid rgba(52,216,195,.35); padding: 8px 10px; border-radius: 10px; white-space: nowrap; font-size: 12px; z-index: 80; }
.qr-modal, .panel-modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(2,6,23,.72); backdrop-filter: blur(8px); }
.qr-modal.open, .panel-modal.open { display: flex; }
.guest-card { border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.025); padding: 12px; display: grid; gap: 11px; }
.badge, .slot-badge { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; border-radius: 999px; padding: 0 11px; background: rgba(52,216,195,.11); color: var(--air); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.video-wait, .preview-wait, .empty { display: grid; place-items: center; min-height: 100%; color: var(--muted); font-weight: 800; text-align: center; }
.guest-meta, .guest-info, .guest-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.guest-name { font-size: 22px; font-weight: 950; line-height: 1.05; }
.guest-status { color: var(--muted); font-size: 12px; margin-top: 4px; }
.meter-wrap { height: 8px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; margin-top: 10px; }
.meter { height: 100%; width: 0; background: linear-gradient(90deg, var(--air), var(--air2)); }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.button-row button { min-height: 40px; padding: 0 13px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--text); font-weight: 800; cursor: pointer; }
.qr-row { display: grid; grid-template-columns: 82px 1fr; gap: 12px; align-items: center; }
.qr-box { width: 82px; height: 82px; background: #fff; border-radius: 16px; display: grid; place-items: center; overflow: hidden; }
.qr-box canvas, .qr-box img { max-width: 100%; height: auto; }
.receiver-url { display: none; }
.srt-box, .log-box { min-height: 100px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: rgba(2,6,23,.45); color: #bfdbfe; padding: 12px; font-size: 12px; }
@media (max-width: 1120px) {
  .studio-shell { grid-template-columns: 1fr; }
  .side-rail { position: static; grid-auto-flow: column; overflow-x: auto; }
  .side-link { width: 52px; height: 52px; }
}
@media (max-width: 720px) {
  .studio-root { padding: 12px; }
  .top-status { justify-content: stretch; }
  .status-pill, .btn-air, .btn-soft, .btn-danger { width: 100%; }
}
