:root {
  color-scheme: dark;
  --bg: #080d13;
  --panel: #101923;
  --panel-2: #151f2b;
  --line: #263647;
  --muted: #8ca0b3;
  --text: #edf6ff;
  --cyan: #56d6e9;
  --orange: #ff9b52;
  --red: #ff665f;
  --green: #61d59a;
  --shadow: 0 20px 70px rgba(0, 0, 0, .35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: radial-gradient(circle at 15% -10%, rgba(55, 113, 146, .15), transparent 34rem), var(--bg); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .55rem; font-size: clamp(2rem, 4vw, 3.65rem); letter-spacing: -.045em; line-height: 1; }
h2 { margin-bottom: .25rem; font-size: 1.25rem; }
.muted { color: var(--muted); line-height: 1.55; }
.eyebrow { margin-bottom: .65rem; color: var(--cyan); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.fineprint { color: #71869a; font-size: .74rem; }
.center { text-align: center; }
.status-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(97, 213, 154, .75); }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

.button { display: inline-flex; min-height: 2.7rem; align-items: center; justify-content: center; gap: .55rem; border: 1px solid transparent; border-radius: .45rem; padding: .65rem 1rem; color: var(--text); background: var(--panel-2); cursor: pointer; font-weight: 750; transition: transform .15s, border-color .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, .icon-button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.button.primary { color: #081014; background: linear-gradient(135deg, #75e4ef, #42bcd3); box-shadow: 0 10px 30px rgba(55, 191, 213, .18); }
.button.ghost { border-color: var(--line); background: transparent; }
.button.danger { border-color: rgba(255, 102, 95, .45); color: #ffb1ac; background: rgba(255, 102, 95, .08); }
.button.small { min-height: 2.15rem; padding: .4rem .75rem; font-size: .78rem; }
.button:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.stack { display: grid; gap: 1.15rem; }
label, legend { color: #c6d4df; font-size: .78rem; font-weight: 700; }
label input { margin-top: .45rem; }
input { width: 100%; min-height: 3rem; border: 1px solid var(--line); border-radius: .45rem; padding: .75rem .85rem; color: var(--text); background: #09111a; }
input::placeholder { color: #526577; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .6rem; }
.label-hint { float: right; color: #667c90; font-size: .68rem; font-weight: 500; }
.input-affix { position: relative; }
.input-affix > span { position: absolute; top: 50%; left: .85rem; color: var(--cyan); transform: translateY(-50%); }
.input-affix input { margin: 0; padding-left: 2rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 2rem; overflow: hidden; }
.login-body::before { position: fixed; inset: 0; z-index: -1; content: ""; opacity: .22; background-image: linear-gradient(rgba(82, 129, 160, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(82, 129, 160, .08) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 90%); }
.login-shell { display: grid; grid-template-columns: 1.08fr .92fr; width: min(960px, 100%); min-height: 560px; overflow: hidden; border: 1px solid var(--line); border-radius: .9rem; background: rgba(12, 19, 27, .92); box-shadow: var(--shadow); }
.brand-panel { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(2.5rem, 7vw, 5rem); overflow: hidden; background: linear-gradient(145deg, rgba(17, 43, 58, .95), rgba(9, 18, 28, .96)); }
.brand-panel::after { position: absolute; width: 430px; height: 430px; right: -220px; bottom: -220px; border: 1px solid rgba(86, 214, 233, .18); border-radius: 50%; box-shadow: 0 0 0 55px rgba(86,214,233,.025), 0 0 0 110px rgba(86,214,233,.018); content: ""; }
.brand-panel h1 { font-size: clamp(3.2rem, 7vw, 5rem); }
.lede { max-width: 22rem; color: #a8bbca; font-size: 1.05rem; line-height: 1.6; }
.brand-mark { display: flex; align-items: end; gap: .32rem; height: 2.3rem; margin-bottom: 1.7rem; }
.brand-mark span { width: .5rem; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 18px rgba(86,214,233,.35); }
.brand-mark span:nth-child(1) { height: 1rem; }.brand-mark span:nth-child(2) { height: 2rem; }.brand-mark span:nth-child(3) { height: 1.45rem; }
.login-card { display: flex; flex-direction: column; justify-content: center; gap: 1.6rem; padding: clamp(2rem, 6vw, 4.2rem); }
.login-card h2 { font-size: 1.8rem; }

.topbar, .playbar { position: sticky; top: 0; z-index: 20; display: flex; min-height: 4.25rem; align-items: center; gap: 1rem; border-bottom: 1px solid rgba(38, 54, 71, .8); padding: 0 max(1rem, calc((100vw - 1180px) / 2)); background: rgba(8, 13, 19, .9); backdrop-filter: blur(18px); }
.wordmark { margin-right: auto; letter-spacing: .1em; font-size: .92rem; font-weight: 900; }.wordmark b { color: var(--cyan); }.mini-mark { margin-right: .35rem; color: var(--orange); }
.crew-chip { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .65rem; font-size: .75rem; }.crew-chip small { color: var(--muted); text-transform: uppercase; }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 4rem 0 6rem; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.4rem; }.hero > div:first-child { max-width: 700px; }
.system-state { display: flex; min-width: 180px; align-items: center; gap: .8rem; border-left: 1px solid var(--line); padding: .5rem 0 .5rem 1.2rem; }.system-state div { display: grid; }.system-state small { color: var(--muted); font-size: .6rem; letter-spacing: .1em; }.system-state strong { margin-top: .15rem; font-size: .9rem; }
.alert { margin: 1rem 0; border: 1px solid; border-radius: .45rem; padding: .85rem 1rem; font-size: .85rem; }.alert.error { border-color: rgba(255,102,95,.4); color: #ffc1bd; background: rgba(255,102,95,.08); }.alert.success { border-color: rgba(97,213,154,.35); color: #aef2cf; background: rgba(97,213,154,.08); }
.active-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; border: 1px solid rgba(86,214,233,.35); border-radius: .65rem; padding: 1rem 1.2rem; background: rgba(86,214,233,.055); }.active-strip p { margin: 0 0 .25rem; }.active-strip strong { margin-right: .75rem; }.active-strip span { color: var(--muted); font-size: .8rem; }
.dashboard-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 1.25rem; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: .65rem; padding: clamp(1.2rem, 3vw, 1.8rem); background: linear-gradient(145deg, rgba(19, 29, 40, .96), rgba(12, 19, 27, .96)); box-shadow: 0 14px 45px rgba(0,0,0,.18); }
.panel-heading { display: flex; gap: .85rem; margin-bottom: 1.5rem; }.panel-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }.step { display: grid; flex: 0 0 2rem; height: 2rem; place-items: center; border: 1px solid rgba(86,214,233,.35); border-radius: .35rem; color: var(--cyan); font: 700 .7rem ui-monospace, monospace; background: rgba(86,214,233,.05); }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.profile-card input { position: absolute; opacity: 0; pointer-events: none; }.profile-card span { display: grid; min-height: 5.5rem; align-content: center; border: 1px solid var(--line); border-radius: .45rem; padding: .65rem; cursor: pointer; background: #0b131c; transition: border-color .15s, background .15s; }.profile-card b { color: var(--text); font-size: .75rem; }.profile-card small { margin-top: .2rem; color: var(--cyan); font-size: .66rem; font-weight: 600; }.profile-card em { margin-top: .45rem; color: var(--muted); font-size: .62rem; font-style: normal; }.profile-card input:checked + span { border-color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(86,214,233,.35); background: rgba(42, 99, 112, .15); }.profile-card input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.launch { width: 100%; margin-top: .25rem; }
.save-list { display: grid; gap: .55rem; }.save-row { display: flex; min-height: 4.6rem; align-items: center; justify-content: space-between; gap: .8rem; border: 1px solid var(--line); border-radius: .45rem; padding: .75rem; background: #0b131c; }.save-row > div:first-child { display: grid; gap: .35rem; min-width: 0; }.save-row small { color: var(--muted); font-size: .65rem; }.save-id { color: #cde7f3; font: 750 .84rem ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }.row-actions { display: flex; align-items: center; gap: .45rem; }.icon-button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: .72rem; }.active-label { border-radius: 999px; padding: .28rem .5rem; color: #aef2cf; background: rgba(97,213,154,.1); font-size: .66rem; }
.empty-state { display: grid; min-height: 260px; place-items: center; align-content: center; text-align: center; border: 1px dashed var(--line); border-radius: .45rem; padding: 2rem; }.empty-state > span { margin-bottom: .8rem; color: var(--cyan); font-size: 2rem; }.empty-state h3 { margin-bottom: .4rem; }.empty-state p { max-width: 290px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.admin-panel { margin-top: 1.25rem; }.table-wrap { overflow-x: auto; }table { width: 100%; border-collapse: collapse; font-size: .78rem; }th, td { border-bottom: 1px solid var(--line); padding: .75rem .6rem; text-align: left; }th { color: var(--muted); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }.align-right { text-align: right; }.align-right form { display: inline; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 1.5rem; padding: .65rem 1rem; border: 1px solid var(--line); border-radius: .4rem; color: var(--text); background: #17232e; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 1rem); transition: .2s; pointer-events: none; font-size: .8rem; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

.play-body { height: 100vh; overflow: hidden; background: #030507; }
.playbar { position: relative; min-height: 3.6rem; padding: 0 1rem; }
.play-meta { display: flex; align-items: center; gap: .55rem; font-size: .75rem; }
.play-meta small { color: var(--muted); }
.playbar-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.text-copy { border: 0; padding: 0; color: var(--cyan); background: transparent; cursor: pointer; font: 750 .74rem ui-monospace, monospace; letter-spacing: .06em; }
.stream-stage { position: relative; height: calc(100vh - 3.6rem); background: #000; }.stream-stage iframe { width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .3s; }.stream-stage iframe.ready { opacity: 1; }.boot-screen { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; text-align: center; background: radial-gradient(circle, #102431, #05090d 55%); transition: opacity .3s; }.boot-screen.hidden { opacity: 0; pointer-events: none; }.boot-screen h1 { font-size: clamp(1.8rem, 5vw, 3rem); }.boot-screen > p:last-child { color: var(--muted); }.orbit { position: relative; width: 4rem; height: 4rem; margin-bottom: 2rem; border: 1px solid rgba(86,214,233,.2); border-radius: 50%; animation: spin 3s linear infinite; }.orbit i { position: absolute; width: .45rem; height: .45rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }.orbit i:nth-child(1) { left: 50%; top: -.22rem; }.orbit i:nth-child(2) { right: .25rem; bottom: .25rem; background: var(--orange); }.orbit i:nth-child(3) { left: -.1rem; bottom: 1.1rem; width: .25rem; height: .25rem; }@keyframes spin { to { transform: rotate(360deg); } }

:fullscreen .playbar, body:fullscreen .playbar { display: none !important; }
:fullscreen .stream-stage, body:fullscreen .stream-stage, .stream-stage:fullscreen { height: 100vh !important; width: 100vw !important; }
.floating-fullscreen-btn { display: none; position: absolute; top: 1rem; right: 1rem; z-index: 50; padding: .45rem .85rem; border: 1px solid rgba(86,214,233,.4); border-radius: .4rem; color: #fff; background: rgba(8,13,19,.85); backdrop-filter: blur(10px); font: 600 .75rem inherit; cursor: pointer; opacity: 0; transition: opacity .2s ease; }
:fullscreen .floating-fullscreen-btn, body:fullscreen .floating-fullscreen-btn, .stream-stage:fullscreen .floating-fullscreen-btn { display: block; }
.stream-stage:hover .floating-fullscreen-btn { opacity: 1; }


@media (max-width: 800px) {
  .login-shell, .dashboard-grid { grid-template-columns: 1fr; }.brand-panel { display: none; }.login-shell { max-width: 460px; min-height: auto; }.login-card { min-height: 520px; }
  .hero { align-items: start; flex-direction: column; }.system-state { border-left: 0; padding-left: 0; }.profile-grid { grid-template-columns: 1fr; }.profile-card span { min-height: 4.5rem; }.profile-card em { margin-top: .25rem; }
  .crew-chip small { display: none; }.topbar { padding: 0 1rem; }.page-shell { padding-top: 2.5rem; }
  .play-meta small { display: none; }
}
@media (max-width: 520px) {
  .login-body { padding: 0; }.login-shell { min-height: 100vh; border: 0; border-radius: 0; }.login-card { padding: 2rem 1.25rem; }
  .topbar .crew-chip { display: none; }.save-row { align-items: flex-start; flex-direction: column; }.row-actions { width: 100%; justify-content: flex-end; }
  .active-strip { align-items: stretch; flex-direction: column; }.playbar .wordmark b { display: none; }.play-meta { margin-left: auto; }.playbar .wordmark { margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
