/* StreamForge Studio v11 — broadcast console
   Flat ink panels on a dimmed night-lake backdrop, hairline rules, tight radii, dense type.
   Colour is information: the brand blue for actions, tally red only for what is live, status tints for state.
   No pills: labels are small square tags, status is a dot and a word, tabs are underlined. */
@font-face { font-family: 'Inter'; src: url('/static/assets/InterVariable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('/static/assets/Bricolage.woff2') format('woff2-variations'); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }

:root {
  --ink: #05071a;
  --deck: #0a0d24;
  --deck-2: #0f1331;
  --deck-3: #161b44;
  --well: rgba(3, 5, 18, .6);
  --panel: rgba(10, 13, 33, .84);
  --panel-solid: #0a0d24;
  --rule: rgba(148, 163, 255, .10);
  --rule-2: rgba(148, 163, 255, .17);
  --rule-3: rgba(148, 163, 255, .30);
  --hover: rgba(148, 163, 255, .06);
  --active: rgba(148, 163, 255, .11);
  --text: #eceffc;
  --text-2: #a2aad0;
  --text-3: #687197;
  --cyan: #3fd0ff;
  --blue: #4f7bff;
  --violet: #8d5cff;
  --accent: #5674ff;
  --accent-2: #6884ff;
  --accent-text: #a9bbff;
  --tally: #ff3358;
  --green: #2fd895;
  --amber: #ffb547;
  --red: #ff4f6d;
  --signal: linear-gradient(100deg, #3fd0ff 0%, #4f7bff 48%, #8d5cff 100%);
  --signal-soft: linear-gradient(100deg, rgba(63, 208, 255, .14), rgba(79, 123, 255, .14) 50%, rgba(141, 92, 255, .14));
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: var(--font);
  --brandface: 'Bricolage', 'Inter', system-ui, sans-serif;
  --r-lg: 12px;
  --r: 10px;
  --r-sm: 7px;
  --r-xs: 5px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .025) inset, 0 10px 30px -18px rgba(0, 0, 0, .85);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* legacy names used across pages */
  --line: var(--rule);
  --line-2: var(--rule-2);
  --grad: var(--signal);
  --grad-btn: var(--signal);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--ink); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-size: 13.5px; line-height: 1.45; letter-spacing: -0.004em; overflow: hidden; font-feature-settings: 'cv11', 'ss01'; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #cfd9ff; }
::selection { background: rgba(86, 116, 255, .45); }
:focus-visible { outline: 2px solid rgba(120, 150, 255, .9); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- canvas ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; background: var(--ink) url('/static/assets/bg.jpg') center / cover no-repeat; }
.backdrop::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 10%, rgba(20, 30, 90, .10), rgba(4, 6, 20, .6) 70%), linear-gradient(180deg, rgba(4, 6, 22, .3), rgba(4, 6, 22, .6)); }
.backdrop.studio { background: var(--ink) url('/static/assets/studio-bg.jpg') center 26% / cover no-repeat; }
.backdrop.studio::after { background:
  linear-gradient(180deg, rgba(5, 7, 26, .70) 0%, rgba(5, 7, 26, .86) 34%, rgba(5, 7, 26, .95) 70%, rgba(5, 7, 26, .97) 100%),
  linear-gradient(90deg, rgba(5, 7, 26, .5), rgba(5, 7, 26, 0) 40%); }
#app { position: relative; z-index: 1; height: 100%; }

/* ---------- primitives ---------- */
.glass { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%); }
.grad-text { background: var(--signal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 24px; height: 24px; }
code { font-size: .92em; padding: 1px 5px; border-radius: 4px; background: rgba(148, 163, 255, .1); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 16px 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--rule-2); background: rgba(148, 163, 255, .055); cursor: pointer; font-weight: 550; font-size: 13px; white-space: nowrap; color: var(--text);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s; text-decoration: none; }
.btn:hover { border-color: var(--rule-3); background: rgba(148, 163, 255, .1); color: #fff; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .icon { width: 15px; height: 15px; }
.btn.primary { border: 1px solid rgba(255, 255, 255, .08); background-color: var(--accent); background-image: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0));
  color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn.primary:hover { background-color: var(--accent-2); }
.btn.outline { background: transparent; border-color: rgba(120, 150, 255, .5); color: #dce4ff; }
.btn.danger { border-color: rgba(255, 79, 109, .42); background: rgba(255, 79, 109, .1); color: #ffc9d3; }
.btn.danger:hover { background: rgba(255, 79, 109, .18); border-color: rgba(255, 79, 109, .6); }
.btn.success { border-color: rgba(47, 216, 149, .42); background: rgba(47, 216, 149, .1); color: #bff5dd; }
.btn.success:hover { background: rgba(47, 216, 149, .17); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
.icon-btn { width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; display: grid;
  place-items: center; cursor: pointer; color: var(--text-2); position: relative; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link { color: var(--accent-text); cursor: pointer; font-weight: 550; font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; background: none; border: 0; padding: 0; }
.link:hover { color: #d2dcff; }
.link .icon { width: 14px; height: 14px; }

/* ---------- tags (formerly chips) and status dots ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 550;
  border: 0; background: rgba(148, 163, 255, .1); color: #c6cdee; white-space: nowrap; line-height: 1; }
.chip .icon { width: 12px; height: 12px; }
.chip.blue { background: rgba(86, 116, 255, .16); color: #b8c7ff; }
.chip.violet { background: rgba(141, 92, 255, .16); color: #d6c8ff; }
.chip.amber { background: rgba(255, 181, 71, .13); color: #ffd595; }
.chip.green { background: rgba(47, 216, 149, .12); color: #9aeccb; }
.chip.red { background: rgba(255, 79, 109, .13); color: #ffb3c1; }
.chip.cyan { background: rgba(63, 208, 255, .12); color: #a8e8ff; }
.chip.live { background: var(--tally); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 0 5px; height: 18px; border-radius: 3px; }
.pill-rec { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 8px; border-radius: 5px;
  background: rgba(255, 51, 88, .1); border: 1px solid rgba(255, 51, 88, .32); font-weight: 600; font-size: 12px; color: #ffd0d9; }
.pill-rec .t { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 650; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.live { background: var(--tally); animation: tally 1.6s infinite; }
.dot.ok { background: var(--green); }
.dot.warn { background: var(--amber); }
.dot.bad { background: var(--red); }
@keyframes tally { 50% { opacity: .35; } }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.input, select.input, textarea.input { height: 34px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--rule-2);
  background: var(--well); outline: none; transition: border-color .15s, box-shadow .15s; width: 100%; font-size: 13.5px; }
.input::placeholder { color: var(--text-3); }
select.input { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a2aad0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
textarea.input { height: auto; min-height: 84px; padding: 9px 10px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: var(--rule-3); }
.input:focus { border-color: rgba(110, 140, 255, .85); box-shadow: 0 0 0 3px rgba(86, 116, 255, .2); }
.input:disabled { opacity: .6; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; width: 16px; height: 16px; }
.input-icon > .input { padding-left: 38px; height: 40px; font-size: 14px; }
.input-icon > .trail { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text-2); font-size: 13px; user-select: none; }
.check input { appearance: none; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--rule-3); background: var(--well);
  display: grid; place-items: center; cursor: pointer; flex: none; margin: 0; }
.check input[type=radio] { border-radius: 50%; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.switch { position: relative; width: 32px; height: 18px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 9px; background: rgba(148, 163, 255, .16); cursor: pointer; transition: .18s; }
.switch span::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; left: 2px; top: 2px; background: #dfe4fb; transition: .18s var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid rgba(120, 150, 255, .9); outline-offset: 2px; }
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--r-sm); background: var(--well); border: 1px solid var(--rule); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 26px; padding: 0 10px; border-radius: 5px; cursor: pointer; color: var(--text-2); font-weight: 550; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.on { background: rgba(148, 163, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(148, 163, 255, .14), 0 1px 2px rgba(0, 0, 0, .35); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent)) 0 / var(--fill, 0%) 100% no-repeat, rgba(148, 163, 255, .18); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin-top: -5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5); transition: box-shadow .15s; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 0 0 4px rgba(86, 116, 255, .28); }
input[type=range]:focus-visible { outline: none; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(148, 163, 255, .18); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }

/* ======================================================================= LOGIN */
.login { height: 100%; overflow: auto; }
.login-nav { display: flex; align-items: center; padding: 22px 56px; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--brandface); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: #fff; }
.brand .forge { background: linear-gradient(90deg, #5bc2ff, #6d7dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { width: 32px; height: 32px; flex: none; }
.login-links { display: flex; gap: 32px; margin-left: 24px; }
.login-links button { background: none; border: 0; color: #cfd6f6; font-weight: 500; font-size: 14px; cursor: pointer; padding: 6px 0; border-bottom: 1px solid transparent; }
.login-links button:hover { color: #fff; border-bottom-color: rgba(150, 170, 255, .6); }
.login-nav .spacer { flex: 1; }
.login-body { display: grid; grid-template-columns: minmax(520px, 1.25fr) minmax(380px, 440px); gap: 48px; padding: 8px 56px 40px; min-height: calc(100% - 90px); align-items: center; position: relative; }
.kicker { color: #7fd6ff; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.hero-title { font-family: var(--brandface); font-size: clamp(44px, 5vw, 74px); line-height: .98; margin: 14px 0 18px; font-weight: 720; letter-spacing: -0.04em; font-stretch: 88%; }
.hero-title .c, .hero-title .v { background: linear-gradient(90deg, #5fd6ff, #6a7dff 60%, #9a6bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { font-size: 17px; line-height: 1.55; color: #c3cbef; max-width: 520px; }
.features { display: flex; gap: 30px; margin: 28px 0 30px; flex-wrap: wrap; }
.feature { display: flex; gap: 12px; align-items: center; }
.feature .tile { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; color: #fff; padding: 0; background: rgba(86, 116, 255, .22) !important; border: 1px solid rgba(120, 150, 255, .3); box-shadow: none; }
.feature b { display: block; font-size: 14px; }
.feature span { font-size: 12.5px; color: var(--text-2); }
.showcase { position: relative; height: 320px; max-width: 760px; }
.laptop { position: absolute; left: 0; bottom: 0; width: 520px; height: 290px; border-radius: 12px; padding: 10px;
  background: rgba(8, 11, 32, .88); border: 1px solid rgba(120, 150, 255, .22); box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  transform: perspective(1200px) rotateY(9deg) rotateX(2deg); transform-origin: left center; display: grid; grid-template-columns: 104px 1fr; gap: 10px; overflow: hidden; }
.laptop .side { border-right: 1px solid var(--rule); padding-right: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-2); }
.laptop .side div { padding: 5px 7px; border-radius: 5px; display: flex; gap: 6px; align-items: center; }
.laptop .side div.on { background: rgba(148, 163, 255, .14); color: #fff; }
.laptop .screen { border-radius: 7px; position: relative; overflow: hidden; }
.laptop .screen .scene { position: absolute; inset: 0; background: radial-gradient(circle at 70% 70%, rgba(255, 120, 200, .3), transparent 40%), radial-gradient(circle at 25% 60%, rgba(80, 200, 255, .3), transparent 45%), linear-gradient(160deg, #1d1f5e, #2b1858 60%, #0d1036); }
.laptop .bubble { position: absolute; left: 44%; top: 46%; padding: 7px 10px; border-radius: 6px; background: rgba(8, 11, 32, .9); border: 1px solid rgba(120, 170, 255, .5); font-size: 12px; }
.laptop .bubble b { display: block; }
.laptop .strip { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 34px; border-radius: 5px; display: flex; gap: 3px; overflow: hidden; }
.laptop .strip i { flex: 1; background: linear-gradient(180deg, #343a8a, #191c4a); border-radius: 2px; }
.laptop .strip i.on { outline: 2px solid #7ab8ff; }
.phones { position: absolute; left: 460px; bottom: 30px; display: flex; gap: 12px; }
.phone { width: 108px; height: 196px; border-radius: 12px; position: relative; overflow: hidden; border: 1px solid rgba(150, 170, 255, .35); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.phone:nth-child(1) { transform: translateY(-14px); }
.phone:nth-child(3) { transform: translateY(8px); }
.phone .ph-bg { position: absolute; inset: 0; }
.phone .ph-txt { position: absolute; left: 10px; right: 10px; bottom: 32px; font-family: var(--brandface); font-weight: 800; font-size: 18px; line-height: 1; font-stretch: 80%; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.phone .ph-tag { position: absolute; left: 10px; bottom: 10px; font-size: 10px; color: #dfe6ff; }
.formats { position: absolute; left: 510px; bottom: -6px; display: flex; gap: 6px; }
/* the oversized logo and stacked words collided with the sign-in card: the page reads cleaner without them */
.big-s, .side-words { display: none; }
.auth-card { padding: 30px 30px 26px; border-radius: 14px; background: rgba(10, 13, 36, .82); border: 1px solid rgba(140, 160, 255, .2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); z-index: 2; }
.auth-card .head { text-align: center; margin-bottom: 22px; }
.auth-card .head .logo { width: 44px; height: 44px; margin: 0 auto 10px; display: block; }
.auth-card .head .name { font-family: var(--brandface); font-size: 26px; font-weight: 720; letter-spacing: -.03em; }
.auth-card .head .sub { color: #7fb4ff; font-size: 15px; font-weight: 600; margin-top: 2px; }
.auth-card h2 { font-size: 18px; margin: 18px 0 4px; font-weight: 650; letter-spacing: -.02em; }
.auth-card .lead { color: var(--text-2); margin: 0; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; margin: 4px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.form-error { color: #ffc0cc; background: rgba(255, 60, 100, .1); border: 1px solid rgba(255, 90, 120, .32); padding: 9px 11px; border-radius: 7px; font-size: 13px; line-height: 1.45; }
.auth-foot { text-align: center; color: var(--text-2); margin-top: 16px; font-size: 13px; }

/* ======================================================================= SHELL */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); height: 100%; }
.sidebar { display: flex; flex-direction: column; padding: 12px 10px 10px; min-height: 0;
  background: rgba(4, 6, 20, .74); border-right: 1px solid var(--rule); backdrop-filter: blur(20px) saturate(130%); -webkit-backdrop-filter: blur(20px) saturate(130%); }
.sidebar .brand { padding: 4px 8px 14px; font-size: 16.5px; gap: 9px; }
.sidebar .logo { width: 24px; height: 24px; }
.nav-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav button { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 9px; border-radius: 6px; border: 0;
  background: transparent; cursor: pointer; color: var(--text-2); font-size: 13.5px; font-weight: 500; text-align: left; transition: background .12s, color .12s; position: relative; }
.nav button .icon { width: 16px; height: 16px; color: var(--text-3); transition: color .12s; }
.nav button:hover { background: var(--hover); color: var(--text); }
.nav button:hover .icon { color: var(--text-2); }
.nav button.on { background: var(--active); color: #fff; font-weight: 550; }
.nav button.on .icon { color: var(--accent-text); }
.nav .badge { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px; }
.nav button.on .badge { color: var(--text-2); }
.nav .badge.live { color: #ff8da1; }
.nav .badge.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tally); }
.nav .grp { font-size: 11.5px; color: var(--text-3); font-weight: 550; padding: 16px 9px 6px; }
.nav .sep { height: 1px; background: var(--rule); margin: 8px 6px; }
.side-card { margin-top: 10px; padding: 10px; border-radius: 8px; position: relative; overflow: hidden; flex: none; cursor: pointer;
  background: rgba(148, 163, 255, .04); border: 1px solid var(--rule); transition: border-color .15s, background .15s; }
.side-card:hover { border-color: var(--rule-2); background: rgba(148, 163, 255, .07); }
.side-card .top { display: flex; gap: 10px; align-items: center; position: relative; }
.side-card .bolt { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: rgba(86, 116, 255, .18); flex: none; color: var(--accent-text); }
.side-card .bolt .icon { width: 15px; height: 15px; }
.side-card b { font-size: 11.5px; display: block; }
.side-card .tier-name { font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }
.side-card p { margin: 8px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.45; position: relative; }
.side-card .meter { height: 3px; border-radius: 2px; background: rgba(148, 163, 255, .14); margin-top: 9px; overflow: hidden; position: relative; }
.side-card .meter i { display: block; height: 100%; background: var(--signal); border-radius: 2px; }
.side-card .btn { margin-top: 10px; position: relative; height: 28px; font-size: 12.5px; }
.side-card .btn.primary { background: rgba(86, 116, 255, .14); background-image: none; border: 1px solid rgba(110, 140, 255, .32); color: #dbe2ff; box-shadow: none; }
.side-card .btn.primary:hover { background: rgba(86, 116, 255, .24); }
@media (max-height: 760px) { .side-card p, .side-card .meter { display: none; } .nav button { height: 30px; } .sidebar .brand { padding-bottom: 10px; } }
/* 13-inch laptops (about 650-700 px of browser height): the AI card shrinks to one tappable row so every nav item,
   Admin included, stays visible without a hidden scroll */
@media (max-height: 700px) { .side-card { padding: 8px 10px; } .side-card .btn { display: none; }
  .side-card .bolt { width: 24px; height: 24px; } .nav button { height: 29px; } .nav .grp { padding: 10px 9px 4px; }
  .nav .sep { margin: 6px 6px; } .sidebar { padding-top: 10px; } .sidebar .brand { padding-bottom: 8px; } }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 16px 0 24px; flex: none;
  border-bottom: 1px solid var(--rule); background: rgba(4, 6, 20, .42); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.search { width: min(380px, 40vw); height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 5px 0 10px; cursor: text; color: var(--text-3);
  border-radius: var(--r-sm); }
.shell .search.glass { background: rgba(148, 163, 255, .05); border: 1px solid var(--rule); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.shell .search.glass:hover { border-color: var(--rule-2); }
.search .icon { width: 15px; height: 15px; }
.search > span:not(.kbd) { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { padding: 1px 5px; border-radius: 4px; border: 1px solid var(--rule-2); font-size: 11px; color: var(--text-3); background: rgba(148, 163, 255, .05); flex: none; font-weight: 550; line-height: 1.5; }
.topbar .spacer { flex: 1; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 12.5px;
  background: rgba(255, 51, 88, .1); border: 1px solid rgba(255, 51, 88, .32); color: #ffd0d9; }
.live-pill:hover { background: rgba(255, 51, 88, .17); }
.notif-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: #ff5aa5; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 13px; }
.user-btn:hover { background: var(--hover); }
.user-btn > span:not(.avatar) { font-weight: 550 !important; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 12px; color: #fff; flex: none; }
.role-pill { padding: 2px 6px; border-radius: 4px; font-weight: 600; font-size: 11px; background: rgba(141, 92, 255, .15); color: #d5c8ff; }
.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 24px 48px; scrollbar-width: thin; scrollbar-color: rgba(148, 163, 255, .2) transparent; }
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb { background: rgba(148, 163, 255, .2); border-radius: 4px; }
.content > .view { max-width: 1520px; margin: 0 auto; }
.view { animation: viewIn .24s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.banner { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; display: flex; gap: 10px; align-items: center; border: 1px solid; font-size: 13px; }
.banner > .icon { width: 16px; height: 16px; }
.banner.info { background: rgba(86, 116, 255, .1); border-color: rgba(86, 116, 255, .32); }
.banner.warning { background: rgba(255, 181, 71, .08); border-color: rgba(255, 181, 71, .34); }
.banner.warning > .icon { color: var(--amber); }
.banner.success { background: rgba(47, 216, 149, .08); border-color: rgba(47, 216, 149, .32); }
.banner.danger { background: rgba(255, 79, 109, .09); border-color: rgba(255, 79, 109, .36); }
.banner.danger > .icon { color: var(--red); }
.main > #sysBanner, .main > #payBanner { padding: 12px 24px 0; }
.main > #sysBanner .banner, .main > #payBanner .banner { margin: 0; max-width: 1520px; margin-inline: auto; }
.main > #sysBanner .banner + .banner { margin-top: 8px; }

/* mobile tab bar */
.tabbar { display: none; }
@media (max-width: 1080px) {
  body { overflow: hidden; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 12px; gap: 4px; }
  .search { width: auto; flex: 1; min-width: 0; }
  .live-pill { padding: 0 8px; }
  .live-pill #livePillT { display: none; }
  .user-btn { padding: 2px; }
  .search .kbd, .user-btn > span:not(.avatar), .user-btn > .icon, .role-pill { display: none; }
  .content { padding: 16px 14px 92px; }
  .main > #sysBanner, .main > #payBanner { padding: 10px 14px 0; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 60px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    background: rgba(6, 8, 24, .96); border-top: 1px solid var(--rule-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--text-3); font-size: 10.5px; font-weight: 550; border-radius: 8px; cursor: pointer; position: relative; }
  .tabbar button .icon { width: 19px; height: 19px; }
  .tabbar button.on { color: #fff; }
  .tabbar button.on .icon { color: var(--accent-text); }
  .tabbar button .badge { position: absolute; top: 3px; right: calc(50% - 22px); min-width: 16px; height: 16px; border-radius: 4px; background: var(--tally); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
}

/* ---------- page heads ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.page-head p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; max-width: 72ch; }
.page-head > .row { flex-wrap: wrap; }
.studio-title { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; margin: 0; line-height: 1.25; }
.studio-sub { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.studio-tag { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }

/* ---------- cards ---------- */
.card { padding: 16px; min-width: 0; position: relative; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 24px; }
.card-head > .icon { width: 16px; height: 16px; color: var(--text-3); }
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card .empty, .empty { color: var(--text-3); font-size: 13px; padding: 14px 0; line-height: 1.55; }
.tile { padding: 10px 12px; border-radius: 8px; background: rgba(148, 163, 255, .035); border: 1px solid var(--rule); min-width: 0; }
.tile .k { display: flex; gap: 8px; align-items: center; }
.tile .k > .icon { width: 16px; height: 16px; color: var(--text-3); }
.tile b { font-size: 13.5px; display: block; font-weight: 600; }
.tile small { font-size: 12px; color: var(--text-3); display: block; }
.section-title { font-size: 12.5px; color: var(--text-2); font-weight: 600; margin: 18px 0 8px; }
.panel { padding: 18px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-radius: var(--r); overflow: hidden; background: var(--rule); border: 1px solid var(--rule); }
.kpi { padding: 12px 14px; background: var(--panel-solid); min-width: 0; }
.kpis .kpi.glass { border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--panel-solid); }
.kpi .icon { width: 15px; height: 15px; color: var(--text-3); }
.kpi .v { font-size: 22px; font-weight: 650; letter-spacing: -0.025em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .l { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.kpi .d { font-size: 11.5px; margin-top: 6px; font-weight: 600; color: var(--green); }
.kpi .d.down { color: #ff8ba0; }
.kpi .d.flat { color: var(--text-3); font-weight: 500; }
.chart { position: relative; height: 150px; margin-top: 12px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .tip { position: absolute; padding: 5px 8px; border-radius: 6px; background: #0d1130; border: 1px solid var(--rule-2); font-size: 12px; pointer-events: none; transform: translate(-50%, -120%); white-space: nowrap; z-index: 3; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.axis { fill: var(--text-3); font-size: 10.5px; font-family: var(--font); }
.big-number { display: flex; align-items: center; gap: 14px; margin: -2px 0 12px; }
.big-number .n { font-size: 32px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.big-number .lbl { color: var(--text-2); font-size: 12.5px; line-height: 1.35; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 32px; margin-left: auto; flex: 1; max-width: 140px; }
.bars i { flex: 1; border-radius: 1px; background: rgba(120, 150, 255, .7); min-height: 2px; }

/* lists */
.mlist { display: flex; flex-direction: column; gap: 2px; }
.mrow { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 6px; border-radius: 7px; cursor: pointer; transition: background .12s; margin: 0 -6px; }
.mrow:hover { background: var(--hover); }
.thumb { width: 64px; height: 36px; border-radius: 4px; object-fit: cover; background: #10143a; display: block; }
.mrow .t { font-weight: 550; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.mrow .meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; color: var(--text-2); font-size: 12px; flex-wrap: wrap; row-gap: 4px; }
.mrow .ago { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.mrow .icon-btn { width: 24px; height: 24px; color: var(--text-3); }
.plist { display: flex; flex-direction: column; gap: 2px; }
.prow { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; cursor: pointer; padding: 6px; border-radius: 7px; margin: 0 -6px; transition: background .12s; }
.prow:hover { background: var(--hover); }
.pthumb { position: relative; width: 72px; height: 40px; border-radius: 4px; overflow: hidden; background: #10143a; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pthumb .d { position: absolute; bottom: 3px; right: 3px; font-size: 10px; font-weight: 650; padding: 0 4px; border-radius: 3px; background: rgba(0, 0, 0, .72); font-variant-numeric: tabular-nums; line-height: 15px; }
.prow b { display: block; font-size: 13px; font-weight: 550; }
.prow small { color: var(--text-3); font-size: 12px; }

/* ======================================================================= DASHBOARD */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 16px; flex-wrap: wrap; }
.dash-head .row { gap: 8px; }
.dropbar { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; margin-bottom: 16px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--rule-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color .15s, box-shadow .15s; }
.dropbar:focus-within { border-color: rgba(110, 140, 255, .75); box-shadow: 0 0 0 3px rgba(86, 116, 255, .16); }
.dropbar > .icon { color: var(--text-3); width: 17px; height: 17px; }
.dropbar input { flex: 1; min-width: 0; height: 34px; border: 0; background: transparent; outline: none; font-size: 14px; }
.dropbar input::placeholder { color: var(--text-3); }
.dropbar .sep { width: 1px; height: 20px; background: var(--rule-2); margin: 0 2px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.dash-grid + .dash-grid { margin-top: 16px; }
.dash-grid.thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-radius: var(--r); overflow: hidden; background: var(--rule); border: 1px solid var(--rule); }
.stat-strip.six { grid-template-columns: repeat(6, 1fr); }
.stat-strip.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1180px) { .stat-strip.six { grid-template-columns: repeat(3, 1fr); } }
.stat-strip > div { background: var(--panel-solid); padding: 12px 14px; min-width: 0; position: relative; }
.stat-strip > div[data-act] { cursor: pointer; transition: background .12s; }
.stat-strip > div[data-act]:hover { background: #0e1230; }
.stat-strip .v { font-size: 22px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-strip .v small { font-size: 12px; font-weight: 550; color: var(--text-3); letter-spacing: 0; margin-left: 3px; }
.stat-strip .l { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.stat-strip .d { font-size: 11.5px; font-weight: 600; color: var(--green); margin-top: 4px; }
.stat-strip .d.down { color: #ff8ba0; }
.stat-strip .d.flat { color: var(--text-3); font-weight: 500; }
.stat-strip .meter { height: 3px; border-radius: 2px; background: rgba(148, 163, 255, .14); margin-top: 8px; overflow: hidden; }
.stat-strip .meter i { display: block; height: 100%; background: var(--signal); }
.stat-strip .meter i.over { background: linear-gradient(90deg, #ffb547, #ff7a59); }
.dash-stats { margin-bottom: 16px; }
.setup { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; margin-bottom: 16px; flex-wrap: wrap; }
.setup .count { font-size: 12.5px; color: var(--text-2); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.setup .count b { color: var(--text); font-weight: 600; }
.checklist { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.card > .checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.check-step { display: flex; gap: 8px; align-items: center; text-align: left; line-height: 1.3; height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--text); }
.check-step:hover { background: var(--hover); border-color: var(--rule); }
.check-step .tick { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--rule-3); display: grid; place-items: center; flex: none; }
.check-step .tick .icon { width: 10px; height: 10px; stroke-width: 3.2; }
.check-step.done { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(148, 163, 255, .3); }
.check-step.done .tick { background: var(--green); border-color: var(--green); color: #04261a; }
.progress-ring { width: 22px; height: 22px; flex: none; }
.poster-row { display: grid; grid-auto-flow: column; grid-auto-columns: 136px; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: rgba(148, 163, 255, .2) transparent; }
.poster { position: relative; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; cursor: pointer; background: #0f1336; border: 1px solid var(--rule); transition: border-color .15s; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 6, 20, .4) 0%, transparent 24%); pointer-events: none; }
.pcard { min-width: 0; cursor: pointer; }
.pcard .ptitle { font-size: 12.5px; font-weight: 550; line-height: 1.3; margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .pmeta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard:hover .poster { border-color: rgba(140, 165, 255, .5); }
.pcard:hover .poster img { transform: scale(1.03); }
.poster .cap { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 1; font-size: 12px; font-weight: 600; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.poster .top { position: absolute; left: 6px; top: 6px; right: 6px; display: flex; justify-content: space-between; z-index: 1; }
.poster .top .chip { background: rgba(4, 6, 20, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.poster:hover { border-color: rgba(140, 165, 255, .5); }
.poster:hover img { transform: scale(1.03); }
.usage-meter { height: 6px; border-radius: 3px; background: rgba(148, 163, 255, .14); overflow: hidden; }
.usage-meter i { display: block; height: 100%; border-radius: 3px; background: var(--signal); transition: width .6s var(--ease); }
.usage-meter i.over { background: linear-gradient(90deg, #ffb547, #ff7a59); }

/* ======================================================================= CONTROL ROOM (multi-stream) */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.wall.compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.wall.compact .monitor .bar { padding: 8px 10px 9px; gap: 4px; }
.wall.compact .add-monitor { min-height: 0; }
.stack .stat-strip { grid-template-columns: 1fr 1fr; }
.monitor { position: relative; border-radius: 8px; overflow: hidden; background: #04061a; border: 1px solid var(--rule-2); cursor: pointer;
  transition: border-color .15s, box-shadow .15s; display: flex; flex-direction: column; }
.monitor:hover { border-color: var(--rule-3); }
.monitor.rec { border-color: rgba(255, 51, 88, .55); }
.monitor.sel { border-color: #7d98ff; box-shadow: 0 0 0 1px #7d98ff; }
.monitor .screen { position: relative; aspect-ratio: 16 / 9; background: #070a22; overflow: hidden; }
.monitor .screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.monitor .screen .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 12px; text-align: center; padding: 12px; }
.monitor .tally { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; align-items: center; }
.monitor .tally .chip:not(.live) { background: rgba(4, 6, 20, .75); }
.monitor .tc { position: absolute; top: 8px; right: 8px; padding: 0 5px; border-radius: 3px; background: rgba(0, 0, 0, .66); font-variant-numeric: tabular-nums; font-weight: 650; font-size: 11.5px; line-height: 18px; }
.monitor .scan { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; display: flex; align-items: flex-end; gap: 2px; padding: 0 8px 5px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55)); }
.monitor .scan i { flex: 1; background: rgba(140, 200, 255, .75); border-radius: 1px; min-height: 2px; transition: height .5s; }
.monitor .bar { padding: 10px 12px 11px; display: flex; flex-direction: column; gap: 7px; background: var(--panel-solid); border-top: 1px solid var(--rule); }
.monitor .name { display: flex; gap: 7px; align-items: center; font-weight: 600; font-size: 13px; }
.monitor .stats { display: flex; gap: 10px; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.monitor .stats b { color: var(--text-2); font-weight: 600; }
.monitor .acts { display: flex; gap: 6px; }
.monitor .acts .btn { flex: 1; }
.plat { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 800; color: #fff; flex: none; }
.plat.twitch { background: #9146ff; } .plat.youtube { background: #ff0033; } .plat.kick { background: #53fc18; color: #05210a; } .plat.obs { background: #3a3f55; } .plat.upload { background: #3d5bff; }
.add-monitor { border: 1px dashed var(--rule-3); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 200px; cursor: pointer; color: var(--text-2); background: rgba(148, 163, 255, .025); transition: border-color .15s, background .15s, color .15s; text-align: center; padding: 16px; }
.add-monitor:hover { border-color: rgba(125, 152, 255, .7); background: rgba(86, 116, 255, .06); color: #fff; }
.add-monitor .plus { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: rgba(86, 116, 255, .16); color: var(--accent-text); border: 1px solid rgba(110, 140, 255, .3); }
.add-monitor .plus .icon { width: 17px; height: 17px; stroke-width: 2.2; }
.add-monitor b { font-size: 13.5px; color: var(--text); font-weight: 600; }
.add-monitor small { font-size: 12px; color: var(--text-3); max-width: 240px; line-height: 1.45; }
.detect { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 7px; background: var(--well); border: 1px solid var(--rule); font-size: 12.5px; min-height: 38px; }
.focus-panel { margin-top: 16px; }
.watch-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--rule); }
.watch-row:last-child { border-bottom: 0; }

.room-empty { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px dashed var(--rule-2); border-radius: 8px; flex-wrap: wrap; }
.room-empty > .icon { color: var(--text-3); width: 18px; height: 18px; }
.room-empty b { font-size: 13.5px; font-weight: 600; }
.room-empty .dim { font-size: 12.5px; margin-top: 1px; }
.empty-room { display: grid; grid-template-columns: minmax(200px, .9fr) 1.3fr; gap: 16px; align-items: stretch; }
.how { margin: 0; padding: 0; list-style: none; counter-reset: how; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.how li { counter-increment: how; display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; }
.how li::before { content: counter(how); grid-row: span 2; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-weight: 650; font-size: 11.5px; background: rgba(148, 163, 255, .1); color: var(--text-2); margin-top: 1px; }
.how b { font-size: 13.5px; font-weight: 600; }
.how span { color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 700px) { .empty-room { grid-template-columns: 1fr; } }

/* live page blocks */
.live-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.preview { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: #070a22; border: 1px solid var(--rule); }
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview .live-tag { position: absolute; top: 8px; left: 8px; background: var(--tally); color: #fff; font-weight: 700; font-size: 10.5px; letter-spacing: .05em; padding: 3px 6px; border-radius: 3px; display: flex; gap: 5px; align-items: center; }
.preview .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--text-2); padding: 20px; font-size: 13px; }
.capture-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: stretch; }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.stage { padding: 12px; background: var(--panel-solid); position: relative; }
.stage .h { display: flex; gap: 7px; align-items: center; font-weight: 550; font-size: 12.5px; color: var(--text-2); }
.stage .h .icon { width: 15px; height: 15px; }
.stage .v { font-size: 20px; font-weight: 650; margin: 6px 0 2px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stage .s { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.stage.ok { box-shadow: inset 0 2px 0 rgba(47, 216, 149, .7); }
.stage.warn { box-shadow: inset 0 2px 0 rgba(255, 181, 71, .8); }
.stage.bad { box-shadow: inset 0 2px 0 rgba(255, 79, 109, .85); }
.signal-chart { height: 200px; margin-top: 4px; }
.wave { display: flex; align-items: center; gap: 2px; height: 44px; }
.wave i { flex: 1; border-radius: 1px; background: rgba(120, 170, 255, .75); min-height: 3px; transition: height .4s; }
.feed { display: flex; flex-direction: column; gap: 0; max-height: 320px; overflow: auto; }
.feed .item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid var(--rule); font-size: 12.5px; }
.feed .item:last-child { border-bottom: 0; }

/* ======================================================================= REVIEW */
.review { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; align-items: start; }
.review .stage-video { position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--rule-2); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9); }
.review .stage-video video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.review .decide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.review .decide .btn { height: 40px; font-size: 14px; }
.review h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin: 4px 0 8px; line-height: 1.25; }
.queue { display: grid; grid-auto-flow: column; grid-auto-columns: 60px; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; }
.queue .q { aspect-ratio: 9 / 16; border-radius: 5px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #10143a; position: relative; }
.queue .q img { width: 100%; height: 100%; object-fit: cover; }
.queue .q.on { border-color: #7d98ff; }
.queue .q.done { opacity: .35; }
.keys { display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 12px; }
.keys .kbd { margin-right: 4px; }

/* ======================================================================= TIERS */
.tier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tier { position: relative; padding: 18px 16px 16px; border-radius: var(--r); border: 1px solid var(--rule-2); background: var(--panel); display: flex; flex-direction: column; gap: 10px; }
.tier.ultra { border-color: rgba(141, 92, 255, .42); background: linear-gradient(180deg, rgba(141, 92, 255, .08), rgba(141, 92, 255, 0) 45%), var(--panel); }
.tier.current { border-color: #7d98ff; box-shadow: 0 0 0 1px #7d98ff; }
.tier h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.tier .tag { font-size: 12.5px; color: var(--text-2); line-height: 1.5; min-height: 38px; }
.tier .big { font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tier .big small { font-size: 12.5px; font-weight: 550; color: var(--text-2); letter-spacing: 0; margin-left: 4px; }
.tier dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 12.5px; }
.tier dt { color: var(--text-2); }
.tier dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.tier .models { font-size: 11.5px; color: var(--text-3); line-height: 1.5; border-top: 1px solid var(--rule); padding-top: 10px; word-break: break-word; }
.tier .rel { height: 3px; border-radius: 2px; background: rgba(148, 163, 255, .14); overflow: hidden; }
.tier .rel i { display: block; height: 100%; background: var(--signal); }

/* ======================================================================= ADMIN */
.admin-tabs { margin-bottom: 16px; }
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 550; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 88px; }
.mini-bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.mini-bars i { width: 100%; border-radius: 2px 2px 0 0; background: rgba(120, 150, 255, .75); min-height: 2px; }
.mini-bars span { font-size: 10px; color: var(--text-3); }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

/* clips */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
.filters::-webkit-scrollbar { display: none; }
.toolbar .filters { flex: 1; min-width: 0; }
.filters button { flex: none; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; padding: 7px 10px; border-radius: 0; cursor: pointer; font-weight: 550; color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; }
.filters button:hover { color: var(--text); }
.filters button.on { color: #fff; border-bottom-color: var(--accent); }
.filters button .n { margin-left: 6px; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 500; }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; }
.ccard { border-radius: 8px; overflow: hidden; cursor: pointer; transition: border-color .15s, background .15s; background: var(--panel-solid); border: 1px solid var(--rule); position: relative; }
.ccard:hover { border-color: rgba(140, 165, 255, .45); background: #0d1130; }
.ccard .media { position: relative; aspect-ratio: 9 / 14; background: #0f1336; overflow: hidden; }
.ccard .media img, .ccard .media video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.ccard .media .top { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; z-index: 1; }
.ccard .media .dur { position: absolute; bottom: 6px; right: 6px; font-size: 11px; font-weight: 650; padding: 0 5px; line-height: 18px; border-radius: 3px; background: rgba(0, 0, 0, .7); font-variant-numeric: tabular-nums; }
.ccard .body { padding: 9px 10px 10px; }
.ccard .body b { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.ccard .body .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; color: var(--text-3); font-size: 11.5px; gap: 6px; }
.ccard .top .chip { background: rgba(4, 6, 20, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ccard .top .chip.green { color: #8ff0c4; } .ccard .top .chip.amber { color: #ffd38d; } .ccard .top .chip.red { color: #ffabbb; }
.ccard .top .chip.blue { color: #b6c6ff; } .ccard .top .chip.violet { color: #d4c5ff; } .ccard .top .chip.cyan { color: #a2e6ff; }
.ccard .pick { position: absolute; top: 6px; left: 6px; z-index: 2; width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid rgba(255, 255, 255, .8); background: rgba(4, 6, 20, .6); display: none; place-items: center; }
.selecting .ccard .pick { display: grid; }
.selecting .ccard .media .top { left: 32px; }
.ccard.picked { border-color: #7d98ff; box-shadow: 0 0 0 1px #7d98ff; }
.ccard.picked .pick { background: var(--accent); border-color: #fff; }
.bulkbar { position: sticky; bottom: 10px; z-index: 6; margin-top: 14px; padding: 8px 10px 8px 14px; border-radius: var(--r); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 20px; padding: 0 5px; border-radius: 4px; font-size: 11.5px; font-weight: 700;
  background: rgba(4, 6, 20, .74); color: #8ff0c4; font-variant-numeric: tabular-nums; position: relative; flex: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.score::before { content: none; }
.score span { position: relative; }
.upload-zone { border: 1px dashed var(--rule-3); border-radius: var(--r); padding: 24px; text-align: center; color: var(--text-2); cursor: pointer; transition: .15s; background: rgba(148, 163, 255, .025); }
.upload-zone:hover, .upload-zone.drag { border-color: rgba(125, 152, 255, .75); background: rgba(86, 116, 255, .07); color: #fff; }
.progress { height: 4px; border-radius: 2px; background: rgba(148, 163, 255, .14); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--signal); width: 0; transition: width .25s; border-radius: 2px; }

/* tables */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: left; font-weight: 550; color: var(--text-3); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid rgba(148, 163, 255, .06); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(148, 163, 255, .035); }
.table tr.click { cursor: pointer; }

/* multi-select toggles (what to look for): square, never underline tabs */
#genres { border-bottom: 0; flex-wrap: wrap; gap: 6px; overflow: visible; }
#genres button { border: 1px solid var(--rule-2); border-radius: 6px; margin: 0; height: 30px; padding: 0 11px; }
#genres button:hover { border-color: var(--rule-3); }
#genres button.on { background: rgba(86, 116, 255, .16); border-color: rgba(110, 140, 255, .6); color: #fff; }

/* settings tabs: underlined, never pills */
.tabs { display: flex; gap: 2px; padding: 0; border-radius: 0; background: none; border: 0; border-bottom: 1px solid var(--rule); width: auto; max-width: 100%; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; padding: 8px 10px; border-radius: 0; cursor: pointer; font-weight: 550; color: var(--text-2); display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; font-size: 13px; }
.tabs button .icon { width: 15px; height: 15px; color: var(--text-3); }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: #fff; border-bottom-color: var(--accent); background: none; }
.tabs button.on .icon { color: var(--accent-text); }
.tabs button .n { font-size: 11.5px; padding: 0; border-radius: 0; background: none; color: var(--text-3); font-variant-numeric: tabular-nums; }
.preset-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.preset { padding: 12px; border-radius: 8px; border: 1px solid var(--rule); background: rgba(148, 163, 255, .03); cursor: pointer; text-align: left; transition: .15s; }
.preset:hover { border-color: var(--rule-2); background: var(--hover); }
.preset.on { border-color: #7d98ff; background: rgba(86, 116, 255, .1); box-shadow: 0 0 0 1px #7d98ff; }
.preset b { display: block; margin: 6px 0 3px; font-weight: 600; font-size: 13px; }
.preset-ic { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: rgba(148, 163, 255, .1); color: var(--text-2); }
.preset-ic .icon { width: 16px; height: 16px; }
.preset.on .preset-ic { background: rgba(86, 116, 255, .22); color: var(--accent-text); }
.preset small { color: var(--text-2); font-size: 12px; line-height: 1.4; display: block; }
.cap-preview { aspect-ratio: 9 / 16; max-height: 440px; border-radius: 10px; position: relative; overflow: hidden; background: url('/static/assets/bg.jpg') 40% 50% / cover; border: 1px solid var(--rule-2); }
.cap-preview .cap { position: absolute; left: 8%; right: 8%; text-align: center; font-weight: 900; }
.cap-preview .hook { position: absolute; left: 10%; right: 10%; top: 15%; text-align: center; font-weight: 800; padding: 7px 9px; border-radius: 5px; background: rgba(107, 77, 255, .92); font-size: 15px; }
.prov { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--rule); background: rgba(148, 163, 255, .03); }
.prov .rank { width: 24px; height: 24px; border-radius: 5px; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: rgba(148, 163, 255, .12); color: var(--text-2); flex: none; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: rgba(2, 3, 14, .7); border: 1px solid var(--rule); border-radius: 7px; padding: 10px 12px; white-space: pre-wrap; color: #cfdcff; overflow: auto; }

/* ======================================================================= OVERLAYS */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(2, 3, 12, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 24px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 20px; border-radius: var(--r-lg); background: #0b0e27;
  border: 1px solid var(--rule-2); box-shadow: 0 30px 90px rgba(0, 0, 0, .65); animation: pop .22s var(--ease); position: relative; }
.modal.sm { width: min(500px, 100%); }
.modal.md { width: min(740px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }
.modal .close { position: absolute; top: 12px; right: 12px; }
.modal h2, .drawer h2 { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; padding-right: 36px; }
.drawer { position: fixed; top: 8px; right: 8px; bottom: 8px; width: min(780px, calc(100% - 16px)); z-index: 51; padding: 20px; overflow: auto;
  border-radius: var(--r-lg); background: #0b0e27; border: 1px solid var(--rule-2); box-shadow: -24px 0 80px rgba(0, 0, 0, .6); animation: slide .26s var(--ease); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.clip-modal { display: grid; grid-template-columns: 320px 1fr; gap: 22px; }
.clip-modal video { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; background: #000; border: 1px solid var(--rule-2); display: block; }
.trace { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.trace .st { display: grid; grid-template-columns: 16px 96px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; background: transparent; font-size: 12px; border-bottom: 1px solid var(--rule); }
.trace .st:last-child { border-bottom: 0; }
.trace .st .ms { color: var(--text-3); font-variant-numeric: tabular-nums; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.quick button { border: 1px solid var(--rule-2); background: rgba(148, 163, 255, .05); height: 28px; padding: 0 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: #d3daf8; font-weight: 500; }
.quick button:hover { border-color: rgba(125, 152, 255, .7); color: #fff; }
.quick > label { border-radius: 6px !important; }
.popover { position: fixed; z-index: 60; width: 380px; max-height: 520px; overflow: auto; padding: 6px; border-radius: var(--r); background: #0d1130; border: 1px solid var(--rule-2); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); animation: pop .16s var(--ease); }
.menu button { width: 100%; display: flex; gap: 10px; align-items: center; height: 32px; padding: 0 10px; border-radius: 6px; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 13px; color: var(--text); }
.menu button .icon { width: 16px; height: 16px; color: var(--text-3); }
.menu button:hover { background: var(--active); }
.notif { display: flex; gap: 10px; padding: 9px 8px; border-radius: 7px; cursor: pointer; }
.notif:hover { background: var(--hover); }
.notif .ic { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; flex: none; background: rgba(86, 116, 255, .16); color: var(--accent-text); }
.notif .ic.success { background: rgba(47, 216, 149, .13); color: var(--green); }
.notif .ic.warning { background: rgba(255, 181, 71, .13); color: var(--amber); }
.notif b { font-size: 13px; display: block; font-weight: 600; }
.notif small { color: var(--text-2); font-size: 12px; }
.notif.unread b::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff5aa5; margin-left: 7px; vertical-align: middle; }
.palette { width: min(620px, 100%); padding: 0; overflow: hidden; align-self: start; margin-top: 12vh; }
.palette input { width: 100%; height: 50px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; padding: 0 18px; font-size: 15px; outline: none; }
.palette .results { max-height: 420px; overflow: auto; padding: 6px; }
.palette .res { display: flex; gap: 10px; align-items: center; height: 36px; padding: 0 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.palette .res .icon { width: 16px; height: 16px; color: var(--text-3); }
.palette .res.sel, .palette .res:hover { background: var(--active); }
.palette .res.sel .icon { color: var(--accent-text); }
.palette .ask-answer { padding: 14px 16px 10px; line-height: 1.55; font-size: 14px; }
.palette .ask-answer p { margin: 8px 0 0; }
.palette .ask-q { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 12.5px; }
.palette .ask-q .icon { width: 14px; height: 14px; color: var(--accent-text); }
.palette .ask-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.palette .res.hit { height: auto; min-height: 44px; padding: 6px 10px; }
.palette .res.hit img { width: 28px; height: 50px; object-fit: cover; border-radius: 4px; flex: none; }
.palette .res.hit b { font-weight: 600; }
.palette .grp { font-size: 11.5px; color: var(--text-3); padding: 10px 10px 4px; font-weight: 550; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 280px; max-width: 420px; padding: 10px 12px; border-radius: 8px; background: #0f1334; border: 1px solid var(--rule-2); box-shadow: 0 16px 50px rgba(0, 0, 0, .55); display: flex; gap: 10px; align-items: flex-start; animation: pop .2s var(--ease); font-size: 13px; line-height: 1.45; }
.toast .icon { width: 16px; height: 16px; margin-top: 1px; }
.toast.err { border-color: rgba(255, 90, 120, .5); }
.toast.err .icon { color: var(--red); }
.toast.ok { border-color: rgba(47, 216, 149, .45); }
.toast.ok .icon { color: var(--green); }
@media (max-width: 1080px) { .toasts { left: 12px; right: 12px; bottom: 72px; } .toast { min-width: 0; max-width: none; } }

/* editor page */
.editor { display: grid; grid-template-columns: 320px 1fr 340px; gap: 16px; }
.editor video { width: 100%; border-radius: 8px; background: #000; display: block; }
.editor .row { flex-wrap: wrap; }
.src-video { aspect-ratio: 16 / 9; }
.out-video { aspect-ratio: 9 / 16; }
.etl { position: relative; height: 88px; margin-top: 14px; user-select: none; }
.etl .strip { position: absolute; left: 0; right: 0; top: 0; height: 54px; border-radius: 6px; background: #10143a center / 100% 100% no-repeat; border: 1px solid var(--rule-2); overflow: hidden; filter: brightness(.45) saturate(.7); }
.etl .wv { position: absolute; left: 0; right: 0; top: 58px; height: 28px; display: flex; align-items: center; gap: 1px; }
.etl .wv i { flex: 1; background: rgba(140, 150, 255, .5); min-height: 2px; border-radius: 1px; }
.etl .cut { position: absolute; top: 0; height: 54px; border: 2px solid #6fa8ff; border-radius: 5px; cursor: grab; backdrop-filter: brightness(2.1) saturate(1.3); -webkit-backdrop-filter: brightness(2.1) saturate(1.3); background: rgba(90, 160, 255, .08); }
.etl .cut.sel { border-color: #a98bff; background: rgba(140, 100, 255, .2); }
.etl .cut .h { position: absolute; top: -2px; bottom: -2px; width: 8px; background: #6fa8ff; cursor: ew-resize; border-radius: 3px; }
.etl .cut .h.l { left: -5px; } .etl .cut .h.r { right: -5px; }
.etl .ph { position: absolute; top: -6px; height: 96px; width: 2px; background: #fff; pointer-events: none; }
.etl .pk { position: absolute; top: -10px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #ff5aa5; transform: translateX(-5px); }
.cap-list { max-height: 420px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.cap-item { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: center; }
.cap-item .tc { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cap-item input { height: 32px; font-size: 13px; }
#edTranscript span.now { color: var(--cyan); font-weight: 650; }
.timeline { position: relative; margin-top: 12px; }
.filmstrip { height: 52px; border-radius: 6px; overflow: hidden; background: #10143a center / 100% 100% no-repeat; border: 1px solid var(--rule-2); position: relative; }
.wavebar { height: 32px; display: flex; align-items: center; gap: 1px; margin-top: 6px; }
.wavebar i { flex: 1; background: rgba(130, 120, 255, .7); border-radius: 1px; min-height: 2px; }
.playhead { position: absolute; top: -8px; bottom: -4px; width: 2px; background: #6fa8ff; }
.cutbox { position: absolute; top: 0; height: 52px; border: 2px solid #7ab0ff; border-radius: 5px; background: rgba(90, 160, 255, .12); }
.tool-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.se-body { display: grid; grid-template-columns: 140px 1fr; gap: 20px; }
.phone-prev { position: relative; width: 140px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; border: 1px solid var(--rule-2); background: #0f1336; cursor: pointer; }
.phone-prev img, .phone-prev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-prev .dur { position: absolute; bottom: 6px; right: 6px; font-size: 11px; font-weight: 650; padding: 0 5px; line-height: 18px; border-radius: 3px; background: rgba(0, 0, 0, .7); }
.phone-prev .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: .15s; background: rgba(0, 0, 0, .25); }
.phone-prev:hover .play { opacity: 1; }
#saveBar { border-radius: var(--r) !important; padding: 10px 12px 10px 16px !important; }

/* Ask AI results bar in Clips */
.askbar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; margin: -4px 0 14px; border: 1px solid rgba(110, 140, 255, .35);
  background: rgba(86, 116, 255, .08); border-radius: 8px; font-size: 13px; }
.askbar > .icon { color: var(--accent-text); }

/* explained score */
.scorebars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin: 10px 0 4px; }
.scorebars > div { display: grid; grid-template-columns: 62px 1fr 24px; align-items: center; gap: 8px; font-size: 12px; }
.scorebars i { height: 4px; border-radius: 2px; background: rgba(148, 163, 255, .14); overflow: hidden; display: block; }
.scorebars b { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.scorebars .num { text-align: right; color: var(--text-2); }

/* AI critic notes */
.critic { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; }
.critic-issues { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--rule); }
.critic-issues button { display: flex; gap: 8px; align-items: center; padding: 6px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; color: var(--text); font-size: 12.5px; cursor: pointer; text-align: left; min-width: 0; }
.critic-issues button:last-child { border-bottom: 0; }
.critic-issues button:hover b { text-decoration: underline; }
.critic-issues .num { width: 34px; flex: none; }
.critic-issues b { font-weight: 600; white-space: nowrap; }
.critic-issues .grow { color: var(--text-2); }
.critic-issues .sev { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--amber); }
.critic-issues .sev.high { background: var(--red); }
.critic-issues .sev.low { background: var(--text-3); }

/* long videos */
.modal.lg { width: min(980px, 100%); }
.lf-rec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 6px 6px 12px; border: 1px solid var(--rule); border-radius: 8px; font-size: 12.5px; }
.lf-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.lf-item { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 8px; }
.lf-item[data-act] { cursor: pointer; transition: background .12s; }
.lf-item[data-act]:hover { background: var(--hover); }
.lf-item b { font-size: 13px; font-weight: 600; }
.lf-thumb { position: relative; width: 112px; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: #10143a; display: grid; place-items: center; color: var(--text-3); flex: none; }
.lf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lf-thumb .d { position: absolute; right: 4px; bottom: 4px; font-size: 10.5px; font-weight: 650; padding: 0 4px; line-height: 16px; border-radius: 3px; background: rgba(0, 0, 0, .72); font-variant-numeric: tabular-nums; color: #fff; }
.lf-view { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 20px; }
.lf-view video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; border: 1px solid var(--rule-2); display: block; }
.lf-side { min-width: 0; }
.lf-chapters { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 8px; max-height: 220px; overflow-y: auto; }
.lf-chapters button { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; cursor: pointer; text-align: left; font-size: 13px; color: var(--text); min-width: 0; }
.lf-chapters button:last-child { border-bottom: 0; }
.lf-chapters button:hover { background: var(--hover); }
.lf-chapters .num { width: 52px; flex: none; font-size: 12px; }
.lf-copy { display: flex; align-items: center; gap: 8px; padding: 5px 4px 5px 10px; border: 1px solid var(--rule); border-radius: 7px; font-size: 13px; margin-bottom: 6px; }
.lf-copy .icon-btn { width: 26px; height: 26px; }
@media (max-width: 1080px) { .lf-view { grid-template-columns: 1fr; } }

/* ---------- responsive ---------- */
@media (max-width: 1380px) {
  .editor { grid-template-columns: 280px 1fr; }
  .editor > :last-child { grid-column: 1 / -1; }
  .preset-grid { grid-template-columns: repeat(3, 1fr); }
  .phones { display: none; }
  .dash-grid.thirds { grid-template-columns: 1fr 1fr; }
  .dash-grid.thirds > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1080px) {
  .login-body { grid-template-columns: 1fr; padding: 8px 20px 40px; }
  .showcase, .big-s, .side-words, .login-links { display: none; }
  .login-nav { padding: 16px 20px; }
  .dash-grid, .dash-grid.thirds, .two-col, .three-col, .capture-hero, .clip-modal, .editor, .form-grid, .review, .tier-grid, .live-body { grid-template-columns: 1fr; }
  .dash-grid.thirds > :last-child, .editor > :last-child { grid-column: auto; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .stat-strip, .stat-strip.five, .stat-strip.six { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .preset-grid { grid-template-columns: repeat(2, 1fr); }
  .review .stage-video { max-height: 70vh; margin: 0 auto; width: auto; height: 70vh; }
  .modal { padding: 16px; }
  .overlay { padding: 10px; }
  .clip-modal video { max-height: 60vh; width: auto; margin: 0 auto; }
  .tiles3 { grid-template-columns: 1fr; }
  .topbar .spacer { display: none; }
  .card-head { flex-wrap: wrap; }
  .card-head .right { flex-wrap: wrap; }
  .dropbar { flex-wrap: wrap; }
  .dropbar .sep { display: none; }
}
@media (max-width: 560px) {
  .wall { grid-template-columns: 1fr; }
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { padding: 14px; }
  .table { font-size: 12.5px; }
  .table th, .table td { padding: 8px 6px; }
  .dash-head .row .btn span.lbl-long { display: none; }
}
@media (max-height: 600px) { .side-card { display: none; } }
