/* SHIFT TV Panel — control-room theme v2
   One stylesheet for every page. Dark, high-contrast, made for a 1920×1080 monitor first.
   Status colours keep their meaning: red = PROGRAM / REC / error / late, green = PREVIEW / ok / in sync,
   amber = warning, grey = off. Red is never used for decoration or for normal buttons. */

:root {
  --bg: #0b0d10;        /* page */
  --card: #14171c;      /* cards, panels */
  --card2: #1a1e24;     /* raised areas inside cards, table headers */
  --field: #0f1216;     /* inputs */
  --line: #2a3038;      /* borders */
  --line2: #20252c;     /* inner dividers */
  --ink: #e8ebef;       /* main text */
  --muted: #9aa4b0;     /* secondary text (≥ 7:1 on --card) */
  --dim: #6c7682;       /* labels of minor importance */
  --accent: #3d8ef0;    /* links, primary buttons, focus */
  --accent2: #2f77d0;
  --pgm: #ff2433;       /* PROGRAM, REC, error, late */
  --pvw: #22c46b;       /* PREVIEW, ok, in sync */
  --warn: #f5a524;      /* warning */
  --off: #5d6672;       /* off, idle */
  --ok: var(--pvw); --err: var(--pgm); --red: var(--pgm); --blue: var(--accent); --link: #6fb0ff;
  --nav: #07080a;
  --radius: 6px;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: #2f77d055; }

/* ───────────── top navigation ───────────── */
.nav { background: var(--nav); display: flex; align-items: stretch; height: 52px; padding: 0 16px; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #1c2026; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; padding-right: 18px; margin-right: 8px; border-right: 1px solid #1f242b; }
.brand:hover { text-decoration: none; }
.brand svg { height: 26px; width: auto; display: block; }
.brand .tv { color: var(--pgm); margin-left: 3px; }
.brand .sub { font-weight: 600; color: var(--dim); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.menu { display: flex; align-items: stretch; margin: 0; padding: 0; list-style: none; }
.menu > li { position: relative; }
.menu > li > a { display: flex; align-items: center; height: 52px; padding: 0 13px; color: #c3cad3; font-weight: 500; font-size: 13.5px; }
.menu > li > a:hover, .menu > li:hover > a { color: #fff; background: #12151a; text-decoration: none; }
.menu > li.on > a { color: #fff; box-shadow: inset 0 -2px 0 #fff; }
.menu .drop { display: none; position: absolute; top: 52px; left: 0; min-width: 250px; background: #161a20; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.55); padding: 6px 0; }
.menu > li:hover .drop { display: block; }
.menu .drop a { display: block; padding: 8px 16px; color: var(--ink); font-size: 13.5px; }
.menu .drop a:hover { background: #20262e; text-decoration: none; }
.menu .drop .sep { border-top: 1px solid var(--line2); margin: 6px 0; }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav .right .menu .drop { left: auto; right: 0; }
.nav .user { color: #c3cad3; }
.menu li.create > a { color: #fff; }
.menu li.create > a::before { content: "+"; display: inline-flex; width: 20px; height: 20px; border-radius: 4px; background: var(--accent); align-items: center; justify-content: center; margin-right: 8px; font-weight: 700; }

/* ───────────── page frame ───────────── */
.wrap { max-width: 1880px; margin: 0 auto; padding: 20px 24px 40px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.layout.full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr); } }
footer { text-align: center; color: var(--dim); padding: 18px; font-size: 12px; }

/* page header (new) and the old blue band, now a plain header */
.pagehead, .band { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 56px; padding: 0 0 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); background: none; color: var(--ink); border-radius: 0; }
.pagehead h1, .band h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; white-space: nowrap; }
.ph-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ph-sub, .band-sub { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-left: 0; opacity: 1; }
.band h1 .band-sub { margin-left: 10px; }
.ph-actions, .band .links { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
.band .links a { color: var(--link); }
.back { color: var(--muted); font-size: 13px; }
.band .sel { background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; width: auto; min-width: 220px; max-width: 340px; flex: 0 0 auto; font: inherit; }
.band-tabs { display: flex; gap: 2px; padding: 0; margin: -18px 0 18px; border-bottom: 1px solid var(--line); background: none; }
.band-tabs a { padding: 11px 16px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.band-tabs a.on { border-bottom-color: #fff; color: #fff; }
.band-tabs a:hover { text-decoration: none; color: #fff; }
.crumbs { font-size: 13px; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line2); }
.crumbs a { color: var(--muted); }

/* ───────────── cards & panels ───────────── */
.card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.card { padding: 16px 18px; }
.card h2, .panel-head h2, .sect { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; padding: 0; border: 0; }
.card h1 { font-size: 20px; margin: 0 0 12px; }
.card h2 + h2 { margin-top: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.panel-head h2 { margin: 0; }
.panel-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-head.blue { background: none; color: var(--ink); }
.panel-head.blue a { color: var(--link); }
.panel-body { padding: 16px; }
.panel-body.flush { padding: 0; }
.panel.settings { border-radius: var(--radius); }
.help .panel-body { color: var(--muted); font-size: 13px; }
.help ul { padding-left: 18px; margin: 6px 0; }
.help li { margin: 4px 0; }
.band + .card, .band-tabs + .card, .band + .panel, .band + .toolbar { margin-top: 0; }

/* ───────────── buttons ───────────── */
.btn, button { font: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--accent2); background: var(--accent); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1.2; min-height: 36px; transition: background .12s, border-color .12s; }
.btn:hover, button:hover { background: var(--accent2); text-decoration: none; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: default; }
.btn.ghost, button.ghost { background: #1d222a; color: var(--ink); border-color: #323944; }
.btn.ghost:hover, button.ghost:hover { background: #262c35; border-color: #3d4551; }
.btn.red, button.red { background: var(--pgm); border-color: var(--pgm); color: #fff; }
.btn.red:hover, button.red:hover { background: #e01522; }
.btn.green, button.green { background: #16a35a; border-color: #16a35a; color: #fff; }
.btn.green:hover, button.green:hover { background: #128a4c; }
.btn.warn, button.warn { background: transparent; color: var(--warn); border-color: #7a5512; }
.btn.warn:hover, button.warn:hover { background: #2a2010; }
.btn.danger, button.danger { background: transparent; color: #ff6b74; border-color: #6e1f25; }
.btn.danger:hover, button.danger:hover { background: #2a1214; }
.btn.sm, button.sm { padding: 5px 10px; font-size: 12.5px; min-height: 30px; }
.btn.lg, button.lg { padding: 12px 20px; font-size: 15px; min-height: 48px; }
button.xl { padding: 16px 28px; font-size: 19px; font-weight: 700; min-height: 60px; white-space: nowrap; }
/* Send SHIFT destination, right under the camera picture */
.shiftdest { display: flex; align-items: center; gap: 20px; margin-top: 12px; border: 1px solid var(--accent2); }
.shiftdest .sd-text { flex: 1 1 auto; min-width: 0; }
.shiftdest h2 { margin: 0 0 4px; }
.shiftdest p { margin: 0; color: var(--muted); font-size: 13.5px; }
.shiftdest.needed { border: 2px solid var(--accent); box-shadow: 0 0 0 4px #3d8ef026; }
.shiftdest.needed h2 { font-size: 20px; color: #fff; }
@media (max-width: 700px) { .shiftdest { flex-direction: column; align-items: stretch; } .shiftdest button.xl { width: 100%; } }
button.link { background: none; border: 0; padding: 0; color: var(--link); font-weight: 500; min-height: 0; }
button.link:hover { background: none; text-decoration: underline; }
button.link.del { color: #ff6b74; }
form.inline { display: inline; }
.btnbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.btnbar:empty { display: none; }
.seg { display: inline-flex; border: 1px solid #323944; border-radius: var(--radius); overflow: hidden; }
.seg > button { border-radius: 0; border: 0; border-right: 1px solid #323944; min-height: 44px; }
.seg > button:last-child { border-right: 0; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(255,255,255,.35); margin-left: 6px; }

/* ───────────── forms ───────────── */
label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: 12.5px; color: var(--muted); }
label.check, .toggles label { font-weight: 500; display: flex; gap: 8px; align-items: center; color: var(--ink); margin: 0; font-size: 13.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); color: var(--ink); width: 100%; min-height: 38px; }
input::placeholder, textarea::placeholder { color: #59626d; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #3d8ef033; }
select:disabled { opacity: .5; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 26px; margin: 0; }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 520px; white-space: pre; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.breakform { display: inline-flex; gap: 6px; align-items: center; }
.breakform input { width: 76px; padding: 5px 7px; }
.narrow { max-width: 420px; margin: 80px auto; }
pre.snippet { background: #07080a; color: #d5dae0; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); overflow: auto; font-size: 12.5px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.toolbar label { margin: 0; }
.page-actions { display: flex; gap: 8px; justify-content: flex-end; margin: -6px 0 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

/* ───────────── tables ───────────── */
table { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); background: var(--card2); border-bottom: 1px solid var(--line); padding: 9px 12px; white-space: nowrap; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.data tr:hover td { background: #181c22; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.kv td { padding: 7px 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
table.kv td:first-child { color: var(--muted); width: 38%; white-space: nowrap; }
table.kv tr:last-child td { border-bottom: 0; }
div.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; }
div.kv > div:nth-child(odd) { color: var(--muted); }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line2); }
td.acts { white-space: nowrap; text-align: right; }
td.acts a { text-decoration: none; margin-right: 8px; }
tr.total td { background: var(--card2); font-weight: 600; }
.srtstats th { font-size: 11px; white-space: normal; vertical-align: bottom; }
.srtstats tr.grp th { border-bottom: 0; padding-bottom: 0; }

/* ───────────── status ───────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; border: 1px solid transparent; white-space: nowrap; line-height: 1.5; }
.b-ok   { background: #0f2c1c; color: #4ade8a; border-color: #1c5434; }
.b-err  { background: #3a0d12; color: #ff6b74; border-color: #6e1f25; }
.b-warn { background: #33240a; color: #ffc15a; border-color: #6a4b14; }
.b-grey { background: #1e232a; color: var(--muted); border-color: #2d343d; }
.b-blue { background: #0f2340; color: #8cc2ff; border-color: #1f4170; }
.b-solid-pgm { background: var(--pgm); color: #fff; border-color: var(--pgm); }
.b-solid-pvw { background: var(--pvw); color: #04140b; border-color: var(--pvw); }
.ic { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #0b0d10; vertical-align: middle; }
.ic.ok { background: var(--pvw); } .ic.err { background: var(--pgm); color: #fff; } .ic.warn { background: var(--warn); } .ic.grey { background: var(--off); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--off); vertical-align: middle; }
.dot.ok { background: var(--pvw); box-shadow: 0 0 0 3px #22c46b22; } .dot.err { background: var(--pgm); box-shadow: 0 0 0 3px #ff243322; } .dot.warn { background: var(--warn); }
.bar { height: 7px; background: #232931; border-radius: 4px; overflow: hidden; width: 120px; margin: 3px 0; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.bar.ram > span { background: var(--pvw); }
.bar.hot > span { background: var(--pgm); }
.bar.share { display: inline-block; width: 70%; vertical-align: middle; margin-right: 6px; }
.lvl-error { color: #ff6b74; font-weight: 600; } .lvl-warn { color: #ffc15a; } .lvl-info { color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .dimmed { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.stats { display: flex; gap: 0; }
.stats > div { flex: 1; padding: 16px 18px; border-right: 1px solid var(--line2); }
.stats > div:last-child { border-right: 0; }
.stats .v, .stat { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* messages */
.flash { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; }
.flash.ok { background: #0f2c1c; color: #8ff0b6; border-color: #1c5434; }
.flash.err { background: #3a0d12; color: #ffb3b8; border-color: #6e1f25; }
.flash.info { background: #0f2340; color: #b9d8ff; border-color: #1f4170; }

/* charts & reports */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #232931; stroke-width: 1; }
.chart .axis { fill: var(--dim); font-size: 11px; }
.chart .in { fill: none; stroke: var(--pgm); stroke-width: 2; }
.chart .in-a { fill: rgba(255,36,51,.10); stroke: none; }
.chart .out { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }
.chart rect.bar { fill: #4a7fc0; }
/* connected viewers / bandwidth (WMSPanel-style realtime and day charts) */
.chart .conn { fill: none; stroke: #a9bcd0; stroke-width: 2; }
.chart .conn-a { fill: #a9bcd0; fill-opacity: .08; stroke: none; }
.chart .bw { fill: none; stroke: var(--pgm); stroke-width: 2; stroke-dasharray: 2 3; }
.chart .axis.bw-t { fill: #ff8a93; }
.chart .traffic { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .traffic-a { fill: var(--accent); fill-opacity: .14; stroke: none; }
.rtabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.rtabs a { padding: 10px 14px; color: var(--muted); font-size: 13.5px; font-weight: 600; border-bottom: 2px solid transparent; text-decoration: none; }
.rtabs a:hover { color: #fff; }
.rtabs a.on { color: #fff; border-bottom-color: #fff; }
.seg-links { display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius); overflow: hidden; vertical-align: middle; }
.seg-links a { padding: 5px 12px; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; border-right: 1px solid rgba(255,255,255,.35); }
.seg-links a:last-child { border-right: 0; }
.seg-links a.on { background: #fff; color: #0b0d10; }
.legend { display: flex; gap: 18px; justify-content: center; font-size: 12px; color: var(--muted); padding-bottom: 8px; }
.legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }
.pie { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: center; }
.pie-legend { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.pie-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.replinks { margin-left: auto; }
a.b { font-weight: 700; text-decoration: underline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
details.clients { position: relative; display: inline-block; }
details.clients summary { cursor: pointer; color: var(--link); }
details.clients > div { text-align: left; position: absolute; right: 0; top: 1.5em; min-width: 260px; white-space: nowrap; z-index: 5; background: #161a20; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.5); padding: 8px 10px; border-radius: var(--radius); max-height: 260px; overflow: auto; }

/* settings with vertical tabs */
.settings-body { display: flex; gap: 0; align-items: stretch; }
.vtabs { flex: 0 0 210px; border-right: 1px solid var(--line2); padding: 10px 0; }
.vtabs a { display: block; padding: 9px 16px; color: var(--ink); font-size: 13.5px; border-left: 2px solid transparent; }
.vtabs a small { display: block; color: var(--dim); font-size: 11px; }
.vtabs a.on { background: #1b2027; border-left-color: #fff; }
.vtabs a.on small { color: var(--muted); }
.vtabs a:hover:not(.on) { background: #171b21; text-decoration: none; }
.vtabs .sep { border-top: 1px solid var(--line2); margin: 8px 0; }
.settings-main { flex: 1; min-width: 0; padding: 16px 18px; overflow-x: auto; }

/* ════════════════ MOBILE CAMERA (one phone) ════════════════ */
.cam-head .ph-title h1 { font-size: 26px; }
.cam-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 18px; align-items: start; }
@media (max-width: 1280px) { .cam-grid { grid-template-columns: minmax(0, 1fr); } }

/* monitor */
.monitor { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; outline: 6px solid #232931; outline-offset: -6px; }
.monitor.t-program { outline-color: var(--pgm); }
.monitor.t-preview { outline-color: var(--pvw); }
.monitor img { width: 100%; height: 100%; object-fit: contain; display: block; }
.monitor .nopic { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; color: var(--dim); font-size: 15px; }
.osd { position: absolute; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.osd.tl { left: 16px; top: 16px; } .osd.tr { right: 16px; top: 16px; justify-content: flex-end; }
.osd.bl { left: 16px; bottom: 16px; } .osd.br { right: 16px; bottom: 16px; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 4px; background: rgba(7,8,10,.78); color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(4px); }
.chip.pgm { background: var(--pgm); } .chip.pvw { background: var(--pvw); color: #04140b; }
.chip.rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pgm); }
.chip.warn { color: #ffc15a; } .chip.err { color: #ff8c93; }
.chip.big { font-size: 15px; padding: 6px 12px; letter-spacing: .06em; }
.umd { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card2); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); margin-top: -6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.umd strong { color: var(--ink); font-size: 14px; }

/* status tiles under the picture */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.tile.err { border-color: #6e1f25; } .tile.warn { border-color: #6a4b14; }
.tile h3 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tile h3 .badge { margin-left: auto; letter-spacing: .03em; }
.tile .big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile .big small { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.tile .sub b { color: var(--ink); font-weight: 600; }
.meter { display: grid; grid-template-columns: 16px 1fr 34px; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.meter .track { height: 8px; background: #232931; border-radius: 4px; overflow: hidden; }
.meter .track > span { display: block; height: 100%; background: var(--pvw); }
.sndx { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sndx b { color: var(--ink); font-weight: 600; }
.events { margin-top: 14px; }
.events table td { padding: 5px 10px; font-size: 12.5px; }

/* on-air controls (top of the right column) */
.onair { padding: 0; }
.card .onair-title { padding: 16px 18px 2px; margin: 0; color: var(--ink); }
.onair-row { display: flex; flex-direction: column; }
.onair-row > .grp { padding: 12px 18px; border-bottom: 1px solid var(--line2); }
.grp .sect { margin-bottom: 8px; }
.grp .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.grp .btns button { min-height: 44px; min-width: 64px; }
.grp .btns > button { flex: 1 1 0; }
.msgform { display: grid; grid-template-columns: 1fr 70px auto; gap: 8px; padding: 12px 18px 16px; align-items: end; }
.msgform label { margin-top: 0; }

/* live block: picture left, status tiles right */
.live { display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: "m t" "u t" "e t"; grid-template-rows: auto auto 1fr; gap: 0 12px; align-items: start; }
.live > .monitor { grid-area: m; } .live > .umd { grid-area: u; } .live > .tiles { grid-area: t; grid-template-columns: 1fr; margin-top: 0; gap: 8px; } .live > .events { grid-area: e; }
.live > .tiles .tile { padding: 10px 12px; }
.live > .tiles .tile .big { font-size: 19px; }
@media (max-width: 1600px) { .live { grid-template-columns: minmax(0, 1fr); grid-template-areas: "m" "u" "t" "e"; } .live > .tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 14px; } }

/* right column: quick camera & sound controls */
.ctl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-bottom: 14px; }
.ctl label { margin: 0; grid-column: 1 / -1; display: flex; justify-content: space-between; }
.ctl label .mono { color: var(--ink); }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); margin: 4px 0 14px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; max-width: 240px; aspect-ratio: 16/9; }
.pad button { min-height: 0; padding: 0; font-size: 15px; background: #1d222a; border-color: #323944; color: var(--muted); }
.pad button:hover { background: #2a313b; color: #fff; }
.lenses { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.side-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* set-up area: tabs without JavaScript */
.setup { margin-top: 22px; }
.setup > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabbar label { margin: 0; padding: 12px 16px; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.tabbar label:hover { color: #fff; }
.tabpanels > section { display: none; padding: 18px 0 0; }
#tab-manual:checked ~ .tabbar label[for=tab-manual], #tab-source:checked ~ .tabbar label[for=tab-source],
#tab-encoder:checked ~ .tabbar label[for=tab-encoder], #tab-audio:checked ~ .tabbar label[for=tab-audio],
#tab-graphics:checked ~ .tabbar label[for=tab-graphics], #tab-dest:checked ~ .tabbar label[for=tab-dest],
#tab-rec:checked ~ .tabbar label[for=tab-rec], #tab-log:checked ~ .tabbar label[for=tab-log],
#tab-device:checked ~ .tabbar label[for=tab-device] { color: #fff; border-bottom-color: #fff; }
#tab-manual:checked ~ .tabpanels .tp-manual, #tab-source:checked ~ .tabpanels .tp-source,
#tab-encoder:checked ~ .tabpanels .tp-encoder, #tab-audio:checked ~ .tabpanels .tp-audio,
#tab-graphics:checked ~ .tabpanels .tp-graphics, #tab-dest:checked ~ .tabpanels .tp-dest,
#tab-rec:checked ~ .tabpanels .tp-rec, #tab-log:checked ~ .tabpanels .tp-log,
#tab-device:checked ~ .tabpanels .tp-device { display: block; }
.setup > input[type=radio]:focus-visible + * { outline: none; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .cols2, .cols3 { grid-template-columns: minmax(0, 1fr); } }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; align-items: end; }
.fields .wide { grid-column: span 2; }
.fields .full { grid-column: 1 / -1; }

/* ════════════════ PRODUCTION (multiviewer) ════════════════ */
.wrap:has(.prod-page) { max-width: none; padding: 14px 18px 30px; }
.prod-head { margin-bottom: 12px; padding-bottom: 12px; }
.talkbar { display: grid; grid-template-columns: auto minmax(0, 1fr) 220px 220px; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.talk-all { background: #1d222a; border: 2px solid var(--pgm); color: #fff; font-size: 16px; min-height: 56px; padding: 10px 22px; }
.talk-all:hover { background: #2a1214; }
.talk-all:active, .talk-all.on { background: var(--pgm); }
.talkbar label { margin: 0 0 4px; }
.talkbar .vol label { display: flex; justify-content: space-between; }
@media (max-width: 1200px) { .talkbar { grid-template-columns: 1fr 1fr; } .talk-all { grid-column: 1 / -1; } }

.mv { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 10px; }
.mv-tile { background: #000; border-radius: var(--radius); overflow: hidden; position: relative; outline: 6px solid #232931; outline-offset: -6px; }
.mv-tile.t-program { outline-color: var(--pgm); }
.mv-tile.t-preview { outline-color: var(--pvw); }
.mv-tile.offline { opacity: .75; }
.mv-pic { display: block; aspect-ratio: 16/9; position: relative; background: #050607; }
.mv-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mv-pic .nopic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 15px; }
.mv-pic:hover { text-decoration: none; }
.mv-umd { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #15191e; min-height: 52px; }
.t-program .mv-umd { background: var(--pgm); }
.t-preview .mv-umd { background: var(--pvw); }
.mv-umd .name { font-size: 17px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-preview .mv-umd .name { color: #04140b; }
.mv-umd .op { font-size: 13px; color: rgba(255,255,255,.75); white-space: nowrap; }
.t-preview .mv-umd .op { color: rgba(4,20,11,.75); }
.mv-umd .acts { margin-left: auto; display: flex; gap: 6px; }
.mv-umd .acts button { min-height: 36px; background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.25); color: #fff; }
.mv-umd .acts button:hover { background: rgba(0,0,0,.6); }
.mv-umd .acts button.rec { border-color: var(--pgm); }
.mv-umd .acts button.rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pgm); }
.t-program .mv-umd .acts button.rec::before { background: #fff; }
.mv-stats { display: flex; gap: 14px; padding: 7px 12px; background: #0f1216; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.mv-stats b { color: var(--ink); font-weight: 600; }
.mv-stats .sync { margin-left: auto; }

.setup-drawer { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.setup-drawer > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.setup-drawer > summary::-webkit-details-marker { display: none; }
.setup-drawer > summary::before { content: "▸"; color: var(--muted); }
.setup-drawer[open] > summary::before { content: "▾"; }
.setup-drawer > summary .badge { font-weight: 700; }
.setup-drawer .drawer-body { padding: 0 18px 18px; }

/* ════════════════ STANDARD v3 – all pages ════════════════ */
/* form pages: fields at a readable width, the action bar stays in view */
.wrap > form[method=post]:not(.inline), .settings-main > form[method=post]:not(.inline) { max-width: 1280px; }
.formbar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 0; margin-top: 4px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.settings-main .formbar { background: linear-gradient(to top, var(--card) 70%, transparent); }
.formbar button, .formbar .btn { min-height: 42px; padding: 10px 20px; font-size: 14px; }
.card > h2:not(:first-child) { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line2); }
.card .row + .row { margin-top: 2px; }
/* page header links read as buttons, not as scattered text */
.band .links > a:not(.btn) { color: var(--muted); padding: 6px 10px; border-radius: var(--radius); }
.band .links > a:not(.btn):hover { background: #1a1e24; color: #fff; text-decoration: none; }
.band .links { font-size: 13.5px; }
/* KPI tiles on the home page */
.stats > div { padding: 18px 20px; }
.stats .v { font-size: 30px; line-height: 1.15; }
.stats .l { margin-top: 4px; }
/* reports: the report switch is a row of tabs */
.replinks { font-size: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.replinks a { font-size: 13px; padding: 6px 11px; border-radius: var(--radius); background: #1a1e24; color: var(--ink); border: 1px solid var(--line); }
.replinks a:hover { background: #232931; text-decoration: none; }
.toolbar input[type=date] { min-height: 36px; }
/* charts drawn by the server for a light page */
.pie circle[fill="#232931"] { fill: var(--card2); stroke: var(--line); }
.pie text, .chart text { fill: var(--muted); }
.panel-body.flush { overflow-x: auto; }
/* help boxes in the side column */
aside .panel.help { background: transparent; }
aside .panel.help .panel-head { padding: 10px 14px; }
aside .panel.help .panel-body { padding: 12px 14px; line-height: 1.55; }
.empty { color: var(--muted); padding: 28px; text-align: center; }

/* sign in */
.login { max-width: 420px; margin: 9vh auto 0; text-align: center; }
.login-logo { width: 300px; height: auto; display: block; margin: 0 auto 34px; }
.login .card { text-align: left; padding: 26px 28px; }
.login .card h1 { font-size: 20px; }
.login .hint { margin-top: 18px; }

/* ════════════════ MOBILE CAMERAS (list) ════════════════ */
.cams-layout { grid-template-columns: minmax(0, 1fr) 380px; }
.camlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.camwrap { position: relative; }
.camwrap .camcard { height: 100%; }
.cc-del { position: absolute; right: 14px; bottom: 9px; margin: 0; }
.cc-del button { color: #ff6b74; border-color: #5a2a30; }
.cc-del button:hover { background: #3a1a1f; color: #ffb3b8; }
.camcard { display: block; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--off); border-radius: var(--radius); padding: 14px 16px 12px; color: var(--ink); transition: border-color .12s, background .12s; }
.camcard:hover { text-decoration: none; background: #171b21; border-color: #3a424d; }
.camcard.on { border-left-color: var(--pvw); }
.camcard.late { border-left-color: var(--warn); }
.camcard.t-pgm { border-color: var(--pgm); border-left-color: var(--pgm); box-shadow: 0 0 0 1px var(--pgm); }
.camcard.t-pvw { border-color: var(--pvw); border-left-color: var(--pvw); }
.camcard.off { opacity: .72; }
.cc-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cc-org { margin-left: auto; font-size: 12px; color: var(--dim); }
.cc-name { font-size: 20px; font-weight: 700; margin: 10px 0 2px; }
.cc-sub { color: var(--muted); font-size: 13px; }
.cc-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 12px; padding: 10px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.cc-metrics .l { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.cc-metrics .v { display: block; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-metrics .v .badge { font-size: 10.5px; padding: 1px 5px; }
.t-err { color: #ff6b74; }
.cc-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.steps ol { margin: 0; padding-left: 20px; color: var(--ink); }
.steps li { margin: 0 0 10px; line-height: 1.5; }

/* pairing */
.pair { display: grid; grid-template-columns: minmax(0, 640px) 380px; gap: 16px; align-items: stretch; }
.pair-code .code { font-size: 64px; font-weight: 700; letter-spacing: 10px; color: #fff; line-height: 1.1; margin: 6px 0 6px; }
.pair-code .valid { color: var(--warn); font-size: 14px; margin-bottom: 18px; }
.pair-steps { margin: 0 0 18px; padding-left: 22px; font-size: 15px; line-height: 1.6; }
.pair-qr { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pair-qr img { background: #fff; padding: 14px; border-radius: 8px; image-rendering: pixelated; width: 300px; height: 300px; }
.pair-note { max-width: 1036px; }
@media (max-width: 1100px) { .pair { grid-template-columns: 1fr; } }
.band .links a.btn { color: #fff; } .band .links a.btn.ghost { color: var(--ink); }
body:has(.login) .nav { display: none; }
.card .formbar { position: static; background: none; padding-bottom: 0; }

/* ════════════════ kept by the Panel (function comes first) ════════════════ */
/* the answer of the phone to a command: always in sight, next to the controls */
#cmd-result { position: fixed; top: 136px; right: 24px; z-index: 60; width: 560px; max-width: calc(100vw - 48px); margin: 0 !important; box-shadow: 0 12px 30px rgba(0,0,0,.55);
  font-size: 17px; line-height: 1.45; font-weight: 600; padding: 18px 22px !important; border-width: 2px; cursor: pointer; }
/* the top menu stays on one line on a laptop */
.menu > li > a { white-space: nowrap; }
@media (max-width: 1500px) { .brand svg { height: 18px; } .menu > li > a { padding: 0 8px; font-size: 12.5px; } }
/* the list of viewers opens over the table, not inside a scrolling box */
.panel-body.flush:has(details.clients) { overflow: visible; }
/* a scrolling box would stop the Save bar from staying in view */
.settings-main:has(.formbar) { overflow-x: visible; }
/* the camera list on narrow screens */
.camlist { grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr)); }
@media (max-width: 1100px) { .cams-layout { grid-template-columns: minmax(0, 1fr); } }
/* the camera in use */
button.ghost[aria-pressed="true"], button.ghost[aria-pressed="true"]:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* the camera page header stays in view: the list of cameras and Release control */
.cam-head { position: sticky; top: 52px; z-index: 40; background: var(--bg); padding-top: 8px; }
.pagehead .sel { background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; width: auto; min-width: 220px; max-width: 340px; font: inherit; }

/* live preview over the thumbnail */
.monitor video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ════════════════ MULTISTREAM (M1–M11) ════════════════ */
/* network icon: a 24 px slot. Placeholder = network colour + short name; replace with the network's official icon (SVG, same size). */
.net { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: #fff; flex: 0 0 auto; border: 2px solid var(--card); }
.net.lg { width: 40px; height: 40px; border-radius: 10px; font-size: 13px; border: 0; }
.net.xl { width: 56px; height: 56px; border-radius: 14px; font-size: 17px; border: 0; }
.n-yt { background: #FF0000; } .n-fb { background: #1877F2; } .n-tw { background: #9146FF; } .n-ki { background: #53FC18; color: #0b0d10; }
.n-ig { background: #E1306C; } .n-tt { background: #111; box-shadow: inset 0 0 0 1.5px #3a3f48; } .n-x { background: #000; box-shadow: inset 0 0 0 1.5px #3a3f48; } .n-li { background: #0A66C2; }
.n-rtmp, .n-srt { background: #2a3038; color: #e8ebef; font-size: 8.5px; }
.nets { display: inline-flex; align-items: center; }
.nets .net + .net { margin-left: -7px; }
.nets .more { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* sub-tabs and filters */
.fchipbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.fchip { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #14171c; color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.fchip.on { background: #e8ebef; color: #0b0d10; border-color: #e8ebef; }
.orgsel { min-width: 220px; }
.search { width: 240px !important; }

/* stream lists */
table.data.streams td { padding: 8px 12px; }
.thumb16 { width: 112px; height: 63px; border-radius: 6px; background: #000 center/cover; display: block; position: relative; flex: 0 0 auto; }
.thumb16.sm { width: 80px; height: 45px; }
.thumb16.empty { background: #14171c; border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 11px; }
.thumb16 .dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.78); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.st-title { display: flex; gap: 14px; align-items: center; }
.st-title b { display: block; font-size: 14px; }
.st-title .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rowmenu { width: 32px; height: 32px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; font-weight: 700; }
.rowmenu:hover { background: #1d222a; color: #fff; }
.rmenu { position: absolute; right: 8px; top: 40px; width: 210px; background: #161a20; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.55); padding: 6px 0; z-index: 10; text-align: left; }
.rmenu a { display: block; padding: 8px 14px; color: var(--ink); font-size: 13.5px; }
.rmenu a.del { color: #ff6b74; }
.rmenu .sep { border-top: 1px solid var(--line2); margin: 6px 0; }

/* forms of a stream */
.ms-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.chrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.chrow:last-child { border-bottom: 0; }
.chrow b { display: block; } .chrow .sub { font-size: 12px; color: var(--muted); }
.switch { width: 44px; height: 24px; border-radius: 12px; background: #333a44; position: relative; display: inline-block; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #9aa4b0; }
.switch.on { background: var(--accent); } .switch.on::after { left: 23px; background: #fff; }
.override { grid-column: 2 / -1; background: #101317; border: 1px solid var(--line2); border-radius: var(--radius); padding: 4px 14px 12px; }
.inputpick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.inputpick .opt { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; gap: 10px; align-items: center; background: #101317; }
.inputpick .opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.inputpick .opt b { display: block; font-size: 13.5px; } .inputpick .opt span { font-size: 12px; color: var(--muted); }
.preview { aspect-ratio: 16 / 9; border-radius: var(--radius); background: #000 center/cover; position: relative; border: 1px solid var(--line); }
.preview .tag { position: absolute; left: 10px; top: 10px; }
.bigbtns { display: flex; gap: 10px; margin-top: 14px; }
.bigbtns button { flex: 1; min-height: 52px; font-size: 16px; }

/* modal */
.modal-dim { position: fixed; inset: 0; background: rgba(0,0,0,.66); z-index: 70; }
.modal { position: fixed; left: 50%; top: 90px; transform: translateX(-50%); width: 900px; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; z-index: 71; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal .mhead { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line2); }
.modal .mhead h2 { font-size: 18px; margin: 0; text-transform: none; letter-spacing: 0; color: #fff; }
.modal .mhead .x { margin-left: auto; color: var(--muted); font-size: 22px; }
.ntiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 20px; }
.ntile { border: 1px solid var(--line); border-radius: 10px; background: #101317; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 700; position: relative; }
.ntile:hover { border-color: #4a5260; background: #171b21; }
.ntile .sub { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: -6px; }
.ntile .tag { position: absolute; top: 8px; right: 8px; }
.modal .mfoot { padding: 12px 20px; border-top: 1px solid var(--line2); color: var(--muted); font-size: 12.5px; }

/* analytics */
.range { display: flex; gap: 4px; align-items: center; }
.kcards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kcard .kh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.kcard .kv { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kcard .kl { font-size: 13px; color: var(--muted); }
.kcard .delta { margin-left: auto; font-size: 12.5px; font-weight: 700; }
.up { color: #4ade8a; } .down { color: #ff6b74; }
.lastbar { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto auto auto auto; gap: 22px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.lastbar .lbl { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.lastbar .val { font-size: 18px; font-weight: 800; }
.chart2 { width: 100%; height: auto; display: block; }
.chart2 text { fill: var(--dim); font-size: 11px; font-family: Inter, sans-serif; }
.series i { display: inline-block; width: 12px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.series { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.barlbl { display: grid; grid-template-columns: repeat(5, 1fr); margin: 6px 0 0 4.6%; }
.barlbl div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); text-align: center; }

/* one past stream */
.ps-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.ps-main { padding: 16px; min-width: 0; }
.player { aspect-ratio: 16 / 9; background: #000 center/cover; border-radius: var(--radius); position: relative; }
.player .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; }
.player .play::after { content: ""; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; margin-left: 6px; }
.player .pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, rgba(0,0,0,.8)); display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: 12.5px; font-weight: 600; }
.player .pbar .ptr { flex: 1; height: 4px; background: rgba(255,255,255,.3); border-radius: 2px; position: relative; }
.player .pbar .ptr i { position: absolute; left: 0; top: 0; bottom: 0; width: 34%; background: #fff; border-radius: 2px; }

/* chat */
.chat { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #111419; }
.chat .ch-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.chat .ch-head b { font-size: 14px; }
.chat .msgs { flex: 1; overflow: hidden; padding: 4px 0; }
.msg { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 9px 14px; position: relative; }
.msg:hover { background: #171b21; }
.msg .who { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.msg .who span { color: var(--dim); font-weight: 500; margin-left: 6px; }
.msg .t { font-size: 13.5px; color: #d5dae0; margin-top: 2px; line-height: 1.4; }
.msg .act { position: absolute; right: 10px; top: 8px; display: none; gap: 6px; }
.msg:hover .act, .msg.hov .act { display: flex; }
.msg.hov { background: #171b21; }
.msg.pinned { background: #0f2340; box-shadow: inset 3px 0 0 var(--accent); }
.chat .send { border-top: 1px solid var(--line2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.chat .send .to { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

/* live control */
.livehead { display: flex; align-items: center; gap: 14px; }
.livebadge { display: inline-flex; align-items: center; gap: 8px; background: var(--pgm); color: #fff; font-weight: 800; letter-spacing: .08em; padding: 6px 12px; border-radius: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.livebadge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.lc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.statrow > div { padding: 16px 18px; border-right: 1px solid var(--line2); }
.statrow > div:last-child { border-right: 0; }
.statrow .v { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.statrow .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.spark { display: block; }

/* studio */
.studio { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.program { aspect-ratio: 16 / 9; background: #000 center/cover; border-radius: var(--radius); position: relative; overflow: hidden; border: 3px solid var(--pgm); }
.program .pgm { position: absolute; left: 10px; top: 10px; }
.program .l3 { position: absolute; left: 6%; bottom: 9%; display: flex; flex-direction: column; }
.program .l3 b { background: #FF0015; color: #fff; padding: 6px 14px; font-size: 20px; font-weight: 800; }
.program .l3 span { background: #fff; color: #0b0d10; padding: 4px 14px; font-size: 14px; font-weight: 600; }
.program .logo { position: absolute; right: 3%; top: 4%; width: 140px; opacity: .95; }
.program .pip { position: absolute; right: 3%; bottom: 9%; width: 26%; aspect-ratio: 16/9; background: #222 center/cover; border: 2px solid #fff; border-radius: 4px; }
.src { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #101317; margin-bottom: 8px; }
.src.onair { border-color: var(--pgm); box-shadow: inset 3px 0 0 var(--pgm); }
.src b { display: block; font-size: 13.5px; } .src .sub { font-size: 11.5px; color: var(--muted); }
.src .ctl { display: flex; gap: 6px; margin-top: 6px; }
.layouts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.lay { aspect-ratio: 16/9; border: 1px solid var(--line); border-radius: 6px; background: #101317; position: relative; padding: 5px; display: flex; gap: 3px; }
.lay.on { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.lay i { background: #3a414c; border-radius: 2px; display: block; }
.brandit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.brandit .b { border: 1px solid var(--line); border-radius: 6px; background: #101317; aspect-ratio: 16/9; position: relative; overflow: hidden; }
.brandit .b.on { border-color: #fff; }
.proposal { display: inline-flex; align-items: center; gap: 6px; }

/* guest join + chat window: pages without the top menu */
.solo { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 20px; }
.solo .logo { height: 34px; margin-bottom: 28px; }
.join { display: grid; grid-template-columns: 640px 400px; gap: 20px; }
.meter2 { height: 10px; border-radius: 5px; background: #232931; overflow: hidden; }
.meter2 i { display: block; height: 100%; width: 58%; background: linear-gradient(90deg, var(--pvw) 70%, var(--warn) 90%); }
.chatwin { width: 560px; height: 880px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }

/* v2 – official network icons: <img class="net" src="icons/youtube.svg" alt="YouTube"> uses the same sizes as the placeholder squares */
img.net { padding: 0; background: none; border: 0; border-radius: 0; object-fit: contain; }
.nets img.net + img.net, .nets .net + img.net, .nets img.net + .net { margin-left: 3px; }
/* v2 – a network that cannot receive chat messages */
.net.nosend { opacity: .35; filter: grayscale(1); }
.nosendlbl { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.send.off input { opacity: .55; cursor: not-allowed; }
.send.off { background: #0e1014; }
/* v2 – live bar on Live control, product name on stand-alone pages, start box */
.livebar { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.livebar b { font-size: 16px; }
.prodname { font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--muted); margin: -18px 0 18px; }
.lblw { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.startbox { width: 520px; margin: 0; }
.segv { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.segv span { flex: 1; text-align: center; padding: 9px 0; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); background: var(--field); }
.segv span:last-child { border-right: 0; }
.segv span.on { background: #e8ebef; color: #0b0d10; }

/* links as add-channel tiles, a real choice in the start box */
a.ntile { color: var(--ink); }
a.ntile:hover { text-decoration: none; }
.modal .x { color: var(--muted); }
.modal .x:hover { color: #fff; text-decoration: none; }
.segv label { flex: 1; margin: 0; text-align: center; padding: 9px 0; font-weight: 600; font-size: 14px; color: var(--muted); border-right: 1px solid var(--line); background: var(--field); cursor: pointer; }
.segv label:last-child { border-right: 0; }
.segv input { position: absolute; opacity: 0; width: 0; height: 0; }
.segv label:has(input:checked) { background: #e8ebef; color: #0b0d10; }
.segv label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }

/* SHIFT RESTREAM studio: the input on the left, the channels on the right (as Restream) */
.rs-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.rs-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rs-top { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.rs-title { display: flex; flex-direction: column; min-width: 0; }
.rs-title b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-src { display: flex; align-items: center; gap: 10px; margin: 0; flex: 1; }
.rs-src span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.rs-src select { flex: 1; max-width: 420px; }
.rs-monitor.t-program { outline-color: var(--pgm); }
.rs-offline { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center; }
.rs-offline .chip { position: absolute; left: 16px; top: 16px; }
.rs-wait { margin: 0; color: var(--ink); font-size: 15px; }
.rs-connect { display: grid; gap: 8px; width: 100%; max-width: 520px; }
.rs-how { display: grid; gap: 3px; text-align: left; background: #11151a; border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; }
.rs-how b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rs-how code { font-family: var(--mono); font-size: 13px; color: var(--ink); word-break: break-all; }
.rs-how span { font-size: 12.5px; color: var(--muted); }
.rs-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin-top: 10px; }
.rs-info .rs-sent { margin-left: auto; color: var(--muted); }
.rs-go { display: grid; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.rs-go-fields { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.rs-go-fields label { margin-top: 0; }
.rs-golive { width: 100%; }
.rs-golive:disabled { opacity: .45; cursor: not-allowed; }
.rs-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 0 6px; min-width: 0; }
.rs-chead { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
.rs-chead h2 { margin: 0; font-size: 16px; }
.rs-cbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.rs-all { display: inline-flex; align-items: center; gap: 8px; }
.rs-all button.link { font-weight: 700; letter-spacing: .04em; }
.rs-list { list-style: none; margin: 0; padding: 0; }
.rs-ch { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line2); }
.rs-ch.off .net { opacity: .45; filter: grayscale(.7); }
.rs-ch-txt { flex: 1; min-width: 0; }
.rs-ch-name { display: flex; align-items: center; gap: 6px; }
.rs-ch-name b, .rs-ch-txt .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-ch-state { margin-top: 3px; font-size: 12.5px; }
.rs-st { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.rs-st.live { color: #7ee2a8; font-weight: 600; } .rs-st.err { color: #ff8c93; }
.rs-ch-act { display: flex; align-items: center; gap: 8px; }
.rs-more { color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
.rs-more:hover { background: #20262e; color: var(--ink); text-decoration: none; }
.rs-switch { background: none; border: 0; padding: 4px; min-height: 0; cursor: pointer; }
.rs-switch:hover { background: none; }
.rs-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
.rs-empty .empty { padding: 22px 16px; }
.rs-note { padding: 10px 16px 6px; margin: 0; }
@media (max-width: 1000px) {
  .rs-grid { grid-template-columns: 1fr; }
  .rs-go-fields { grid-template-columns: 1fr; }
}
/* stream key box under the player */
.rs-keys { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.rs-keys > summary { cursor: pointer; padding: 12px 0; list-style: none; display: flex; align-items: center; gap: 10px; }
.rs-keys > summary::-webkit-details-marker { display: none; }
.rs-keys > summary::before { content: "▸"; color: var(--muted); }
.rs-keys[open] > summary::before { content: "▾"; }
.rs-keys[open] { padding-bottom: 14px; }
.rs-tabs { display: inline-flex; gap: 4px; background: #11151a; border: 1px solid var(--line); border-radius: 8px; padding: 3px; margin-bottom: 8px; }
.rs-tabs button { background: none; border: 0; color: var(--muted); font-weight: 700; padding: 6px 16px; min-height: 0; border-radius: 6px; }
.rs-tabs button.on { background: #2a3038; color: #fff; }
.rs-field { display: flex; gap: 6px; align-items: center; }
.rs-field input { flex: 1; font-family: var(--mono); font-size: 13px; min-width: 0; }
.rs-pane label { margin-top: 10px; }
.rs-regen { margin-top: 12px; }
/* Upload & Stream */
.rp { gap: 16px; }
.rp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.rp-card h2 { margin: 0 0 10px; font-size: 16px; }
.rp-card h3 { margin: 18px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rp-up { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rp-up .btn { cursor: pointer; }
.rp-uploads, .rp-items, .rp-list, .rp-job-items { list-style: none; margin: 0; padding: 0; }
.rp-uploads li { display: grid; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.rp-uploads li.err .small { color: #ff8c93; }
.rp-bar { height: 6px; background: #232931; border-radius: 3px; overflow: hidden; }
.rp-bar span { display: block; height: 100%; background: var(--accent); }
.rp-libhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 6px; flex-wrap: wrap; }
.rp-libhead h2 { margin: 0; }
.rp-usage { display: grid; gap: 4px; min-width: 220px; }
.rp-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.rp-item-txt { display: grid; min-width: 0; }
.rp-item-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-item-act { display: flex; align-items: center; gap: 10px; }
.rp-empty { padding: 14px 0; }
.rp-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.rp-list .rp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-list li.rp-total, .rp-list li.rp-empty { border-bottom: 0; }
.rp-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 12px; align-items: end; }
.rp-logo { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px 120px; gap: 12px; align-items: end; margin-top: 8px; }
.rp-logo input[type=range] { width: 100%; }
.rp-logo-up { margin-top: 10px; cursor: pointer; }
.rp-when { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rp-when .segv { width: 240px; }
.rp-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.rp-msg { margin: 12px 0 0; color: #7ee2a8; } .rp-msg.err { color: #ff8c93; }
.rp .rs-golive { margin-top: 14px; }
.rp-job { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; background: #11151a; }
.rp-job.on { border-color: var(--pgm); }
.rp-job.err { border-color: #ff6b74; }
.rp-job-head { display: flex; align-items: center; gap: 10px; }
.rp-job-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-job-sub { margin: 6px 0; }
.rp-err { color: #ff8c93; margin-top: 4px; }
.rp-job-items li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; color: var(--muted); }
.rp-job-items li.now { color: #fff; font-weight: 600; }
.rp-job-items li.now::before { content: "▶"; color: var(--pgm); margin-right: 6px; }
@media (max-width: 1000px) { .rp-grid2, .rp-logo { grid-template-columns: 1fr; } .rp-item { grid-template-columns: 1fr; } }
/* SHIFT RESTREAM analytics */
.an { display: grid; gap: 16px; }
.an-head { display: flex; align-items: center; justify-content: space-between; }
.an-head h2 { margin: 0; }
.an-period { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.an-period a { padding: 6px 14px; border-radius: 6px; color: var(--muted); font-weight: 700; }
.an-period a.on { background: #2a3038; color: #fff; text-decoration: none; }
.an-kpis { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.an-kpis > div { padding: 16px 18px; border-right: 1px solid var(--line2); }
.an-kpis > div:last-child { border-right: 0; }
.an-kpis .v { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.an-kpis .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.an-kpis .t { color: var(--dim); font-size: 12px; margin-top: 4px; }
.an-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.an-card h3 { margin: 0 0 12px; font-size: 15px; }
.an-bar { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 12px; align-items: center; padding: 6px 0; }
.an-bar-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.an-bar-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar-track { height: 10px; background: #232931; border-radius: 5px; overflow: hidden; }
.an-bar-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #6fb0ff); }
.an-chs { display: flex; gap: 4px; }
.an-chs .net.lg { width: 28px; height: 28px; font-size: 10px; border-radius: 7px; }
@media (max-width: 1000px) { .an-kpis { grid-template-columns: repeat(2, 1fr); } .an-bar { grid-template-columns: 1fr; } }
/* Channels | Chat in the studio */
.rs-sidetabs { display: flex; gap: 4px; margin: 0 16px 10px; background: #11151a; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.rs-sidetabs button { flex: 1; background: none; border: 0; color: var(--muted); font-weight: 700; padding: 8px 0; min-height: 0; border-radius: 6px; }
.rs-sidetabs button.on { background: #2a3038; color: #fff; }
.rs-chat { height: 420px; overflow-y: auto; display: flex; flex-direction: column-reverse; border-top: 1px solid var(--line2); }
.rs-chat-list { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column-reverse; }
.rs-chat-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.rs-chat-net .net.lg { width: 26px; height: 26px; font-size: 9px; border-radius: 7px; }
.rs-chat-text { word-break: break-word; margin-top: 2px; }
.rs-chat-empty { border-bottom: 0 !important; padding: 20px 0 !important; }
.rs-chat-send { display: flex; gap: 8px; padding: 10px 16px 0; }
.rs-chat-send input { flex: 1; }
/* packages */
.rs-planbar { margin: 0 16px 8px; padding: 9px 12px; border-radius: var(--radius); background: #3a1418; border: 1px solid #6b2229; color: #ffb3b9; font-size: 13px; }
.pl-table td:not(:first-child), .pl-table th:not(:first-child) { text-align: center; }
.pl-set select { width: auto; min-width: 160px; }
/* legal pages, Facebook connect */
.legal{max-width:760px;margin:24px auto;line-height:1.55}
.legal h1{margin-bottom:4px}
.legal h2{margin-top:22px;font-size:1.05rem}
.legal ul{padding-left:20px}
.legal li{margin:4px 0}
.legal-links{margin-top:28px}
.rs-connect{padding:0 20px 8px}
.rs-connect .btn{margin-bottom:6px}

/* pairing invite link */
.pair-invite { margin-bottom: 16px; }
.pair-invite .rs-field { max-width: 720px; }
.pair-share { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }

/* copy icons (copy.js): a small clipboard next to a value, "Copied" above it for 2 s */
button.copy-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; min-height: 0; padding: 0; margin: 0 0 0 6px; vertical-align: middle; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--muted); }
button.copy-ic:hover { background: #1d222a; border-color: #323944; color: var(--ink); }
button.copy-ic svg { width: 15px; height: 15px; }
button.copy-ic.ok { color: var(--ok); }
button.copy-ic.fail { color: var(--err); }
button.copy-ic[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: 4px; border: 1px solid var(--line); background: #07080a; color: #d5dae0; font-size: 11.5px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 5; }
.copy-pre { position: relative; }
.copy-pre pre.snippet { padding-right: 44px; }
.copy-pre button.copy-ic { position: absolute; top: 8px; right: 8px; margin: 0; }
/* the live monitor of the event page (live_event.js) */
.ev-monitor { position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; background: #07080a; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ev-monitor video { display: block; width: 100%; height: 100%; object-fit: contain; }
.ev-mon-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; color: var(--muted); font-weight: 600; }
.ev-mon-msg[hidden], .ev-mon-badge[hidden] { display: none; }
.ev-mon-badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 4px; background: #3a0d12; color: #ffb3b8; border: 1px solid #6e1f25; font-size: 12px; font-weight: 700; }
.ev-mon-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 14px; max-width: 720px; }
.ev-meter { flex: 0 0 120px; height: 8px; background: #1d222a; border: 1px solid #323944; border-radius: 4px; overflow: hidden; }
.ev-meter i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }
