:root {
  --bg: #0b0c0f;
  --bg-2: #0e1013;
  --panel: #14161a;
  --panel-2: #1b1e23;
  --panel-3: #262a31;
  --border: #21252c;
  --text: #ffffff;
  --text-dim: #9aa1ad;
  --text-faint: #626a76;
  --accent: #4fcf1f;
  --accent-2: #3fb514;
  --on-accent: #0b1a03;
  --live: #3fbf14;
  --ok: #3fbf14;
  --ok-2: #4fcf1f;
  --warn: #f5b528;
  --radius: 4px;
  --font: 'Segoe UI', Inter, ui-sans-serif, system-ui, -apple-system, Roboto, sans-serif;
  --cond: var(--font);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lucide { width: 17.5px; height: 17.5px; flex: none; stroke-width: 2; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--text-dim); border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; flex: none; }
.spinner.sm { width: 15.5px; height: 15.5px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 9px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7.5px; min-height: 39.5px; padding: 0 15.5px; border-radius: 6.5px; border: 1px solid var(--border); background: var(--panel-2); font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: background-color 120ms ease, opacity 120ms ease, transform 80ms ease; }
.btn:hover:not(:disabled) { background: var(--panel-3); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.light { background: #f2f2f4; border-color: #f2f2f4; color: #111; }
.btn.light:hover:not(:disabled) { background: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover:not(:disabled) { background: var(--accent-2); }
.btn.live { background: var(--live); border-color: var(--live); color: #fff; }
.btn.live:hover:not(:disabled) { filter: brightness(1.08); background: var(--live); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #1d1300; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); }
.btn.sm { min-height: 31px; padding: 0 10px; font-size: 13px; border-radius: 5.5px; }
.btn.xs { min-height: 24px; padding: 0 7.5px; font-size: 12px; border-radius: 4.5px; gap: 4.5px; }
.btn.block { width: 100%; }
.btn.danger-text { color: var(--live); }
.icon-btn { display: inline-grid; place-items: center; width: 35px; height: 35px; border-radius: 6.5px; border: 0; background: transparent; color: var(--text); }
.icon-btn:hover:not(:disabled) { background: var(--panel-2); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn.sm { width: 28.5px; height: 28.5px; }
.icon-btn.square-live { background: var(--live); color: #fff; }
.icon-btn.square-live:hover { background: var(--live); filter: brightness(1.1); }

.input, .select, textarea.input { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 6.5px; border: 1px solid transparent; background: var(--panel-2); outline: none; }
.input:focus, .select:focus { border-color: var(--accent); }
.input:disabled, .select:disabled { opacity: .5; }
.select { appearance: none; padding-right: 35px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e98' stroke-width='2.5'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field { display: flex; flex-direction: column; gap: 6.5px; margin-bottom: 15.5px; }
.field > label, .field > .label { font-weight: 600; font-size: 14.5px; }
.field .req { color: var(--live); }
.help { font-size: 12px; color: var(--text-dim); margin-top: -2px; }
.secret { position: relative; display: flex; align-items: center; }
.secret .input { padding-right: 44px; }
.secret .icon-btn { position: absolute; right: 3.5px; color: var(--text-dim); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input[type=checkbox] { appearance: none; width: 24px; height: 24px; border-radius: 5.5px; background: var(--panel-3); display: grid; place-items: center; margin: 0; }
.check input[type=checkbox]:checked { background: var(--accent); }
.check input[type=checkbox]:checked::after { content: ''; width: 6.5px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.switch { appearance: none; width: 42px; height: 24px; border-radius: 109px; background: var(--panel-3); position: relative; cursor: pointer; flex: none; margin: 0; transition: background-color 150ms ease; }
.switch::after { content: ''; position: absolute; top: 3.5px; left: 3.5px; width: 17.5px; height: 17.5px; border-radius: 50%; background: #fff; transition: transform 150ms ease; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(17.5px); background: #111; }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.switch-row { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; font-weight: 600; font-size: 14.5px; }
.badge { display: inline-flex; align-items: center; gap: 4.5px; padding: 2px 7.5px; border-radius: 4.5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--panel-3); color: var(--text-dim); }
.badge.ok { background: var(--ok); color: #fff; }
.badge.ok-soft { background: rgba(76, 154, 42, .2); color: #8bd65e; border: 1px solid rgba(76, 154, 42, .5); }
.badge.warn { background: rgba(242, 165, 22, .15); color: var(--warn); border: 1px solid rgba(242, 165, 22, .4); }
.badge.live { background: var(--live); color: #fff; }
.badge.accent { background: var(--accent); color: #fff; }
.badge.gray { background: #3a3a42; color: #c4c4cc; }
.chip { display: inline-block; padding: 1px 6.5px; border-radius: 4.5px; background: var(--panel-2); border: 1px solid var(--border); font: 12px var(--mono); color: var(--text-dim); }
.chips { display: flex; gap: 6.5px; flex-wrap: wrap; margin-top: 6.5px; }
.empty-box { display: grid; place-items: center; min-height: 61.5px; padding: 17.5px; border: 1px dashed #3a3a42; border-radius: 6.5px; color: var(--text-dim); font-size: 15.5px; text-align: center; }
.note { font-size: 13px; color: var(--text-dim); }
.note.warn { color: var(--warn); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

#toasts { position: fixed; right: 17.5px; bottom: 17.5px; z-index: 100; display: flex; flex-direction: column; gap: 9px; width: min(418px, calc(100vw - 35px)); }
.toast { padding: 12px 15.5px; border-radius: 9px; background: var(--panel); border: 1px solid var(--border); border-left: 4.5px solid var(--accent); box-shadow: 0 11px 33px rgba(0,0,0,.5); font-size: 14.5px; animation: tin 150ms ease; cursor: pointer; }
.toast.ok { border-left-color: var(--ok-2); }
.toast.err { border-left-color: var(--live); }
.toast.warn { border-left-color: var(--warn); }
@keyframes tin { from { opacity: 0; transform: translateY(6.5px); } }
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 17.5px; animation: fin 120ms ease; }
@keyframes fin { from { opacity: 0; } }
.modal { width: min(528px, 100%); max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 22px; box-shadow: 0 22px 66px rgba(0,0,0,.6); }
.modal.wide { width: min(704px, 100%); }
.modal h2 { margin: 0 0 4.5px; font-size: 20px; }
.modal .sub { margin: 0 0 17.5px; color: var(--text-dim); font-size: 14.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.popover { position: fixed; z-index: 95; min-width: 198px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 4.5px; box-shadow: 0 11px 33px rgba(0,0,0,.5); }
.popover button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; background: transparent; border-radius: 5.5px; text-align: left; font-size: 14.5px; }
.popover button:hover { background: var(--panel-2); }
.popover button .badge { margin-left: auto; }
.popover .sep { height: 1px; background: var(--border); margin: 4.5px 0; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 26.5px 17.5px; background: radial-gradient(880px 462px at 50% -8%, rgba(79, 207, 31, .16), transparent 70%), var(--bg); }
.auth-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: 13px; padding: 28.5px; }
.auth-card .brand { margin-bottom: 20px; }
.auth-card h1 { font-size: 22px; margin: 0 0 4.5px; }
.auth-card p.sub { margin: 0 0 20px; color: var(--text-dim); font-size: 14.5px; }
.form-error { margin: 11px 0 0; padding: 10px 12px; border-radius: 6.5px; background: rgba(79, 207, 31, .14); color: #9be37a; font-size: 14.5px; font-weight: 600; }
.auth-alt { margin-top: 17.5px; font-size: 14.5px; color: var(--text-dim); text-align: center; }
.auth-alt a { color: var(--text); font-weight: 600; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18.5px; letter-spacing: -.01em; }
.brand img { width: 33px; height: 33px; }
.brand .word b { color: var(--accent); }

.site { display: grid; grid-template-columns: 275px 1fr; min-height: 100vh; }
.site.collapsed { grid-template-columns: 0 1fr; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--border); overflow: hidden; }
.side-top { padding: 15.5px 17.5px 20px; }
.side nav { flex: 1; overflow: auto; padding: 0 9px; }
.side .group { margin: 20px 6.5px 6.5px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--text-dim); text-transform: uppercase; }
.side a.item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 6.5px; text-decoration: none; color: var(--text); font-size: 15.5px; margin-bottom: 2px; }
.side a.item:hover { background: var(--panel); }
.side a.item.on { background: var(--panel-2); }
.side a.item .lucide { width: 18.5px; height: 18.5px; color: var(--text-dim); }
.side-user { margin: 11px 9px 13px; display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 9px; background: var(--panel); }
.avatar { width: 37.5px; height: 37.5px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font-weight: 700; font-size: 14.5px; flex: none; }
.avatar.lg { width: 70.5px; height: 70.5px; font-size: 22px; }
.side-user .name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .logout { width: 35px; height: 35px; border-radius: 6.5px; border: 0; background: var(--live); color: #fff; display: grid; place-items: center; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main-head { height: 50.5px; display: flex; align-items: center; gap: 11px; padding: 0 15.5px; border-bottom: 1px solid var(--border); }
.main-head h1 { margin: 0; font-size: 20px; }
.main-body { flex: 1; padding: 39.5px 26.5px; }
.page { width: min(704px, 100%); margin: 0 auto; }
.page.wide { width: min(1320px, 100%); }
.page h2.title { font-size: 31px; margin: 0 0 6.5px; }
.page h3 { font-size: 23px; margin: 28.5px 0 11px; }
.page h3:first-child { margin-top: 0; }
.site-foot { display: flex; align-items: center; justify-content: space-between; gap: 17.5px; padding: 17.5px 26.5px; flex-wrap: wrap; }
.site-foot .copy { display: flex; align-items: center; gap: 11px; color: var(--text-dim); font-size: 14.5px; line-height: 1.4; }
.site-foot .copy img { width: 31px; height: 31px; opacity: .8; }
.site-foot .links { display: flex; gap: 17.5px; font-size: 14.5px; }
.site-foot .links a { color: var(--text-dim); text-decoration: none; }
.site-foot .links a:hover { color: var(--text); }

.welcome { display: flex; align-items: center; gap: 17.5px; padding: 26.5px; background: var(--panel); border-radius: 9px; margin-bottom: 39.5px; }
.welcome h2 { margin: 0; font-size: 33px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(308px, 1fr)); gap: 17.5px; margin-bottom: 39.5px; }
.card { position: relative; display: block; padding: 20px 17.5px; border-radius: 6.5px; background: var(--panel); text-decoration: none; color: var(--text); border: 1px solid transparent; transition: border-color 120ms ease; }
.card:hover { border-color: var(--border); }
.card .lucide { width: 24px; height: 24px; margin-bottom: 9px; }
.card h4 { margin: 0 0 6.5px; font-size: 20px; }
.card p { margin: 0; color: var(--text-dim); font-size: 15.5px; }
.card .badge { position: absolute; top: 13px; right: 13px; }
.home-page { width: min(1320px, 100%); margin: 0 auto; }
.home-page h3 { font-size: 26.5px; margin: 0 0 15.5px; }

.list { display: flex; flex-direction: column; gap: 9px; }
.list-row { display: flex; align-items: center; gap: 13px; padding: 13px; border-radius: 6.5px; background: var(--panel); min-height: 61.5px; }
.list-row .main-col { flex: 1; min-width: 0; }
.list-row .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .s { font-size: 13px; color: var(--text-dim); }
.badge.current { background: #2a8a2a; color: #e9ffe0; }
.platform { width: 24px; height: 24px; border-radius: 5.5px; display: grid; place-items: center; font: 800 13px/1 var(--font); color: #fff; flex: none; }
.platform.twitch { background: #9146ff; }
.platform.kick { background: #2b2b2b; color: #53fc18; border: 1px solid #53fc18; }
.platform.youtube { background: #e62117; }
.platform.tiktok { background: #000; color: #fff; border: 1px solid #25f4ee; box-shadow: inset -2px 0 0 #fe2c55; }
.platform.rtmp, .platform.srt, .platform.pulldown { background: var(--panel-3); color: var(--text); }
.platform.has-logo { background: transparent; border: 0; box-shadow: none; overflow: hidden; }
.platform .plogo { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 5px; }
details.adv summary .platform { display: inline-grid; width: 18px; height: 18px; vertical-align: -4px; }
ol.steps { margin: 8px 0 14px 18px; padding: 0; color: var(--text-dim); font-size: 13px; line-height: 1.55; }
.connect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 48.5px; display: flex; align-items: center; gap: 6.5px; padding: 0 9px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 30; }
.topbar .logo-link img { width: 37.5px; height: 37.5px; display: block; }
.acct-picker { position: relative; }
.acct-picker button.sel { display: flex; align-items: center; gap: 9px; width: 187px; min-height: 33px; padding: 0 9px; border-radius: 5.5px; border: 0; background: var(--panel); color: var(--text); font-size: 14.5px; text-align: left; }
.acct-picker button.sel .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-picker button.sel .placeholder { color: var(--text-dim); }
.acct-menu { position: absolute; top: calc(100% + 6.5px); left: 0; z-index: 40; width: 275px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 4.5px; box-shadow: 0 11px 33px rgba(0,0,0,.5); }
.acct-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: 0; background: transparent; border-radius: 5.5px; text-align: left; font-size: 15.5px; }
.acct-menu button:hover, .acct-menu button.on { background: var(--panel-2); }
.acct-menu .empty { padding: 11px; color: var(--text-dim); font-size: 14.5px; }
.topnav { display: flex; gap: 2px; margin-left: 6.5px; }
.topnav a { display: inline-flex; align-items: center; gap: 4.5px; padding: 5.5px 9px; border-radius: 5.5px; text-decoration: none; color: var(--text); font-size: 13px; }
.topnav a:hover { background: var(--panel); }
.topnav a.on { background: var(--panel-2); }
.topnav a .lucide { width: 13px; height: 13px; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 6.5px; }
.topright .uname { font-weight: 700; font-size: 13px; padding: 0 4.5px; }
.topright .state-pill { display: inline-flex; align-items: center; gap: 6.5px; font-size: 13px; color: var(--text-dim); padding: 0 6.5px; }
.app-body { flex: 1; display: flex; min-height: 0; }
.welcome-app { flex: 1; display: grid; place-items: center; font-size: 31px; font-weight: 800; padding: 44px 17.5px; text-align: center; }

.dash { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; padding: 9px; align-content: start; }
.dash .col { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.dpanel { background: var(--panel); border-radius: 4.5px; overflow: hidden; display: flex; flex-direction: column; }
.dpanel-head { height: 31px; display: flex; align-items: center; gap: 9px; padding: 0 6.5px 0 9px; background: #2a2a30; font-weight: 700; font-size: 13px; user-select: none; }
.dpanel-head .title { cursor: pointer; display: flex; align-items: center; gap: 9px; }
.dpanel-head .acts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.dpanel-head .acts .icon-btn { width: 24px; height: 24px; color: var(--text-dim); }
.dpanel-head .acts .icon-btn .lucide { width: 14.5px; height: 14.5px; }
.dpanel-head .sortbtn { display: inline-flex; align-items: center; gap: 4.5px; border: 0; background: transparent; color: var(--text-dim); font-size: 12px; padding: 2px 5.5px; border-radius: 4.5px; }
.dpanel-head .sortbtn:hover { background: var(--panel-2); color: var(--text); }
.dpanel-head .sortbtn .lucide { width: 13px; height: 13px; }
.dpanel-head .title { min-width: 0; overflow: hidden; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-weight: 600; font-size: 11.5px; color: var(--text); white-space: nowrap; }
.chart-legend::-webkit-scrollbar { display: none; }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend .lg b { font-weight: 500; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.chart-legend .lg.off { opacity: .55; }
.chart-legend .lg.none { color: var(--text-dim); font-weight: 500; }
.chart-legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dpanel.collapsed .dpanel-body { display: none; }
.dpanel.collapsed .chev { transform: rotate(-90deg); }
.chev { transition: transform 150ms ease; }
.dpanel-body { padding: 9px; flex: 1; min-height: 0; }
.monitor { position: relative; aspect-ratio: 16 / 9; background: #0d0d0f; border-radius: 2px; overflow: hidden; display: grid; place-items: center; }
.monitor img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.monitor .off { display: flex; flex-direction: column; align-items: center; gap: 13px; color: var(--text-dim); text-align: center; padding: 17.5px; z-index: 1; }
.monitor .off .lucide { width: 37.5px; height: 37.5px; }
.scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6.5px; }
.scene-grid.list { grid-template-columns: 1fr; }
.scene-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5.5px; min-height: 61.5px; padding: 6.5px; border: 0; border-radius: 3.5px; background: #141416; color: var(--text); font-size: 12px; font-weight: 700; text-align: center; transition: background-color 120ms ease; }
.scene-tile:hover:not(:disabled) { background: #1f1f23; }
.scene-tile:disabled { cursor: default; }
.scene-tile .lucide { width: 16.5px; height: 16.5px; }
.scene-grid.list .scene-tile { flex-direction: row; justify-content: flex-start; min-height: 39.5px; padding: 0 13px; gap: 11px; }
.scene-tile.on { background: var(--ok); color: #fff; }
.scene-tile.pending { outline: 2px solid var(--ok); }
.ingest-list { display: flex; flex-direction: column; gap: 4.5px; }
.ingest-list.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ingest-row { display: flex; align-items: center; gap: 9px; min-height: 35px; padding: 3.5px 4.5px 3.5px 6.5px; border-radius: 3.5px; background: #141416; font-size: 13px; font-weight: 700; }
.ingest-row .lucide { width: 15.5px; height: 15.5px; }
.ingest-row .status-ic { color: var(--text-faint); }
.ingest-row.online .status-ic { color: #7ed957; }
.ingest-row .rate { font: 600 12px var(--mono); color: #7ed957; }
.ingest-row .rtt { font: 12px var(--mono); color: var(--text-dim); }
.ingest-row .primary-tag { font-size: 10px; }
.btn.mute { background: #5cb833; border-color: #5cb833; color: #0b1f02; min-height: 24px; padding: 0 7.5px; font-size: 12px; border-radius: 3.5px; gap: 4.5px; }
.btn.mute.on { background: #f0384a; border-color: #f0384a; color: #fff; }
.btn.fixbtn { background: var(--warn); border-color: var(--warn); color: #1d1300; min-height: 24px; width: 24px; padding: 0; border-radius: 3.5px; }
.btn.mute .lucide, .btn.fixbtn .lucide { width: 13px; height: 13px; }
.chart-wrap { position: relative; height: 308px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); display: inline-block; flex: none; }
.dot.ok { background: var(--ok-2); }
.dot.live { background: var(--live); animation: pulse 1.2s ease-in-out infinite; }
.dot.warn { background: var(--warn); }
@keyframes pulse { 50% { opacity: .35; } }

.settings { flex: 1; display: grid; grid-template-columns: 181.5px 1fr; min-height: calc(100vh - 48.5px); }
.settings.collapsed { grid-template-columns: 0 1fr; }
.set-side { border-right: 1px solid var(--border); padding: 13px 6.5px; overflow: hidden; }
.set-side .group { margin: 9px 6.5px 9px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text-dim); text-transform: uppercase; }
.set-side a { display: flex; align-items: center; gap: 9px; padding: 6.5px 9px; border-radius: 5.5px; text-decoration: none; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.set-side a:hover { background: var(--panel); }
.set-side a.on { background: var(--panel-2); }
.set-side a.disabled { color: var(--text-faint); pointer-events: none; }
.set-side a .lucide { width: 15.5px; height: 15.5px; }
.set-main { min-width: 0; display: flex; flex-direction: column; }
.set-head { height: 33px; display: flex; align-items: center; padding: 0 9px; border-bottom: 1px solid var(--border); }
.set-body { flex: 1; overflow: auto; padding: 31px 22px 66px; }
.set-page { width: min(539px, 100%); margin: 0 auto; }
.set-page h2 { font-size: 18.5px; margin: 0 0 2px; }
.set-page h2 + .sub { margin: 0 0 11px; color: var(--text-dim); font-size: 13px; }
.set-page section { margin-bottom: 33px; }
.set-page .field > label { font-size: 13px; }
.set-page .input, .set-page .select { min-height: 33px; padding: 5.5px 10px; font-size: 13px; background: #1d1d21; }
.set-page .select { background-position: right 10px center; }
.set-page .btn.light.block { min-height: 33px; font-size: 13px; }
.set-row { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 6.5px 9px 6.5px 11px; border-radius: 4.5px; background: #1e1e22; margin-bottom: 5.5px; font-size: 13px; font-weight: 700; }
.set-row .lucide { width: 16.5px; height: 16.5px; color: var(--text-dim); }
.set-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row .countdown { font: 12px var(--mono); color: var(--text-dim); font-weight: 400; }
.set-row .chev-btn { color: var(--text-dim); }
.set-row.expandable { cursor: pointer; }
.set-detail { margin: -2px 0 9px; padding: 13px; border-radius: 0 0 4.5px 4.5px; background: #18181b; border: 1px solid #222227; }
.set-detail .kv { display: grid; grid-template-columns: 121px 1fr auto; align-items: center; gap: 6.5px; margin-bottom: 9px; font-size: 13px; }
.set-detail .kv .k { color: var(--text-dim); }
.set-detail code { padding: 5.5px 9px; border-radius: 4.5px; background: var(--bg); font: 12px var(--mono); overflow-wrap: anywhere; display: block; }
.set-detail code.blur { filter: blur(5.5px); user-select: none; }
.plugin-row { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 4.5px; background: #1e1e22; margin-bottom: 5.5px; }
.plugin-row .lucide { width: 17.5px; height: 17.5px; }
.plugin-row .info { flex: 1; min-width: 0; }
.plugin-row .t { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6.5px; }
.plugin-row .d { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.collection-btn { display: flex; align-items: center; justify-content: center; gap: 6.5px; width: 100%; min-height: 35px; border-radius: 4.5px; border: 0; background: #1e1e22; font-weight: 600; font-size: 13px; margin-bottom: 6.5px; }
.collection-btn.on { background: #4b9a2a; color: #fff; }
.multi { position: relative; }
.multi .menu { position: absolute; left: 0; right: 0; top: calc(100% + 4.5px); z-index: 20; background: var(--panel); border: 1px solid var(--border); border-radius: 6.5px; padding: 4.5px; max-height: 264px; overflow: auto; }
.multi .menu label { display: flex; align-items: center; gap: 9px; padding: 6.5px 9px; border-radius: 4.5px; font-size: 13px; cursor: pointer; }
.multi .menu label:hover { background: var(--panel-2); }
details.adv summary { cursor: pointer; font-size: 13px; font-weight: 600; margin: 15.5px 0 11px; }
details.help-box { border-radius: 4.5px; background: #1e1e22; margin-bottom: 15.5px; }
details.help-box summary { display: flex; align-items: center; gap: 9px; padding: 9px 11px; cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
details.help-box summary::-webkit-details-marker { display: none; }
details.help-box summary .chev2 { margin-left: auto; transition: transform 150ms ease; }
details.help-box[open] summary .chev2 { transform: rotate(90deg); }
details.help-box .content { padding: 0 13px 13px; font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.range-row { display: flex; align-items: center; gap: 11px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row output { min-width: 70.5px; text-align: right; font: 13px var(--mono); }
.docs { line-height: 1.65; }
.docs h2 { margin-top: 33px; }
.docs code { background: var(--panel-2); padding: 1px 5.5px; border-radius: 4.5px; font: 13px var(--mono); }
.docs pre { background: var(--panel); padding: 13px; border-radius: 6.5px; overflow: auto; font: 13px var(--mono); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tbl th, table.tbl td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl th { color: var(--text-dim); font-weight: 600; font-size: 13px; }
.qr { width: 220px; background: #fff; border-radius: 9px; overflow: hidden; }
.qr svg { display: block; width: 100%; height: auto; }

@media (max-width: 1000px) {
  .dash { grid-template-columns: 1fr; }
  .dash .col { display: contents; }
  .dash .p-monitor { order: 1; }
  .dash .p-scenes { order: 2; }
  .dash .p-ingests { order: 3; }
  .dash .p-bitrate { order: 4; }
}
@media (max-width: 760px) {
  .site { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 286px; z-index: 50; transform: translateX(-100%); transition: transform 150ms ease; box-shadow: 11px 0 33px rgba(0,0,0,.5); }
  .site.mobile-open .side { transform: none; }
  .site.collapsed { grid-template-columns: 1fr; }
  .main-body { padding: 24px 15.5px; }
  .welcome h2 { font-size: 24px; }
  .topnav a { padding: 5.5px 6.5px; }
  .acct-picker button.sel { width: 132px; }
  .topright .uname, .topright .state-pill { display: none; }
  .settings { grid-template-columns: 1fr; }
  .settings .set-side { position: fixed; inset: 48.5px auto 0 0; width: 220px; z-index: 25; background: var(--bg); transform: translateX(-100%); transition: transform 150ms ease; }
  .settings.mobile-open .set-side { transform: none; }
  .settings.collapsed { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingest-list.grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 220px; }
  .dash { padding: 6px; gap: 6px; }
  .scene-grid:not(.list) .scene-tile { min-height: 58px; }
  .chart-legend { font-size: 11px; gap: 4px 8px; }
  .connect-grid { grid-template-columns: 1fr; }
  .site-foot { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .topbar .topnav a span.lbl-long { display: none; }
  .topbar { height: auto; min-height: 48.5px; flex-wrap: wrap; row-gap: 4.5px; padding: 5.5px 9px; }
  .topbar .topright { width: 100%; justify-content: flex-end; }
  .topbar .acct-picker button.sel { width: 121px; }
  .settings .set-side { inset: 90px auto 0 0; }
  .btn-start-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } .spinner { animation: spin 1.6s linear infinite !important; } }
a.btn { text-decoration: none; color: inherit; }

.power-pill { display: inline-flex; align-items: stretch; height: 33px; border-radius: 5.5px; overflow: hidden; background: var(--panel-2); color: #fff; user-select: none; }
.power-pill .pp-icon { width: 33px; flex: none; display: grid; place-items: center; background: var(--live); }
.power-pill .pp-icon .lucide { width: 17.5px; height: 17.5px; }
.power-pill .pp-label { position: relative; display: flex; align-items: center; min-width: 105.5px; padding: 0 13px 0 11px; font-size: 13px; font-weight: 700; }
.power-pill .pp-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--live); transition: width 90ms linear; }
.power-pill .pp-text { position: relative; }
.topnav a.disabled { opacity: .45; cursor: not-allowed; }

.boot-view { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 121px 17.5px 44px; text-align: center; }
.boot-view h2 { margin: 0 0 13px; font-size: 33px; font-weight: 800; }
.boot-view p { margin: 0 0 28.5px; color: var(--text-dim); font-size: 16.5px; max-width: 682px; }
.boot-bar { width: min(422.5px, 100%); height: 10px; border-radius: 109px; background: var(--panel-2); overflow: hidden; }
.boot-fill { height: 100%; width: 0; border-radius: 109px; background: linear-gradient(90deg, #d01c33, var(--live) 70%, #ff6b7a); transition: width 90ms linear; }
@media (max-width: 480px) { .power-pill .pp-label { min-width: 0; } .boot-view { padding-top: 60px; } .boot-view h2 { font-size: 24px; } }
.boot-view .btn.live { margin-top: -6px; }
.boot-view .boot-note { margin-top: 15.5px; color: var(--warn); font-size: 14.5px; max-width: 572px; }
.logbox { max-height: 60vh; overflow: auto; background: #0b0b0f; border: 1px solid var(--border); border-radius: 6.5px; padding: 11px; font: 12.5px/1.45 var(--mono, ui-monospace, monospace); white-space: pre-wrap; word-break: break-word; margin: 0; }

.settings { grid-template-columns: 220px 1fr; }
.set-side { padding: 16px 8px; }
.set-side .group { font-size: 12.5px; margin: 10px 8px 10px; }
.set-side a { font-size: 15.5px; padding: 9px 11px; gap: 11px; border-radius: 6px; }
.set-side a .lucide { width: 18px; height: 18px; }
.set-head { height: 40px; }
.set-body { padding: 36px 26px 70px; }
.set-page { width: min(740px, 100%); }
.set-page h2 { font-size: 26px; margin-bottom: 4px; }
.set-page h2 + .sub, .set-page .sub { font-size: 15.5px; margin-bottom: 16px; }
.set-page section { margin-bottom: 40px; }
.set-page .field { gap: 8px; margin-bottom: 18px; }
.set-page .field > label { font-size: 16px; font-weight: 600; }
.set-page .help, .set-page .note { font-size: 14px; }
.set-page .input, .set-page .select { min-height: 42px; padding: 8px 13px; font-size: 15.5px; border-radius: 6px; }
.set-page .btn.light.block, .set-page .btn { min-height: 40px; font-size: 15px; }
.set-page .btn.sm { min-height: 34px; font-size: 14px; }
.set-row { min-height: 54px; font-size: 16px; padding: 8px 12px 8px 14px; }
.set-row .lucide { width: 19px; height: 19px; }
.plugin-row .t { font-size: 16px; }
.plugin-row .d { font-size: 14px; }
.switch-row { font-size: 15.5px; }

.ib-card { border-radius: 6px; overflow: hidden; background: #1e1e22; margin-bottom: 10px; }
.ib-head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px 8px 14px; cursor: pointer; font-size: 17px; font-weight: 700; user-select: none; }
.ib-card.open .ib-head { background: #4a4a50; }
.ib-head > .lucide { width: 20px; height: 20px; color: var(--text-dim); }
.ib-card.open .ib-head > .lucide { color: #ddd; }
.ib-head .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-head .grow { flex: 1; }
.ib-icon { display: grid; place-items: center; width: 40px; height: 34px; border-radius: 5px; border: 0; background: #151518; color: #fff; }
.ib-icon .lucide { width: 17px; height: 17px; }
.ib-setprimary { min-height: 34px; padding: 0 20px; border-radius: 5px; border: 0; background: #8a8a90; color: #2a2a2e; font-weight: 700; font-size: 15px; }
.ib-setprimary:hover { background: #a0a0a6; }
.ib-primary { display: inline-flex; align-items: center; min-height: 34px; padding: 0 16px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 14.5px; font-weight: 700; }
.ib-chev { display: grid; place-items: center; width: 30px; height: 34px; border: 0; background: transparent; color: var(--text-dim); }
.ib-body { padding: 16px 14px 14px; }
.ib-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ib-field > label { font-size: 16px; font-weight: 600; }
.ib-box { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 6px 0 13px; border-radius: 6px; background: #141417; }
.ib-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; cursor: pointer; }
.ib-value.blurred { filter: blur(5px); user-select: none; }
.ib-select { position: relative; display: flex; align-items: center; }
.ib-select > .lucide { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--text-dim); pointer-events: none; }
.ib-select .select { padding-left: 42px; background-color: #141417; }
.ib-qr { width: 220px; padding: 12px; margin-bottom: 14px; border-radius: 8px; background: #fff; }
.ib-qr svg { display: block; width: 100%; height: auto; }
.demo-banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 22px; border-radius: 8px; background: rgba(242, 165, 22, .12); border: 1px solid rgba(242, 165, 22, .45); font-size: 14.5px; line-height: 1.45; }
.demo-banner .lucide { flex: none; width: 20px; height: 20px; color: var(--warn); margin-top: 1px; }

.cr-app { height: 100vh; display: flex; flex-direction: column; }
.cr-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; text-decoration: none; font-size: 14px; color: var(--text-dim); }
.cr-back:hover { background: var(--panel); color: var(--text); }
.cr-back .lucide { width: 16px; height: 16px; }
.cr-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; margin-left: 6px; }
.cr-tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 6px; border: 0; background: transparent; color: var(--text-dim); font-size: 14px; font-weight: 600; white-space: nowrap; }
.cr-tab .lucide { width: 16px; height: 16px; }
.cr-tab:hover { background: var(--panel); color: var(--text); }
.cr-tab.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.cr-x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; margin-right: -4px; }
.cr-x:hover { background: var(--panel-3); }
.cr-x .lucide { width: 13px; height: 13px; }
.cr-stage { position: relative; flex: 1; min-height: 0; }
.cr-overview { position: absolute; inset: 0; overflow: auto; padding: 22px 22px 60px; }
.cr-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.cr-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cr-head h1 { margin: 0; font-size: 26px; }
.cr-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: var(--panel-2); font-size: 13.5px; font-weight: 600; }
.cr-pill.live { background: rgba(79, 207, 31, .18); color: #9be37a; }
.cr-pill.demo { background: rgba(242, 165, 22, .14); color: var(--warn); }
.cr-pill .lucide { width: 14px; height: 14px; }
.cr-search { max-width: 240px; min-height: 38px; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.cr-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); }
.cr-card.on { border-color: #34343c; }
.cr-card.live { border-color: rgba(79, 207, 31, .6); box-shadow: 0 0 0 1px rgba(79, 207, 31, .25); }
.cr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cr-name { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.cr-owner { font-size: 13px; color: var(--text-dim); }
.cr-state { padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; background: var(--panel-3); color: var(--text-dim); white-space: nowrap; }
.cr-state.on { background: rgba(92, 184, 51, .16); color: #7fd65a; }
.cr-state.live { background: var(--live); color: #fff; }
.cr-state.starting, .cr-state.stopping { background: rgba(242, 165, 22, .15); color: var(--warn); }
.cr-progress { height: 5px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.cr-progress > div { height: 100%; background: var(--live); transition: width .4s linear; }
.cr-ingests { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-ing { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: var(--panel-2); font-size: 13px; color: var(--text-dim); }
.cr-ing .dot { width: 8px; height: 8px; border-radius: 50%; background: #55555f; }
.cr-ing.on { color: var(--text); }
.cr-ing.on .dot { background: #5cb833; }
.cr-ing b { font-weight: 700; font-variant-numeric: tabular-nums; }
.cr-row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 10px; font-size: 14px; min-height: 26px; }
.cr-row .select { min-height: 34px; padding: 4px 30px 4px 10px; font-size: 14px; }
.cr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cr-actions .btn.sm { min-height: 34px; }
.cr-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
.warn-text { color: var(--warn); }
@media (max-width: 760px) {
  .cr-overview { padding: 14px 12px 50px; }
  .cr-grid { grid-template-columns: 1fr; }
  .cr-back span, .cr-back { font-size: 0; gap: 0; }
  .cr-back .lucide { width: 18px; height: 18px; }
}
@media (max-width: 760px) {
  .settings { grid-template-columns: 1fr; }
  .set-body { padding: 22px 14px 60px; }
  .set-page h2 { font-size: 22px; }
  .ib-head { font-size: 15.5px; gap: 8px; padding: 8px 8px 8px 12px; }
  .ib-setprimary { padding: 0 12px; font-size: 14px; }
}
@media (max-width: 480px) {
  .ib-head .badge.gray { display: none; }
  .ib-head .name { flex-shrink: 0; max-width: 42%; }
}

.login-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.login-top { height: 60px; display: flex; align-items: center; padding: 0 14px; background: var(--bg-2); border-bottom: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.login-logo img { height: 34px; width: auto; display: block; }
.login-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 16px 16px 40px; }
.login-card { width: min(450px, 100%); background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.login-title { margin: 0; padding: 14px 16px 12px; text-align: center; font-size: 19px; font-weight: 600; border-bottom: 1px solid var(--border); background: var(--panel-3); border-radius: 4px 4px 0 0; }
.login-body { padding: 18px 20px 24px; }
.login-body form { display: flex; flex-direction: column; }
.login-label { display: block; text-align: center; color: var(--text-dim); font-size: 14.5px; margin: 6px 0 8px; }
.login-body .input { height: 38px; min-height: 38px; border-radius: 4px; margin-bottom: 12px; background: var(--bg); border: 1px solid var(--border); }
.login-body .input:focus { border-color: var(--accent); }
.login-body .secret { margin-bottom: 12px; }
.login-body .secret .input { margin-bottom: 0; }
.login-actions { display: flex; justify-content: center; margin-top: 4px; }
.login-btn { min-width: 66px; height: 38px; padding: 0 14px; border-radius: 4px; font-weight: 500; }
.login-body .form-error { text-align: center; margin: 0 0 10px; }
.login-main .auth-alt { margin-top: 14px; color: var(--text-dim); font-size: 13.5px; }
.login-foot { padding: 18px 16px; text-align: center; color: var(--text-dim); font-size: 14.5px; background: var(--bg-2); border-top: 1px solid var(--border); }

@media (min-width: 761px) {
.topbar { height: 62px; padding: 0 14px; gap: 10px; }
.topbar .logo-link img { width: 44px; height: 44px; }
.acct-picker button.sel { width: 255px; min-height: 40px; font-size: 16px; padding: 0 12px; }
.topnav { gap: 4px; margin-left: 4px; }
.topnav a { font-size: 15px; padding: 7px 9px; gap: 6px; }
.topnav a .lucide { width: 15px; height: 15px; }
.topright { gap: 8px; }
.topright .uname { font-size: 15px; }
.topright .btn.sm { min-height: 40px; font-size: 15px; font-weight: 600; padding: 0 13px; gap: 7px; border-radius: 5px; }
.topright .btn.sm .lucide { width: 18px; height: 18px; }
.topright .icon-btn { width: 40px; height: 40px; }
.topright .icon-btn .lucide { width: 21px; height: 21px; }
.topright .square-live { border-radius: 5px; }
.tchip { display: inline-flex; align-items: center; height: 40px; padding: 0 9px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--border); font: 600 13.5px var(--mono); color: var(--text); }
.tchip:empty { display: none; }
}
.settings { min-height: calc(100vh - 62px); }

.dash { gap: 8px; padding: 16px; }
.dash .col { gap: 8px; }
.dpanel { border-radius: 4px; background: #1c1c20; }
.dpanel-head { height: 40px; padding: 0 10px 0 12px; font-size: 16px; background: #29292e; }
.dpanel-head .title { gap: 10px; }
.dpanel-head .badge { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 2px 6px; border-radius: 3px; }
.dpanel-head .badge.ok { background: #3e9e1c; }
.dpanel-head .acts { gap: 4px; }
.dpanel-head .acts .icon-btn { width: 28px; height: 28px; }
.dpanel-head .acts .icon-btn .lucide { width: 17px; height: 17px; }
.dpanel-head .sortbtn { font-size: 13px; font-weight: 600; color: var(--text); }
.dpanel-body { padding: 12px; }
.monitor { background: #050506; border-radius: 0; }
.chart-body { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.chart-legend { justify-content: center; gap: 6px 16px; font-size: 13px; font-weight: 600; min-height: 18px; }
.chart-legend .lg { gap: 7px; }
.chart-legend .dot { width: 12px; height: 12px; }
.chart-wrap { flex: 1; min-height: 160px; height: auto; }
.scene-grid { gap: 8px; }
.scene-tile { min-height: 82px; gap: 8px; font-size: 14.5px; border-radius: 3px; background: #17171a; }
.scene-tile .lucide { width: 21px; height: 21px; }
.scene-tile.on { background: linear-gradient(180deg, #57c21d 0%, #47a51a 100%); }
.scene-grid.list .scene-tile { min-height: 44px; font-size: 14.5px; }
.ingest-list { gap: 8px; }
.ingest-row { min-height: 44px; padding: 0 8px 0 12px; gap: 10px; font-size: 16px; border-radius: 3px; background: #17171a; }
.ingest-row .lucide { width: 18px; height: 18px; }
.ingest-row .rate { font: 600 13px var(--font); color: #7ed957; }
.ingest-row .primary-tag { font-size: 10.5px; }
.btn.mute { min-height: 28px; padding: 0 9px; font-size: 14px; font-weight: 600; border-radius: 3px; gap: 4px; }
.btn.fixbtn { min-height: 28px; width: 28px; border-radius: 3px; }
.btn.mute .lucide, .btn.fixbtn .lucide { width: 15px; height: 15px; }
.dpanel-body.fade-more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 56px), rgba(0,0,0,.25)); mask-image: linear-gradient(180deg, #000 calc(100% - 56px), rgba(0,0,0,.25)); }

@media (min-width: 1001px) {
  .app:has(.dash:not([hidden])) { height: 100vh; min-height: 0; overflow: hidden; }
  .app:has(.dash:not([hidden])) .app-body { min-height: 0; overflow: hidden; }
  .dash:not([hidden]) { min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .dash .col { min-height: 0; }
  .dash .p-monitor { flex: 1 1 auto; min-height: 260px; }
  .dash .p-monitor .dpanel-body { display: flex; }
  .dash .p-monitor .monitor { flex: 1; aspect-ratio: auto; height: auto; min-height: 0; }
  .dash .p-bitrate { flex: 0 0 284px; }
  .dash .p-bitrate.collapsed, .dash .p-scenes.collapsed, .dash .p-ingests.collapsed { flex: 0 0 auto; }
  .dash .p-scenes { flex: 0 1 auto; max-height: 48%; }
  .dash .p-ingests { flex: 1 1 0; }
  .dash .p-scenes .dpanel-body, .dash .p-ingests .dpanel-body { overflow-y: auto; scrollbar-width: thin; }
  .dash .p-monitor.collapsed { flex: 0 0 auto; min-height: 0; }
}
.dash-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
@media (max-width: 760px) {
  .dash { padding: 8px; }
  .dpanel-head { height: 38px; font-size: 15px; }
  .scene-tile { min-height: 62px; font-size: 13px; gap: 6px; }
  .scene-tile .lucide { width: 18px; height: 18px; }
  .ingest-row { font-size: 14.5px; min-height: 42px; }
  .topright .icon-btn { width: 36px; height: 36px; }
}

html, body { font-size: 15.5px; font-feature-settings: 'tnum' 1; letter-spacing: .005em; }
h1, h2, h3, h4 { font-family: var(--cond); font-weight: 700; letter-spacing: .01em; }
.mono { font-family: var(--cond); font-weight: 600; letter-spacing: .02em; }

.btn { border-radius: 3px; font-weight: 600; letter-spacing: .01em; }
.btn.light { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.light:hover:not(:disabled) { background: #63e02f; border-color: #63e02f; }
.btn.accent { color: var(--on-accent); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #03140c; }
.btn.warn { color: #1f0c00; }
.btn.sm { border-radius: 3px; }
.btn.xs { border-radius: 2px; }
.icon-btn { border-radius: 3px; }
.input, .select, textarea.input { border-radius: 3px; background: var(--bg-2); border-color: var(--border); }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 207, 31, .16); }
.check input[type=checkbox] { border-radius: 3px; }
.check input[type=checkbox]:checked::after { border-color: var(--on-accent); }
.switch { border-radius: 3px; background: var(--panel-3); }
.switch::after { border-radius: 2px; background: #c9d3e3; }
.switch:checked::after { background: var(--on-accent); }
.badge { border-radius: 2px; letter-spacing: .02em; text-transform: none; font-size: 11.5px; font-weight: 700; }
.badge.ok { background: var(--ok); color: #03140c; }
.badge.ok-soft { background: rgba(52, 211, 153, .12); color: var(--ok-2); border-color: rgba(52, 211, 153, .45); }
.badge.accent { color: var(--on-accent); }
.badge.gray { background: var(--panel-3); color: #c3cddc; }
.badge.current { background: var(--ok); color: #03140c; }
.empty-box { border-color: var(--panel-3); border-radius: 3px; }
.toast { border-radius: 3px; border-left-width: 3px; }
.modal { border-radius: 4px; }
.popover, .acct-menu { border-radius: 4px; }
.popover button, .acct-menu button { border-radius: 2px; }
.collection-btn.on { background: var(--ok); color: #03140c; }

.auth-wrap { background: radial-gradient(900px 480px at 50% -10%, rgba(79, 207, 31, .12), transparent 70%), var(--bg); }
.auth-card { border-radius: 4px; }
.form-error { background: rgba(79, 207, 31, .12); color: #9be37a; border-radius: 3px; }
.brand { font-family: var(--cond); font-weight: 700; font-size: 21px; letter-spacing: .02em; }
.side a.item, .set-side a { border-radius: 3px; position: relative; }
.side a.item.on, .set-side a.on { background: var(--panel); box-shadow: inset 3px 0 0 var(--accent); }
.side .group, .set-side .group { text-transform: none; letter-spacing: .01em; font-family: var(--cond); font-size: 14px; font-weight: 600; color: var(--text-faint); }
.side-user { border-radius: 4px; }
.side-user .logout, .avatar { border-radius: 3px; }
.card, .list-row, .welcome { border-radius: 4px; }
.page h2.title, .home-page h3 { letter-spacing: .01em; }
.login-card, .login-title { border-radius: 4px 4px 0 0; }
.login-card { border-radius: 4px; background: var(--panel); }
.login-title { background: var(--panel-2); font-family: var(--cond); font-size: 22px; font-weight: 700; }
.login-top, .login-foot { background: var(--bg-2); }

.topbar { background: var(--bg); border-bottom-color: var(--border); }
.acct-picker button.sel { border-radius: 3px; background: var(--panel); border: 1px solid var(--border); font-weight: 600; }
.topnav a { border-radius: 0; font-weight: 600; color: var(--text-dim); box-shadow: inset 0 -2px 0 transparent; }
.topnav a:hover { background: transparent; color: var(--text); }
.topnav a.on { background: transparent; color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.topright .uname { font-family: var(--cond); font-weight: 600; letter-spacing: .02em; }
.tchip { font: 700 19px/1 var(--cond) !important; letter-spacing: .04em; color: var(--live) !important; background: rgba(79, 207, 31, .08) !important; border-color: rgba(79, 207, 31, .4) !important; border-radius: 3px !important; gap: 7px; }
.tchip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.2s ease-in-out infinite; }
.topright .btn.sm, .topright .square-live { border-radius: 3px !important; }
.power-pill { border-radius: 3px; }

.dash { background: var(--bg); }
.dpanel { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; }
.dpanel-head { background: transparent; border-bottom: 1px solid var(--border); font-family: var(--cond); font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.dpanel.collapsed .dpanel-head { border-bottom-color: transparent; }
.dpanel-head .badge { font-family: var(--font); font-size: 12px; border-radius: 2px; }
.dpanel-head .badge.ok { background: rgba(52, 211, 153, .14); color: var(--ok-2); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .4); }
.dpanel-head .sortbtn { font-family: var(--font); color: var(--text-dim); }
.monitor { background: #05070a; outline: 1px solid var(--border); }

body.on-air .p-monitor { border-color: rgba(79, 207, 31, .55); box-shadow: inset 0 3px 0 var(--live); }
.scene-tile { background: var(--bg-2); border: 1px solid var(--border); border-radius: 3px; font-family: var(--cond); font-size: 17px; font-weight: 600; letter-spacing: .02em; color: var(--text); transition: border-color 120ms ease, background-color 120ms ease; }
.scene-tile:hover:not(:disabled) { background: var(--panel-2); border-color: #34425a; }
.scene-tile .lucide { color: var(--text-dim); }
.scene-tile.on { background: var(--panel-2); border-color: #8b98ac; color: #fff; box-shadow: inset 0 3px 0 #8b98ac; }
body.on-air .scene-tile.on { background: rgba(79, 207, 31, .12); border-color: var(--live); box-shadow: inset 0 3px 0 var(--live); }
body.on-air .scene-tile.on .lucide { color: var(--live); }
.scene-tile.pending { outline: 1px dashed var(--accent); outline-offset: -4px; }

.ingest-row { background: var(--bg-2); border: 1px solid var(--border); border-radius: 3px; box-shadow: inset 3px 0 0 var(--panel-3); font-weight: 600; }
.ingest-row.online { box-shadow: inset 3px 0 0 var(--ok-2); }
.ingest-row.online .status-ic { color: var(--ok-2); }
.ingest-row .rate { font: 700 16px var(--cond) !important; letter-spacing: .03em; color: var(--ok-2) !important; }
.ingest-row .rtt { font-family: var(--cond); font-size: 14px; }
.btn.mute { background: transparent; border-color: #34425a; color: var(--text); }
.btn.mute:hover:not(:disabled) { background: var(--panel-2); }
.btn.mute.on { background: rgba(79, 207, 31, .14); border-color: var(--live); color: #9be37a; }
.btn.fixbtn { background: transparent; border-color: rgba(79, 207, 31, .55); color: var(--accent); }
.btn.fixbtn:hover:not(:disabled) { background: rgba(79, 207, 31, .12); }

.chart-legend { font-family: var(--cond); font-size: 15px; letter-spacing: .02em; }
.chart-legend .dot { border-radius: 2px; }

.set-row, .plugin-row, details.help-box, .ib-card, .collection-btn { background: var(--panel); border: 1px solid var(--border); border-radius: 3px; }
.set-detail { background: var(--bg-2); border-color: var(--border); }
.set-detail code, .ib-box, .ib-icon { background: var(--bg-2); border-radius: 3px; }
.ib-card.open .ib-head { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.ib-setprimary { background: var(--panel-3); color: var(--text); border-radius: 3px; }
.ib-setprimary:hover { background: #2e3c52; }
.ib-primary { color: var(--on-accent); border-radius: 3px; }
.ib-select .select { background-color: var(--bg-2); }
.set-page .input, .set-page .select { background-color: var(--bg-2); }
.cr-card { border-radius: 4px; }
.cr-tab, .cr-back, .cr-state, .cr-ing { border-radius: 3px; }
.cr-state.on { background: rgba(52, 211, 153, .12); color: var(--ok-2); }
.cr-ing.on .dot { background: var(--ok-2); }
.boot-fill { background: linear-gradient(90deg, #2f8f0f, var(--live) 70%, #9be37a); border-radius: 2px; }
.boot-bar { border-radius: 2px; }
.boot-view h2, .welcome-app { font-family: var(--cond); letter-spacing: .01em; }

.login-main { justify-content: center; padding-bottom: 12vh; }
.login-card { border-top: 3px solid var(--live); }
.login-title { background: transparent; border-bottom: 0; text-align: left; padding: 22px 24px 2px; font-size: 30px; }
.login-sub { margin: 0; padding: 0 24px; color: var(--text-dim); font-size: 15px; }
.login-body { padding: 18px 24px 24px; }
.login-label { text-align: left; margin: 4px 0 6px; color: var(--text); font-weight: 600; font-size: 14.5px; }
.login-body .input { height: 42px; min-height: 42px; border-radius: 3px; background: var(--bg-2); }
.login-actions { justify-content: stretch; margin-top: 8px; }
.login-btn { width: 100%; height: 44px; border-radius: 3px; font-size: 16px; font-weight: 700; }
.login-foot { font-size: 13.5px; }
body.on-air .p-scenes .dpanel-head .badge.ok { background: rgba(79, 207, 31, .14); color: #9be37a; box-shadow: inset 0 0 0 1px rgba(79, 207, 31, .45); }
.brand .word b { color: var(--accent); }

.power-pill .pp-icon, .power-pill .pp-fill { background: var(--accent); color: var(--on-accent); }
.power-pill { color: var(--text); }
.boot-fill { background: linear-gradient(90deg, #2f8f0f, var(--accent) 70%, #9be37a); }
.login-card { border-top-color: var(--accent); }
.side-user .logout { background: var(--panel-2); color: var(--text); }
.side-user .logout:hover { background: var(--panel-3); }
.cr-progress > div { background: var(--accent); }

.boot-view .btn.accent { margin-top: -6px; }

.gutter { display: none; }
@media (min-width: 1001px) {
  .dash { column-gap: 0; grid-template-columns: minmax(0, var(--cl, 1fr)) 8px minmax(0, var(--cr, 1fr)); }
  .dash .col { gap: 0; }
  .gutter { display: block; position: relative; flex: none; touch-action: none; user-select: none; }
  .gutter.gv { cursor: col-resize; }
  .gutter.gh { height: 8px; cursor: row-resize; }
  .gutter::after { content: ''; position: absolute; border-radius: 2px; background: transparent; transition: background-color 120ms ease; }
  .gutter.gv::after { top: 50%; left: 2.5px; width: 3px; height: 42px; margin-top: -21px; }
  .gutter.gh::after { left: 50%; top: 2.5px; height: 3px; width: 42px; margin-left: -21px; }
  .gutter:hover::after { background: var(--panel-3); }
  .gutter.dragging::after { background: var(--accent); }
  .gutter.gv.dragging::after { top: 0; height: 100%; margin-top: 0; }
  .gutter.gh.dragging::after { left: 0; width: 100%; margin-left: 0; }
  body.resizing, body.resizing * { cursor: inherit; user-select: none !important; }
  body.resizing { cursor: grabbing; }
  .dash .p-bitrate { flex-basis: var(--chart-h, 284px); }
  .dash.scenes-sized .p-scenes { flex: 0 0 var(--scenes-h); max-height: none; }
  .dash.scenes-sized .p-scenes.collapsed { flex: 0 0 auto; }
}

.btn.accent, .btn.light, .btn.live, .icon-btn.square-live, .badge.accent, .badge.live, .ib-primary { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.accent:hover:not(:disabled), .btn.light:hover:not(:disabled), .btn.live:hover:not(:disabled), .icon-btn.square-live:hover { background: #4fcf1f; border-color: #4fcf1f; filter: none; }
.switch:checked { background: var(--accent-2); }
.switch:checked::after { background: #fff; }
.check input[type=checkbox]:checked { background: var(--accent-2); }
.check input[type=checkbox]:checked::after { border-color: #fff; }
.power-pill .pp-icon, .power-pill .pp-fill { background: var(--accent-2); color: #fff; }

@media (max-width: 760px) {
  .settings { display: flex; flex-direction: column; width: 100%; min-width: 0; max-width: 100vw; }
  .settings .set-main { min-width: 0; }
  .settings .set-head { display: none; }
  .settings .set-side, .settings.mobile-open .set-side {
    position: sticky; top: 0; inset: auto; width: auto; transform: none; transition: none; z-index: 6;
    display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; min-width: 0; max-width: 100vw;
    padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); background: var(--bg);
  }
  .settings .set-side::-webkit-scrollbar { display: none; }
  .settings .set-side .group { display: none; }
  .settings .set-side a {
    flex: 0 0 auto; margin: 0; min-height: 44px; padding: 0 16px; gap: 8px; font-size: 15px; white-space: nowrap;
    border: 1px solid var(--border); border-radius: 999px; box-shadow: none; background: var(--panel);
  }
  .settings .set-side a.on { border-color: var(--accent); background: rgba(79, 207, 31, .14); color: var(--text); box-shadow: none; }
  .settings .set-side a.disabled { opacity: .45; }
}

.ing-row { display: contents; }
.p-chat .dpanel-body { padding: 0; }
.chat-body { display: flex; flex-direction: column; flex: 1; width: 100%; min-width: 0; min-height: 0; height: 100%; }
.chat-frame { flex: 1; width: 100%; min-height: 420px; border: 0; background: #18181b; display: block; }
.chat-empty { padding: 16px; color: var(--text-dim); font-size: 14px; line-height: 1.45; }
.chat-pick { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; height: 30px; padding: 0 8px; font: inherit; font-size: 13px; }
.chat-who { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font: 600 13.5px/1 var(--font); color: var(--text); min-width: 0; max-width: 170px; }
.chat-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who .platform { width: 18px; height: 18px; }
@media (max-width: 1000px) {
  .dash .p-chat { order: 4; }
  .dash .p-bitrate { order: 5; }
}
@media (min-width: 1001px) {
  .ing-row { display: flex; flex: 1 1 0; min-height: 0; min-width: 0; }
  .ing-row .p-ingests { flex: 1 1 0; min-width: 0; }
  .ing-row .p-ingests.collapsed { flex: 1 1 0; }
  .ing-row .p-chat { flex: 0 0 var(--chat-w, 300px); min-width: 0; display: flex; flex-direction: column; }
  .ing-row .p-chat.collapsed { flex: 0 0 auto; }
  .ing-row .p-chat .dpanel-body { flex: 1 1 0; min-height: 0; display: flex; }
  .ing-row .p-chat .chat-frame { min-height: 0; }
  .gutter.gc { width: 8px; }
}


html, body { letter-spacing: 0; }
h1, h2, h3, h4, .mono, .brand, .dpanel-head, .scene-tile, .login-title, .topright .uname,
.chart-legend, .ingest-row .rate, .ingest-row .rtt, .side .group, .set-side .group { font-family: var(--font) !important; letter-spacing: 0 !important; }
.mono { font-family: var(--mono) !important; }
:focus-visible { outline-color: var(--accent); }

.topbar { background: var(--bg); border-bottom: 1px solid #1d1d20; }
.acct-picker button.sel { background: var(--panel); border-color: var(--panel); border-radius: 4px; }
.topnav a { color: #fff; font-weight: 500; box-shadow: none; border-radius: 4px; }
.topnav a:hover { background: var(--panel); color: #fff; }
.topnav a.on { background: var(--panel); color: #fff; box-shadow: none; }
.topright .btn.sm { background: var(--panel-2); border-color: var(--panel-2); color: #fff; border-radius: 4px !important; }
.topright .btn.sm:hover:not(:disabled) { background: var(--panel-3); }
.icon-btn.square-live, .btn.live { background: var(--live) !important; border-color: var(--live) !important; color: #fff !important; }
.icon-btn.square-live:hover, .btn.live:hover:not(:disabled) { background: #ff4d5e !important; border-color: #ff4d5e !important; }
.tchip { color: var(--live) !important; background: rgba(240, 56, 74, .1) !important; border-color: rgba(240, 56, 74, .45) !important; }

.dash { background: var(--bg); }
.dpanel { background: var(--panel); border: 0; border-radius: 4px; overflow: hidden; }
.dpanel-head { background: var(--panel-2); border-bottom: 0; font-size: 17px; font-weight: 600; }
.dpanel-head .badge, .dpanel-head .badge.ok, body.on-air .p-scenes .dpanel-head .badge.ok { background: var(--ok); color: #fff; box-shadow: none; border-radius: 3px; font-size: 12px; font-weight: 700; }
.badge.ok, .badge.current, .collection-btn.on { background: var(--ok); color: #fff; }
.badge.ok-soft { background: rgba(79, 207, 31, .12); color: var(--ok-2); border-color: rgba(79, 207, 31, .45); }
.monitor { background: #000; outline: 0; }
body.on-air .p-monitor { border-color: transparent; box-shadow: inset 0 3px 0 var(--live); }

.scene-tile { background: var(--bg-2); border: 0; border-radius: 4px; font-size: 14.5px; font-weight: 600; color: #fff; }
.scene-tile:hover:not(:disabled) { background: #16161a; border-color: transparent; }
.scene-tile .lucide { color: #fff; }
.scene-tile.on, .scene-tile.on:hover:not(:disabled) { background: var(--ok); border-color: transparent; box-shadow: none; color: #fff; }
.scene-tile.on .lucide { color: #fff; }
body.on-air .scene-tile.on, body.on-air .scene-tile.on:hover:not(:disabled) { background: var(--ok); border-color: transparent; box-shadow: none; }
body.on-air .scene-tile.on .lucide { color: #fff; }
.scene-tile.pending { outline-color: var(--ok); }

.ingest-row { background: var(--bg-2); border: 0; border-radius: 4px; box-shadow: none; font-weight: 600; font-size: 16px; }
.ingest-row.online { box-shadow: none; }
.ingest-row .status-ic { color: var(--text-dim); }
.ingest-row.online .status-ic, .ingest-row .rate { color: var(--ok-2) !important; }
.btn.mute { background: var(--ok-2); border-color: var(--ok-2); color: #0b1a03; font-weight: 600; border-radius: 3px; }
.btn.mute:hover:not(:disabled) { background: #63e02f; border-color: #63e02f; }
.btn.mute.on { background: #f0384a; border-color: #f0384a; color: #fff; }
.btn.mute.on:hover:not(:disabled) { background: #ff4d5e; border-color: #ff4d5e; }
.btn.fixbtn { background: var(--warn); border-color: var(--warn); color: #1d1300; border-radius: 3px; }
.btn.fixbtn:hover:not(:disabled) { background: #ffc645; border-color: #ffc645; }
.btn.mute:disabled, .btn.fixbtn:disabled { opacity: .55; }

.btn.accent, .btn.light, .badge.accent, .ib-primary, .power-pill .pp-icon, .power-pill .pp-fill { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.accent:hover:not(:disabled), .btn.light:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); filter: none; }
.switch:checked, .check input[type=checkbox]:checked { background: var(--accent-2); }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 207, 31, .15); }
.side a.item.on, .set-side a.on, .ib-card.open .ib-head { box-shadow: inset 3px 0 0 var(--accent); }
.auth-wrap { background: var(--bg); }
.form-error { background: rgba(240, 56, 74, .12); color: #ff9aa4; }
.login-card { border-top-color: var(--accent); }
.boot-fill { background: var(--accent); }
.gutter.dragging::after, .cr-progress > div { background: var(--accent); }
.brand .word b { color: var(--accent); }

.app.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.snav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; background: var(--bg-2); border-right: 1px solid var(--border); overflow-y: auto; }
.snav-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.snav-brand img { width: 34px; height: 34px; }
.snav-acct .acct-picker button.sel { width: 100%; min-height: 40px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.snav-list { display: flex; flex-direction: column; gap: 4px; }
.snav-item { display: flex; align-items: center; gap: 12px; padding: 0 12px; height: 44px; border-radius: 8px; border: 1px solid transparent; color: var(--text-dim); text-decoration: none; font-size: 15px; font-weight: 500; transition: background-color 120ms ease, color 120ms ease; }
.snav-item .lucide { width: 18px; height: 18px; }
.snav-item:hover { background: var(--panel); color: var(--text); }
.snav-item.on { background: rgba(79, 207, 31, .08); border-color: rgba(79, 207, 31, .45); color: #fff; }
.snav-item.disabled { opacity: .4; pointer-events: none; }
.snav-ext { margin-left: auto; display: flex; opacity: .6; }
.snav-ext .lucide { width: 14px; height: 14px; }
.snav-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 13px; color: var(--text-dim); }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; }
.sdot.ok { background: var(--ok-2); }
.sdot.warn { background: var(--warn); }
.sdot.live { background: var(--live); animation: pulse 1.2s ease-in-out infinite; }
.app.shell .topbar { position: sticky; top: 0; z-index: 30; height: 60px; padding: 0 20px; gap: 12px; justify-content: space-between; background: var(--bg); border-bottom: 1px solid var(--border); }
.tb-status { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.tb-status b { font-weight: 600; }
.tb-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.app.shell .topright { margin-left: auto; }
.app.shell .topright .btn.sm, .app.shell .icon-btn.square-live { border-radius: 8px !important; }
.app.shell .topright .btn.sm { background: var(--panel); border: 1px solid var(--border); }
.app.shell .settings { grid-template-columns: 1fr; min-height: 0; }
.app.shell .settings .set-side, .app.shell .settings .set-head { display: none; }
.app.shell .dash { padding: 20px; gap: 16px; }
.app.shell .dpanel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.app.shell .dpanel-head { height: 48px; background: transparent; border-bottom: 1px solid var(--border); padding: 0 12px 0 16px; font-size: 15px; font-weight: 600; }
.app.shell .dpanel-head .badge, .app.shell .dpanel-head .badge.ok { background: rgba(79, 207, 31, .14); color: var(--ok-2); border-radius: 6px; font-weight: 600; }
.app.shell .scene-tile, .app.shell .ingest-row { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; }
.app.shell .scene-tile:hover:not(:disabled) { background: #121418; border-color: #2c313a; }
.app.shell .scene-tile.on, .app.shell .scene-tile.on:hover:not(:disabled) { background: var(--ok); border-color: var(--ok); color: #fff; }
.app.shell .monitor { border-radius: 8px; }
.app.shell .btn.mute, .app.shell .btn.fixbtn { border-radius: 6px; }
@media (min-width: 1001px) {
  .app.shell:has(.dash:not([hidden])) { height: 100vh; overflow: hidden; }
  .app.shell:has(.dash:not([hidden])) .main-col { height: 100vh; min-height: 0; }
  .app.shell:has(.dash:not([hidden])) .app-body { min-height: 0; overflow: hidden; }
}
@media (max-width: 1000px) {
  .app.shell { grid-template-columns: 1fr; }
  .snav { position: sticky; top: 0; z-index: 40; height: auto; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .snav-top { display: contents; }
  .snav-brand span { display: none; }
  .snav-acct { grid-column: 2; grid-row: 1; margin-right: 46px; }
  .snav-menu { position: absolute; right: 12px; top: 12px; }
  .snav-list, .snav-foot { display: none; }
  .snav.open .snav-list { display: flex; grid-column: 1 / -1; padding-top: 4px; }
  .snav-item { height: 48px; }
  .app.shell .topbar { position: static; height: auto; min-height: 56px; padding: 8px 12px; flex-wrap: nowrap; }
  .app.shell .topbar .uname, .app.shell .topbar .tb-sep { display: none; }
  .app.shell .topright { gap: 6px; }
  .app.shell .dash { padding: 12px; }
  .app.shell .dash > .gutter, .app.shell .dash .gutter { display: none; }
  .app.shell .dash .col { gap: 12px; }
  .app.shell .dash { gap: 12px; }
  .app.shell .set-body { padding: 20px 16px 60px; }
}
@media (min-width: 1001px) { .snav-menu { display: none; } }
.app.shell .set-body { padding: 32px 40px 70px; }
.app.shell .set-page { width: min(860px, 100%); margin: 0; }
.app.shell .set-page h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.app.shell .set-page section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.app.shell .set-page section:last-child { border-bottom: 0; }
.app.shell .set-page .input, .app.shell .set-page .select { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; min-height: 42px; }
.app.shell .set-row, .app.shell .ib-card, .app.shell .plugin-row, .app.shell .collection-btn { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.acct-picker button.sel.single { cursor: default; opacity: 1; }
.app.shell { grid-template-columns: 280px minmax(0, 1fr); }
@media (min-width: 1001px) {
  .app.shell .dash { gap: 0; grid-template-columns: minmax(0, var(--cl, 1fr)) 16px minmax(0, var(--cr, 1fr)); }
  .app.shell .dash .col { gap: 0; }
  .app.shell .gutter.gh { height: 16px; }
  .app.shell .gutter.gv::after { left: 6.5px; }
  .app.shell .gutter.gh::after { top: 6.5px; }
}
@media (max-width: 1000px) { .app.shell { grid-template-columns: 1fr; } }
.tb-status b { white-space: nowrap; }
.app.shell .set-page { margin: 0 auto; }
.snav-brand span { letter-spacing: -.01em; font-size: 18.5px; font-weight: 800; } .snav-brand b { color: var(--accent); font-weight: 800; }
.snav-brand img, .brand img { width: 33px; height: 33px; }
.brand, .snav-brand { font-family: var(--font) !important; font-weight: 800; font-size: 18.5px; letter-spacing: -.01em !important; }
@media (min-width: 1001px) {
  .app.shell .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .app.shell .dash .col { display: flex; flex-direction: column; gap: 16px; }
  .app.shell .dash .p-monitor { flex: 0 0 auto; min-height: 0; }
  .app.shell .dash .p-monitor .dpanel-body { display: block; }
  .app.shell .dash .p-monitor .monitor { aspect-ratio: 16 / 9; width: 100%; height: auto; }
  .app.shell .dash .p-bitrate { flex: 1 1 0; min-height: 200px; }
  .app.shell .dash .p-bitrate.collapsed { flex: 0 0 auto; min-height: 0; }
  .app.shell .dash .p-scenes { flex: 0 1 auto; max-height: 48%; }
}
.gutter { display: none !important; }

.icon-btn.square-live, .btn.live { background: var(--accent-2) !important; border-color: var(--accent-2) !important; color: #fff !important; }
.icon-btn.square-live:hover, .btn.live:hover:not(:disabled) { background: var(--accent) !important; border-color: var(--accent) !important; }
.tchip { color: var(--accent) !important; background: rgba(79, 207, 31, .1) !important; border-color: rgba(79, 207, 31, .45) !important; }
.btn.danger-text { color: #f0384a; }
.seg { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 18px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.seg button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-dim); font: inherit; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--text); }
.seg-tag { font-size: 11.5px; font-weight: 700; color: var(--accent); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.plan-card.featured { border-color: rgba(79, 207, 31, .35); }
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-top h3 { margin: 0; font-size: 18px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 36px; font-weight: 800; letter-spacing: -.02em; }
.plan-price span { color: var(--text-dim); }
.plan-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-feats li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 14.5px; }
.plan-feats .lucide { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 2px; }
.bill-status { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin: 8px 0 26px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.bill-status > .lucide { width: 22px; height: 22px; flex: none; color: var(--text-dim); margin-top: 1px; }
.bill-status.ok > .lucide { color: var(--accent); }
.bill-status.warn { border-color: rgba(245, 181, 40, .5); }
.bill-status.warn > .lucide { color: var(--warn); }
.bill-status div { display: flex; flex-direction: column; gap: 3px; }
.bill-status span { color: var(--text-dim); font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper b { min-width: 28px; text-align: center; font-size: 20px; }
.stepper .icon-btn { border: 1px solid var(--border); border-radius: 8px; width: 40px; height: 40px; }
.welcome-plans, .billing-pick { width: min(860px, 100%); margin: 0 auto; padding: 40px 20px 60px; box-sizing: border-box; }
.billing-pick h2 { font-size: 28px; margin: 0 0 6px; }
.billing-pick > p { margin: 0 0 18px; }
