:root {
  color-scheme: dark;
  --bg: #06101d;
  --panel: rgba(12, 29, 49, .92);
  --panel-2: rgba(8, 22, 39, .94);
  --line: rgba(139, 189, 229, .2);
  --text: #eef7ff;
  --muted: #9fb5c8;
  --cyan: #5dd9ff;
  --blue: #6b8cff;
  --green: #55e39b;
  --amber: #ffd166;
  --red: #ff667d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(39, 126, 183, .24), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(80, 74, 207, .19), transparent 32rem),
    linear-gradient(150deg, #030914 0%, var(--bg) 55%, #071728 100%);
}
a { color: var(--cyan); }
button, input, select { font: inherit; }
button {
  border: 1px solid rgba(103, 219, 255, .35);
  border-radius: 10px;
  padding: .72rem 1rem;
  color: #03111d;
  background: linear-gradient(135deg, #73e3ff, #7f9cff);
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(71, 164, 213, .14);
}
button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { opacity: .38; cursor: not-allowed; }
button.secondary { background: rgba(18, 48, 76, .92); color: var(--text); }
button.warning { background: linear-gradient(135deg, #ffdb78, #ff9f5a); }
button.danger { background: linear-gradient(135deg, #ff8295, #ff5c73); }
button.success { background: linear-gradient(135deg, #62e5a5, #55cfd1); }
button.ghost { background: transparent; color: var(--muted); }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #071321;
  color: var(--text);
  padding: .68rem .75rem;
}
.shell { width: min(1600px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0 2.5rem; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 14, 25, .82);
  backdrop-filter: blur(16px);
  position: sticky;
  top: .5rem;
  z-index: 10;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  color: #03111d; font-weight: 900;
  background: linear-gradient(145deg, var(--cyan), var(--blue));
}
.brand strong { letter-spacing: .05em; }
.brand small { display: block; color: var(--muted); margin-top: .08rem; }
.status-strip { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: .42rem;
  min-height: 32px; padding: .35rem .65rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(12, 32, 53, .85);
  color: var(--muted); font-size: .84rem;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #607184; }
.chip.good::before { background: var(--green); box-shadow: 0 0 12px rgba(85, 227, 155, .75); }
.chip.warn::before { background: var(--amber); }
.chip.bad::before { background: var(--red); }
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 1.25rem;
  margin: 1rem 0;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 43, 70, .92), rgba(12, 23, 44, .94));
  box-shadow: var(--shadow);
}
.eyebrow { margin: 0 0 .35rem; color: var(--cyan); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .35rem; font-size: clamp(1.55rem, 3vw, 2.45rem); }
h2 { margin-bottom: .75rem; font-size: 1.08rem; }
.hero p:last-child { margin-bottom: 0; color: var(--muted); max-width: 72rem; }
.hero-id { align-self: center; text-align: right; }
.hero-id strong { display: block; font-size: 1.05rem; color: var(--cyan); }
.hero-id span { color: var(--muted); font-size: .83rem; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; }
.main-column, .side-column { display: grid; gap: 1rem; align-content: start; }
.panel {
  border: 1px solid var(--line); border-radius: 15px;
  padding: 1rem; background: var(--panel); box-shadow: var(--shadow);
}
.panel.soft { background: var(--panel-2); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.section-head h2 { margin: 0; }
.section-head span { color: var(--muted); font-size: .82rem; }
.controls { display: flex; flex-wrap: wrap; gap: .55rem; }
.controls.vertical { flex-direction: column; }
.controls.vertical button { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .75rem 0; }
label { color: var(--muted); font-size: .84rem; }
label input { margin-top: .35rem; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: .75rem;
  min-height: 300px;
}
.media-grid .empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 260px; color: var(--muted); border: 1px dashed var(--line); border-radius: 13px; }
.video-tile {
  position: relative; overflow: hidden; min-height: 250px;
  border: 1px solid var(--line); border-radius: 14px; background: #01070d;
}
.video-tile video { width: 100%; height: 100%; min-height: 250px; object-fit: cover; display: block; }
.video-tile.active { border-color: rgba(85, 227, 155, .9); box-shadow: 0 0 0 2px rgba(85, 227, 155, .16); }
.video-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .62rem .72rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86));
  font-size: .78rem; line-height: 1.35;
}
.video-overlay strong { display: block; font-size: .92rem; color: white; }
.video-overlay .facts { color: #c8deee; display: grid; grid-template-columns: 1fr auto; gap: .15rem .6rem; }
.preview-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; }
#previewVideo { width: 100%; max-height: 430px; border-radius: 12px; background: #01070d; object-fit: cover; }
.callout { border-left: 4px solid var(--cyan); background: rgba(24, 76, 108, .2); padding: .85rem .9rem; border-radius: 8px; color: #d8eaf7; }
.callout.warning { border-left-color: var(--amber); }
.callout.success { border-left-color: var(--green); }
.roster { display: grid; gap: .55rem; }
.roster-row {
  display: grid; grid-template-columns: 1fr auto; gap: .6rem;
  padding: .72rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(4, 15, 27, .5);
}
.roster-row strong { display: block; }
.roster-row small { color: var(--muted); }
.roster-state { text-align: right; font-size: .76rem; }
.roster-state .ready { color: var(--green); }
.roster-state .waiting { color: var(--amber); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-height: 330px; overflow: auto; }
.timeline li { padding: .65rem .7rem; border-left: 3px solid var(--blue); background: rgba(5, 18, 31, .6); border-radius: 6px; color: #dbe9f5; font-size: .82rem; }
.timeline time { display: block; color: var(--muted); font-size: .72rem; margin-top: .2rem; }
.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; max-height: 440px; overflow: auto; }
.transcript li { padding: .72rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(4, 15, 27, .55); }
.transcript strong { color: var(--cyan); }
.transcript time { color: var(--muted); font-size: .72rem; margin-left: .5rem; }
.notice-ready {
  border: 2px solid var(--green); background: rgba(27, 113, 73, .24); border-radius: 14px;
  padding: 1rem; animation: glow 1.6s ease-in-out infinite alternate;
}
@keyframes glow { from { box-shadow: 0 0 0 rgba(85, 227, 155, 0); } to { box-shadow: 0 0 28px rgba(85, 227, 155, .24); } }
canvas { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #020810; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.big-message { min-height: 45vh; display: grid; place-items: center; text-align: center; }
.big-message h1 { font-size: clamp(2rem, 6vw, 4.6rem); }
.big-message p { max-width: 50rem; color: var(--muted); font-size: 1.05rem; }
footer { padding: 1.4rem 0 .2rem; color: #748ca1; text-align: center; font-size: .78rem; }
@media (max-width: 1000px) {
  .dashboard { grid-template-columns: 1fr; }
  .preview-wrap { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 1rem, 1600px); }
  .topbar, .hero { grid-template-columns: 1fr; display: grid; }
  .hero-id { text-align: left; }
  .status-strip { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  button { width: 100%; }
}
