/* HOLAF · Фидбек — стили приложения (дизайн перенесён из согласованного mockup.html) */
:root{
  --bg:#eef1f6; --card:#fff; --ink:#16223a; --mut:#6b7686; --line:#e3e7ee;
  --mut2:#9aa3ad; --blue:#2f6fed; --red:#e5484d; --org:#e9890c; --grn:#1f9d57; --amber:#d39a00;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,Segoe UI,Roboto,Inter,sans-serif;background:var(--bg);color:var(--ink)}
header{background:#14233b;color:#fff;padding:0 20px;display:flex;align-items:center;gap:6px;height:54px;position:sticky;top:0;z-index:10}
header .logo{font-weight:800;margin-right:10px;letter-spacing:.3px}
header .tab{color:#c2cde2;padding:16px 8px;cursor:pointer;font-weight:600;border-bottom:3px solid transparent;white-space:nowrap}
header .tab.on{color:#fff;border-color:#ffd166}
header .right{margin-left:auto;color:#9fb0cc;font-size:13px;display:flex;gap:6px;align-items:center;min-width:0}
.pill{background:#21324f;border-radius:20px;padding:4px 11px;font-size:12px;white-space:nowrap;max-width:168px;overflow:hidden;text-overflow:ellipsis;min-width:0}
header .pill{flex:0 0 auto;max-width:220px}
header .right .pill:first-child{max-width:128px}
header #st-llm{max-width:48px}
header #st-auto{max-width:190px}
header #btn-refresh{width:30px;height:24px;display:inline-flex;align-items:center;justify-content:center;padding:4px 0}
.pill-btn{cursor:pointer;font-weight:700;user-select:none;transition:background .12s}
.pill-btn:hover{background:#2c4467}
.pill-btn:focus-visible{outline:2px solid #ffd166;outline-offset:1px}
.pill-btn.spin{opacity:.85;pointer-events:none}
.pill-btn.spin .ic{display:inline-block;animation:spin .7s linear infinite}
.pill.auto-on{background:#173f2b;color:#c7f5d9}
.pill.auto-off{background:#334058;color:#cbd5e1}
@keyframes spin{to{transform:rotate(360deg)}}
.live{display:inline-block;width:8px;height:8px;border-radius:50%;background:#33d27e;margin-right:5px;box-shadow:0 0 0 0 rgba(51,210,126,.6);animation:pulse 1.6s infinite}
.live.off{background:#8b95a7;animation:none}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(51,210,126,.55)}70%{box-shadow:0 0 0 7px rgba(51,210,126,0)}100%{box-shadow:0 0 0 0 rgba(51,210,126,0)}}
@media(max-width:820px){header{overflow-x:auto;padding:0 10px;gap:2px}header .logo{margin-right:8px;flex:0 0 auto}header .right{display:none}header .tab{padding:16px 10px;flex:0 0 auto}}
.wrap{max-width:1120px;margin:18px auto;padding:0 16px}
#page-happy{max-width:min(1640px,calc(100vw - 24px))}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 18px;margin:14px 0;box-shadow:0 1px 2px rgba(20,35,59,.04)}
h2{margin:4px 0 2px;font-size:19px}
.sub{color:var(--mut);font-size:13px;margin-bottom:10px}
.flash{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:#14233b;color:#fff;
  padding:10px 18px;border-radius:10px;font-size:13px;z-index:50;box-shadow:0 4px 18px rgba(0,0,0,.25);
  opacity:0;transition:opacity .25s;pointer-events:none;max-width:80%}
.flash.show{opacity:1}
.empty{background:#f7f9fc;border:1px dashed #cdd6e4;border-radius:10px;padding:18px;color:var(--mut);font-size:13px;text-align:center}
/* metrics */
.metrics{display:flex;gap:12px;flex-wrap:wrap}
.metric{flex:1;min-width:150px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.metric b{font-size:26px;display:block;line-height:1.1} .metric span{color:var(--mut);font-size:12px}
.metric .sm{font-size:12px;font-weight:700}
.up{color:var(--red)} .dn{color:var(--grn)} .flat{color:var(--mut)}
/* баннер «сервер старше кода» (аудит P0-1): перезапусти сервер, чтобы видеть свежий код */
.stale-banner{background:#fff4d6;border-bottom:1px solid #e7c200;color:#7a5b00;padding:8px 16px;font-size:13px;text-align:center}
.stale-banner code{background:#fde9a8;padding:1px 5px;border-radius:5px}
/* тонкий KPI-рельс «Счастья» (дизайн mockup_site_hybrid_realistic_v1): отдаёт максимум высоты очереди */
.kpibar{display:flex;gap:10px;flex-wrap:wrap;padding:9px 16px;background:var(--card);border:1px solid var(--line);border-radius:12px}
.kpi{display:flex;flex-direction:column;gap:1px;padding:2px 14px 2px 0;border-right:1px solid var(--line)}
.kpi:last-child{border:0}
.kpi b{font-size:19px;line-height:1.05;letter-spacing:-.3px}
.kpi span{font-size:11px;color:var(--mut)}
.kpi b.warn{color:var(--red)} .kpi b.ok{color:var(--grn)}
.auto-strip{margin:10px 0 12px}
.auto-console{display:grid;gap:12px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;box-shadow:0 1px 2px rgba(20,35,59,.04)}
.auto-console.is-live{border-color:#bfe6cf;background:#f6fcf8}
.auto-console.is-shadow{border-color:#d7deea;background:#f8fafc}
.auto-console.is-running{border-color:#bdd2ff;background:#f7faff}
.auto-console.is-live.is-running{border-color:#93d9ad;background:#f3fbf6}
.auto-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.auto-title{display:flex;align-items:center;gap:10px;min-width:0}
.auto-title b{display:block;font-size:16px;line-height:1.15}
.auto-title span:not(.auto-led){display:block;color:var(--mut);font-size:12.5px;line-height:1.3;margin-top:2px}
.auto-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.auto-actions .btn{min-height:34px}
.auto-channel-grid{display:none}
.auto-channel{border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.72);padding:9px 10px;min-width:0}
.auto-channel small{display:block;color:var(--mut);font-size:10.5px;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.auto-channel b{display:block;font-size:13px;line-height:1.2;margin-top:3px}
.auto-channel span{display:block;color:var(--mut);font-size:11.5px;line-height:1.25;margin-top:2px;overflow-wrap:anywhere}
.auto-channel.is-live b{color:var(--grn)}
.auto-channel.is-shadow b{color:var(--mut)}
.auto-channel.is-manual b{color:var(--amber)}
.auto-config{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:8px}
.auto-config label{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.72);padding:7px 8px;color:var(--mut);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;min-width:0}
.auto-mode-note{max-width:390px}
.auto-advanced{display:none}
.auto-advanced summary{cursor:pointer;color:var(--mut);font-size:12px;font-weight:800;user-select:none}
.auto-advanced-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.auto-advanced-grid>div{border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.7);padding:10px}
.auto-advanced-grid b{display:block;font-size:13px;line-height:1.2}
.auto-advanced-grid span{display:block;color:var(--mut);font-size:12px;line-height:1.3;margin:2px 0 8px}
.auto-panel{display:grid;grid-template-columns:minmax(260px,1.1fr) minmax(300px,.9fr) auto;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px;box-shadow:0 1px 2px rgba(20,35,59,.04)}
.auto-panel.is-live{border-color:#bfe6cf;background:#f6fcf8}
.auto-panel.is-shadow{border-color:#d7deea;background:#f8fafc}
.auto-strip.is-busy{opacity:.65;pointer-events:none}
.auto-main{display:flex;align-items:center;gap:10px;min-width:0}
.auto-main b{display:block;font-size:14px;line-height:1.15}
.auto-main span:not(.auto-led){display:block;color:var(--mut);font-size:12px;line-height:1.25;margin-top:1px}
.auto-led{width:12px;height:12px;min-width:12px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 0 rgba(148,163,184,.4)}
.auto-console.is-live .auto-led{background:var(--grn);animation:pulse 1.6s infinite}
.auto-console.is-shadow.is-running .auto-led{background:var(--blue);animation:pulse 1.6s infinite}
.auto-console.is-live.is-running .auto-led{background:var(--grn);animation:pulse 1.2s infinite}
.auto-panel.is-live .auto-led{background:var(--grn);animation:pulse 1.6s infinite}
.auto-stats{display:grid;grid-template-columns:repeat(4,minmax(58px,1fr));gap:8px}
.auto-stats span{border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.68);padding:7px 8px;min-width:0}
.auto-stats b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.auto-stats small{display:block;color:var(--mut);font-size:10.5px;text-transform:uppercase;letter-spacing:.03em;margin-top:1px}
.auto-ctrl{display:flex;align-items:center;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.auto-ctrl label{display:flex;align-items:center;gap:5px;color:var(--mut);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}
.auto-cap{width:72px;border:1px solid var(--line);border-radius:8px;padding:6px 7px;font:inherit;font-size:12px;background:#fff;color:var(--ink)}
.auto-run{grid-column:1/-1;border-top:1px solid var(--line);padding-top:7px;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.auto-run b{display:block;font-size:13px;line-height:1.2}
.auto-run span{display:block;color:var(--mut);font-size:12px;line-height:1.25;margin-top:1px;overflow-wrap:anywhere}
.auto-run.is-running b{color:var(--blue)}
.auto-run-ctrl{display:flex;align-items:center;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.auto-run-ctrl label{display:flex;align-items:center;gap:5px;color:var(--mut);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}
@media(max-width:980px){.auto-panel{grid-template-columns:1fr}.auto-head{align-items:flex-start;flex-direction:column}.auto-actions{justify-content:flex-start}.auto-channel-grid,.auto-config,.auto-advanced-grid{grid-template-columns:1fr 1fr}.auto-ctrl,.auto-run-ctrl{justify-content:flex-start}.auto-stats{grid-template-columns:repeat(2,minmax(80px,1fr))}.auto-run{align-items:flex-start;flex-direction:column}.auto-mode-note{max-width:none}}
@media(max-width:620px){.auto-channel-grid,.auto-config,.auto-advanced-grid{grid-template-columns:1fr}.auto-actions .btn{width:100%}}
.reply-mode{display:none}
.reply-compact-title b{display:block;font-size:14px;line-height:1.15}
.reply-compact-title span{display:block;color:var(--mut);font-size:12px;line-height:1.25;margin-top:2px}
.reply-compact-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.reply-compact-stats span{border:1px solid var(--line);border-radius:8px;background:#f7f9fc;padding:7px 8px;min-width:0}
.reply-compact-stats b{display:block;font-size:12px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reply-compact-stats small{display:block;color:var(--mut);font-size:10px;line-height:1.15;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reply-ctrl{display:grid;gap:5px;justify-items:end;min-width:150px}
.reply-ctrl small{color:var(--mut);font-size:11px;text-align:right;line-height:1.25}
@media(max-width:1080px){.reply-mode{grid-template-columns:1fr}.reply-ctrl{justify-items:start}.reply-ctrl small{text-align:left}.reply-compact-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* dynamics */
.dyn{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.spark{background:#fafbfe;border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.spark .t{font-size:12px;color:var(--mut)} .spark .v{font-size:20px;font-weight:800}
/* problems table */
table{width:100%;border-collapse:collapse}
.row{cursor:pointer;border-top:1px solid var(--line)}
.row:hover{background:#fafbfe}
.row td{padding:11px 8px;vertical-align:middle}
.rank{font-weight:800;width:26px;color:var(--mut)}
.skusub{font-size:11px;color:var(--mut);margin-top:3px;line-height:1.3}
.skusub b{color:#445}
.wblink{color:var(--blue);text-decoration:none;font-weight:700;font-size:11px}
.wblink:hover{text-decoration:underline}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;vertical-align:middle}
.d-red{background:var(--red)} .d-org{background:var(--org)} .d-amb{background:var(--amber)} .d-grn{background:var(--grn)}
.bar{height:10px;border-radius:6px;background:#eef1f6;overflow:hidden;min-width:90px}
.bar i{display:block;height:100%;border-radius:6px}
.freq{font-weight:800;font-size:15px;white-space:nowrap}
.freq small{display:block;color:var(--mut);font-weight:400;font-size:11px}
thead th{padding:4px 8px;font-weight:700;font-size:12px;color:var(--mut);text-align:left;border-bottom:1px solid var(--line)}
.chip{display:inline-block;font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;white-space:nowrap}
.c-prod{background:#fde3e3;color:#a11} .c-mkt{background:#fff0d6;color:#9a5b00} .c-buy{background:#e1f2e6;color:#136b2e} .c-log{background:#eceef1;color:#555}
.trend.u{color:var(--red);font-weight:700} .trend.f{color:var(--mut)} .trend.d{color:var(--grn);font-weight:700}
.btn{border:0;border-radius:9px;padding:7px 12px;font:inherit;font-weight:700;cursor:pointer;transition:filter .12s}
.btn-pri{background:var(--blue);color:#fff} .btn-ok{background:var(--grn);color:#fff} .btn-warn{background:var(--org);color:#fff}
.btn-mut{background:#eef1f6;color:#333} .btn-sm{padding:6px 10px;font-size:12px}
.btn:hover:not(:disabled){filter:brightness(1.06)}
.btn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.btn:disabled{opacity:.45;cursor:not-allowed}
.drawer{display:none;background:#f7f9fc;border-top:1px solid var(--line)}
.drawer.open{display:table-row}
.drawer td{padding:0}
.dr-in{padding:16px 18px;display:grid;grid-template-columns:1fr 1fr;gap:18px}
.minirow{display:flex;justify-content:space-between;font-size:13px;padding:4px 0;border-bottom:1px dashed #e3e7ee;align-items:flex-start}
.quote{color:#555;font-size:13px;background:#fff;border-left:3px solid #dfe4ee;padding:7px 11px;border-radius:5px;margin:6px 0}
.calc{font-size:12px;color:#445;background:#fff;border:1px dashed #d6deea;border-radius:8px;padding:9px 11px;margin-top:8px}
/* bottom two-col */
.cols2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.skurow{display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:8px 0;border-bottom:1px solid var(--line)}
.feed{font-size:13px}
.feeditem{display:flex;gap:8px;align-items:flex-start;padding:8px 0;border-bottom:1px dashed #e6eaf1}
.feeditem .tm{color:var(--mut);font-size:11px;white-space:nowrap;width:70px}
.star1{color:var(--red);font-weight:700}
.note{background:#eef3ff;border:1px solid #d4e1ff;border-radius:10px;padding:10px 14px;font-size:13px;color:#274}
/* воронка */
.alert{background:#fff7e6;border:1px solid #ffd98a;color:#6b4e00;border-radius:14px;padding:14px 18px;margin:14px 0}
.alert b{color:#5a4200}
.chain{display:flex;align-items:stretch;flex-wrap:wrap;margin:12px 0 4px}
.cnode{flex:1 1 110px;text-align:center;padding:8px 4px}
.cnode .cn{font-size:24px;font-weight:800;letter-spacing:-.5px;color:var(--ink)}
.cnode .cl{font-size:12px;color:var(--mut);margin-top:3px;line-height:1.25}
.cnode .cdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:middle}
.cgap{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:56px;padding:0 4px}
.cgap .cv{font-weight:800;font-size:14px;color:#34506e} .cgap .ca{color:#c0c6cf;font-size:18px;line-height:.7}
.sm4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.smc{border:1px solid var(--line);border-radius:12px;padding:15px 16px;background:#fafbfe;transition:.15s}
.smc:hover{box-shadow:0 2px 8px rgba(20,35,59,.07)}
.smc .t{font-size:12px;color:var(--mut)} .smc .v{font-size:22px;font-weight:800;margin:1px 0;letter-spacing:-.4px}
.smc .d{font-size:12px;font-weight:700} .smc svg{width:100%;height:64px;display:block;margin-top:4px}
#sm4 circle,#sm4 line{transition:cx .22s cubic-bezier(.34,1.4,.64,1),cy .22s cubic-bezier(.34,1.4,.64,1),opacity .15s}
.ftab{width:100%;border-collapse:collapse;font-size:13.5px}
.ftab th,.ftab td{padding:7px 8px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.ftab th:first-child,.ftab td:first-child{text-align:left}
.ftab thead th{color:var(--mut);font-weight:700;font-size:12px;border-bottom:2px solid var(--line);cursor:pointer;user-select:none}
.ftab tbody tr{border-bottom:1px solid var(--line)} .ftab tbody tr:hover{box-shadow:inset 0 0 0 2px #9cc3ff;cursor:default}
.ftab td.fin{font-weight:800;background:#f0fdf4} .ftab th.fin{color:var(--grn)}
.ftab tr.gap td{color:#c0c6cf;font-style:italic;background:#fafbfd}
.hero{box-shadow:0 5px 22px rgba(31,157,87,.10)!important;border:1px solid #cfe9d8!important;background:#f7fbf9!important}
.btn:active{transform:translateY(2px) scale(.97);opacity:.9}
@keyframes fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
/* happiness */
/* Вкладка «Счастье» — рабочая консоль на высоту вьюпорта: страница НЕ растёт, длинная очередь
   прокручивается ВНУТРИ своей колонки, карточка+действия на месте (UX-ревью р.1: flex вместо
   магического calc — устойчиво к переносу KPI в 2 ряда и к блокам .ap/.note под таблицей). */
/* :not(.hidden) ОБЯЗАТЕЛЕН — иначе ID-селектор перебивает .hidden{display:none} и вкладка
   «Счастье» просвечивает поверх Дашборда/Воронки (пустые колонки-призраки) */
#page-happy:not(.hidden){display:flex;flex-direction:column;height:calc(100vh - 78px)}
#page-happy > *{flex:0 0 auto}
#page-happy > .console2{flex:1 1 auto;min-height:0}
/* ДВЕ ЗОНЫ (редизайн v2): высокая очередь слева (видно ~13-15 кейсов) + рабочая панель справа.
   Очередь: фикс-шапка (.qhead) + скролл-список (.qlist). Работа: контекст/диалог (.wscroll, скролл)
   + закреплённый футер действий (.afoot). */
.console2{display:grid;grid-template-columns:minmax(340px,400px) minmax(720px,1fr);gap:12px;min-height:0}
.zone{background:#fff;border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;min-height:0;overflow:hidden;box-shadow:0 1px 2px rgba(20,35,59,.05)}
.qlist{flex:1 1 auto;overflow-y:auto;padding:10px 12px;min-height:0}
.work{overflow:hidden}
.wscroll{flex:1 1 auto;overflow-y:auto;padding:14px 16px 18px;min-height:210px;scroll-behavior:auto}
.afoot{flex:0 0 auto;border-top:1px solid var(--line);background:#fafbfe;padding:10px 14px 12px;max-height:min(46vh,500px);overflow-y:auto}
.afoot textarea{min-height:150px;max-height:min(22vh,230px)}
.kbdlegend{font-size:10.5px;color:var(--mut2);margin-top:6px}
.kbdlegend b{background:rgba(20,35,59,.07);border-radius:4px;padding:0 4px;color:#445;font-weight:700}
.qshortcuts{margin-top:5px}
.qshortcuts summary{cursor:pointer;color:var(--mut2);font-size:10.5px;font-weight:700;user-select:none}
.kbd{font-size:10px;background:rgba(255,255,255,.28);border-radius:4px;padding:0 4px;margin-left:5px;font-weight:700}
.btn-mut .kbd{background:rgba(20,35,59,.08);color:var(--mut)}
/* поиск + фильтр-чипы + инструменты в фикс-шапке очереди */
.qsearch{width:100%;border:1px solid var(--line);border-radius:8px;padding:7px 9px;font:inherit;font-size:13px;background:#fafbfe;margin-top:7px}
.qsearch:focus{outline:2px solid var(--blue);outline-offset:-1px;border-color:var(--blue)}
.chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
/* .fchip (НЕ .chip!): фильтр-чипы очереди. Имя своё — иначе перебивали цвета route-чипов .chip
   на Дашборде (.c-prod/.c-mkt/.c-buy той же специфичности, но раньше в источнике) — регрессия ревью 2026-06-14 */
.fchip{font-size:11.5px;font-weight:600;padding:4px 9px;border-radius:20px;border:1px solid var(--line);background:#fff;color:var(--mut);cursor:pointer;user-select:none}
.fchip:hover{border-color:#c7d0de;color:var(--ink)}
.fchip.on{background:#eaf1ff;border-color:#bcd2ff;color:#1e478f}
.fchip b{opacity:.7}
.qtools{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.qgroup{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--mut);font-weight:700;margin:12px 2px 5px}
.qgroup:first-child{margin-top:2px}
.out{font-size:11px;font-weight:700;padding:1px 7px;border-radius:6px}
.out-saved{background:#d7f5dd;color:#136b2e} .out-angry{background:#ffe0e0;color:#a11} .out-other{background:#eceef1;color:#555}
@media(max-width:900px){#page-happy:not(.hidden){height:auto}#page-happy > .console2{flex:none;grid-template-columns:1fr}.zone{overflow:visible}.qlist,.wscroll{overflow:visible}}
.qitem{border:1px solid var(--line);border-left:4px solid var(--red);border-radius:9px;padding:9px;margin:8px 0;cursor:pointer;font-size:13px}
.qitem:focus-visible{outline:2px solid var(--blue,#2f6fed);outline-offset:1px}
.qitem.sel{background:#fef5f5;box-shadow:0 0 0 2px #fbdada inset;border-left-width:5px}
/* длинное имя товара — максимум 2 строки, чтобы высота кейса в списке из сотен была предсказуема */
.qitem .em{font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.25;word-break:break-word}
.qitem .meta{color:var(--mut);font-size:12px;margin-top:3px}
.chat-inbox{margin-top:7px;padding-top:5px;border-top:1px dashed #e1e6ef;display:flex;flex-direction:column;gap:3px}
.chat-inrow{display:grid;grid-template-columns:18px minmax(0,1fr);gap:5px;align-items:start;color:#6b7789;font-size:11.5px;line-height:1.28}
.chat-inrow span{width:16px;height:16px;border-radius:50%;background:#eef3ff;color:#31599b;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:800}
.chat-inrow b{font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qitem.t-дефект{border-left-color:var(--red)} .qitem.t-повреждение{border-left-color:var(--org)}
.qitem.t-запах{border-left-color:var(--amber)}
.qitem.t-гнев_подарок{border-left-color:#7c5cff} .qitem.t-недовольство{border-left-color:#8b95a7}
/* топ-тяжесть читается мгновенно по лёгкой заливке, а не по тонкой кромке */
.qitem.t-дефект{background:linear-gradient(90deg,#fff6f5,#fff)}
.qitem.t-повреждение{background:linear-gradient(90deg,#fff8f4,#fff)}
.esc{background:#fff7e6;border:1px solid #ffd98a;border-radius:9px;padding:9px;font-size:12px;color:#7a5b00;margin:8px 0}
.esc b{color:#5a4200}
.agentbox{background:#eef2fb;border:1px solid #d4ddf5;border-radius:9px;padding:9px;font-size:12px;color:#23324f;margin:8px 0}
details.agentbox > summary{cursor:pointer;font-weight:600;list-style:revert}
.badges{display:flex;gap:4px;flex-wrap:wrap;margin:8px 0 4px}
.case-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.case-head-main{min-width:0}
.case-title{display:block;font-size:18px;line-height:1.18;overflow-wrap:anywhere}
.case-meta{font-size:12px;color:var(--mut);margin-top:3px}
.case-head .badges{justify-content:flex-end;margin:0;max-width:48%}
.case-resources{display:flex;align-items:center;gap:7px;flex-wrap:wrap;background:#f7f9fc;border:1px solid var(--line);border-radius:10px;padding:8px 9px;margin:8px 0 10px}
.case-link{display:inline-flex;align-items:center;min-height:26px;border:1px solid #cddbf5;background:#eef5ff;color:#1f4d9e;border-radius:8px;padding:4px 8px;font-size:12px;font-weight:800;text-decoration:none;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.case-link-main{background:#eaf7ef;border-color:#bee6ce;color:#176c3d}
.case-link-media{background:#fff7e8;border-color:#f0d38a;color:#8a5a00}
.case-link.off{background:#f1f4f8;border-color:var(--line);color:var(--mut);font-weight:700}
.case-thumb{width:54px;height:54px;border-radius:8px;border:1px solid var(--line);background:#eef1f6;overflow:hidden;display:inline-flex}
.case-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.assist-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0 10px}
.assist-card{border:1px solid var(--line);border-radius:9px;background:#f7f9fc;padding:8px 9px;min-width:0}
.assist-card small{display:block;color:var(--mut);font-size:10.5px;text-transform:uppercase;letter-spacing:.03em;margin-bottom:2px}
.assist-card b{display:block;font-size:12px;line-height:1.25;overflow-wrap:anywhere}
@media(max-width:720px){.assist-strip{grid-template-columns:1fr}}
.return-assist{border:1px solid #c9e0d0;background:#f5fbf7;border-radius:10px;padding:10px 12px;margin:8px 0 10px;color:#173c25}
.return-assist-fold{padding:0}
.return-assist-fold > summary{cursor:pointer;list-style:none;padding:9px 11px}
.return-assist-fold > summary::-webkit-details-marker{display:none}
.return-assist-fold > summary small{display:block;color:#4f765d;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.return-assist-fold > summary b{display:block;font-size:14px;line-height:1.2;margin-top:1px}
.return-assist-fold > summary span{display:block;font-size:12px;line-height:1.3;color:#526170;font-weight:800;margin-top:3px}
.return-assist-fold[open] > summary{border-bottom:1px solid #c9e0d0}
.return-assist-fold > .return-reason,.return-assist-fold > .return-chips,.return-assist-fold > .return-nogo,.return-assist-fold > .return-safe{margin-left:11px;margin-right:11px}
.return-assist-fold > .return-safe{margin-bottom:9px}
.return-assist-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}
.return-assist-head small{display:block;color:#4f765d;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.return-assist-head b{font-size:15px;line-height:1.22}
.return-action{font-size:13px;line-height:1.35;font-weight:800;margin-top:6px}
.return-reason{font-size:12px;color:#526170;line-height:1.35;margin-top:4px}
.return-safe{font-size:11.5px;color:#6b7788;margin-top:7px}
.return-nogo{font-size:12px;line-height:1.35;color:#7a4c00;background:#fff8e6;border:1px solid #f0d48a;border-radius:8px;padding:7px 8px;margin-top:8px}
.return-nogo b{color:#5a3700}
.return-chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
.return-chip{font-size:11px;font-weight:800;border-radius:999px;background:#e5f4ea;color:#1b703c;border:1px solid #c3e4cf;padding:2px 7px}
.return-chip.muted{background:#eef2f7;color:#526170;border-color:#d8e0ea}
.return-decision{border:1px solid #f0c890;background:#fff8ea;border-radius:10px;padding:10px 12px;margin:0 0 10px;color:#3d2a00}
.return-decision-empty{background:#f7f9fc;border-color:var(--line);color:var(--ink)}
.return-decision-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.return-decision-head small{display:block;color:#8a5a00;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.return-decision-head b{font-size:15px;line-height:1.2}
.return-decision-head span{flex:0 0 auto;font-size:11px;font-weight:800;color:#8a5a00;background:#fff;border:1px solid #f0d38a;border-radius:999px;padding:3px 8px}
.return-decision label{display:block;margin:8px 0 4px;font-size:11px;font-weight:800;color:#6b7788;text-transform:uppercase}
.return-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:7px 0 8px}
.return-facts div{background:#fff;border:1px solid #f0d38a;border-radius:8px;padding:7px 8px;min-width:0}
.return-facts small{display:block;color:#8a5a00;font-size:10px;font-weight:800;text-transform:uppercase;margin-bottom:2px}
.return-facts b{display:block;font-size:12px;line-height:1.25;overflow-wrap:anywhere}
.return-facts span{display:block;margin-top:3px;font-size:11px;line-height:1.25;color:#795000;font-weight:800}
.mini-copy{margin-top:5px;border:1px solid #d8e0ea;background:#f7f9fc;color:#526170;border-radius:7px;padding:3px 7px;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.mini-copy:hover{background:#eef5ff;color:#1f4d9e}
.return-action-help{border:1px solid #ead39a;background:#fffdf7;border-radius:8px;padding:8px 9px;margin:7px 0;color:#3d2a00}
.return-action-help b{display:block;font-size:12.5px;line-height:1.25;margin-bottom:3px}
.return-action-help span,.return-action-help em{display:block;font-size:12px;line-height:1.35;color:#596779}
.return-action-help em{margin-top:4px;color:#8a5a00;font-style:normal;font-weight:800}
.return-action-help.refund,.return-action-help.approve{border-color:#b9dfc3;background:#f5fbf7;color:#173c25}
.return-action-help.reject{border-color:#f0c890;background:#fff8ea}
.return-final-summary{border:1px solid #b9dfc3;background:#f5fbf7;border-radius:8px;padding:8px 9px;margin:7px 0;color:#173c25}
.return-final-summary small{display:block;color:#4f765d;font-size:10px;font-weight:800;text-transform:uppercase;margin-bottom:2px}
.return-final-summary b{display:block;font-size:13px;line-height:1.25;margin-bottom:3px}
.return-final-summary span,.return-final-summary em{display:block;font-size:12px;line-height:1.35;color:#526170}
.return-final-summary em{margin-top:4px;color:#6f4e00;font-style:normal;font-weight:800}
.return-change{background:#fff;border:1px solid #ead39a;border-radius:8px;padding:0 8px;margin:7px 0}
.return-change > summary{font-size:12px!important;font-weight:800;color:#6f4e00}
.return-action-hidden{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.return-action-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:6px 0 7px}
.return-action-choice{display:flex!important;align-items:flex-start;gap:7px;margin:0!important;background:#fff;border:1px solid #e5d1a0;border-radius:8px;padding:7px 8px;min-width:0;cursor:pointer;text-transform:none!important;color:#334155}
.return-action-choice:hover{border-color:#d39b3d;background:#fffdf7}
.return-action-choice.on{border-color:#2f6fed;background:#eef5ff;box-shadow:0 0 0 1px #2f6fed inset}
.return-action-choice input{width:auto;margin:2px 0 0;flex:0 0 auto}
.return-action-choice span{display:block;font-size:12px;font-weight:900;line-height:1.2;color:#223047}
.return-action-choice.refund span,.return-action-choice.approve span{color:#176c3d}
.return-action-choice.reject span{color:#7a4c00}
.return-extra-actions{border:1px dashed #e6c37c;background:#fffaf0;border-radius:8px;margin:7px 0;padding:0 8px}
.return-extra-actions > summary{cursor:pointer;color:#8a5a00;font-size:12px;font-weight:900;padding:7px 0}
.return-extra-actions .return-action-choices{grid-template-columns:1fr;margin-top:0}
.return-context-repeat{display:grid;grid-template-columns:1.2fr 1.2fr auto;gap:7px;align-items:stretch;border:1px solid #d8e0ea;background:#f8fafc;border-radius:8px;padding:7px;margin:8px 0}
.return-context-repeat > div{background:#fff;border:1px solid #e4e9f2;border-radius:7px;padding:7px 8px;min-width:0}
.return-context-repeat small{display:block;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;margin-bottom:2px}
.return-context-repeat b{display:block;color:#223047;font-size:12px;line-height:1.25;overflow-wrap:anywhere}
.return-context-repeat span{display:block;margin-top:3px;color:#65758a;font-size:11px;line-height:1.25;font-weight:800}
.return-context-media{display:flex!important;gap:5px;align-items:center;flex-wrap:wrap;min-width:112px}
.return-context-thumb{position:relative;display:block;text-decoration:none;color:#526170;font-size:9.5px;font-weight:900;text-align:center;line-height:1.05}
.return-context-thumb img{width:44px;height:44px;object-fit:cover;border-radius:7px;border:1px solid var(--line);display:block;background:#eef1f6}
.return-context-thumb span{display:block!important;margin-top:2px!important;font-size:9.5px!important;line-height:1.05!important;color:#526170!important}
.return-context-no-photo{display:inline-flex!important;align-items:center;justify-content:center;width:58px;height:44px;border:1px dashed #cbd5e1;border-radius:7px;background:#f8fafc;color:#64748b!important;font-size:10px!important;font-weight:900;line-height:1.05;text-align:center}
.return-context-media.muted{align-items:center;color:#8a96a8;font-size:12px;font-weight:800}
.return-context-video{font-size:11px;font-weight:900;color:#8a5a00;text-decoration:none;background:#fff7e8;border:1px solid #f0d38a;border-radius:7px;padding:5px 7px}
.return-send-bar{border:1px solid #a9d8b7;background:#eefaf2;border-radius:8px;padding:8px 9px;margin:8px 0;color:#173c25}
.return-send-bar small{display:block;color:#4f765d;font-size:10px;font-weight:800;text-transform:uppercase;margin-bottom:2px}
.return-send-bar b{display:block;font-size:13px;line-height:1.25;margin-bottom:3px;overflow-wrap:anywhere}
.return-send-bar span{display:block;font-size:12px;line-height:1.35;color:#526170}
.return-send-bar.manual{border-color:#d8e0ea;background:#f8fafc;color:#223047}
.return-manual-close{border:1px solid #c7d7ef;background:#f3f7ff;border-radius:8px;margin:8px 0;padding:0 9px}
.return-manual-close > summary{cursor:pointer;color:#334155;font-size:12px;font-weight:900;padding:8px 0}
.return-danger{border:1px solid #efb36b;background:#fff3e1;border-radius:8px;padding:8px 9px;margin:7px 0 8px;font-size:12px;line-height:1.35;color:#6b3f00}
.return-danger b{color:#523000}
.return-comment{min-height:72px;max-height:120px}
.return-submit{width:100%;margin:8px 0 5px}
.return-submit:disabled,.return-manual-done:disabled{background:#e5e9f0!important;border-color:#d8e0ea!important;color:#8a96a8!important;box-shadow:none!important;cursor:not-allowed!important;opacity:1!important}
.return-submit:disabled:hover,.return-manual-done:disabled:hover{filter:none!important}
.subfold{margin:8px 0}.subfold > summary{cursor:pointer;font-size:12px;color:var(--mut);padding:4px 0}
.return-manual-close + .subfold + .subfold{opacity:.76}
details.note > summary{cursor:pointer;font-weight:600}
.casequote{background:#fdecec;color:#5a1f1f;border-radius:12px;padding:10px 13px;font-size:13.5px;line-height:1.4;margin:8px 0}
.convo{display:flex;flex-direction:column;gap:8px;margin:8px 0}  /* без своего скролла — скроллит колонка (один уровень) */
.convo .msg{max-width:94%;border-radius:12px;padding:8px 11px;font-size:13px;line-height:1.38;white-space:pre-wrap;word-break:break-word}
.convo .theirs{align-self:flex-start;background:#fdecec;color:#5a1f1f;border-bottom-left-radius:3px}
.convo .mine{align-self:flex-end;background:#e7f3ec;color:#1f4a30;border-bottom-right-radius:3px}
.convo .bot{align-self:flex-start;background:#eef0fb;color:#33366b;border-bottom-left-radius:3px}  /* авто-ответ бота WatBot */
.convo .who{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;opacity:.55;margin-bottom:2px}
.convo .att{opacity:.6}
.msg-link{color:var(--blue);font-weight:800;text-decoration:underline;text-underline-offset:2px;word-break:break-all}
.atts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.atts .thumb{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid var(--line);background:#eef1f6;cursor:pointer}
.atts .att-media{display:inline-flex;flex-direction:column;gap:3px;align-items:center;text-decoration:none;color:#526170;font-size:10.5px;font-weight:800}
.atts .att-media span{max-width:82px;text-align:center;line-height:1.15}
.atts .att-prod{font-size:11.5px;background:#eef1f6;color:#3a4a63;border-radius:8px;padding:4px 8px;text-decoration:none;align-self:center}
.atts .att-link{font-size:11.5px;background:#eaf1ff;color:#1e478f;border:1px solid #bcd2ff;border-radius:8px;padding:4px 8px;text-decoration:none;align-self:center;font-weight:800}
.atts .att-link:hover{text-decoration:underline}
.calc .atts .thumb{width:82px;height:82px}
.priwhy{font-size:10.5px;font-weight:600;color:#b4474b;background:#fff3f3;border-radius:6px;padding:1px 6px;margin:3px 0;display:inline-block}
.qhead{flex:0 0 auto;background:#fff;padding:12px 12px 10px;border-bottom:1px solid var(--line)}
.qhead > b{font-size:14px}
.badge{font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;display:inline-block;margin:0 4px 4px 0}
.b-tier{background:#fde3e3;color:#a11} .b-src-llm{background:#e7e0ff;color:#5b3ea1}
.b-src-template{background:#eceef1;color:#555} .b-src-llm_fallback_template{background:#fff0d6;color:#9a5b00}
.b-status{background:#dbe8ff;color:#1e478f} .b-public{background:#fde3e3;color:#a11}
textarea{width:100%;min-height:120px;max-height:42vh;border:1px solid var(--line);border-radius:8px;padding:8px;font:inherit;font-size:13px;resize:none;overflow:auto;box-sizing:border-box}
.return-decision select{min-height:34px;background:#fff}
.return-decision textarea.return-comment{min-height:52px;max-height:82px}
@media(max-width:1040px){.return-facts{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.return-facts{grid-template-columns:1fr}}
.action-meta{font-size:12.5px;color:var(--mut);margin-bottom:6px}
.reply-label{font-size:12px;color:var(--mut);font-weight:700;margin:5px 0 4px}
.action-primary{margin:8px 0 6px}
.action-primary .btn{font-size:15px;min-height:40px}
.action-secondary{display:flex;gap:7px;flex-wrap:wrap;margin:7px 0}
.action-secondary .btn{flex:1 1 130px}
select{font:inherit;padding:7px;border-radius:8px;border:1px solid #cdd3da;width:100%}
.ap{background:#f7f9fc;border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:12.5px;color:var(--mut);margin-top:10px}
.ap .sw{display:inline-block;width:38px;height:21px;border-radius:20px;background:#cfd6e0;position:relative;vertical-align:middle;margin-right:8px;opacity:.55}
.ap .sw i{position:absolute;top:2px;left:2px;width:17px;height:17px;border-radius:50%;background:#fff}
.progressbar{height:7px;border-radius:5px;background:#e3e7ee;overflow:hidden;margin-top:6px}
.progressbar i{display:block;height:100%;background:#9fb0cc;border-radius:5px}
.hidden{display:none}
.foot{color:var(--mut);font-size:12px;text-align:center;margin:24px 0}
@media(max-width:900px){.dr-in,.cols2,.dyn{grid-template-columns:1fr}}
@media(max-width:820px){.sm4{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.chain{flex-direction:column;align-items:stretch}.cnode{padding:6px}.cgap{flex-direction:row;gap:10px;min-width:auto;padding:3px 0}.cgap .ca{transform:rotate(90deg)}.sm4{grid-template-columns:1fr}}

/* WB-жалобы: компактный рабочий экран + отчёт */
.cmp-head h2{font-size:26px;letter-spacing:-.4px;margin:0 0 2px}
.cmp-shell{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:14px;align-items:start;margin:12px 0 14px}
.cmp-main,.cmp-side{display:grid;gap:14px;align-items:start}
.cmp-side{position:sticky;top:68px}
.cmp-now{background:#101f36;color:#fff;border-radius:14px;padding:16px 18px;min-height:178px;display:flex;flex-direction:column;justify-content:space-between}
.cmp-state{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px}
.cmp-state i{width:12px;height:12px;min-width:12px;margin-top:6px;border-radius:50%;background:#2fd076}
.cmp-state.warn i{background:var(--org)}
.cmp-state.attn i{background:var(--blue)}
.cmp-state.running i{background:var(--blue);animation:pulse 1.2s infinite}
.cmp-state b{font-size:21px;line-height:1.12;overflow-wrap:anywhere}
.cmp-now .sub{color:#bdc9dc}
.cmp-flow{display:flex;align-items:stretch;gap:6px;margin-top:12px;flex-wrap:wrap}
.cmp-flow .cmp-step{flex:1 1 0;min-width:0;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);border-radius:9px;padding:8px 9px;color:#cbd7ea;font-size:11px;line-height:1.3;display:flex;flex-direction:column;gap:2px}
.cmp-flow .cmp-step em{font-style:normal;font-weight:800;color:#8ea6cc;font-size:10.5px;text-transform:uppercase;letter-spacing:.03em}
.cmp-flow .cmp-step b{color:#fff;font-size:15px;line-height:1.1}
.cmp-flow .cmp-step i{font-style:normal;color:#a8b8d2;font-size:11px;line-height:1.25}
.cmp-flow .cmp-step-goal{background:rgba(47,208,118,.12);border-color:rgba(47,208,118,.35)}
.cmp-flow .cmp-step-goal b{color:#79e6a8}
.cmp-lesson{background:rgba(47,208,118,.12);border:1px solid rgba(47,208,118,.35);border-radius:9px;padding:10px 12px;margin:8px 0 10px;color:#d5efdf;font-size:12.5px;line-height:1.4}
.cmp-lesson b{color:#79e6a8;font-weight:800}
.cmp-conv-empty{color:#a8b8d2;font-size:12px;line-height:1.4;padding:8px 4px;font-style:normal}
.cmp-flow .cmp-arrow{flex:0 0 auto;align-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#7f97bd;font-size:20px;font-weight:800;padding:0 2px}
.cmp-flow .cmp-arrow em{font-style:normal;font-size:9.5px;font-weight:700;color:#7f97bd;text-align:center;line-height:1.1;max-width:64px;margin-top:1px}
.cmp-flow-tail{color:#d5def0;background:rgba(255,255,255,.06);border:1px dashed rgba(255,255,255,.18);border-radius:8px;padding:7px 8px;font-size:11.5px;margin-top:7px;white-space:normal;overflow-wrap:anywhere}
.cmp-hero-cta{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin-top:14px}
.cmp-hero-main{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.btn.btn-hero{background:#2fd076;color:#08331d;font-weight:800;font-size:14px;padding:11px 18px;border:none;border-radius:10px;cursor:pointer}
.btn.btn-hero:hover:not(:disabled){background:#3ee085}
.btn.btn-hero:disabled{opacity:.55;cursor:default}
.cmp-cta-note{color:#cbd7ea;font-size:12px;line-height:1.3}
.cmp-hero-main .cmp-step-tag{background:rgba(255,255,255,.16);color:#dfe8f6}
.cmp-step-tag{display:inline-block;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;background:#eef2fb;color:#4a5f86;border-radius:6px;padding:2px 7px;margin-right:6px;vertical-align:1px}
.cmp-skel-hero{background:linear-gradient(180deg,#1b2438,#141c2e);border-radius:14px;padding:18px 18px 22px}
.cmp-skel-bar{height:14px;border-radius:7px;background:rgba(255,255,255,.1);margin-top:12px}
.cmp-skel-bar.w60{width:60%}.cmp-skel-bar.w40{width:40%}
.cmp-skel-card{height:120px;border-radius:12px;background:#eef1f6;margin-top:12px;animation:pulse 1.4s infinite}
.cmp-error{margin-top:12px}
.cmp-error .btn{margin-top:10px}
.cmp-rating-await{display:flex;flex-direction:column;gap:12px}
.cmp-await{color:var(--mut);font-size:13px;line-height:1.45}
.cmp-stage2{margin:16px 0 14px}
.cmp-stage2-h{font-size:15px;margin:0 0 4px;color:var(--ink)}
.cmp-stage2 .cmp-support{margin-top:8px}
.cmp-action{margin:0;padding:15px 16px;min-height:178px}
.cmp-action h2,.cmp-ok h2,.cmp-queue h2,.cmp-why h2,.cmp-report h2,.cmp-risk h2{margin-top:0}
.cmp-rule{font-size:12px;color:var(--mut);font-weight:800;margin:8px 0}
.cmp-rule b{color:var(--ink)}
.cmp-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cmp-action .cmp-actions{grid-template-columns:1fr}
.cmp-actions .btn-ok:first-child{grid-column:1/-1}
.btn.is-loading{opacity:.9;cursor:progress}
.btn-spin{display:inline-block;width:12px;height:12px;border:2px solid rgba(255,255,255,.55);border-top-color:#fff;border-radius:50%;margin-right:7px;vertical-align:-2px;animation:spin .75s linear infinite}
.btn-mut .btn-spin{border-color:rgba(22,34,58,.25);border-top-color:var(--ink)}
.cmp-live-status{display:flex;gap:8px;align-items:flex-start;margin-top:10px;border:1px solid var(--line);background:#f7f9fc;border-radius:9px;padding:9px 10px;color:var(--mut);font-size:12px;line-height:1.25}
.cmp-live-status i{width:9px;height:9px;min-width:9px;border-radius:50%;background:#9fb0cc;margin-top:3px}
.cmp-live-status.syncing,.cmp-live-status.refreshing{border-color:#b9cdf8;background:#f2f6ff;color:#315079}
.cmp-live-status.syncing i,.cmp-live-status.refreshing i{background:var(--blue);animation:pulse 1.2s infinite}
.cmp-live-status.success{border-color:#bfe6cf;background:#f0fbf5;color:#1e6f43}
.cmp-live-status.success i{background:var(--grn)}
.cmp-live-status.error{border-color:#ffd0d2;background:#fff4f4;color:#9a1f25}
.cmp-live-status.error i{background:var(--red)}
.cmp-runbox{margin-top:10px;background:#f7f9fc;border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.cmp-runbox summary{cursor:pointer;font-weight:800;font-size:13px}
.cmp-runbox-danger{background:#fff6f5;border:1.5px solid #f0b6b6}
.cmp-runbox-danger summary{color:#9a1f25}
.cmp-run-warn{margin-top:8px;background:#fff;border:1px solid #f0b6b6;border-left:4px solid var(--red);border-radius:8px;padding:8px 10px;font-size:12px;line-height:1.35;color:#7a2429}
.cmp-run-warn b{color:#9a1f25}
.cmp-run-controls{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-top:8px;font-size:12px;color:var(--mut)}
.inp{border:1px solid var(--line);border-radius:8px;padding:7px 9px;font:inherit;background:#fff}
.cmp-support{margin-top:10px;border:1px solid #d7e2f3;background:#f7fbff;border-radius:10px;padding:10px}
.cmp-support-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}
.cmp-support-metrics div{background:#fff;border:1px solid #e0e8f5;border-radius:8px;padding:7px 8px;min-width:0}
.cmp-support-metrics b{display:block;color:var(--ink);font-size:17px;line-height:1.1}.cmp-support-metrics span{display:block;color:var(--mut);font-size:11px;margin-top:2px;line-height:1.2}
.cmp-support-title{display:flex;justify-content:space-between;gap:8px;align-items:flex-start;margin:7px 0;font-size:13px}
.cmp-support-title b{line-height:1.2}.cmp-support-title span{color:var(--mut);font-size:12px;white-space:nowrap}
.cmp-support-preview{font-size:12px;line-height:1.35;color:#44536b;border-left:3px solid #bcd3ff;padding-left:8px;margin:8px 0}
.cmp-support-pulse{background:rgba(79,140,255,.10);border:1px solid rgba(79,140,255,.30);border-radius:9px;padding:9px 11px;margin:8px 0 10px;font-size:12.5px;line-height:1.45;color:#334963}
.cmp-support-pulse b{color:#2f5fd0;font-weight:800}
.cmp-support-cta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:2px 0 12px}
.cmp-support-cta .sub{flex:1;min-width:180px;margin:0;font-size:11.5px}
.cmp-support-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.cmp-support-run{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-top:9px;border-top:1px solid #d7e2f3;padding-top:9px;font-size:12px;color:var(--mut)}
.cmp-support-run input[type="number"]{width:72px}.cmp-support-run input:not([type="number"]){width:150px}
.cmp-support-details{margin-top:8px}.cmp-support-details summary{cursor:pointer;font-weight:800;font-size:12px;color:var(--mut)}
.cmp-support-details pre{white-space:pre-wrap;background:#fff;border:1px solid var(--line);border-radius:8px;padding:9px;max-height:220px;overflow:auto;font-size:12px;line-height:1.35;color:#24324a}
.cmp-support-response{display:block;width:100%;min-height:70px;resize:vertical;margin:8px 0}
.cmp-ok{padding:12px 14px;margin:12px 0}
.cmp-work{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:12px;margin-bottom:12px;align-items:start}
.cmp-queue,.cmp-why,.cmp-report,.cmp-risk,.cmp-tech{margin:0}
.cmp-stats{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 6px}
.cmp-stats .cmp-stat{font-size:12px;color:var(--mut);border-left:3px solid var(--line);padding:2px 0 2px 8px}
.cmp-stats .cmp-stat b{color:var(--ink);font-size:13px}
.cmp-stats .cmp-stat.on{border-left-color:var(--blue);color:var(--ink)}
.cmp-queue-shown{font-size:12px;color:var(--mut);margin-bottom:8px}
.cmp-queue-shown b{color:var(--ink)}
.cmp-why-row{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
.cmp-why-b{display:inline-block;font-size:10.5px;font-weight:700;line-height:1.3;padding:1px 7px;border-radius:999px;background:#eef1f6;color:#5a6a83}
.cmp-why-b.good{background:#e6f7ee;color:#1e7a45}
.cmp-why-b.weak{background:#fdeeee;color:#9a4a4a}
.cmp-cycle-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:2px}
.cmp-cycle{font-size:11px;font-weight:800;background:#eef4ff;color:#1f4d9e;border:1px solid #c7d8ff;border-radius:999px;padding:2px 9px;white-space:nowrap}
.cmp-eta{font-size:11.5px;color:var(--mut)}
.cmp-support-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;flex-wrap:wrap}
.cmp-support-work{margin-top:9px}
.cmp-support-rlabel{display:block;font-size:12px;font-weight:700;color:var(--mut);margin-top:8px}
.cmp-support-foot{margin-top:10px;border-top:1px solid #d7e2f3;padding-top:9px}
.cmp-inline{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.cmp-cases{display:grid;gap:8px}
.cmp-case{border:1px solid var(--line);border-left:4px solid var(--org);border-radius:9px;padding:9px 10px;display:grid;grid-template-columns:220px minmax(0,1fr) 140px;gap:10px;align-items:start;background:#fff}
.cmp-case b{display:block;line-height:1.15}
.cmp-case span{display:block;color:var(--mut);font-size:12px;margin-top:3px}
.cmp-case p{margin:0;color:#44536b;font-size:13px;line-height:1.35}
.cmp-case details summary{cursor:pointer;color:var(--mut);font-size:12px;font-weight:800}
.cmp-manual{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.cmp-eligbar{height:10px;background:#edf1f6;border-radius:999px;display:flex;overflow:hidden;margin:10px 0}
.cmp-eligbar i{display:block}.seg-eligible{background:var(--grn)}.seg-candidate{background:var(--blue)}.seg-no_text_missing{background:#9fb0cc}.seg-wb_blocked{background:var(--org)}.seg-ineligible{background:#c8d2df}.seg-other,.seg-empty{background:#dfe5ee}
.cmp-reasons{display:grid;gap:5px;margin-top:8px}
.cmp-reasons div{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding-bottom:6px;color:var(--mut);font-size:12px}
.cmp-reasons div:last-child{border-bottom:0;padding-bottom:0}
.cmp-reasons b{color:var(--ink)}
.cmp-report{display:grid;grid-template-columns:.9fr 1.1fr;gap:14px;margin-bottom:14px}
.cmp-effect,.cmp-rating{margin:0}
.cmp-effect-grid{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;align-items:center;margin-top:10px}
.cmp-big{font-size:48px;font-weight:850;line-height:1;color:var(--org)}
.cmp-stack{height:9px;background:#edf1f6;border-radius:999px;overflow:hidden;margin-bottom:10px}
.cmp-stack i{display:block;height:100%;background:var(--grn)}
.cmp-context{display:flex;gap:8px;flex-wrap:wrap}
.cmp-context span{background:#f7f9fc;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:12px;color:var(--mut)}
.cmp-context b{display:block;color:var(--ink);font-size:16px}
.cmp-rating-chart{height:178px}.cmp-rating-chart svg{width:100%;height:100%;display:block}
.cmp-mini3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px}
.cmp-mini3 div{background:#f7f9fc;border:1px solid var(--line);border-radius:8px;padding:9px 10px;color:var(--mut);font-size:12px}
.cmp-mini3 b{display:block;color:var(--ink);font-size:17px}
.cmp-risk{overflow-x:auto;margin-bottom:14px}
.cmp-risk table{min-width:760px;font-size:13px}
.cmp-risk td,.cmp-risk th{padding:9px 8px}
.rec-page{display:block}
#page-upsells{max-width:min(1660px,calc(100vw - 32px))}
.rec-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:8px}.rec-head h2{margin-top:0}
.upselltop{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:12px;margin-bottom:12px;align-items:stretch}
.upsellhero,.compactnote{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:0 1px 2px rgba(20,35,59,.04)}
.upsellhero{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.upsellhero h2{margin:0 0 2px;font-size:24px;letter-spacing:-.3px}
.compactnote{font-size:12px;color:var(--mut);line-height:1.35}
.metricrail{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:10px 0 12px}
.metricbox{background:#f7f9fc;border:1px solid var(--line);border-radius:10px;padding:10px 12px;color:var(--mut);font-size:12px}
.metricbox b{display:block;color:var(--ink);font-size:21px;line-height:1.05}.metricbox.strong b{color:var(--grn)}
.metricbox .sm{display:block;margin-top:2px;color:var(--mut2);font-size:11px}
.rec-card{overflow:visible;margin-bottom:14px}
.upfilters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.selectmock{margin-left:auto;border:1px solid var(--line);background:#f7f9fc;border-radius:8px;padding:5px 9px;font-size:12px;color:var(--mut);font-weight:700}
.upgrid{display:grid;grid-template-columns:360px minmax(0,1fr);gap:14px;align-items:start}
.upgrid aside{position:sticky;top:72px;min-width:0}
.upgrid aside h2{margin:0 0 8px;font-size:16px}
.skulist{display:grid;gap:8px;max-height:calc(100vh - 300px);overflow:auto;padding-right:2px}
.skuitem{display:flex;gap:10px;align-items:center;width:100%;text-align:left;border:1px solid var(--line);background:#fff;border-radius:8px;padding:10px 11px;cursor:pointer;color:var(--ink);font:inherit}
.skuitem-txt{min-width:0;flex:1}
.recbadge{display:inline-block;margin-top:5px;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;line-height:1.5}
.recbadge.on{background:#e6f6ec;color:#1f7a43;border:1px solid #c7e9d3}
.recbadge.off{background:#f1f4f8;color:#8a97a6;border:1px solid #e1e7ef}
.skuitem:hover{border-color:#bcd3ff;background:#fafcff}.skuitem.on{border-color:#bcd3ff;background:#f5f8ff;box-shadow:0 0 0 2px #e4eeff inset}
.skuitem b{display:block;line-height:1.2;font-size:13px}.pairmeta{display:block;color:var(--mut);font-size:11.5px;line-height:1.25;margin-top:3px}
/* миниатюры карточек WB в рекомендациях */
.rthumb{width:54px;height:54px;flex:0 0 auto;border-radius:8px;object-fit:cover;background:#f0f3f7;border:1px solid var(--line)}
.rthumb-lg{width:72px;height:72px}
.rthumb-none{display:inline-flex;align-items:center;justify-content:center;font-size:10px;color:#9aa7b6;text-align:center;line-height:1.1;padding:2px;box-sizing:border-box}
.recdst{display:flex;gap:9px;align-items:flex-start}.recdst-txt{min-width:0}
.pairbox-body{display:flex;gap:10px;align-items:center;margin-top:4px}.pairbox-body>div{min-width:0}
.skuitem .score{margin-top:7px;height:8px;background:#edf2f7;border-radius:999px;overflow:hidden}.skuitem .score i{display:block;height:100%;background:linear-gradient(90deg,#2f6fed,#14a6a4);border-radius:999px}
.tablewrap{min-width:0;overflow:visible}
.slotbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border:1px solid var(--line);background:#fafbfe;border-radius:8px;padding:10px 12px;margin-bottom:10px}
.slotbar b{font-size:13px}.slotbar .sub{font-size:12px;margin:2px 0 0}
.segment{display:flex;gap:4px;background:#eef2f8;border-radius:9px;padding:3px}.segment span{border:0;background:transparent;border-radius:7px;padding:5px 8px;font:inherit;font-size:12px;font-weight:800;color:var(--mut)}.segment span.on{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(20,35,59,.08)}
.upsellpair{border:1px solid var(--line);border-radius:10px;background:#fff;margin-bottom:10px;padding:12px}
.pairmain{display:grid;grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:10px;align-items:stretch}.pairarrow{display:flex;align-items:center;justify-content:center;color:var(--mut);font-size:22px;font-weight:800}
.pairbox{border:1px solid var(--line);border-radius:8px;background:#f7f9fc;padding:10px 12px}.pairbox.recommend{background:#f2fbf5;border-color:#cbe8d4}.pairbox.manual{background:#fff8e6;border-color:#f0d48a}.pairbox span{font-size:11px;color:var(--mut);font-weight:800;text-transform:uppercase}.pairbox b{display:block;margin-top:4px;line-height:1.18}
.pairdetails{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:10px}.pairdetails div{background:#fafbfe;border:1px solid var(--line);border-radius:8px;padding:8px 10px;color:var(--mut);font-size:12px;min-width:0}.pairdetails b{display:block;color:var(--ink);font-size:15px;line-height:1.15}.pairdetails span{display:block;margin-top:2px;line-height:1.25}
.copyline{margin-top:8px;background:#f7f9fc;border:1px dashed #ccd7e6;border-radius:8px;padding:7px 9px;color:#445;font-size:12px;line-height:1.35}.maincopy{background:#fffdf5;border-color:#eed48a;color:#6b4e00}
.reco-table{width:100%;min-width:0;table-layout:fixed;font-size:13px;margin-top:8px}.reco-table td,.reco-table th{padding:9px 8px;vertical-align:top;border-top:1px solid var(--line);overflow-wrap:anywhere}.reco-table thead th{border-top:0}.reco-table tr.mainrow td{background:#fbfdff}.reco-table th:nth-child(1),.reco-table td:nth-child(1){width:150px}.reco-table th:nth-child(2),.reco-table td:nth-child(2){width:46%}.reco-table th:nth-child(3),.reco-table td:nth-child(3){width:22%}.reco-table th:nth-child(4),.reco-table td:nth-child(4){width:14%}
.pairbig{font-size:26px;font-weight:850;line-height:1;color:var(--ink);letter-spacing:-.3px}
.muted{color:var(--mut)}
.pairbig.muted{color:var(--mut);font-weight:700}
.reco-table .swt{display:flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap;cursor:pointer}.reco-table .swt input{width:16px;height:16px;flex:0 0 auto;cursor:pointer}.slotselect{margin-top:5px;font-size:11px;padding:2px 4px;border:1px solid var(--line);border-radius:6px;max-width:115px;color:var(--ink);background:#fff}.delta{font-weight:700;font-size:14px}.delta.good{color:var(--grn)}.delta.bad{color:var(--red)}.delta.wait{color:var(--mut)}
.recflag{font-size:11px;margin-top:5px;font-weight:600}.recflag.warn{color:var(--org)}.recflag.ok{color:var(--grn)}
.rec-search{width:100%;box-sizing:border-box;margin:0 0 8px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;font-size:13px;background:#fff;color:var(--ink)}
.rec-source{display:inline-block;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800;background:#eceef1;color:#555}
.rec-source.co_basket,.rec-source.mixed{background:#e1f2e6;color:#136b2e}.rec-source.co_basket_family{background:#eaf1ff;color:#1f4d9e}
.rec-source.public-ok{background:#d7f7e2;color:#10612b}.rec-source.historical_reply{background:#e9f0ff;color:#1f4d9e}.rec-source.popular_fallback{background:#fff0d6;color:#9a5b00}
.rec-scope{font-size:12px;color:var(--ink);font-weight:700;margin-top:5px}.rec-proof,.rec-stops{font-size:11.5px;color:var(--mut);margin-top:3px;line-height:1.3}.rec-stops{color:#8a5a00}
.stock{display:block;width:max-content;margin-top:4px;border-radius:999px;background:#e1f2e6;color:#136b2e;padding:2px 7px;font-size:10.5px;font-weight:800}.stock.low{background:#fff0d6;color:#9a5b00}
.risk{display:inline-block;border-radius:999px;padding:2px 7px;font-size:10.5px;font-weight:800}.risk.low{background:#d7f7e2;color:#10612b}.risk.med{background:#fff0d6;color:#8a5a00}.risk.high{background:#fde3e3;color:#a11}
.rec-warn{font-size:12px;margin:8px 0;padding:10px 12px;border-radius:10px}.rec-note{margin-top:8px}
/* Универсальный дефолт: тот же визуальный язык, что и список товаров (фото+название), + акцент на выбранных */
.globdef-prod{display:flex;gap:10px;align-items:flex-start}
.globdef-table td:nth-child(1){width:42%}.globdef-table td:nth-child(2){width:26%}.globdef-table td:nth-child(3){width:16%}.globdef-table td:nth-child(4){width:16%}
.globdef-table .pairbig{font-size:19px;display:block}.globdef-table td>span{color:var(--mut);font-size:11.5px}
.globdef-row.on td{background:#eef8f1}.globdef-row.on td:first-child{box-shadow:inset 3px 0 0 var(--grn)}
@media(max-width:900px){.globdef-table{min-width:640px}}
.cmp-tech summary{cursor:pointer;font-weight:800}
.cmp-pre{white-space:pre-wrap;margin:8px 0 0;color:var(--mut);font-size:11px;max-height:160px;overflow:auto;background:#f7f9fc;border:1px solid var(--line);border-radius:8px;padding:8px}
@media(max-width:1280px){#page-upsells{max-width:min(1280px,calc(100vw - 24px))}.upgrid{grid-template-columns:320px minmax(0,1fr)}.metricrail{grid-template-columns:repeat(3,minmax(0,1fr))}.pairdetails{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.cmp-shell,.cmp-work,.cmp-report,.upselltop,.upgrid,.pairmain,.pairdetails,.metricrail{grid-template-columns:1fr}.cmp-side{position:static}.upgrid aside{position:static}.cmp-actions,.cmp-effect-grid,.cmp-mini3,.rec-metrics{grid-template-columns:1fr}.cmp-support-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.cmp-case{grid-template-columns:1fr}.cmp-flow{flex-direction:column}.cmp-flow .cmp-arrow{flex-direction:row;gap:6px}.cmp-flow .cmp-arrow em{max-width:none}.cmp-state b{font-size:18px}.cmp-now,.cmp-action{min-height:0}.upsellhero{display:block}.upsellhero .btn{margin-top:8px}.selectmock{margin-left:0}.skulist{max-height:none}.tablewrap{overflow-x:auto}.reco-table{min-width:760px}}
