:root {
  --bg: #0f1115; --panel: #171a21; --line: #262a33; --text: #e8eaee; --muted: #8b93a3;
  --accent: #4f8cff; --ok: #2fbf71; --warn: #f2a93b; --bad: #ef4b4b;
  --b1: #ef6b4b; --b2: #2fbf71; --b3: #4fb3ff; --b4: #b77cff; --bcta: #f2c53b;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--accent); }
button, input, select, textarea {
  font: inherit; color: var(--text); background: #0c0e12; border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px;
}
button { cursor: pointer; background: #222733; }
button:hover { border-color: #3a4150; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

header.top {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5;
}
header.top h1 { font-size: 17px; margin: 0 8px 0 0; }
.pill { padding: 3px 9px; border-radius: 99px; font-size: 12px; background: #262b36; color: var(--muted); }
.pill.running { background: rgba(47,191,113,.15); color: var(--ok); }
.pill.reconnecting, .pill.starting { background: rgba(242,169,59,.15); color: var(--warn); }
.pill.error { background: rgba(239,75,75,.15); color: var(--bad); }

main.grid {
  display: grid; gap: 14px; padding: 14px 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr);
}
@media (max-width: 1200px) { main.grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { main.grid { grid-template-columns: 1fr; padding: 12px; } }
section.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
section.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.stack > * + * { margin-top: 14px; }

.lot-head { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
@media (max-width: 760px) { .lot-head { grid-template-columns: 1fr; } }
.frame { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #0b0d10; border: 1px solid var(--line); }
.lot-name { font-size: 20px; font-weight: 650; margin: 2px 0 6px; }
.price { font-size: 22px; font-weight: 700; }
.old-price { text-decoration: line-through; color: var(--muted); margin-left: 8px; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

.stages { display: flex; gap: 6px; flex-wrap: wrap; }
.stage { padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.stage.on { background: rgba(47,191,113,.16); border-color: rgba(47,191,113,.5); color: var(--ok); }
.stage.next { border-color: var(--warn); color: var(--warn); }

.feed { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; }
.item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #12151b; }
.item.flag { border-color: rgba(239,75,75,.55); background: rgba(239,75,75,.08); }
.item.flag b { color: var(--bad); }
.item.new { animation: flash 2.5s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px rgba(239,75,75,.6); } to { box-shadow: none; } }
.blk { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; color: #0b0d10; margin-right: 6px; }
.blk-1 { background: var(--b1); } .blk-2 { background: var(--b2); } .blk-3 { background: var(--b3); }
.blk-4 { background: var(--b4); } .blk-cta { background: var(--bcta); }

.score { display: flex; gap: 3px; flex-wrap: wrap; }
.score button { width: 30px; padding: 5px 0; text-align: center; }
.score button.sel { background: var(--accent); border-color: var(--accent); color: #fff; }

table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th, table.list td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 500; }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td { background: #1c2029; }
table.list tr.active td { background: rgba(79,140,255,.1); }
.transcript { white-space: pre-wrap; color: #c9ced8; max-height: 180px; overflow: auto; font-size: 13px; line-height: 1.45; }
.research h3 { font-size: 14px; margin: 14px 0 6px; }
.research ul { margin: 0; padding-left: 18px; } .research li { margin: 4px 0; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; width: min(900px, 94vw); max-height: 88vh; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.toast { position: fixed; bottom: 16px; right: 16px; background: #222733; border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; z-index: 50; max-width: 420px; }

/* ---------- Суфлёр ведущей ---------- */
body.host { background: #000; overflow: hidden; height: 100vh; }
.host-wrap { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 3vh 4vw; gap: 2vh; }
.host-lot { display: flex; justify-content: space-between; align-items: baseline; gap: 3vw; color: #9aa3b2; font-size: 3.2vh; }
.host-lot .name { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-lot .price { color: var(--bcta); font-size: 4.4vh; white-space: nowrap; }
.host-prompt { display: flex; flex-direction: column; justify-content: center; }
.host-prompt .label { font-size: 3vh; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2vh; }
.host-prompt .text { font-size: 8.5vh; line-height: 1.12; font-weight: 750; color: #fff; }
.host-prompt .example { font-size: 3.6vh; line-height: 1.25; color: #c9d3e0; font-style: italic; margin-top: 2vh; }
.host-prompt.fresh .text { animation: hostIn .6s ease-out; }
@keyframes hostIn { from { opacity: 0; transform: translateY(2vh); } to { opacity: 1; transform: none; } }
.host-msg { background: var(--bcta); color: #000; font-weight: 700; font-size: 4.5vh; padding: 1.4vh 2vw; border-radius: 1.2vh; }
.host-carousel { display: flex; gap: 1.2vw; }
.host-carousel .st { flex: 1; text-align: center; font-size: 2.6vh; padding: 1.2vh 0; border-radius: 1vh; background: #15181e; color: #5d6575; font-weight: 600; }
.host-carousel .st.on { background: #133622; color: #5ee39a; }
.host-carousel .st.next { background: #3a2a0b; color: #ffcc5c; outline: 2px solid #ffcc5c; }
.host-idle { color: #3d4350; font-size: 5vh; }
.c-1 { color: var(--b1); } .c-2 { color: var(--b2); } .c-3 { color: var(--b3); } .c-4 { color: var(--b4); } .c-cta { color: var(--bcta); }

/* ---------- Живой дашборд ---------- */
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); border: 1px solid transparent; }
.tabs a.on { color: var(--text); background: #222733; border-color: var(--line); }
.viewers { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.viewer { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #1e2230; color: #b8c0d0; white-space: nowrap; }
.viewer.me { outline: 1px solid var(--accent); }
.controls { padding: 12px 16px 0; }
.controls.hidden { display: none; }
/* Блоки, які пульт показує й ховає класом hidden (економія, дорожча модель на час) */
.hidden { display: none !important; }
/* Ліва колонка з плеєром на 30% вужча (VB, 2026-11-07): звільнене місце — стрічці хуків */
main.live { display: grid; gap: 14px; padding: 14px 16px; grid-template-columns: minmax(0, .7fr) minmax(0, 1.8fr) minmax(0, .75fr); }
main.live .wide { grid-column: 1 / -1; }
@media (max-width: 1280px) { main.live { grid-template-columns: minmax(0, .7fr) minmax(0, 1.5fr); } main.live .side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } main.live .side > * + * { margin-top: 0; } }
@media (max-width: 820px) { main.live { grid-template-columns: 1fr; padding: 12px; } main.live .side { grid-template-columns: 1fr; } }
.player { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 8px; background: #000; display: block; }
.player-empty { display: grid; place-items: center; color: var(--muted); text-align: center; padding: 12px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: #12151b; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 11px; color: var(--muted); }
.kpi.alert { border-color: rgba(239,75,75,.6); background: rgba(239,75,75,.08); } .kpi.alert .v { color: var(--bad); }
.kpi.good .v { color: var(--ok); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.chip.on { background: #222a3a; color: var(--text); border-color: #3a4560; }
.tl { display: flex; flex-direction: column; gap: 6px; max-height: 720px; overflow: auto; }
.ev { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 8px; background: #12151b; border: 1px solid var(--line); }
.ev .t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; padding-top: 2px; }
.ev .q { font-size: 15px; line-height: 1.35; }
.ev.hook .q { font-weight: 600; }
.ev .sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.ev.stage, .ev.cycle, .ev.lot, .ev.prompt { background: transparent; }
.ev.stage .q, .ev.cycle .q, .ev.prompt .q { font-size: 13px; color: #aab2c2; }
.ev.lot { border-color: rgba(79,140,255,.5); } .ev.lot .q { color: #9cc0ff; font-weight: 600; }
.ev.flag { border-color: rgba(239,75,75,.55); background: rgba(239,75,75,.07); } .ev.flag .q { color: #ff8a8a; font-size: 13px; }
.ev.fresh { animation: evIn 1.8s ease-out; }
@keyframes evIn { from { box-shadow: 0 0 0 2px rgba(79,140,255,.8); } to { box-shadow: none; } }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: #23293a; color: #c7cfe0; margin-right: 4px; }
.stars { color: var(--bcta); font-size: 12px; letter-spacing: 1px; }
.pinbtn { font-size: 12px; padding: 4px 8px; white-space: nowrap; }
.pinbtn.on { background: rgba(242,197,59,.16); border-color: rgba(242,197,59,.6); color: var(--bcta); }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar { display: grid; grid-template-columns: 128px 1fr 48px; gap: 8px; align-items: center; font-size: 12px; }
.bar .track { height: 10px; background: #12151b; border-radius: 99px; overflow: hidden; position: relative; }
.bar .fill { height: 100%; border-radius: 99px; }
.bar .fill.stream { position: absolute; top: 0; left: 0; opacity: .3; }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.legend { font-size: 11px; color: var(--muted); margin-top: 6px; }
details.card summary { cursor: pointer; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
details.card[open] summary { margin-bottom: 10px; }
details.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.ch-card .last { font-size: 15px; margin-top: 8px; }
.bar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main.live .span2 { grid-column: span 2; }
@media (max-width: 820px) { main.live .span2 { grid-column: auto; } .ev { grid-template-columns: 56px 1fr; } .ev > :last-child { grid-column: 2; justify-self: start; } }
#meta { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

tr.ai-active td { background: rgba(79,140,255,.12); }
tr.ai-active td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
#meta.ai-error { color: var(--bad); }

/* ---------- Пакет 1: пульт команд, шпаргалка, реакции, таймер ---------- */
.cmds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cmds button { text-align: left; padding: 9px 10px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.cmds button .k { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-weight: 500; }
.cmds button.sent { background: rgba(242,197,59,.18); border-color: var(--bcta); }
.cue-now { margin-top: 8px; font-size: 12px; color: var(--muted); min-height: 16px; }
.cue-now b { color: var(--bcta); }
.reactbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.reactbar .rx-now { font-size: 18px; padding: 4px 10px; }
.reactbar input { min-width: 140px; }
.ev .side-btns { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.rx { display: flex; gap: 2px; opacity: .35; transition: opacity .15s; }
.ev:hover .rx, .rx:focus-within { opacity: 1; }
@media (hover: none) { .rx { opacity: .8; } }
.rx button { font-size: 13px; padding: 2px 5px; background: transparent; border-color: transparent; }
.rx button:hover { border-color: var(--line); background: #222733; }
.rx-count { margin-left: 6px; white-space: nowrap; }
.ev.reaction { background: rgba(79,140,255,.06); border-color: rgba(79,140,255,.35); }
.ev.reaction .q { font-size: 14px; }
.ev.command { background: rgba(242,197,59,.06); border-color: rgba(242,197,59,.35); }
.ev.command .q { font-size: 13px; color: var(--bcta); font-weight: 600; }
.cheat h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 6px; }
.cheat h3:first-child { margin-top: 0; }
.cheat .line { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cheat .line:last-child { border-bottom: 0; }
.cheat .line .txt { flex: 1; min-width: 0; line-height: 1.35; }
.cheat .line button { font-size: 12px; padding: 3px 8px; white-space: nowrap; }
.cheat .obj-q { color: var(--muted); font-size: 12px; }
.lot-timer { margin-top: 10px; }
.lot-timer .nums { display: flex; gap: 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.lot-timer .nums b { font-size: 16px; }
.lot-timer .over { color: var(--bad); }

/* суфлёр */
.host-wrap { grid-template-rows: auto auto 1fr auto; }
.host-timer { display: flex; gap: 3vw; align-items: center; font-size: 3vh; color: #9aa3b2; font-variant-numeric: tabular-nums; }
.host-timer b { color: #fff; font-size: 4vh; }
.host-timer .over b, .host-timer .over { color: #ff6b6b; }
.host-cue { position: fixed; left: 4vw; right: 4vw; top: 28vh; z-index: 10; background: var(--bcta); color: #000;
  font-size: 9vh; font-weight: 800; line-height: 1.1; padding: 3vh 3vw; border-radius: 2vh; text-align: center;
  box-shadow: 0 0 0 1vh rgba(242,197,59,.3); animation: cueIn .35s ease-out; }
.host-cue .by { display: block; font-size: 2.6vh; font-weight: 600; opacity: .7; margin-top: 1.5vh; }
@keyframes cueIn { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Пакет 2: итог эфира, креатив-пак, подготовка ---------- */
.post-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #12151b; }
.post-box h3 { margin: 0 0 8px; font-size: 14px; }
.post-box pre { white-space: pre-wrap; font: inherit; margin: 0; line-height: 1.45; }
.copy { font-size: 12px; padding: 3px 8px; white-space: nowrap; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin-top: 8px; }
.cp-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.cp-item .tc { font-variant-numeric: tabular-nums; color: var(--bcta); font-weight: 600; }
.cp-line { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.cp-line > span { flex: 1; min-width: 0; }
.prep-item { display: flex; gap: 8px; align-items: center; }
.prep-item .st { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: #262b36; color: var(--muted); white-space: nowrap; }
.prep-item .st.ready { background: rgba(47,191,113,.15); color: var(--ok); }
.prep-item .st.pending { background: rgba(242,169,59,.15); color: var(--warn); }
.prep-item .st.error { background: rgba(239,75,75,.15); color: var(--bad); }

/* Библиотека приёмов и копилка эфира */
.tech { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: #1d2a3f; color: #a9c6ff; margin-right: 4px; cursor: pointer; border: 0; }
.tech:hover { background: #26375a; }
.gem { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgba(242,197,59,.16); color: var(--bcta); margin-left: 4px; }
.ev.vaulted { border-left: 3px solid var(--bcta); }
.vault-item { border: 1px solid rgba(242,197,59,.35); background: rgba(242,197,59,.06); }
.vault-item .why { color: var(--muted); font-size: 12px; margin-top: 3px; }
.linkbtn { float: right; background: transparent; border: 0; color: var(--accent); padding: 0; cursor: pointer; }
.lib-now .tip { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; margin-top: 6px; background: #12151b; }
.lib-now .tip .ph { margin-top: 3px; }
.lib-now .tip .cue { color: var(--muted); font-size: 12px; margin-top: 2px; }
.lib h3 { margin: 14px 0 6px; }
.lib .row-t { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.lib .row-t.hl { background: rgba(79,140,255,.10); }
.lib .code { font-weight: 700; color: #a9c6ff; }
.lib .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* вход и админка */
.userbar { display: flex; gap: 10px; align-items: center; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 360px; }
.login-box input { width: 100%; margin-bottom: 10px; }
.login-box button { width: 100%; }
.err { color: var(--bad); min-height: 18px; margin-top: 8px; }
table.adm { width: 100%; border-collapse: collapse; font-size: 13px; }
table.adm th, table.adm td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.adm th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.adm td.num, table.adm th.num { text-align: right; font-variant-numeric: tabular-nums; }
.off { opacity: .5; }
.scroll { overflow: auto; max-height: 520px; }

/* Музика: чи штовхає до покупки */
.music-now { display: flex; gap: 12px; align-items: center; }
.music-score { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; min-width: 62px; }
.music-score small { font-size: 14px; color: var(--muted); font-weight: 400; }
.music-issue { margin-top: 6px; font-size: 12px; color: var(--bad); }
.music-tip { margin-top: 6px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: rgba(79,140,255,.1); }
.music-spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin: 10px 0 8px; }
.music-spark i { flex: 1; min-width: 3px; border-radius: 2px; }
.music-spark i.cta { outline: 1px solid #fff; }
.music-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.music-kpis .v { font-size: 18px; }

/* Відділ продажу */
.sales-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px 16px; }
@media (max-width: 900px) { .sales-grid { grid-template-columns: 1fr; padding: 12px; } }
.sales-col textarea, .sales-col input:not([type=checkbox]) { width: 100%; margin-bottom: 6px; }
/* Однакова висота блоків лота й мови ведучої в обох вікнах: форма і стрічка починаються на одному рівні */
.sales-lot { margin: 10px 0 8px; min-height: 8.6em; }
.sales-lot .name { font-size: 22px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.sales-lot .price { font-size: 26px; font-weight: 700; color: var(--ok); min-height: 1.3em; line-height: 1.3; }
.sales-lot .bundle { font-size: 16px; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.sales-speech { border-left: 3px solid var(--line); padding: 6px 12px; font-size: 18px; line-height: 1.5; height: 7.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.sales-col .feed { max-height: 420px; }
.focus-btn { white-space: nowrap; }
/* Збільшене вікно: велике відео і шрифти; друге — вузьке, у верхньому лівому куті */
.sales-grid.focus { grid-template-columns: minmax(300px, 24%) minmax(0, 1fr); align-items: start; }
.sales-grid.focus .sales-col.small { order: 1; position: sticky; top: 8px; }
.sales-grid.focus .sales-col.big { order: 2; }
.sales-grid.focus .sales-col.small .sales-video iframe, .sales-grid.focus .sales-col.small .sales-video-empty, .sales-grid.focus .sales-col.small .sales-vbar { max-width: 100%; }
.sales-grid.focus .sales-col.small .sales-lot { min-height: 0; } .sales-grid.focus .sales-col.small .sales-lot .name { font-size: 16px; min-height: 0; } .sales-grid.focus .sales-col.small .sales-lot .price { font-size: 18px; min-height: 0; } .sales-grid.focus .sales-col.small .sales-lot .bundle { font-size: 13px; min-height: 0; }
.sales-grid.focus .sales-col.small .sales-speech { font-size: 13px; height: auto; max-height: 6em; -webkit-line-clamp: 4; }
.sales-grid.focus .sales-col.small .feed { max-height: 220px; }
.sales-grid.focus .sales-col.big .sales-video iframe, .sales-grid.focus .sales-col.big .sales-video-empty, .sales-grid.focus .sales-col.big .sales-vbar { max-width: 860px; }
.sales-grid.focus .sales-col.big .sales-lot .name { font-size: 28px; } .sales-grid.focus .sales-col.big .sales-lot .price { font-size: 32px; } .sales-grid.focus .sales-col.big .sales-lot .bundle { font-size: 19px; }
.sales-grid.focus .sales-col.big .sales-speech { font-size: 22px; height: 7.8em; -webkit-line-clamp: 5; }
.sales-grid.focus .sales-col.big .feed { max-height: 560px; }
@media (max-width: 900px) { .sales-grid.focus { grid-template-columns: 1fr; } .sales-grid.focus .sales-col.big { order: 1; } .sales-grid.focus .sales-col.small { order: 2; position: static; } }
.sales-msg.st-onair { border-color: var(--warn); } .sales-msg.st-done, .sales-msg.st-skip { opacity: .6; }
.badge { font-size: 11px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.badge.st-new { color: var(--accent); border-color: var(--accent); } .badge.st-onair { color: var(--warn); border-color: var(--warn); } .badge.st-done { color: var(--ok); border-color: var(--ok); }
.badge.st-ack { color: #0d1117; background: var(--ok); border-color: var(--ok); font-weight: 600; }
.sales-msg.unacked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ack-line { color: var(--ok); font-weight: 600; margin-top: 2px; }
.ack-line.wait { color: var(--muted); font-weight: 400; }
button.ack-btn { display: block; width: 100%; margin: 6px 0 2px; background: var(--ok); border-color: var(--ok); color: #0d1117; font-weight: 650; }
.bad-pill { background: rgba(239,75,75,.18); color: var(--bad); margin-left: 6px; }
#salesCard h2 { display: flex; align-items: center; gap: 6px; }
.host-sales { display: flex; flex-direction: column; gap: 1vh; margin-bottom: 2vh; }
.host-sales .hs { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5vw; align-items: center; font-size: 3.2vh; padding: 1vh 1.5vw; border-radius: 1vh; background: #141a26; border: 1px solid #2a3550; color: #dfe6f5; }
.host-sales .hs.onair { border-color: var(--warn); background: #2a2110; }
.host-sales .hs.greet { color: #fff; } .host-sales .hs.greet b { color: var(--bcta); }
.host-sales .hs button { font-size: 3vh; padding: .4vh 1.4vw; }
.hs-more { color: var(--muted); font-size: 2.2vh; }
.sales-video { margin-top: 8px; }
.sales-video iframe { width: 100%; max-width: 520px; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; display: block; }
.sales-video-empty { max-width: 520px; aspect-ratio: 16 / 9; border-radius: 8px; background: #0b0d12; color: var(--muted); display: grid; place-items: center; font-size: 13px; }
.sales-vbar { margin: 6px 0 2px; max-width: 520px; }
.sales-adminbar { margin: 14px 16px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--warn); background: rgba(242,169,59,.08); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sales-me { margin: 14px 16px 0; }
.me-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.me-grid { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; }  /* усі показники завжди в один рядок; на дуже вузькому екрані рядок гортається */
.me-kpi { flex: 1 1 0; min-width: 58px; border: 1px solid var(--line); border-radius: 8px; padding: clamp(4px, .7vw, 8px) clamp(5px, .8vw, 10px); }
.me-kpi .v { font-size: clamp(16px, 2vw, 24px); font-weight: 700; line-height: 1.2; }
.me-kpi .v small { font-size: .55em; font-weight: 500; color: var(--muted); margin-left: 2px; }
.me-kpi .l { font-size: clamp(9px, 1vw, 12px); color: var(--muted); line-height: 1.25; overflow-wrap: anywhere; }
.me-coach { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(47,191,113,.08); border: 1px solid rgba(47,191,113,.35); line-height: 1.5; }
.me-coach .tip, .me-coach .best { margin-top: 4px; color: var(--muted); }
.me-hist { margin-top: 10px; } .me-hist summary { cursor: pointer; color: var(--accent); }
.me-hist tr[data-day] { cursor: pointer; } .me-hist tr.on td { background: #1b2232; }

/* ощадливий вибір моделі */
dialog.thrift { width: min(520px, 94vw); text-align: left; border-color: #3a4560; }
.thrift-eye { font-size: 34px; text-align: center; line-height: 1; }
dialog.thrift h2 { text-align: center; margin: 6px 0 10px; letter-spacing: .02em; }
dialog.thrift textarea { width: 100%; box-sizing: border-box; margin-top: 4px; }
.thrift-cost { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.thrift-cost > div { background: #1b2130; border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.thrift-cost b { font-size: 18px; }
.thrift-cost > div:nth-child(2) b, .thrift-cost > div:nth-child(3) b { color: var(--warn); }
.thrift-actions { justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
#thriftMinutes { margin: 0 0 0 6px; }
.ai-upgrade { margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(242,169,59,.5); background: rgba(242,169,59,.08); }
.ai-upgrade button { margin-top: 6px; }
.fast-lane { margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(90,160,255,.45); background: rgba(90,160,255,.07); }
.fast-lane button { margin-top: 6px; }
.fast-lane .fast-tr { margin-top: 6px; font-style: italic; }
.ai-savings { margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(47,191,113,.45); background: rgba(47,191,113,.08); }
.thrift-saved { color: var(--ok); }

/* Пара ефіру «продюсер + ведуча» на пульті */
.crew { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; border: 1px solid transparent; }
.crew.warn { border-color: var(--warn); background: rgba(242,169,59,.08); }
.crew select { max-width: 170px; }
/* Відділ продажу над стрічкою хуків: блимає, поки продюсер не натисне «Побачив, виконую» */
.stack.mid #salesFeed { max-height: 260px; }
#salesCard.alarm { animation: salesAlarm 1s ease-in-out infinite; border-color: var(--bad, #ef4b4b); }
@keyframes salesAlarm { 0%, 100% { box-shadow: 0 0 0 2px rgba(239,75,75,.9), 0 0 18px rgba(239,75,75,.55); background-color: rgba(239,75,75,.10); } 50% { box-shadow: 0 0 0 1px rgba(239,75,75,.25); background-color: transparent; } }
/* Звук 🔔, нагадування через 2 хв і швидкі відповіді менеджеру */
.sales-bell { padding: 2px 8px; } .sales-bell.off { opacity: .55; }
.sales-msg.overdue { border-color: var(--bad, #ef4b4b); box-shadow: 0 0 0 2px var(--bad, #ef4b4b) inset; }
.overdue-line { color: var(--bad, #ef4b4b); font-weight: 650; margin-top: 2px; }
.quick-replies { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.quick-replies .chip { font-size: 12px; padding: 3px 9px; color: var(--text); cursor: pointer; }
.quick-replies .chip.on { border-color: var(--ok); }
.reply-line { color: var(--accent); margin-top: 2px; } .reply-line b { color: var(--text); }
.reply-box { margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: rgba(77,163,255,.10); border: 1px solid rgba(77,163,255,.35); }

/* Права колонка пульта: цифри зверху, під ними вкладки «Підказки» / «Хуки і тригери», нижче — пульт команд */
.ftabs { display: flex; gap: 6px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.ftab { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 12px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); position: relative; }
.ftab.on { color: var(--text); border-bottom-color: var(--accent, #5b8cff); }
.ftab-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-left: 4px; vertical-align: middle; }
.ftab-dot[hidden] { display: none; }
#paneTips { max-height: clamp(220px, 36vh, 560px); overflow: auto; resize: vertical; padding-right: 2px; }
#paneHooks .tl { max-height: clamp(160px, 28vh, 460px); resize: vertical; }
.tips-sec + .tips-sec { margin-top: 12px; }
.tips-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.tips-h .linkbtn { margin-left: auto; }
#paneTips .feed { max-height: none; }
#suggestions .item.tip-hot { border-left: 3px solid var(--ok); padding-left: 8px; }
/* Уточнення досьє в «Шпаргалці лота» */
.refine { margin: 2px 0 8px; }
.refine-item { border-left: 2px solid var(--accent, #4b8bff); padding: 4px 8px; margin: 6px 0; }
.refine-a { white-space: pre-wrap; font-size: 13px; line-height: 1.35; }
.refine-item.ok { background: rgba(26,143,58,.12); border-left-color: #1a8f3a; }
.refine-item.skip { opacity: .45; }
.refine button.v-take { background: #1a8f3a; color: #fff; border-color: #1a8f3a; }
.refine button.v-skip { background: #777; color: #fff; border-color: #777; }
.v-ok { color: #1a8f3a; font-weight: 600; }
.ctabs { display: flex; gap: 4px; margin: 2px 0 8px; border-bottom: 1px solid var(--line); }
.ctabs button { background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 6px 12px; color: var(--muted); cursor: pointer; font: inherit; }
.ctabs button.on { color: var(--text); background: #222733; border-color: var(--line); font-weight: 600; }
.ctabs .rev-b { color: #e0b030; font-size: 12px; } .ctabs .v-ok { font-size: 12px; } .ctabs .alert-dot { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.params textarea { width: 100%; box-sizing: border-box; background: #0f1218; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; line-height: 1.4; resize: vertical; min-height: 110px; }
.params textarea:focus { outline: 1px solid var(--accent, #4b8bff); }
.cheat-det { margin-top: 8px; } .cheat-det > summary { cursor: pointer; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.fact-alert { background: rgba(200,30,30,.12); border: 1px solid #d33; border-radius: 8px; padding: 6px 8px; margin: 4px 0 8px; font-size: 13px; }
.fact-alert .fa-item { margin-top: 4px; }
.team-box { background: rgba(26,143,58,.10); border-left: 3px solid #1a8f3a; border-radius: 0 8px 8px 0; padding: 4px 8px; margin: 4px 0 8px; font-size: 13px; }
.team-box .row { margin-top: 3px; }
.refine-cost { font-size: 10px; opacity: .45; text-align: right; margin-top: 2px; }
/* Вузька права колонка: цифри переносяться в кілька рядків */
main.live .side .kpis { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
main.live .side .kpi .v { font-size: 18px; }
.ftab { padding: 8px 8px; font-size: 12px; }
/* Оцінка відділу продажу: чи студія впоралась і чи задоволений покупець */
.rate-box { margin-top: 6px; padding: 6px 8px; border-radius: 6px; border: 1px dashed var(--line); }
.rate-box.due { border: 1px solid var(--warn); background: rgba(245,185,66,.10); animation: ratePulse 2s ease-in-out 3; }
.rate-box.done { border-style: solid; border-color: rgba(61,220,132,.4); }
.rate-ask { color: var(--warn); font-weight: 600; margin-bottom: 4px; }
.rate-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.rate-row .chip { font-size: 12px; padding: 3px 9px; color: var(--text); cursor: pointer; }
.rate-row .chip.on { border-color: var(--ok); background: rgba(61,220,132,.15); }
.rate-q { color: var(--muted); min-width: 150px; }
.rate-cmt { flex: 1; min-width: 180px; }
.rate-line { color: var(--warn); margin-top: 2px; }
.rate-line.bad { color: var(--bad); }
@keyframes ratePulse { 50% { box-shadow: 0 0 0 3px rgba(245,185,66,.35); } }
/* Пульт: зведення оцінок продажу */
.sales-fb { margin: 4px 0 8px; padding: 6px 8px; border-radius: 6px; background: rgba(245,185,66,.08); border: 1px solid rgba(245,185,66,.3); }
.sales-fb .fb-sum { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.sales-fb .fb-sum b { font-size: 15px; }
.sales-fb .fb-item { margin-top: 3px; }
.sales-fb .fb-item.bad { color: var(--bad); }
/* Компактна «Модель ARGUS і вартість» у шапці: займає порожнє місце між глядачами і рядком «Пара» */
.aibar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 520px; min-width: 0; position: relative; }
.aibar select { width: auto; max-width: 200px; padding: 4px 8px; }
.aibar .ai-savings, .aibar .ai-upgrade { margin-top: 0; padding: 3px 9px; border-radius: 99px; font-size: 12px; }
.aibar .ai-savings.hidden, .aibar .ai-upgrade.hidden { display: none; }
.aibar .ai-upgrade div { display: inline; } .aibar .ai-upgrade button { margin: 0 0 0 6px; padding: 2px 8px; }
.ai-tiers-pop summary { cursor: pointer; list-style: none; color: var(--accent); }
.ai-tiers-pop summary::-webkit-details-marker { display: none; }
.ai-tiers-pop[open] > div { position: absolute; z-index: 20; right: 0; top: 100%; margin-top: 6px; width: min(560px, 92vw); padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }

/* ☎️ дзвінки на 0 800: окремий віджет на кожну студію (Київ, Дніпро), «за добу» — з 00:00 за Києвом */
#callsCard { padding-top: 8px; padding-bottom: 10px; }
#callsCard h2 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#callsCard .empty { padding: 0; font-size: 12px; text-align: left; }
.calls-ok { color: var(--ok); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; }
.calls-off { color: var(--bad); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; }
.calls-grid { display: grid; gap: 10px; }
.calls-grid.calls-two { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.cw { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #12151b; min-width: 0; }
.cw-live { border-color: rgba(70,200,120,.55); }
.cw-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: 6px; }
.cw-now { color: var(--ok); font-weight: 400; text-transform: none; letter-spacing: 0; animation: callPulse 1.2s ease-in-out infinite; border-radius: 6px; padding: 0 4px; }
@keyframes callPulse { 50% { background: rgba(70,200,120,.18); } }
.cw-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.cw-t { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.cw-t b { font-size: 18px; font-variant-numeric: tabular-nums; }
.cw-t span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-u { font-style: normal; font-size: 11px; color: var(--accent, #7fb3ff); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cw-ok b { color: var(--ok); } .cw-bad b { color: var(--bad); }
.calls-spark { display: flex; align-items: flex-end; gap: 1px; height: 14px; margin-top: 6px; }
.calls-spark i { flex: 1; background: var(--ok); opacity: .7; min-height: 1px; border-radius: 1px; }
.calls-recent { display: flex; gap: 10px; margin-top: 5px; font-size: 12px; white-space: nowrap; overflow: hidden; }
.call-chip b { font-weight: 600; }
.call-missed { color: var(--bad); }
.calls-hint { grid-column: 1 / -1; font-size: 12px; color: var(--muted, #9aa3b2); line-height: 1.35; }
.calls-hint-good { color: var(--ok); } .calls-hint-weak { color: var(--warn); }
#callsCard.flash { animation: callFlash 1s ease-out; }
@keyframes callFlash { 0% { box-shadow: 0 0 0 3px rgba(70,200,120,.8); } 100% { box-shadow: none; } }
.aibar .fast-lane { margin-top: 0; padding: 3px 9px; border-radius: 99px; font-size: 12px; }
.aibar .fast-lane.hidden { display: none; }
.aibar .fast-lane.on { border-color: rgba(90,160,255,.9); background: rgba(90,160,255,.18); }
.aibar .fast-lane button { margin: 0 0 0 4px; padding: 2px 8px; }
/* Конкурент в ефірі: синя рамка, щоб не плутати з фактом-суперечністю */
.cp-alert { background: rgba(30,90,220,.12); border-color: #3a6fe0; }
/* Досьє: ціна проти ринку, минулі ефіри, скарги */
.mk-box { background: rgba(20,82,201,.07); border-left: 3px solid #1452c9; border-radius: 0 8px 8px 0; padding: 4px 8px; margin: 4px 0 8px; font-size: 13px; }
.mk-line { margin: 3px 0; }
.mk-line summary { cursor: pointer; }
.mk-warn { color: #8a5a00; }
.prep-badge { font-size: 11px; padding: 0 5px; border-radius: 4px; background: rgba(127,127,127,.15); margin-left: 4px; white-space: nowrap; }
.prep-badge.good { background: rgba(26,143,58,.18); }
.prep-badge.bad { background: rgba(200,120,0,.2); }

/* Залишок коштів ARGUS: пульт і /admin */
.balance { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
.balance.ok { background: rgba(47,191,113,.14); color: var(--ok); border-color: rgba(47,191,113,.35); }
.balance.warn { background: rgba(242,169,59,.16); color: var(--warn); border-color: rgba(242,169,59,.5); }
.balance.low, .balance.empty, .balance.cap { background: rgba(239,75,75,.16); color: var(--bad); border-color: rgba(239,75,75,.6); }
.balance.empty, .balance.cap { animation: balBlink 1s steps(2, start) infinite; }
.balance.unknown { background: #262b36; color: var(--muted); }
.balance .sub { font-weight: 400; opacity: .85; }
@keyframes balBlink { to { opacity: .45; } }
.bal-big { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bal-big.ok { color: var(--ok); } .bal-big.warn { color: var(--warn); } .bal-big.low, .bal-big.empty, .bal-big.cap { color: var(--bad); } .bal-big.unknown { color: var(--muted); }
.kpi.warn { border-color: rgba(242,169,59,.6); background: rgba(242,169,59,.08); } .kpi.warn .v { color: var(--warn); }
