/* ============================================================
   Multistream Bar — dashboard
   Layout: top bar · side navigation · scrolling main with a sticky preview
   ============================================================ */
:root {
  --bg: #0a0a10;
  --bg-2: #0f0f17;
  --panel: #14141d;
  --panel-2: #191924;
  --raise: #1e1e2b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --txt: #f2f2f7;
  --txt-2: rgba(242, 242, 247, 0.68);
  --txt-3: rgba(242, 242, 247, 0.44);
  --acc: #8b5cf6;
  --acc-2: #22d3ee;
  --acc-soft: rgba(139, 92, 246, 0.16);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --r: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --twitch: #9146ff; --youtube: #ff3b3b; --kick: #53fc18; --tiktok: #25f4ee;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(1100px 520px at 70% -120px, rgba(139, 92, 246, 0.14), transparent 70%), var(--bg);
  color: var(--txt); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: #a78bfa; text-underline-offset: 2px; }
a:hover { color: #c4b5fd; }
code { font-family: var(--mono); font-size: 0.92em; background: rgba(255, 255, 255, 0.07); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--txt-3); font-size: 12px; }
small { color: var(--txt-3); font-weight: 500; }
:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 2px; border-radius: 6px; }
.icon { width: 1em; height: 1em; display: block; flex: none; overflow: visible; }
.icon__tone { opacity: 0.18; }
.icon__line { vector-effect: non-scaling-stroke; }

/* ---------- app grid ---------- */
.app {
  display: grid; height: 100vh; min-height: 0;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: 62px minmax(0, 1fr);
  grid-template-areas: 'top top' 'side main';
}
.top { grid-area: top; }
.side { grid-area: side; }
.main { grid-area: main; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: rgba(10, 10, 16, 0.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 196px; }
.brand__logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--acc), #6366f1 55%, var(--acc-2));
  box-shadow: 0 8px 22px -8px rgba(139, 92, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand__logo i { width: 18px; height: 6px; border-radius: 3px; background: #fff; box-shadow: 0 -8px 0 -1px rgba(255, 255, 255, 0.55), 0 8px 0 -1px rgba(255, 255, 255, 0.55); }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__txt b { font-size: 15px; letter-spacing: -0.02em; }
.brand__txt span { font-size: 11px; color: var(--txt-3); letter-spacing: 0.08em; text-transform: uppercase; }

.top__plats { display: flex; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.tp {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  font-size: 12px; font-weight: 600; color: var(--txt-2); cursor: pointer; font-family: inherit;
}
.tp:hover { border-color: var(--line-2); color: var(--txt); }
.tp .icon { font-size: 14px; color: var(--pc); }
.tp__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--txt-3); }
.tp[data-s='live'] .tp__dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.tp[data-s='connecting'] .tp__dot { background: var(--warn); animation: blink 1s infinite; }
.tp[data-s='error'] .tp__dot { background: var(--bad); }
.tp[data-s='off'] { opacity: 0.6; }
@keyframes blink { 50% { opacity: 0.35; } }

.top__actions { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--txt); font: 600 13px/1 var(--font); cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s; position: relative;
}
.btn:hover { background: var(--raise); border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn .icon { font-size: 15px; }
.btn small { color: inherit; opacity: 0.7; font-weight: 500; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn--ghost { background: transparent; }
.btn--primary { background: linear-gradient(135deg, #8b5cf6, #6d5af0); border-color: transparent; box-shadow: 0 8px 22px -10px rgba(139, 92, 246, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn--primary:hover { background: linear-gradient(135deg, #9b70f8, #7d6bf3); }
.btn--danger { color: #fda4af; border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.07); }
.btn--danger:hover { background: rgba(251, 113, 133, 0.16); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-3); }
.dot.is-on { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2); }
.stale { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg); }
.nav .stale { position: static; margin-left: auto; width: 8px; height: 8px; border: 0; }

/* ---------- side navigation ---------- */
.side { padding: 16px 12px 24px; overflow-y: auto; border-right: 1px solid var(--line); background: rgba(10, 10, 16, 0.5); }
.side__label { margin: 20px 10px 7px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-3); }
.nav {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; margin-bottom: 2px;
  border: 0; border-radius: 10px; background: transparent; color: var(--txt-2);
  font: 600 13.5px/1.2 var(--font); text-align: left; cursor: pointer;
}
.nav .icon { font-size: 17px; opacity: 0.85; }
.nav:hover { background: rgba(255, 255, 255, 0.05); color: var(--txt); }
.nav.is-on { background: var(--acc-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35); }
.nav.is-on .icon { color: #c4b5fd; opacity: 1; }

/* ---------- main + sticky preview ---------- */
.main { overflow-y: auto; scroll-behavior: smooth; position: relative; }
.dock {
  position: sticky; top: 0; z-index: 20; padding: 14px 28px 12px;
  background: linear-gradient(180deg, var(--bg) 78%, rgba(10, 10, 16, 0));
}
.dock__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.dock__title { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fb7185; box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.2); flex: none; }
.dock__frame {
  --pv-scale: 0.5; position: relative; width: 100%; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r); background: #101018;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
}
/* color-scheme: normal matches the overlay page. A dark scheme on the iframe element would make the
   browser paint an opaque canvas behind the (transparent) bar. */
.dock__frame iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 220px; border: 0; transform-origin: 0 0; transform: scale(var(--pv-scale)); background: transparent; color-scheme: normal; }
.dock__frame[data-bg='checker'] { background: conic-gradient(#2a2a36 25%, #1c1c26 0 50%, #2a2a36 0 75%, #1c1c26 0) 0 0 / 18px 18px; }
.dock__frame[data-bg='dark'] { background: linear-gradient(160deg, #1b2438, #0c0f18 70%); }
.dock__frame[data-bg='light'] { background: linear-gradient(160deg, #f4f6fb, #d9dfec); }
.dock__frame[data-bg='green'] { background: #00b140; }
.dock.is-collapsed .dock__frame { display: none; }

.views { padding: 6px 28px 64px; max-width: 1280px; }
.view__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 14px 0 20px; }
.view__head h1 { font-size: 26px; letter-spacing: -0.03em; margin-bottom: 4px; }
.view__head p { color: var(--txt-2); max-width: 640px; }
.view { animation: rise 0.28s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- cards & grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.grid--platforms { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); align-items: stretch; }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 18px 16px; min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card--wide { grid-column: 1 / -1; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card__head h2 { font-size: 15px; letter-spacing: -0.01em; flex: 1; }
.notice { border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; color: var(--txt-2); margin-bottom: 16px; border: 1px solid var(--line); background: var(--panel); }
.notice b { color: var(--txt); }
.notice--info { border-color: rgba(34, 211, 238, 0.28); background: rgba(34, 211, 238, 0.06); }
.notice--warn { border-color: rgba(251, 191, 36, 0.32); background: rgba(251, 191, 36, 0.07); margin: 14px 0; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 16px 18px; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--txt-2); }
.cta b { color: var(--txt); }
.hint { font-size: 12.5px; color: var(--txt-3); margin: 6px 0 10px; }
.hint em { color: var(--txt-2); font-style: normal; font-weight: 600; }

/* ---------- form controls ---------- */
.fld { display: block; margin-bottom: 14px; }
.fld > span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--txt-2); }
.fld output { font: 600 12px var(--mono); color: var(--txt); background: rgba(255, 255, 255, 0.07); padding: 1px 7px; border-radius: 6px; }
.fld--inline { display: flex; align-items: center; gap: 12px; margin: 0; }
.fld--inline > span { margin: 0; white-space: nowrap; }
.fld--inline select { max-width: 340px; }
input[type='text'], input[type='password'], input[type='url'], input[type='number'], input[type='datetime-local'], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: #0d0d14; color: var(--txt); font: 500 13.5px var(--font); transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22); }
input::placeholder, textarea::placeholder { color: var(--txt-3); }
input[type='datetime-local'] { color-scheme: dark; }
.secret.is-clear { font-family: var(--mono); font-size: 12.5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }

input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; padding: 0; border: 0; cursor: pointer; }
input[type='range']::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--acc) var(--fill, 50%), rgba(255, 255, 255, 0.12) var(--fill, 50%)); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(139, 92, 246, 0.25); }
input[type='range']::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
input[type='range']::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--acc); }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; }

/* switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.16); transition: background 0.18s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.switch input:checked + i { background: var(--acc); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--acc-2); outline-offset: 2px; }
.switch--label { display: inline-flex; align-items: center; gap: 10px; width: auto; height: auto; font-size: 13px; font-weight: 600; color: var(--txt-2); white-space: nowrap; }
.switch--label i { position: relative; inset: auto; width: 42px; height: 24px; flex: none; }
.switch--label input { width: 42px; height: 24px; right: auto; bottom: auto; }
.row-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.card__head + .row-switch, .row-switch:first-of-type { border-top: 0; }
.row-switch b { display: block; font-size: 13.5px; font-weight: 600; }
.row-switch small { display: block; font-size: 12px; line-height: 1.4; margin-top: 2px; }
.row-switch--flat { border-top: 0; padding-top: 0; margin-bottom: 8px; }

/* checkbox chips */
.chk { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #0d0d14; font-size: 13px; font-weight: 600; color: var(--txt-2); cursor: pointer; user-select: none; }
.chk input { appearance: none; width: 16px; height: 16px; margin: 0; border-radius: 5px; border: 1.5px solid var(--txt-3); display: grid; place-items: center; cursor: pointer; flex: none; }
.chk input:checked { background: var(--acc); border-color: var(--acc); }
.chk input:checked::after { content: ''; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.chk:has(input:checked) { color: var(--txt); border-color: rgba(139, 92, 246, 0.5); background: var(--acc-soft); }
.chips-row, .sub-switches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* segmented */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #0d0d14; border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--txt-2); font: 600 12.5px var(--font); cursor: pointer; }
.seg button:hover { color: var(--txt); }
.seg button.is-on { background: var(--raise); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 2px 6px rgba(0, 0, 0, 0.4); }
.seg--sm button { height: 26px; padding: 0 10px; font-size: 12px; }
.fld > .seg { display: flex; }
.fld > .seg button { flex: 1; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, 0.08); color: var(--txt-2); width: fit-content; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.pill[data-s='live'] { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.pill[data-s='connecting'] { background: rgba(251, 191, 36, 0.14); color: var(--warn); }
.pill[data-s='error'] { background: rgba(251, 113, 133, 0.14); color: var(--bad); }
.pill--warn { background: rgba(251, 191, 36, 0.14); color: var(--warn); }

/* ---------- platform cards ---------- */
.plat { --pc: var(--acc); border-top: 2px solid var(--pc); }
.plat[data-p='twitch'] { --pc: var(--twitch); }
.plat[data-p='youtube'] { --pc: var(--youtube); }
.plat[data-p='kick'] { --pc: var(--kick); }
.plat[data-p='tiktok'] { --pc: var(--tiktok); }
.tp[data-p='twitch'] { --pc: var(--twitch); } .tp[data-p='youtube'] { --pc: var(--youtube); }
.tp[data-p='kick'] { --pc: var(--kick); } .tp[data-p='tiktok'] { --pc: var(--tiktok); }
.plat__head { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.plat__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, #0d0d14); border: 1px solid color-mix(in srgb, var(--pc) 32%, transparent); flex: none; }
.plat__name { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.plat__name h2 { font-size: 17px; letter-spacing: -0.02em; }
.plat__gives { font-size: 12.5px; color: var(--txt-3); margin-bottom: 14px; }
.plat__gives b { color: var(--txt-2); font-weight: 600; }
.plat__detail { font-size: 12.5px; color: var(--bad); margin-top: 10px; line-height: 1.45; }
.plat__detail:empty { display: none; }
.plat:not(:has([data-path$='.enabled']:checked)) .fld,
.plat:not(:has([data-path$='.enabled']:checked)) .more { opacity: 0.55; }
details.more { margin: 2px 0 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); }
details.more summary { cursor: pointer; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--txt-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '›'; font-size: 16px; line-height: 1; transition: transform 0.18s; color: var(--txt-3); }
details.more[open] summary::before { transform: rotate(90deg); }
details.more summary em { font-style: normal; color: var(--txt-3); font-weight: 500; }
details.more > :not(summary) { margin-left: 12px; margin-right: 12px; }
details.more > :last-child { margin-bottom: 12px; }
.steps { padding-left: 18px; margin: 4px 12px 8px 30px; color: var(--txt-2); font-size: 12.5px; }
.steps li { margin-bottom: 5px; }
.steps--big { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; }
.steps--big li { margin-bottom: 9px; padding-left: 4px; }

/* ---------- swatches ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.sw { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d14; cursor: pointer; color: var(--txt-2); font: 600 12.5px var(--font); text-align: left; }
.sw__c { height: 36px; border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.sw:hover { border-color: var(--line-2); color: var(--txt); }
.sw.is-on { border-color: var(--acc); color: #fff; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25); }

/* ---------- split (left panel) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; }
.cover { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.cover__img { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #0d0d14 conic-gradient(#1b1b26 25%, #14141d 0 50%, #1b1b26 0 75%, #14141d 0) 0 0 / 16px 16px; border: 1px solid var(--line-2); }
.cover__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover__img img:not([src]) { visibility: hidden; }
.cover__src { font-size: 12px; color: var(--txt-3); text-align: center; }

/* ---------- editable lists ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.list--tight { gap: 6px; margin-bottom: 14px; }
.item { border: 1px solid var(--line); border-radius: 12px; background: #0f0f17; padding: 12px 14px 4px; }
.item__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.item__head b { flex: 1; font-size: 13px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; min-width: 0; }
.item__head b .icon { font-size: 16px; color: var(--acc-2); }
.item__head b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .fld { margin-bottom: 10px; }
.item .fld > span { font-size: 12px; }
.item__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--txt-2); cursor: pointer; display: grid; place-items: center; font-size: 14px; font-family: inherit; }
.icon-btn:hover { background: var(--raise); color: #fff; }
.icon-btn[disabled] { opacity: 0.3; pointer-events: none; }
.icon-btn--del:hover { color: #fda4af; border-color: rgba(251, 113, 133, 0.4); }
.tile-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0f0f17; }
.tile-row .chk { flex: 1; border: 0; background: transparent; padding: 0; }
.tile-row .chk:has(input:checked) { background: transparent; }
.tile-row.is-off { opacity: 0.55; }
.empty { padding: 22px; text-align: center; color: var(--txt-3); border: 1px dashed var(--line-2); border-radius: 12px; }

/* ---------- tests ---------- */
.test { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; align-items: end; }
.test__note { grid-column: span 2; }
.test .btn { margin-bottom: 14px; }
.test__chk { margin-bottom: 14px; align-self: end; height: 40px; }
.test__quick { margin-top: 2px; }

/* ---------- monitor ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { --pc: var(--acc); padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.stat[data-p='twitch'] { --pc: var(--twitch); } .stat[data-p='youtube'] { --pc: var(--youtube); }
.stat[data-p='kick'] { --pc: var(--kick); } .stat[data-p='tiktok'] { --pc: var(--tiktok); }
.stat__l { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-3); }
.stat__l .icon { font-size: 14px; color: var(--pc); }
.stat__v { margin-top: 6px; font: 700 26px/1.1 var(--mono); letter-spacing: -0.04em; }
.stat__v.is-none { color: var(--txt-3); }
.stat--total { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.08)); border-color: rgba(139, 92, 246, 0.35); }
.card--feed { padding-bottom: 8px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 560px); min-height: 260px; overflow-y: auto; }
.feed li { display: flex; align-items: baseline; gap: 10px; padding: 7px 4px; border-top: 1px solid var(--line); font-size: 13px; animation: rise 0.2s var(--ease); }
.feed li:first-child { border-top: 0; }
.feed time { font: 500 11px var(--mono); color: var(--txt-3); flex: none; }
.feed .badge { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; color: #0a0a10; background: var(--pc); }
.feed li[data-p='twitch'] { --pc: var(--twitch); } .feed li[data-p='youtube'] { --pc: var(--youtube); }
.feed li[data-p='kick'] { --pc: var(--kick); } .feed li[data-p='tiktok'] { --pc: var(--tiktok); }
.feed li[data-p='twitch'] .badge, .feed li[data-p='youtube'] .badge { color: #fff; }
.feed .who { font-weight: 700; flex: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .what { color: var(--txt-2); min-width: 0; word-break: break-word; }
.feed li.is-event { background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 11%, transparent), transparent 55%); }
.feed li.is-event .what { color: var(--txt); font-weight: 600; }
.feed[data-filter='events'] li:not(.is-event), .feed[data-filter='chat'] li.is-event { display: none; }
.feed__empty { padding: 36px 10px 30px; text-align: center; color: var(--txt-3); }
.feed:has(li) + .feed__empty { display: none; }

/* ---------- OBS link ---------- */
.link textarea { height: auto; padding: 12px; font: 500 12px/1.5 var(--mono); word-break: break-all; color: var(--txt-2); margin-bottom: 12px; resize: none; background: #0b0b11; }
.card--link .card__head { margin-bottom: 12px; }

/* ---------- go-live checklist ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0f0f17; font-size: 13.5px; }
.checks .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; }
.checks li[data-ok='true'] .mark { background: rgba(52, 211, 153, 0.18); color: var(--ok); }
.checks li[data-ok='false'] { border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.05); }
.checks li[data-ok='false'] .mark { background: rgba(251, 191, 36, 0.2); color: var(--warn); }
.checks .txt { flex: 1; min-width: 0; color: var(--txt-2); }
.checks .txt b { color: var(--txt); font-weight: 600; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 100; padding: 11px 18px; border-radius: 12px; background: #23233a; border: 1px solid rgba(139, 92, 246, 0.5); font-weight: 600; font-size: 13.5px; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7); animation: rise 0.25s var(--ease); }
.toast[data-kind='error'] { border-color: rgba(251, 113, 133, 0.6); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 62px auto minmax(0, 1fr); grid-template-areas: 'top' 'side' 'main'; }
  .side { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side__label { display: none; }
  .nav { width: auto; white-space: nowrap; margin: 0; }
  .top__plats { display: none; }
  .brand { min-width: 0; }
  .brand__txt span { display: none; }
  .dock, .views { padding-left: 16px; padding-right: 16px; }
  .split { grid-template-columns: 1fr; }
  .cover { flex-direction: row; align-items: center; }
  .cover__img { width: 90px; flex: none; }
  .two { grid-template-columns: 1fr; }
  .test__note { grid-column: auto; }
  .view__head { flex-direction: column; align-items: flex-start; }
  .top__actions .btn span:not(.dot):not([data-icon]) { font-size: 12px; }
  #btnMonitorTop { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
