/* Broadcast console look for the studio and the advanced overlay window.
   Graphite chassis, raised keys, tally colors: green = preview, red = program / on air, amber = operator action.
   Readouts (clocks, scores, levels) use a DIN-style face where the system has one. */

.console {
  --bg: #14161b;
  --chassis: #101216;
  --surface: #1b1e25;
  --surface-2: #242831;
  --key: #2a2f39;
  --key-hi: #343a46;
  --border: #2d323d;
  --seam: #0c0e12;
  --text: #e6e8ec;
  --text-2: #b4bac5;
  --muted: #858d9b;
  --pgm: #ff3b3b;
  --pvw: #1fd16a;
  --amber: #ffb224;
  --cue: #4aa3ff;
  --live: #ff3b3b;
  --series-1: #4aa3ff;
  --readout: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.console ::selection { background: rgba(74, 163, 255, 0.35); }
.console .ic { width: 18px; height: 18px; flex: none; }
.console :focus-visible { outline: 2px solid var(--cue); outline-offset: 2px; }

/* ---------- top bar ---------- */
.console .top {
  background: linear-gradient(180deg, #181b21, var(--chassis));
  border-bottom: 1px solid var(--seam);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 10px 18px;
  position: relative;
}
.console .top::after { /* tally rail: lights red on air */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; transition: background 0.3s;
}
.console.onair .top::after { background: var(--pgm); box-shadow: 0 0 14px rgba(255, 59, 59, 0.7); }
.console .ttl { gap: 12px; }
.console .ttl h1 { font-size: 17px; font-weight: 650; letter-spacing: 0; }
.console .brand {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(180deg, #2b303b, #20242c); border: 1px solid var(--key-hi); color: var(--pgm);
}
.console .brand .ic { width: 20px; height: 20px; }
.console .tools { gap: 8px; }
.console .tool-group { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.console .tool-group .ghost { border: 0; border-radius: 0; box-shadow: none; }
.console .tool-group .ghost + .ghost { border-left: 1px solid var(--border); }

/* tally pill: dark lamp off air, lit red on air */
.console .pill.tally {
  height: 28px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border);
  background: #191c22; color: var(--muted); font: 600 13px/1 var(--readout); letter-spacing: 0.06em; text-transform: uppercase;
}
.console .pill.tally::before { width: 8px; height: 8px; background: #3a404c; }
.console .pill.tally.on {
  background: var(--pgm); border-color: #ff6b6b; color: #fff; box-shadow: 0 0 18px rgba(255, 59, 59, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.console .pill.tally.on::before { background: #fff; animation: tally-blink 1.6s ease-in-out infinite; }
@keyframes tally-blink { 50% { opacity: 0.25; } }

/* ---------- keys (buttons) ---------- */
.console .ghost {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--key-hi);
  background: linear-gradient(180deg, #2d323d, var(--key));
  color: var(--text-2); font-weight: 550;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 0 var(--seam);
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.console .ghost:hover { color: var(--text); background: linear-gradient(180deg, #353b47, #2c313b); }
.console .ghost:active { transform: translateY(1px); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.console .ghost:disabled { opacity: 0.4; transform: none; }
.console .ghost.sm { height: 28px; padding: 0 10px; font-size: 13px; gap: 6px; }
.console .ghost.sm .ic { width: 16px; height: 16px; }
.console .ghost.icon-only { width: 34px; padding: 0; justify-content: center; }
.console .ghost.danger { color: #ff9a9a; }
.console .ghost.danger:hover { color: #fff; border-color: rgba(255, 59, 59, 0.6); background: linear-gradient(180deg, #4a2427, #3a1c1f); }
.console .golive {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 8px;
  background: linear-gradient(180deg, #ff5555, #e02a2a); border: 1px solid #ff7070; color: #fff; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 16px rgba(255, 59, 59, 0.25);
}
.console .golive.on { background: linear-gradient(180deg, #2d323d, var(--key)); border-color: var(--pgm); color: #ffb0b0; box-shadow: 0 0 0 1px var(--pgm), 0 0 18px rgba(255, 59, 59, 0.35); }
.console .mute {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--key-hi); background: linear-gradient(180deg, #2d323d, var(--key)); color: var(--text-2);
}
.console .mute .ic { width: 15px; height: 15px; }
.console .mute.on { background: linear-gradient(180deg, #ffc451, var(--amber)); border-color: #ffd27a; color: #1a1300; box-shadow: 0 0 12px rgba(255, 178, 36, 0.4); }
.console .mute.cue.on, .console .src-ctl .mute.on { background: linear-gradient(180deg, #6fb6ff, var(--cue)); border-color: #8fc6ff; color: #04121f; box-shadow: 0 0 12px rgba(74, 163, 255, 0.4); }
.console kbd {
  font: 600 10px/1 var(--readout); color: var(--muted); padding: 2px 4px; border-radius: 3px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.25);
}

/* form controls */
.console input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]), .console select, .console textarea {
  background: #111318; border: 1px solid var(--border); color: var(--text); border-radius: 7px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.console input:focus, .console select:focus, .console textarea:focus { border-color: var(--cue); outline: none; box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.18); }
.console input[type=range] { accent-color: var(--text-2); }
.console input[type=checkbox] { accent-color: var(--pvw); }

/* ---------- studio layout ---------- */
.console .studio.tabbed { padding: 14px 18px 14px; gap: 12px; max-width: none; }
.console .monitors { grid-template-columns: minmax(0, 1fr) 168px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.console .mon { gap: 0; }
.console .mon-h {
  min-height: 0; gap: 10px; padding: 0 0 6px; font-size: 13px;
}
.console .mon-pop { margin-left: auto; width: 28px; height: 26px; padding: 0; display: inline-grid; place-items: center; }
.console .mon-pop .ic { width: 15px; height: 15px; }
.console .mon-pop.on { color: var(--amber); border-color: rgba(255, 178, 36, 0.6); }
.console .mon-name { color: var(--text-2); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console .tag {
  height: 22px; padding: 0 9px; border-radius: 5px; font: 700 12px/22px var(--readout); letter-spacing: 0.1em; color: #fff; border: 0;
}
.console .tag::before { display: none; }
.console .tag.pv { background: var(--pvw); color: #04220f; }
.console .tag.pg { background: var(--pgm); }
.console .mon canvas {
  border-radius: 6px; border: 0;
  box-shadow: 0 0 0 1px var(--seam), 0 0 0 3px #22262e, 0 10px 30px rgba(0, 0, 0, 0.45);
}
.console .mon-pv canvas { box-shadow: 0 0 0 1px var(--seam), 0 0 0 3px var(--pvw), 0 0 22px rgba(31, 209, 106, 0.18), 0 10px 30px rgba(0, 0, 0, 0.45); }
.console .mon-pg canvas { box-shadow: 0 0 0 1px var(--seam), 0 0 0 3px var(--pgm), 0 0 22px rgba(255, 59, 59, 0.2), 0 10px 30px rgba(0, 0, 0, 0.45); }

/* transition module */
.console .switcher {
  justify-content: center; gap: 10px; padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, #1f232b, #181b21); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.console .trs { gap: 5px; }
.console .trs button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 52px; padding: 0;
  border-radius: 7px; border: 1px solid var(--key-hi); background: linear-gradient(180deg, #2d323d, var(--key)); color: var(--muted);
  font-size: 11px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.console .trs button .ic { width: 20px; height: 20px; }
.console .trs button:hover { color: var(--text); }
.console .trs button[aria-checked="true"] {
  color: #1a1300; border-color: #ffd27a; background: linear-gradient(180deg, #ffc451, var(--amber)); box-shadow: 0 0 14px rgba(255, 178, 36, 0.35);
}
.console .switcher .small { color: var(--muted); font-size: 12px; }
.console .take {
  position: relative; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 10px; border: 1px solid #ff7070; color: #fff; font: 700 22px/1 var(--readout); letter-spacing: 0.14em;
  background: radial-gradient(120% 90% at 50% 0%, #ff6a6a, #d61f1f 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 24px rgba(255, 59, 59, 0.45), 0 6px 14px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
}
.console .take kbd { color: rgba(255, 255, 255, 0.75); border-color: rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.18); letter-spacing: 0.05em; }
.console .take:active { transform: translateY(1px); }
.console .take:disabled {
  opacity: 1; color: #6d7482; border-color: var(--key-hi); background: linear-gradient(180deg, #2a2e37, #22252d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.console .take:disabled kbd { color: #5c6370; border-color: var(--border); }

/* scene bus: hardware keys with a tally lamp */
.console .scenes-row { gap: 10px; align-items: center; }
.console .scenes-row h2, .console .ph h2 {
  display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 650; color: var(--text);
}
.console .scenes-row h2 .ic, .console .ph h2 .ic { color: var(--muted); }
.console .scenes { gap: 6px; }
.console .scene {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px 0 12px; min-width: 132px;
  border-radius: 8px; border: 1px solid var(--key-hi); color: var(--text-2); font-weight: 600;
  background: linear-gradient(180deg, #2f3540, #262a33); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 var(--seam);
}
.console .scene svg { width: 26px; height: 16px; opacity: 0.7; }
.console .scene kbd { margin-left: auto; }
.console .scene .lamp {
  position: absolute; left: 10px; right: 10px; top: 4px; height: 3px; border-radius: 2px; background: #3a404c;
}
.console .scene.is-pv { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 var(--seam), 0 0 0 1px var(--pvw); color: var(--text); }
.console .scene.is-pv .lamp { background: var(--pvw); box-shadow: 0 0 8px var(--pvw); }
.console .scene.is-pg { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 var(--seam), 0 0 0 1px var(--pgm); color: #fff; background: linear-gradient(180deg, #3e2a2e, #2f2226); }
.console .scene.is-pg .lamp { background: var(--pgm); box-shadow: 0 0 8px var(--pgm); }
.console .scene.is-pv.is-pg { box-shadow: 0 0 0 1px var(--pgm), 0 0 0 3px var(--pvw); }

/* section tabs */
.console .stabs { padding: 4px; gap: 3px; border-radius: 11px; background: #181b21; border: 1px solid var(--border); }
.console .stabs [role="tab"] { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; color: var(--muted); font-weight: 600; }
.console .stabs [role="tab"]:hover { color: var(--text); }
.console .stabs [role="tab"][aria-selected="true"] {
  color: var(--text); background: linear-gradient(180deg, #333945, #2a2f39); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.console .stabs [role="tab"][aria-selected="true"] .ic { color: var(--amber); }

/* modules (panels) */
.console .panel {
  background: linear-gradient(180deg, #1d2027, #191c22); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.console .ph { padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--seam); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03); }
.console .storage-line { color: var(--muted); }

/* sources */
.console .add-row { gap: 8px; }
.console .add-src { height: 40px; padding: 0 14px; }
.console .add-src .ic { color: var(--amber); }
.console .src { border-radius: 10px; background: #15181d; border: 1px solid var(--border); padding: 8px; }
.console .src .thumb { border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--seam); }
.console .src-t { display: flex; align-items: center; gap: 7px; }
.console .src-t .ic { color: var(--muted); width: 16px; height: 16px; }

/* overlays */
.console .ov { padding: 12px 0; }
.console .ov-h b { display: inline-flex; align-items: center; gap: 8px; }
.console .ov-h b .ic { color: var(--muted); }
.console .switch { background: #343a46; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.console .switch.on { background: var(--pgm); box-shadow: 0 0 10px rgba(255, 59, 59, 0.45); }
.console .ov-adv { border-bottom: 0; padding-top: 16px; }
.console #ovxOpen {
  height: 48px; padding: 0 20px; font-size: 15px; color: var(--text);
  border-color: rgba(255, 178, 36, 0.55); background: linear-gradient(180deg, #3a3222, #2c271c);
}
.console #ovxOpen .ic { color: var(--amber); width: 20px; height: 20px; }

/* audio mixer: LED meters and channel strips */
.console .mixer .ch { padding: 8px 10px; border-radius: 9px; background: #15181d; border: 1px solid var(--border); }
.console .mixer .ch-master { border-color: rgba(255, 178, 36, 0.35); }
.console .ch-h b { display: inline-flex; align-items: center; gap: 8px; }
.console .ch-h b .ic { color: var(--muted); width: 16px; height: 16px; }
.console .meter {
  height: 10px; border-radius: 2px; background: repeating-linear-gradient(90deg, #22262e 0 5px, transparent 5px 7px), #0d0f13;
}
.console .meter i { background: repeating-linear-gradient(90deg, #1fd16a 0 5px, transparent 5px 7px); box-shadow: 0 0 8px rgba(31, 209, 106, 0.35); }
.console .meter i.hot { background: repeating-linear-gradient(90deg, #ffb224 0 5px, transparent 5px 7px); box-shadow: 0 0 8px rgba(255, 178, 36, 0.4); }
.console .meter i.clip { background: repeating-linear-gradient(90deg, #ff3b3b 0 5px, transparent 5px 7px); box-shadow: 0 0 8px rgba(255, 59, 59, 0.5); }
.console .db { font-family: var(--readout); font-variant-numeric: tabular-nums; color: var(--text-2); }

/* output */
.console .enc-box h3 { display: flex; align-items: center; gap: 8px; }
.console .enc-box h3 .ic { color: var(--muted); }

@media (max-width: 1100px) {
  .console .monitors { grid-template-columns: 1fr; }
  .console .switcher { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .console .take { height: 52px; padding: 0 24px; }
}
@media (max-width: 720px) {
  .console .tools .ghost span, .console .stabs [role="tab"] span { display: none; }
  .console .tools .ghost { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) { .console .pill.tally.on::before { animation: none; } }
.console .mute.mon { flex-direction: row; gap: 6px; }

/* ======================================================================================================
   Dashboards, sign-in and the other admin pages (body.console.site): the same broadcast-console look as the
   studio — graphite modules, raised keys, readout numerals, tally colors.
   ====================================================================================================== */
.console.site {
  font-size: 14.5px;
  background:
    radial-gradient(1100px 420px at 50% -180px, rgba(74, 163, 255, 0.07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  min-height: calc(var(--vh, 1vh) * 100);
}
.site h1 { letter-spacing: 0; }

/* ---------- header + jump bar (one sticky block) ---------- */
.site .top { z-index: 30; padding: 10px 22px; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site .top .ttl { display: flex; align-items: center; min-width: 0; }
.site .top .ttl h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site .tools { display: flex; align-items: center; flex-wrap: wrap; }
.site .pill { background: #191c22; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: 12.5px; border-radius: 6px; }
.site .pill.who { gap: 6px; }
.site .pill.who::before { display: none; }
.site .pill.who .ic { width: 15px; height: 15px; color: var(--muted); }
.site .pill.on { color: #c9f7dc; border-color: rgba(31, 209, 106, 0.5); background: #142219; }
.site .pill.on::before { background: var(--pvw); box-shadow: 0 0 8px var(--pvw); }
.site .pill.tally.on { color: #fff; border-color: #ff6b6b; background: var(--pgm); }
.site .pill.tally.on::before { background: #fff; box-shadow: none; }
.site select.ghost { padding-right: 28px; }
.site .tools .seg { margin: 0; }

.site .jump {
  flex: 1 0 100%; order: 10; display: flex; gap: 2px; margin: 8px -22px -10px; padding: 0 16px;
  overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--seam); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  background: rgba(0, 0, 0, 0.12);
}
.site .jump::-webkit-scrollbar { display: none; }
.site .jump a {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; flex: none;
  color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.site .jump a .ic { width: 16px; height: 16px; }
.site .jump a:hover { color: var(--text); }
.site .jump a.on { color: var(--text); }
.site .jump a.on .ic { color: var(--amber); }
.site .jump a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--amber); box-shadow: 0 0 8px rgba(255, 178, 36, 0.6); }

/* ---------- page body ---------- */
.site .dash { max-width: 1320px; padding: 24px 24px 72px; gap: 26px; }
.site .dash > section, .site .group-h { scroll-margin-top: 130px; }
.site .group-h {
  display: flex; align-items: center; gap: 14px; margin: 14px 0 -8px;
  font: 700 12px/1 var(--readout); letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber);
}
.site .group-h:first-child { margin-top: 0; }
.site .group-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 178, 36, 0.35), transparent); }

/* section headings: icon + sentence case, like the studio's modules */
.site .dash > section > h2, .site .ph h2 {
  display: inline-flex; align-items: center; gap: 9px; text-transform: none; letter-spacing: 0;
  font-size: 15px; font-weight: 650; color: var(--text);
}
.site .dash > section > h2 { margin-bottom: 12px; }
.site h2 .ic { width: 18px; height: 18px; color: var(--muted); }
.site .panel { padding: 16px 18px; }
.site .panel .panel { background: #15181d; box-shadow: none; }
.site .ph { flex-wrap: wrap; gap: 10px; }
.site h3 { color: var(--text); }
.site h4 { color: var(--muted); }

/* tiles: lit readouts on graphite modules */
.site .tile {
  background: linear-gradient(180deg, #1d2027, #181b21); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); position: relative; overflow: hidden;
}
.site .tile .k { font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.site .tile .v { font-family: var(--readout); font-size: 30px; font-weight: 600; letter-spacing: 0.01em; color: var(--text); }
.site .tile .v small { font-family: inherit; }
.site .live .tile { background: linear-gradient(180deg, #1f232b, #191c22); }
.site .live .tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cue); opacity: 0.8; }
.site .live .tile:first-child::before { background: var(--pvw); }

/* server meters */
.site .sys-card { background: linear-gradient(180deg, #1d2027, #181b21); border-color: var(--border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); }
.site .sys-h b { font-family: var(--readout); font-weight: 600; letter-spacing: 0.02em; }
.site .sys-bar { background: repeating-linear-gradient(90deg, #22262e 0 5px, transparent 5px 7px), #0d0f13; border-radius: 2px; }

/* live tool cards */
.site .lt-card { background: linear-gradient(180deg, #1d2027, #181b21); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); }
.site .lt-h { font-size: 11.5px; letter-spacing: 0.09em; color: var(--muted); }
.site .lt-v { font-family: var(--readout); letter-spacing: 0.01em; }

/* tables */
.site .tablewrap { border-radius: 8px; }
.site th {
  font-size: 11px; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--seam); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}
.site td { border-bottom-color: rgba(255, 255, 255, 0.045); }
.site tbody tr { transition: background 0.12s; }
.site tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.site td.num { font-family: var(--readout); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.site .tag.on { color: #fff; background: var(--pgm); border-color: #ff7070; }

/* range and view switches: the studio's section tabs */
.site .seg { padding: 3px; gap: 2px; border-radius: 10px; background: #181b21; border: 1px solid var(--border); }
.site .seg button { color: var(--muted); font-weight: 600; }
.site .seg button:hover { color: var(--text); }
.site .seg button[aria-selected="true"] {
  color: var(--text); background: linear-gradient(180deg, #333945, #2a2f39); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* long addresses (webhook URLs) wrap instead of widening the page */
.site code { overflow-wrap: anywhere; }
.site .ghost { white-space: nowrap; }

/* forms */
.site .field, .site label { color: var(--text-2); }
.site .muted { color: var(--muted); }
.site .search { border-radius: 8px; }
.site .bc-err, .site .err { color: #ff9a9a; }
.site .note, .site .warn-box { border-radius: 8px; }
.site .bc-save, .site .num-tabs .ghost.on {
  color: #04121f; border-color: #8fc6ff; background: linear-gradient(180deg, #6fb6ff, var(--cue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 12px rgba(74, 163, 255, 0.25);
}
.site .bc-dialog { background: linear-gradient(180deg, #1d2027, #171a1f); border: 1px solid var(--border); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); }
.site .bc-dialog::backdrop { background: rgba(5, 6, 8, 0.7); }
.site .banner { border-radius: 0; }
.site .num-st { border-radius: 5px; }
.site .usage { background: #0d0f13; }

/* charts */
.site .chart .grid { stroke: rgba(255, 255, 255, 0.05); }
.site .chart .axis { fill: var(--muted); }
.site .map .land { fill: #262a32; stroke: var(--bg); }
.site .map .land:hover { fill: #313641; }

/* ---------- sign-in, setup and message pages ---------- */
.site .login {
  background:
    radial-gradient(700px 380px at 50% 0%, rgba(74, 163, 255, 0.09), transparent 70%),
    radial-gradient(600px 320px at 50% 110%, rgba(255, 59, 59, 0.06), transparent 70%);
}
.site .card {
  position: relative; overflow: hidden; width: min(400px, 100%); padding: 30px 28px 28px; gap: 10px;
  background: linear-gradient(180deg, #1e2128, #171a1f); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.site .card::before { /* tally rail */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--pvw), var(--cue) 50%, var(--pgm));
  opacity: 0.85;
}
.site .brand.lg { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 6px; }
.site .brand.lg .ic { width: 24px; height: 24px; }
.site .card h1 { font-size: 21px; }
.site .card label { color: var(--text-2); font-weight: 550; }
.site .card input { height: 44px; border-radius: 9px; }
.site .card button {
  height: 44px; border-radius: 9px; border: 1px solid #8fc6ff; color: #04121f; font-weight: 700;
  background: linear-gradient(180deg, #6fb6ff, var(--cue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(74, 163, 255, 0.22);
}
.site .card button:hover { filter: brightness(1.06); }
.site .card button:active { transform: translateY(1px); }
.site .card .err { background: rgba(255, 59, 59, 0.12); border: 1px solid rgba(255, 59, 59, 0.3); color: #ffb3b3; }

@media (max-width: 720px) {
  .site .top { padding: 8px 12px; }
  .site .jump { margin: 8px -12px -8px; padding: 0 8px; }
  .site .dash { padding: 16px 12px 56px; }
  .site .tools .seg button { padding: 0 8px; }
}

/* superadmin site settings: logo row */
.site-logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 44px; }
.site-logo-prev { display: flex; align-items: center; flex-basis: 100%; min-height: 40px; overflow: hidden; }
.site-logo-prev img { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; }

/* sign-in captcha and 2-step code pages */
.cap-row { display: flex; align-items: center; gap: 8px; }
.cap-img { display: block; width: 200px; height: 64px; border-radius: 8px; border: 1px solid var(--border); background: #111318; }
.site .card .cap-new {
  width: 44px; height: 44px; margin: 0; padding: 0; display: grid; place-items: center; flex: none; color: var(--text-2); font-weight: 500;
  border: 1px solid var(--key-hi); background: linear-gradient(180deg, #2d323d, var(--key)); box-shadow: none;
}
.site .card .cap-new:hover { color: var(--text); }
.site .card input[name=captcha] { text-transform: uppercase; letter-spacing: 0.2em; font-family: var(--readout); }
.site .card input[name=code] { letter-spacing: 0.3em; font-family: var(--readout); font-size: 20px; text-align: center; }
.card form.two-step { display: flex; flex-direction: column; gap: 10px; }
.card .ok { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(31, 209, 106, 0.1); color: #a8ecc4; font-size: 14px; }
.site .card form.two-step-re { display: flex; justify-content: center; margin: 0; }
.site .card button.link { height: auto; margin: 2px 0 0; padding: 4px; border: 0; background: none; box-shadow: none; color: var(--cue); font-weight: 600; font-size: 13.5px; }
.site .card button.link:hover { text-decoration: underline; }

/* superadmin: crop the logo before upload */
.crop-ov { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 8, 0.75); }
.crop-dlg { display: flex; flex-direction: column; gap: 12px; max-width: calc(calc(var(--vw, 1vw) * 100) - 32px); padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.site .crop-dlg h2 { margin: 0; font-size: 17px; font-weight: 650; color: var(--text); text-transform: none; letter-spacing: 0; }
.crop-stage {
  position: relative; align-self: center; user-select: none; touch-action: none;
  background: repeating-conic-gradient(#2a2e36 0% 25%, #1c1f25 0% 50%) 0 0 / 16px 16px;
}
.crop-stage img { display: block; width: 100%; height: 100%; pointer-events: none; }
.crop-box { position: absolute; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55); outline: 1px dashed #fff; cursor: move; }
.crop-stage { overflow: hidden; }
.crop-box i { position: absolute; width: 14px; height: 14px; border-radius: 3px; background: #fff; border: 1px solid #1c1f25; }
.crop-box i[data-h=nw] { left: -7px; top: -7px; cursor: nwse-resize; }
.crop-box i[data-h=ne] { right: -7px; top: -7px; cursor: nesw-resize; }
.crop-box i[data-h=sw] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.crop-box i[data-h=se] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.crop-size { margin: 0; text-align: center; }
.crop-act { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.crop-act .crop-ok { color: #fff; border-color: rgba(74, 163, 255, 0.6); background: linear-gradient(180deg, #2f6fb8, #255a97); }

/* studio: Mix board button (opens the pop-out desk) */
.mixwin-open { margin-left: auto; }

/* broadcast delay: top bar readout + DUMP, Output tab settings */
.dump {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid #ff7a7a; cursor: pointer;
  background: linear-gradient(180deg, #ff5a5a, #c81e1e); color: #fff; font: 900 13px/1 system-ui, sans-serif; letter-spacing: 0.14em;
  box-shadow: 0 0 12px rgba(255, 59, 59, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.dump:disabled { cursor: default; background: #2a2f39; border-color: var(--border); color: var(--muted); box-shadow: none; }
.dly-bar { display: inline-flex; align-items: center; gap: 6px; }
.dly-read b { font: 700 15px/1 var(--readout); font-variant-numeric: tabular-nums; color: var(--muted); min-width: 44px; text-align: right; }
.dly-bar.m-full .dly-read b { color: #1fd16a; }
.dly-bar.m-building .dly-read b, .dly-bar.m-shrinking .dly-read b, .dly-bar.m-leaving .dly-read b { color: var(--amber); }
.dly-bar.m-ready .dly-read b { color: var(--text-2); }
.dly-set { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.dly-set h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.dly-set h3 .ic { color: var(--muted); }
.dly-set p { margin: 0; }
.dly-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dly-info { font: 600 14px/1.2 var(--readout); color: var(--text-2); }

/* studio: Hot keys tab */
.hk-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px 22px; align-items: start; }
.hk-msg { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: 8px; background: rgba(74, 163, 255, 0.1); border: 1px solid rgba(74, 163, 255, 0.35); color: #cfe6ff; font-size: 13.5px; }
.hk-group h3 { margin: 0 0 6px; font: 600 11.5px/1 var(--readout); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.hk-group table { width: 100%; border-collapse: collapse; }
.hk-group td { padding: 4px 6px; border-bottom: 1px solid #20242c; font-size: 13.5px; color: var(--text-2); }
.hk-group td:nth-child(2) { width: 140px; text-align: right; }
.hk-group td:nth-child(3) { width: 38px; }
.hk-key {
  min-width: 70px; height: 28px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--key-hi); border-bottom-width: 3px; background: linear-gradient(180deg, #343a46, #2a2f39);
  color: var(--text); font: 700 12.5px/1 var(--readout); letter-spacing: 0.04em;
}
.hk-key.none { color: var(--muted); }
.hk-key.rec { border-color: var(--amber); color: var(--amber); animation: tally-blink 1.2s ease-in-out infinite; }

/* studio team: remote studio monitors, Team tab, co-host window */
.mon video.monv { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; background: #000; border-radius: 6px; object-fit: contain; }
.studio.tabbed .mon video.monv { max-height: calc(var(--vh, 1vh) * 38); }
.console .mon-pv video.monv { box-shadow: 0 0 0 1px var(--seam), 0 0 0 3px var(--pvw), 0 0 22px rgba(31, 209, 106, 0.18), 0 10px 30px rgba(0, 0, 0, 0.45); }
.console .mon-pg video.monv { box-shadow: 0 0 0 1px var(--seam), 0 0 0 3px var(--pgm), 0 0 22px rgba(255, 59, 59, 0.2), 0 10px 30px rgba(0, 0, 0, 0.45); }
.mon-h .mon-listen { margin-left: auto; flex-direction: row; gap: 6px; }
.team-panel { display: grid; gap: 18px; }
.team-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.team-sec h3 .ic { width: 16px; height: 16px; color: var(--muted); }
.team-sec p { margin: 6px 0; }
.team-host { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.team-host .field { min-width: 240px; }
.team-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.team-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: #15181d; border: 1px solid var(--border); font-size: 13px; }
.team-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.team-dot.main { background: var(--pgm); }
.team-dot.co { background: var(--pvw); }
.team-tag { margin-left: auto; font-size: 12px; color: var(--text-2, var(--muted)); }
.team-co { display: grid; gap: 8px; }
.co-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 9px; background: #15181d; border: 1px solid var(--border); }
.co-row > b { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 140px; }
.co-row > b .ic { width: 16px; height: 16px; color: var(--muted); }
.co-dev { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.co-dev .ic { width: 14px; height: 14px; }
.co-dev.on { color: var(--text); }
.co-row .mute.air { background: var(--pgm); color: #fff; }
body.co-body { min-height: calc(var(--vh, 1vh) * 100); }
.co-body .co-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 16px; max-width: 1400px; margin: 0 auto; }
.co-body .panel { display: flex; flex-direction: column; gap: 10px; }
.co-btns { display: flex; align-items: center; gap: 12px; }
.co-btns .mute { flex-direction: row; gap: 6px; }
.co-meter { flex: 1; height: 8px; border-radius: 4px; background: #15181d; overflow: hidden; }
.co-meter i { display: block; height: 100%; width: 0; background: var(--pvw); }
@media (max-width: 800px) { .co-body .co-main { grid-template-columns: 1fr; } }
.console .pill.warn { color: #ffb020; border-color: rgba(255, 176, 32, 0.45); }
.console .mute.pgm.on { background: linear-gradient(180deg, #4be38c, var(--pvw)); border-color: #7cf0ad; color: #03210e; box-shadow: 0 0 12px rgba(31, 209, 106, 0.4); }

/* studio scaled to the window (fit.js): viewport sizes from --vh / --vw */
.fit.studio-body { min-height: calc(var(--vh, 1vh) * 100); }
.fit.studio-body:has(.studio.tabbed) { height: calc(var(--vh, 1vh) * 100); }
.fit .studio.tabbed .mon canvas, .fit .studio.tabbed .mon video.monv { max-height: calc(var(--vh, 1vh) * 38); }
.fit.studio-body > .banner { width: min(900px, calc(var(--vw, 1vw) * 100 - 32px)); }

/* recording played on the site */
.vod { max-width: 1280px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.vod-h { display: flex; align-items: center; gap: 12px; }
.vod-h h1 { font-size: 18px; margin: 0; flex: 1; }
.vod-v { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; display: block; }
