/* Админка GL Dream v2 — оболочка поверх style.css (токены цвета, кнопки,
   поля и таблицы берём оттуда). Здесь: раскладка «сайдбар + рабочая
   область», разделы-виды, дашборд, дравер, командная палитра, тосты. */

:root {
  --side-w: 236px;
  --ease: cubic-bezier(.22, .9, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

body.adm { overflow-x: hidden; }
body.adm::before { opacity: .6; }
.adm .wrap, .adm .wrap.wide { width: auto; }
.adm h1 { font-size: 26px; line-height: 1.1; margin: 0; letter-spacing: -0.035em; }
.adm h2 { font-size: 18px; margin: 0 0 12px; }
.adm .card { padding: 22px; }
.adm .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.adm .card-head h2 { margin: 0 0 2px; }
.adm .card-head .card-sub { margin: 0; }
.adm .card-head a.mini { text-decoration: none; display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 100px; }
.adm code, .adm .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }
.adm code { background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 2px 7px; border-radius: 7px; }
.adm button, .adm a.mini { transition: background .18s, border-color .18s, transform .18s var(--ease-spring), opacity .18s; }
.adm button:active:not(:disabled) { transform: scale(.97); }
button.danger { background: var(--bad); }
button.danger:hover:not(:disabled) { background: #ff7676; }
.adm a { color: inherit; }
.grow { flex: 1; }

/* ---------- вход ---------- */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; }
.auth-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; animation: blob 18s ease-in-out infinite alternate; }
.auth-bg span:nth-child(1) { width: 420px; height: 420px; background: var(--accent); top: -120px; left: -100px; }
.auth-bg span:nth-child(2) { width: 360px; height: 360px; background: #6a3cff; bottom: -140px; right: -80px; animation-delay: -6s; }
.auth-bg span:nth-child(3) { width: 260px; height: 260px; background: var(--lime); top: 55%; left: 60%; opacity: .12; animation-delay: -12s; }
@keyframes blob { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(60px, 40px, 0) scale(1.15); } }
.auth-card { position: relative; width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 30px; animation: card-in .5s var(--ease) both; }
.auth-card .brand { margin-bottom: 26px; }
.auth-card h2 { margin-bottom: 4px; }
.auth-card .hint { margin: 0 0 18px; }
.key { display: inline-block; margin-left: 8px; font-size: 12px; opacity: .7; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 0 6px; }
.tg-ring { width: 68px; height: 68px; margin: 6px auto 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent-soft); border: 1px solid var(--accent-line); position: relative; }
.tg-ring::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: sp 1.1s linear infinite; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; position: relative; z-index: 1; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(19,19,24,.7); backdrop-filter: blur(12px); z-index: 50; }
.side-brand { padding: 4px 8px 20px; }
.nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; transition: color .2s, transform .2s var(--ease); }
.nav a i { font-style: normal; width: 20px; height: 20px; display: grid; place-items: center; opacity: .75; transition: transform .35s var(--ease-spring), opacity .2s; }
.nav a i svg { width: 19px; height: 19px; }
.nav a:hover { color: var(--text); }
.nav a:hover i { transform: translateY(-1px) scale(1.12); }
.nav a.on { color: #fff; }
.nav a.on i { opacity: 1; }
.nav-ind { position: absolute; left: 0; right: 0; height: 42px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); transition: transform .38s var(--ease-spring), opacity .2s; opacity: 0; pointer-events: none; }
.nav-ind.ready { opacity: 1; }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 100px; background: var(--accent); color: #fff; min-width: 20px; text-align: center; transform: scale(0); transition: transform .3s var(--ease-spring); }
.nav-badge.show { transform: scale(1); }
.nav-badge.warn { background: var(--warn); color: #1a1200; }
.nav-badge.err { background: var(--bad); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.wstat-mini { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 0 6px; }
.wstat-mini .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.wstat-mini.ok .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: ping 2s infinite; }
.wstat-mini.warn .dot { background: var(--warn); }
.wstat-mini.err .dot { background: var(--bad); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.55); } 70% { box-shadow: 0 0 0 8px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }

.main { min-width: 0; padding: 18px 28px 60px; }
.top { display: flex; align-items: center; gap: 14px; padding: 6px 0 20px; position: sticky; top: 0; z-index: 40; background: linear-gradient(var(--bg) 70%, transparent); margin-bottom: 4px; }
.top-title { flex: 1; min-width: 0; }
.top-title .hint { margin: 2px 0 0; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; padding: 9px 12px; border-radius: 12px; box-shadow: none; }
.search-btn:hover:not(:disabled) { background: var(--panel-2); border-color: #3b3745; color: var(--text); }
.search-btn kbd, .cmd-foot kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; color: var(--dim); }
.icon-btn { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text); box-shadow: none; font-size: 18px; }
.icon-btn:hover:not(:disabled) { background: var(--panel-2); }
.icon-btn .ico { display: inline-block; transition: transform .5s var(--ease); }
.icon-btn.spin .ico { animation: sp .8s linear infinite; }
.upd { font-size: 12px; color: var(--dim); white-space: nowrap; }
.burger { display: none; width: 40px; height: 40px; padding: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: none; position: relative; }
.burger span, .burger span::before, .burger span::after { content: ""; position: absolute; left: 11px; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease); }
.burger span { top: 19px; }
.burger span::before { left: 0; top: -6px; }
.burger span::after { left: 0; top: 6px; }

/* ---------- виды ---------- */
.view { display: none; }
.view.on { display: block; animation: view-in .38s var(--ease) both; }
.view.leaving { display: block; animation: view-out .18s ease-in both; position: absolute; width: calc(100% - 56px); pointer-events: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes view-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }
.view .card.enter { animation-delay: calc(var(--i, 0) * 60ms); }

/* ---------- тулбар / сегменты ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 100px; padding: 3px; gap: 2px; }
.seg button { background: transparent; box-shadow: none; color: var(--muted); font-size: 12.5px; padding: 6px 12px; border-radius: 100px; }
.seg button:hover:not(:disabled) { background: rgba(255,255,255,.04); color: var(--text); }
.seg button.on { background: var(--accent); color: #fff; }
.inline-input { max-width: 300px; padding: 9px 12px !important; font-size: 13px !important; border-radius: 10px !important; }

/* ---------- KPI ---------- */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 18px; border-radius: 14px; border: 1px solid; border-left-width: 4px; font-size: 14px; animation: view-in .4s var(--ease) both; }
.alert b { font-weight: 700; }
.alert a { margin-left: auto; font-size: 13px; color: inherit; opacity: .8; white-space: nowrap; }
.alert.err { background: rgba(255,92,92,.1); border-color: rgba(255,92,92,.35); color: #ffb4b4; }
.alert.warn { background: rgba(245,183,61,.1); border-color: rgba(245,183,61,.35); color: #ffe2a3; }
.alert.info { background: var(--accent-soft); border-color: var(--accent-line); color: #ffd0e2; }
.alert.ok { background: rgba(61,220,151,.08); border-color: rgba(61,220,151,.3); color: #a6f0d0; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; overflow: hidden; padding: 18px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); animation: card-in .5s var(--ease) both; animation-delay: calc(var(--i) * 70ms); transition: transform .25s var(--ease), border-color .25s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--line-2); }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--kpi-c, var(--accent)); opacity: .08; filter: blur(20px); }
.kpi small { display: block; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.kpi b { display: block; font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12.5px; color: var(--muted); }
.kpi .delta.up { color: var(--ok); }
.kpi .delta.down { color: var(--bad); }
.kpi svg.spark { position: absolute; right: 16px; top: 16px; width: 84px; height: 30px; opacity: .8; }
.kpi small { padding-right: 96px; }

/* ---------- дашборд ---------- */
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.dash-grid .card { margin: 0; }
.chart { position: relative; height: 230px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .bar { transform-origin: bottom; animation: bar-up .7s var(--ease) both; animation-delay: calc(var(--i) * 35ms); transition: opacity .2s; cursor: pointer; }
.chart .bar.err { fill: var(--bad); }
.chart .bar.today { filter: drop-shadow(0 0 8px rgba(255,46,126,.55)); }
.chart .xl.today { fill: var(--text); font-weight: 700; }
.chart:hover .bar:not(:hover) { opacity: .55; }
@keyframes bar-up { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart .line { fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.4s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .xl { fill: var(--dim); font-size: 10px; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.tip { position: absolute; pointer-events: none; background: #1d1c24; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; z-index: 5; }
.tip.show { opacity: 1; }
.tip b { color: var(--lime); }

.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hours i { display: block; aspect-ratio: 1; border-radius: 4px; background: rgba(255,255,255,.05); position: relative; animation: fade-in .4s both; animation-delay: calc(var(--i) * 20ms); }
.hours i[data-n]:not([data-n="0"]) { background: var(--accent); opacity: calc(.25 + var(--v) * .75); }
.hours i:hover::after { content: attr(data-h) ":00 · " attr(data-n); position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); background: #1d1c24; border: 1px solid var(--line-2); padding: 4px 8px; border-radius: 8px; font-size: 11px; white-space: nowrap; font-style: normal; color: var(--text); z-index: 5; }
.hours-x { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); margin-top: 5px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-wrap svg { width: 120px; height: 120px; flex: none; transform: rotate(-90deg); }
.donut-wrap circle { fill: none; stroke-width: 14; stroke-linecap: butt; transition: stroke-dasharray 1s var(--ease); }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

.pools { display: flex; flex-direction: column; gap: 12px; }
.pool-row { cursor: pointer; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.pool-row:hover { background: var(--panel-2); border-color: var(--line); }
.pool-row .t { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 7px; gap: 10px; }
.pool-row .t b { font-variant-numeric: tabular-nums; }
.pool-row .bar { height: 8px; border-radius: 100px; background: rgba(255,255,255,.06); overflow: hidden; }
.pool-row .bar i { display: block; height: 100%; border-radius: 100px; background: var(--ok); width: 0; transition: width 1s var(--ease); }
.pool-row.warn .bar i { background: var(--warn); }
.pool-row.err .bar i { background: var(--bad); }
.pool-row.manual .bar i { background: var(--dim); }
.pool-row .st { font-size: 11.5px; color: var(--dim); margin-top: 4px; }

.feed { display: flex; flex-direction: column; }
.feed-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); animation: view-in .35s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; background: rgba(61,220,151,.12); color: var(--ok); }
.feed-item.err .av { background: rgba(255,92,92,.12); color: var(--bad); }
.feed-item .tt { font-size: 13.5px; font-weight: 600; }
.feed-item .sb { font-size: 12px; color: var(--dim); }
.feed-item time { font-size: 12px; color: var(--dim); white-space: nowrap; }
.feed-item.new { background: linear-gradient(90deg, var(--accent-soft), transparent); border-radius: 10px; }

/* ---------- товары ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.prod { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; animation: card-in .45s var(--ease) both; animation-delay: calc(var(--i) * 45ms); transition: transform .25s var(--ease), border-color .25s, opacity .3s; }
.prod:hover { transform: translateY(-2px); border-color: var(--line-2); }
.prod.off { opacity: .55; }
.prod.off:hover { opacity: .85; }
.prod-top { display: flex; align-items: flex-start; gap: 12px; }
.prod-img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--panel-2); flex: none; display: grid; place-items: center; font-size: 22px; }
.prod-title { font-weight: 700; font-size: 15px; line-height: 1.25; }
.prod-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px; border: 1px solid var(--line-2); color: var(--muted); }
.chip.pool { border-color: rgba(61,220,151,.4); color: #a6f0d0; }
.chip.promo { border-color: rgba(245,183,61,.4); color: #ffe2a3; }
.chip.robux, .chip.sber_invite { border-color: var(--accent-line); color: #ffd0e2; }
.prod-keys { font-size: 12px; color: var(--dim); }
.prod-keys code { font-size: 11.5px; }
.prod-pool { }
.prod-pool .bar { height: 6px; border-radius: 100px; background: rgba(255,255,255,.06); overflow: hidden; margin-top: 6px; }
.prod-pool .bar i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .9s var(--ease); border-radius: 100px; }
.prod-pool.warn .bar i { background: var(--warn); }
.prod-pool.err .bar i { background: var(--bad); }
.prod-pool .t { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.prod-sw { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.prod-sw .sw-row { padding: 0; }
.prod-sw .sw-row b { font-size: 13px; }
.prod-act { display: flex; gap: 6px; margin-top: auto; }
.prod-act button { flex: 1; padding: 9px 10px; font-size: 12.5px; }
.ribbon { position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 100px; background: var(--warn); color: #1a1200; animation: fade-in .3s both; }
.ribbon.off { background: var(--bad); color: #fff; }
.mp-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--dim); cursor: pointer; white-space: nowrap; }
.mp-toggle input { width: auto; margin: 0; }

/* ---------- маркетплейсы ---------- */
.mk { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.mk-ym { background: #fc3f1d; }
.mk-ozon { background: #005bff; }
.seg button.on .mk { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.market-head { margin: 0 0 14px; padding: 16px 22px; }
.market-legend { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip.shop-gldream { border-color: rgba(255,46,126,.45); color: #ffd0e2; background: rgba(255,46,126,.08); }
.chip.shop-nestu { border-color: rgba(255,153,51,.45); color: #ffd7ad; background: rgba(255,153,51,.08); }
.chip.dim { border-style: dashed; color: var(--dim); }
.chip.st { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chip.st i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.chip.st.ok { border-color: rgba(61,220,151,.4); color: #a6f0d0; }
.chip.st.ok i { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.chip.st.warn { border-color: rgba(245,183,61,.4); color: #ffe2a3; }
.chip.st.warn i { background: var(--warn); }
.chip.st.err { border-color: rgba(255,92,92,.4); color: #ffb4b4; }
.chip.st.err i { background: var(--bad); }
.prod.mp .prod-img.mk-img { padding: 9px; background: var(--panel-2); }
.prod.mp .prod-img svg { width: 100%; height: 100%; }
.prod.mp .prod-keys { margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prod.mp .prod-pool .t span { display: inline-flex; align-items: center; gap: 6px; }
.prod.mp .prod-pool .t svg { width: 14px; height: 14px; opacity: .7; }
.prod.mp .prod-pool .st { font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.prod.mp .prod-pool.warn .t b { color: var(--warn); }
.prod.mp .prod-pool.err .t b { color: var(--bad); }
.prod.mp .prod-pool .t b { font-variant-numeric: tabular-nums; font-size: 15px; }
.prod.mp.unset { border-style: dashed; }
.prod.mp.unset .prod-title { color: var(--muted); }
.prod-unset { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--dim); line-height: 1.45; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); }
.prod-unset svg { width: 16px; height: 16px; flex: none; margin-top: 1px; opacity: .6; }
.prod.mp .prod-sw { margin-top: auto; }

.stock-big { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l s" "v s"; align-items: end; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.stock-big small { grid-area: l; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; }
.stock-big b { grid-area: v; font-size: 32px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.prod.mp.zero .stock-big b { color: var(--bad); }
.stock-sync { grid-area: s; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); text-align: right; max-width: 130px; line-height: 1.3; }
.stock-sync svg { width: 16px; height: 16px; flex: none; }
.stock-sync.ok { color: #a6f0d0; }
.stock-sync.ok svg { color: var(--ok); }

.stock-ctl { display: flex; align-items: stretch; gap: 0; margin-top: 8px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--panel-2); transition: border-color .2s, box-shadow .2s; }
.stock-ctl.dirty { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stock-ctl.busy { opacity: .6; pointer-events: none; }
.stock-ctl .st-btn { width: 38px; padding: 0; background: transparent; box-shadow: none; border-radius: 0; color: var(--muted); font-size: 18px; font-weight: 600; }
.stock-ctl .st-btn:hover:not(:disabled) { background: rgba(255,255,255,.06); color: var(--text); }
.stock-ctl input { flex: 1; min-width: 0; width: auto; text-align: center; border: 0 !important; border-left: 1px solid var(--line) !important; border-right: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; padding: 9px 6px !important; font-size: 15px !important; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stock-ctl input::-webkit-outer-spin-button, .stock-ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stock-ctl .st-save { border-radius: 0; padding: 0 14px; font-size: 12.5px; box-shadow: none; background: transparent; color: var(--muted); border-left: 1px solid var(--line); }
.stock-ctl.dirty .st-save { background: var(--accent); color: #fff; }
.stock-ctl .st-save:hover:not(:disabled) { background: var(--accent); color: #fff; }

.market-empty { grid-column: 1 / -1; display: grid; place-items: center; gap: 6px; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: 16px; color: var(--dim); text-align: center; animation: view-in .35s var(--ease) both; }
.market-empty svg { width: 36px; height: 36px; opacity: .5; margin-bottom: 6px; }
.market-empty b { color: var(--muted); font-size: 15px; }
.market-empty span { font-size: 13px; }
.alert svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 860px) { .market-legend { display: none; } #marketSearch { max-width: 100%; flex: 1; } }

/* ---------- общие GPT ---------- */
.chip[class*="plan-"] { border-color: color-mix(in srgb, var(--c) 55%, transparent); color: color-mix(in srgb, var(--c) 70%, #fff); background: color-mix(in srgb, var(--c) 12%, transparent); }
.prod.gpt .prod-img.gpt-img { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff)); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.prod.gpt .ribbon { background: var(--warn); color: #1a1200; }
.gpt-mail { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; cursor: pointer; max-width: 100%; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.gpt-mail svg { width: 13px; height: 13px; flex: none; opacity: .6; }
.gpt-mail span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gpt-mail:hover { color: var(--text); }
.totp { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l r" "c r"; align-items: center; gap: 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, background .2s; }
.totp:hover { border-color: var(--line-2); background: rgba(255,255,255,.05); }
.totp small { grid-area: l; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; }
.totp code { grid-area: c; background: none; border: 0; padding: 0; font-size: 28px; font-weight: 800; letter-spacing: .06em; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.totp.soon code { color: var(--warn); }
.totp .ring { grid-area: r; position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.totp .ring i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--ok) var(--p), rgba(255,255,255,.07) 0); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); transition: --p 1s linear; }
.totp.soon .ring i { background: conic-gradient(var(--warn) var(--p), rgba(255,255,255,.07) 0); }
.totp .ring b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.totp.none { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13px; cursor: default; border-style: dashed; }
.totp.none svg { width: 18px; height: 18px; }
.gpt-links { display: flex; gap: 6px; }
.gpt-links span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding: 7px 4px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.gpt-links span:first-child { color: #a6f0d0; }
.gpt-links span:nth-child(2) { color: #ffe2a3; }
.gpt-note { font-size: 12.5px; color: var(--dim); line-height: 1.45; padding: 0 2px; }
.prod.gpt .prod-act button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.prod.gpt .prod-act button:last-child { flex: 0 0 42px; }
.prod.gpt .prod-act svg { width: 15px; height: 15px; }
#gptLinks tr.dim td { opacity: .55; }
#gptLinks td b { font-weight: 600; }
.gpt-row-act { white-space: nowrap; text-align: right; }
.gpt-row-act button { display: inline-flex; align-items: center; gap: 5px; }
.gpt-row-act svg { width: 14px; height: 14px; }
.gpt-row-act .mini + .mini { margin-left: 4px; }
.gpt-row-act .mini:not(.ghost) { background: var(--accent-soft); color: #ffd0e2; border: 1px solid var(--accent-line); box-shadow: none; }
.gpt-row-act .mini:not(.ghost):hover { background: var(--accent); color: #fff; }
@media (max-width: 860px) { #gptSearch { max-width: 100%; flex: 1; } }

.gpt-found { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; margin-bottom: 14px; border-radius: 16px; background: linear-gradient(90deg, var(--accent-soft), var(--panel)); border: 1px solid var(--accent-line); animation: view-in .35s var(--ease) both; }
.gpt-found-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(255,46,126,.35); }
.gpt-found-ic svg { width: 22px; height: 22px; }
.gpt-found-body { min-width: 0; }
.gpt-found-body small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; }
.gpt-found-body b { display: block; font-size: 17px; margin: 2px 0 6px; }
.gpt-found-act { display: flex; flex-direction: column; gap: 6px; }
.gpt-found-act button { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.gpt-found-act svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .gpt-found { grid-template-columns: 1fr; } .gpt-found-ic { display: none; } .gpt-found-act { flex-direction: row; flex-wrap: wrap; } }

/* ---------- личные нейросети ---------- */
.ai-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.ai-live .sw { width: 38px; height: 22px; }
.ai-live .sw i::after { width: 15px; height: 15px; }
.ai-live .sw input:checked + i::after { transform: translateX(16px); }
#aiTable td { vertical-align: top; }
.ai-row { cursor: pointer; transition: background .15s; }
.ai-row:hover td { background: rgba(255,255,255,.035); }
.ai-row.err td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.ai-row.ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.ai-row.warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.ai-err { color: #ffb4b4; margin-top: 4px; max-width: 320px; }
#aiTable .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; }

.ai-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-fact { padding: 11px 13px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.ai-fact small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); font-weight: 700; }
.ai-fact b { display: block; font-size: 13.5px; margin-top: 3px; overflow-wrap: anywhere; }
.ai-h { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); margin: 20px 0 10px; }
.ai-steps { display: grid; gap: 8px; }
.ai-step { border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); overflow: hidden; }
.ai-step.err { border-color: rgba(255,92,92,.35); }
.ai-step.ok { border-color: rgba(61,220,151,.28); }
.ai-step summary { display: flex; align-items: center; gap: 9px; padding: 11px 13px; cursor: pointer; list-style: none; font-size: 13.5px; }
.ai-step summary::-webkit-details-marker { display: none; }
.ai-step summary .chip.st { padding: 3px 6px; }
.ai-step summary .hint { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-ms { margin-left: auto; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-err-box { margin: 0 13px 10px; padding: 9px 11px; border-radius: 10px; font-size: 12.5px; background: rgba(255,92,92,.1); border: 1px solid rgba(255,92,92,.3); color: #ffb4b4; }
.ai-pre-t { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); font-weight: 700; padding: 0 13px; margin-top: 6px; }
.ai-pre { margin: 5px 13px 11px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid var(--line); font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; color: #cfcbe0; }
#aiDrawer .drawer-head { align-items: flex-start; }
#aiDrawer .card-sub { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
@media (max-width: 860px) { .ai-facts { grid-template-columns: 1fr; } #aiSearch { max-width: 100%; flex: 1; } }

.ai-input { border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); padding: 4px 0 10px; }
.ai-input-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px 0; }
.ai-input-t span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); font-weight: 700; }
.ai-input-t button { padding: 5px 10px; font-size: 11.5px; }
.ai-input .ai-pre { margin: 6px 13px 0; max-height: 220px; }
.ai-pre.one { font-size: 13.5px; letter-spacing: .06em; color: #fff; }

#aiForce textarea { min-height: 110px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; }
#aiForce #fCode { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
#aiForce .card-head { align-items: center; }
#fOut { margin-top: 16px; }
#fOut .alert { margin-bottom: 0; }
.f-steps { display: grid; gap: 8px; }
.f-step { border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; padding: 11px 13px; background: var(--panel-2); }
.f-step.ok { border-left-color: var(--ok); }
.f-step.err { border-left-color: var(--bad); }
.f-step b { font-size: 13px; }
.f-step .ai-ms { float: right; }
.f-msg { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.f-step .ai-pre { margin: 8px 0 0; max-height: 150px; }


/* ═══════════ Маркетплейсы v2 — «торговый зал» ═══════════ */
/* Брендовая панель канала: цвет площадки ведёт весь блок, живой меш и
   медленный «скан» дают ощущение работающего табло, а не статики. */
.mk-hero { position: relative; overflow: hidden; margin: 0 0 16px; padding: 24px 26px;
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, var(--panel)), var(--panel) 62%);
  animation: card-in .5s var(--ease) both; }
.mk-hero .mk-tex { position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: screen;
  background: url("/static/img/hero-mesh.webp?v=1") center/cover no-repeat;
  -webkit-mask-image: linear-gradient(100deg, #000 8%, rgba(0,0,0,.35) 52%, transparent 88%);
  mask-image: linear-gradient(100deg, #000 8%, rgba(0,0,0,.35) 52%, transparent 88%); }
.mk-hero .mk-mesh { position: absolute; inset: -40%; pointer-events: none; opacity: .55;
  background: radial-gradient(38% 46% at 22% 30%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 70%),
              radial-gradient(34% 42% at 78% 70%, rgba(139,109,255,.5), transparent 72%);
  filter: blur(22px); animation: mk-drift 24s ease-in-out infinite alternate; }
@keyframes mk-drift { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(4%, 3%, 0) scale(1.12); } }
.mk-hero .mk-scan { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(100deg, transparent 42%, color-mix(in srgb, var(--brand) 35%, transparent) 50%, transparent 58%);
  transform: translateX(-100%); animation: mk-scan 7s ease-in-out 1.5s infinite; }
@keyframes mk-scan { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
.mk-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(115deg, transparent 0 13px, rgba(255,255,255,.022) 13px 14px); }
.mk-hero-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mk-hero-id { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.mk-logo { width: 54px; height: 54px; flex: none; border-radius: 16px; overflow: hidden; display: block;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--brand) 45%, transparent); }
.mk-logo svg { width: 100%; height: 100%; display: block; }
.mk-hero-id h2 { font-size: 23px; letter-spacing: -.03em; margin: 0 0 4px; }
.mk-hero-id p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 54ch; line-height: 1.5; }
.mk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip.live { display: inline-flex; align-items: center; gap: 6px; }
.chip.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: ping 2.4s infinite; }
.mk-board { display: grid; grid-auto-flow: column; gap: 10px; }
.mk-board div { min-width: 92px; padding: 12px 14px; border-radius: 14px; text-align: right;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); }
.mk-board b { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.mk-board small { display: block; margin-top: 5px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); font-weight: 700; }

/* микрошкала под числом KPI */
.kpi-bar { display: block; height: 4px; border-radius: 100px; background: rgba(255,255,255,.07); overflow: hidden; margin: 2px 0 7px; }
.kpi-bar i { display: block; height: 100%; border-radius: 100px; background: var(--kpi-c, var(--accent)); transition: width .8s var(--ease); }

/* приборная карточка товара */
.mk-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 18px; border-radius: 4px 20px 20px 4px; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--brand) 70%, transparent);
  animation: card-in .45s var(--ease) both; animation-delay: calc(var(--i) * 45ms);
  transition: transform .28s var(--ease), border-color .25s, box-shadow .3s; }
.mk-card:hover { transform: translateY(-3px); box-shadow: 0 26px 60px rgba(0,0,0,.5); border-color: var(--line-2); }
.mk-card .mk-sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(60% 40% at 80% 0%, color-mix(in srgb, var(--brand) 25%, transparent), transparent 70%); }
.mk-card:hover .mk-sheen { opacity: 1; }
.mk-card.off { opacity: .55; } .mk-card.off:hover { opacity: .9; }
.mk-card.unset { border-left-style: dashed; }
.mk-corner { position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 100px; background: var(--bad); color: #fff; }
.mk-card-top { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.mk-badge { width: 40px; height: 40px; flex: none; border-radius: 12px; overflow: hidden; }
.mk-badge svg { width: 100%; height: 100%; display: block; }
.mk-card-id { min-width: 0; flex: 1; }
.mk-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.mk-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.mk-price { flex: none; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* кольцевой датчик пула */
.mk-pool { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 16px;
  background: rgba(255,255,255,.028); border: 1px solid var(--line); }
.mk-gauge { position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; --c: var(--ok); }
.mk-gauge.warn { --c: var(--warn); } .mk-gauge.err { --c: var(--bad); }
.mk-ring { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--c) var(--p), rgba(255,255,255,.07) 0);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); }
.mk-gauge.err .mk-ring, .mk-gauge.warn .mk-ring { animation: mk-pulse 2.2s ease-in-out infinite; }
@keyframes mk-pulse { 50% { filter: brightness(1.45); } }
.mk-gauge b { font-size: 25px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--c); }
.mk-gauge small { position: absolute; bottom: 14px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; }
.mk-pool-t { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mk-pool-t > span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.mk-pool-t svg { width: 14px; height: 14px; opacity: .7; }
.mk-pool-t small { font-size: 12px; color: var(--dim); line-height: 1.4; }
.mk-pool-t a { align-self: flex-start; margin-top: 4px; text-decoration: none; padding: 6px 11px; font-size: 12px; }

/* дисплей остатка Ozon */
.mk-display { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  padding: 16px; border-radius: 16px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand) 16%, transparent), rgba(0,0,0,.3)); }
.mk-num b { font-size: 42px; font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px color-mix(in srgb, var(--brand) 55%, transparent); }
.mk-num span { display: block; margin-top: 5px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 700; }
.mk-card.zero .mk-num b { color: var(--bad); text-shadow: 0 0 26px rgba(255,92,92,.45); }
.mk-card.low .mk-num b { color: var(--warn); }
.mk-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim); }
.mk-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.mk-live.on { color: #a6f0d0; } .mk-live.on i { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: ping 2.4s infinite; }
.mk-live.off i { background: var(--bad); }
.mk-res { grid-column: 1 / -1; font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.mk-res.ok { color: #a6f0d0; }
.mk-res svg { width: 13px; height: 13px; }

.mk-manual { padding: 13px 14px; border-radius: 16px; background: rgba(255,255,255,.028); border: 1px solid var(--line); }
.mk-manual-t { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mk-manual-t svg { width: 14px; height: 14px; opacity: .7; }
.mk-manual .stock-ctl { margin-top: 10px; }
.mk-unset { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--dim); line-height: 1.45;
  padding: 12px 13px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px dashed var(--line-2); }
.mk-unset svg { width: 16px; height: 16px; flex: none; margin-top: 1px; opacity: .6; }
.mk-sw { display: flex; align-items: flex-start; gap: 13px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); cursor: pointer; }
.mk-sw b { display: block; font-size: 13.5px; }
.mk-sw small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }

@media (max-width: 860px) {
  .mk-hero { padding: 18px; }
  .mk-hero-in { flex-direction: column; align-items: stretch; }
  .mk-board { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .mk-board div { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .mk-hero .mk-mesh, .mk-hero .mk-scan, .mk-gauge .mk-ring { animation: none !important; } }

/* ---------- переключатели ---------- */
.sw-row { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; padding: 12px 0; margin: 0; font-weight: 500; }
.sw-row + .sw-row { border-top: 1px solid var(--line); }
.sw-row > span:last-child { flex: 1; }
.sw-row b { display: block; font-size: 14.5px; }
.sw-row small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
.sw { position: relative; width: 44px; height: 26px; flex: none; margin-top: 1px; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.sw i { position: absolute; inset: 0; border-radius: 100px; background: #2a2833; border: 1px solid var(--line-2); transition: background .25s, border-color .25s; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease-spring); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.sw input:checked + i { background: var(--ok); border-color: var(--ok); }
.sw.warn input:checked + i { background: var(--warn); border-color: var(--warn); }
.sw.err input:checked + i { background: var(--bad); border-color: var(--bad); }
.sw input:checked + i::after { transform: translateX(18px); }
.sw input:disabled + i { opacity: .5; }
.sw-stack { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.state-line { padding: 10px 0 4px; }
.danger-zone { border-color: rgba(255,92,92,.25); }

/* ---------- пул ---------- */
.pool-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.pool-layout .card { margin: 0; }
.file-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 9px 14px; border: 1px dashed var(--line-2); border-radius: 100px; cursor: pointer; margin: 0; color: var(--muted); transition: border-color .2s, color .2s; }
.file-btn:hover { border-color: var(--accent); color: var(--text); }
.file-btn input { display: none; }
.pool-val { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; word-break: break-all; }
tr.fresh td { animation: row-flash 1.6s ease-out both; }
@keyframes row-flash { from { background: var(--accent-soft); } to { background: transparent; } }

/* ---------- дравер ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(5,5,8,.6); backdrop-filter: blur(3px); z-index: 90; animation: fade-in .25s both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--panel); border-left: 1px solid var(--line); z-index: 100; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .42s var(--ease); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer-body label { margin-top: 14px; }
.drawer-body .grid2 label { margin-top: 0; }
.drawer-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--line); }

/* ---------- командная палитра ---------- */
.cmd { position: fixed; inset: 0; z-index: 120; background: rgba(5,5,8,.55); backdrop-filter: blur(4px); display: grid; place-items: start center; padding-top: 12vh; animation: fade-in .15s both; }
.cmd-box { width: min(620px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; animation: card-in .25s var(--ease) both; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.cmd-box input { width: 100%; border: 0 !important; border-radius: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 18px 20px !important; font-size: 16px !important; background: transparent !important; }
.cmd-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmd-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--muted); }
.cmd-item i { font-style: normal; width: 22px; text-align: center; opacity: .8; }
.cmd-item small { margin-left: auto; color: var(--dim); font-size: 12px; }
.cmd-item.on, .cmd-item:hover { background: var(--accent-soft); color: #fff; }
.cmd-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 10px 12px 4px; font-weight: 700; }
.cmd-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

/* ---------- модал / тосты ---------- */
.modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: rgba(5,5,8,.6); backdrop-filter: blur(3px); animation: fade-in .15s both; }
.modal-box { width: min(420px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; animation: card-in .25s var(--ease-spring) both; }
.modal-box h3 { font-size: 18px; margin-bottom: 8px; }
.modal-box .row { justify-content: flex-end; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 140; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #1a1920; border: 1px solid var(--line-2); border-left: 3px solid var(--ok); border-radius: 12px; padding: 12px 16px; font-size: 14px; min-width: 240px; max-width: 380px; animation: toast-in .4s var(--ease-spring) both; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.toast.err { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
.toast.out { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------- скелетоны ---------- */
.skel { background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: skel 1.3s infinite; border-radius: 8px; height: 14px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- отзывчивость ---------- */
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } .pool-layout { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .35s var(--ease); }
  .side.open { transform: none; box-shadow: 0 0 80px rgba(0,0,0,.6); }
  .burger { display: block; }
  .main { padding: 14px 16px 60px; }
  .search-btn span + kbd, .search-btn kbd { display: none; }
  .upd { display: none; }
  .view.leaving { width: calc(100% - 32px); }
  .prod-grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .adm *, .adm *::before, .adm *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.adm td, .adm th { font-variant-numeric: tabular-nums; }

/* ---- пул: поиск, массовые действия ---- */
.pool-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.pool-tools #poolSearch { flex: 1 1 220px; min-width: 0; }
.pool-take { display: flex; gap: 6px; align-items: center; }
.pool-take input { width: 74px; }
.pool-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: var(--panel-2); border: 1px solid var(--accent); border-radius: 14px; padding: 8px 10px; margin: 0 0 10px; }
.pool-bar b { margin-right: 6px; font-size: 13px; }
.pool-bar .danger { color: var(--bad); }
#poolTable td.chk, #poolTable th.chk { width: 30px; }
#poolTable input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
#poolTable tr.sel td { background: rgba(124, 92, 255, .08); }
#poolTable .pool-val { cursor: copy; word-break: break-all; }
.badge.man { background: rgba(124, 92, 255, .14); color: var(--accent); }
.badge.off { background: rgba(255, 120, 120, .12); color: var(--bad); }

/* ---- Пул для ТГ ---- */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tp-card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  cursor: pointer; display: grid; gap: 6px; color: var(--text); box-shadow: none; font: inherit; }
.tp-card:hover { border-color: var(--accent); }
.tp-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tp-card .tp-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.tp-card .tp-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.tp-card .tp-num small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.tp-card .tp-foot { font-size: 12px; color: var(--muted); }
.tp-card.zero .tp-num { color: var(--bad); }
.tp-card.low .tp-num { color: #f0b957; }
.tp-card.gpt .tp-num { color: var(--accent); font-size: 18px; }
.tp-rules { margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.tp-rules b { color: var(--text); font-weight: 600; }
#tpTable td.chk, #tpTable th.chk { width: 30px; }
#tpTable input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
#tpTable tr.sel td { background: rgba(124, 92, 255, .08); }
#tpTable .pool-val { cursor: copy; word-break: break-all; }

/* ---- Все площадки ---- */
.ch-card { margin-bottom: 16px; }
.ch-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 4px 0 18px; }
.ch-g { position: relative; border-radius: 14px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.ch-g::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gc); }
.ch-g small { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--dim); }
.ch-g b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.ch-g span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-g.total { background: linear-gradient(135deg, rgba(255,62,165,.16), rgba(124,92,255,.10)); }
.up { color: #5fd3a6 !important; } .down { color: #ff7a7a !important; }
.ch-chart { height: 170px; margin: 4px 0 8px; }
.ch-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ch-chart text { fill: var(--dim); font-size: 10px; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ch-table { width: 100%; font-size: 13.5px; }
.ch-table th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); font-weight: 700; text-align: right; white-space: nowrap; }
.ch-table th:first-child, .ch-table td:first-child { text-align: left; }
.ch-table td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-table td.top { text-align: left; white-space: normal; color: var(--muted); font-size: 12px; max-width: 260px; }
.ch-table tr.grp td { font-weight: 800; border-top: 1px solid var(--line); }
.ch-table .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.ch-table .spark svg { width: 90px; height: 24px; display: block; margin-left: auto; }
.ch-table small { color: var(--dim); font-size: 11.5px; margin-left: 4px; }
.ch-table td.top { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }

/* ---- Все площадки: график v2 (HTML вместо растянутого SVG) ---- */
.ch-chart { position: relative; height: 230px; display: flex; align-items: stretch; gap: 10px; padding: 8px 4px 0; margin: 6px 0 12px; }
.chb-grid { position: absolute; inset: 30px 4px 26px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chb-grid span { border-top: 1px dashed rgba(255,255,255,.06); }
.chb { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.chb b { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.chb-bar { width: min(34px, 70%); display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 8px 8px 4px 4px; overflow: hidden;
  transition: transform .2s var(--ease), filter .2s; transform-origin: bottom; animation: chb-in .6s var(--ease) both; }
.chb-bar i { display: block; min-height: 2px; }
.chb-bar i:last-child { border-radius: 8px 8px 0 0; }
.chb:hover .chb-bar { filter: brightness(1.15); transform: scaleY(1.02); }
.chb:hover b { color: var(--text); }
.chb span { font-size: 11px; color: var(--dim); margin-top: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chb.today span { color: var(--text); font-weight: 700; }
.chb.today .chb-bar { box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 8px 24px rgba(255,62,165,.25); }
.chb.best b { color: var(--text); }
@keyframes chb-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 700px) { .ch-chart { gap: 4px; } .chb b { font-size: 10px; } .chb span { font-size: 9.5px; } }
.ch-table td.top { max-width: none; overflow: visible; white-space: nowrap; }
.ch-table td.top span { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.ch-table td.spark { padding-right: 18px; }

/* ---- PIN дашборда ---- */
.pin-gate { display: none; }
.view.dash-locked > :not(.pin-gate) { display: none !important; }
.view.dash-locked > .pin-gate { display: grid; place-items: center; min-height: 60vh; }
.pin-card { width: min(380px, 100%); text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px; }
.pin-ico { font-size: 34px; margin-bottom: 8px; }
.pin-card h2 { margin: 0 0 6px; }
.pin-card form { display: flex; gap: 8px; margin-top: 16px; }
.pin-card input { flex: 1; min-width: 0; text-align: center; font-size: 22px; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.pin-msg { min-height: 20px; margin-top: 12px; font-size: 13px; }
.pin-msg.err { color: var(--bad); }
.pin-card.shake { animation: pin-shake .4s; }
@keyframes pin-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-card.blocked input, .pin-card.blocked button { opacity: .4; pointer-events: none; }

/* ---- Рассылки ---- */
.bc-aud { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.bc-aud button { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); box-shadow: none; font: inherit; cursor: pointer; }
.bc-aud button b { font-size: 14px; }
.bc-aud button span { font-size: 12px; color: var(--muted); font-weight: 400; }
.bc-aud button.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: rgba(255,62,165,.08); }
.bc-params { display: grid; gap: 12px; margin-bottom: 18px; }
.bc-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; }
.bc-row > label { margin: 0; }
.bc-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-cats label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12.5px; cursor: pointer; margin: 0; }
.bc-cats label:has(input:checked) { border-color: var(--accent); background: rgba(255,62,165,.1); }
.bc-cats input, .bc-tg input { accent-color: var(--accent); }
.bc-toggles { display: flex; flex-wrap: wrap; gap: 8px 18px; grid-template-columns: none; }
.bc-tg { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin: 0; cursor: pointer; }
.bc-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.bc-tpl { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.bc-tpl button { padding: 5px 10px; font-size: 12px; }
.bc-btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.bc-preview { border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); padding: 16px; min-height: 180px; }
.bc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.bc-nums div { border-radius: 12px; background: var(--panel); padding: 10px 12px; }
.bc-nums b { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bc-nums span { font-size: 11.5px; color: var(--muted); }
.bc-list { max-height: 320px; overflow: auto; font-size: 12.5px; }
.bc-list div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bc-list div span:last-child { color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.bc-prog { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; min-width: 110px; }
.bc-prog i { display: block; height: 100%; background: var(--accent); }
#bcTable tr[data-cid] { cursor: pointer; }
.bc-detail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.bc-manual { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin: 10px 0; }
.bc-manual a { display: block; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-manual a:hover { border-color: var(--accent); }
@media (max-width: 900px) { .bc-grid { grid-template-columns: 1fr; } .bc-row { grid-template-columns: 1fr; } }

/* ---- поля без type (поиск, «Название», количество): раньше оставались
   белыми браузерными — базовый стиль style.css ловит только type=text ---- */
input:not([type]), input[type=number], input[type=search] {
  font-family: inherit; color: var(--text); background: rgba(0,0,0,0.3);
  border: 1px solid var(--line-2); outline: none; transition: border-color .2s, box-shadow .2s;
}
input:not([type]):not(.inline-input), input[type=number]:not(.inline-input) {
  width: 100%; padding: 14px 16px; font-size: 16px; border-radius: 14px;
}
input[type=number].inline-input, input:not([type]).inline-input { border-radius: 10px; }
/* атрибут hidden должен побеждать display у блоков раздела */
.view [hidden] { display: none !important; }

/* Общие GPT: аккаунт в архиве (есть новее того же тарифа), 27.09.2026 */
.prod.gpt.archived { filter: grayscale(.85); opacity: .72; }
.prod.gpt.archived:hover { opacity: .95; }
.prod.gpt .ribbon.arch { background: #6b7079; color: #fff; }
.chip.st.arch { background: rgba(120,125,135,.18); color: #8a8f98; }
.chip.st.arch i { background: #8a8f98; }
.prod-act button.arch-btn { background: #6b7079 !important; color: #fff !important; }

/* автовыдачи — 28.09.2026 */
.auto-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
@media (max-width: 1100px) { .auto-layout { grid-template-columns: 1fr; } }
.auto-out { margin-top: 14px; display: grid; gap: 10px; }
.auto-out textarea { width: 100%; font-size: 13px; }
.auto-meta { font-size: 13px; color: var(--muted); }
.auto-meta b { color: var(--text); }
.warn-t { color: #f5b942; font-style: normal; font-size: 12px; }
.bad-t { color: var(--bad); }
.auto-list { display: grid; gap: 6px; max-height: 520px; overflow: auto; }
.auto-item { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--panel-2); }
.auto-item.on { border-color: var(--accent); }
.auto-item summary { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.auto-item summary span { flex: 1; }
.auto-item summary b { font-weight: 500; color: var(--muted); font-size: 12px; }
.auto-item textarea { width: 100%; margin: 6px 0 8px; font-size: 13px; }
.auto-tg { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin: 0; }

/* все товары и остатки — 28.09.2026 */
table.ov { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ov th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px; border-bottom: 1px solid var(--line); }
table.ov td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.ov tr.ov-row { cursor: pointer; }
table.ov tr.ov-row:hover { background: rgba(255,255,255,.03); }
table.ov tr.ov-row.empty td:nth-child(3) b { color: var(--bad); }
table.ov tr.ov-row.low td:nth-child(3) b { color: #f5b942; }
table.ov tr.muted { opacity: .55; }
.ov-ch { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 100px; background: var(--panel-2); border: 1px solid var(--line); margin: 1px 0; white-space: nowrap; }
.ov-ch.off { opacity: .5; text-decoration: line-through; }
.ov-chip { font-size: 12px; padding: 4px 10px; border-radius: 100px; background: var(--panel-2); border: 1px solid var(--line); margin-left: 4px; }
.ov-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ov-edit-grid textarea { width: 100%; }
.ov-link { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin: 4px 0; }
.ov-link span:not(.ov-ch) { flex: 1; }
.ov-unlinked { margin-top: 14px; }
.ov-unlinked summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ov-unlinked select { max-width: 260px; font-size: 12.5px; }
@media (max-width: 900px) { .ov-edit-grid { grid-template-columns: 1fr; } table.ov { display: block; overflow-x: auto; } }

/* живой прогресс рассылки + обращение по имени — 28.09.2026 */
.bc-live { margin: 0 0 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(255,46,126,.35);
  background: linear-gradient(135deg, rgba(255,46,126,.10), rgba(139,109,255,.08)); }
.bc-live-top { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.bc-live-pct { margin-left: auto; font-size: 22px; font-weight: 800; background: linear-gradient(135deg,#ff2e7e,#8b6dff);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.bc-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff2e7e; box-shadow: 0 0 0 0 rgba(255,46,126,.6);
  animation: bcPulse 1.4s infinite; }
@keyframes bcPulse { 0% { box-shadow: 0 0 0 0 rgba(255,46,126,.6); } 70% { box-shadow: 0 0 0 9px rgba(255,46,126,0); } 100% { box-shadow: 0 0 0 0 rgba(255,46,126,0); } }
.bc-live-bar { height: 12px; border-radius: 100px; background: rgba(255,255,255,.06); overflow: hidden; margin: 12px 0 10px; }
.bc-live-bar i { display: block; height: 100%; border-radius: 100px; transition: width .8s ease;
  background: linear-gradient(90deg,#ff2e7e,#8b6dff,#5b8cff,#ff2e7e); background-size: 300% 100%; animation: bcFlow 2.5s linear infinite; }
@keyframes bcFlow { from { background-position: 0 0; } to { background-position: 300% 0; } }
.bc-live-nums { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); }
.bc-live-nums b { color: var(--text); }
.bc-live-nums .mini { margin-left: auto; }
.bc-name-prev { margin: 6px 0 0; font-size: 12.5px; }
.bc-name-prev code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; }
.bc-man { display: inline-flex; align-items: center; gap: 2px; margin: 2px 6px 2px 0; }
.bc-man .mini { padding: 2px 6px; }

/* ---------- «Пул» → лента автовыдач (live) ---------- */
#liveIssues h2 { display: flex; align-items: center; gap: 10px; }
#liveIssues .chip.live.stale i { background: var(--warn); box-shadow: 0 0 8px var(--warn); animation: none; }
#liveQ { min-width: 230px; }
.live-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.live-kpis .kpi { padding: 14px 18px; }
.live-kpis .kpi b { font-size: 28px; }
.live-kpis .kpi small { padding-right: 0; }
.live-feed { display: flex; flex-direction: column; gap: 8px; }
.lv-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(200px, 1.6fr) minmax(190px, 1.3fr) 118px; gap: 16px; align-items: center;
  padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line);
  animation: card-in .45s var(--ease) both; animation-delay: calc(var(--n) * 35ms); transition: border-color .2s, transform .2s var(--ease), background .2s; }
.lv-row:hover { border-color: var(--line-2); background: rgba(255,255,255,.04); transform: translateY(-1px); }
.lv-row.fresh { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), 0 0 24px rgba(255,46,126,.18); animation: lv-flash 2.6s var(--ease) both; }
@keyframes lv-flash { 0% { background: rgba(255,46,126,.16); transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; transform: none; } 100% { background: rgba(255,255,255,.025); } }
.lv-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lv-who > div { min-width: 0; }
.lv-who b, .lv-what b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.lv-who small, .lv-what small, .lv-code small, .lv-when small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-who a { color: var(--accent); text-decoration: none; }
.lv-who a:hover { text-decoration: underline; }
.lv-ava { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 85% 58%), hsl(calc(var(--h) + 50) 80% 45%)); box-shadow: 0 6px 16px hsl(var(--h) 80% 40% / .35); }
.lv-what { min-width: 0; }
.lv-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.lv-code { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 4px; align-items: center; min-width: 0; }
.lv-code small { margin: 0; }
.lv-code code { justify-self: start; }
.lv-copy { cursor: pointer; transition: border-color .15s, color .15s; }
.lv-copy:hover { border-color: var(--accent-line); color: #fff; }
.lv-given { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lv-when { text-align: right; }
.lv-when b { display: block; font-size: 14px; }
.live-more { display: flex; justify-content: center; margin-top: 12px; }
@media (max-width: 1100px) {
  .lv-row { grid-template-columns: 1fr 1fr; }
  .lv-when { text-align: left; }
}
@media (max-width: 640px) {
  .lv-row { grid-template-columns: 1fr; gap: 10px; }
  #liveQ { min-width: 0; width: 100%; }
}

.shop-chip.digital_plus { background: rgba(167,139,250,.16); color: #c4b5fd; border-color: rgba(167,139,250,.4); }
.shop-chip.rodge_store { background: rgba(56,189,248,.16); color: #7dd3fc; border-color: rgba(56,189,248,.4); }

/* ---------- Аналитика продаж 2.0 (26.10.2026) ---------- */
.ch-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; margin: 2px 0 18px; }
.ch-kpi .kpi { padding: 14px 16px; animation: none; }   /* автообновление каждые 30 с — плитки не должны каждый раз «въезжать» заново */
.ch-kpi .kpi b { font-size: 25px; margin: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-kpi .kpi small { padding-right: 78px; }
.ch-kpi .kpi.nosp small { padding-right: 0; }
.ch-kpi .kpi svg.spark { width: 70px; right: 12px; top: 14px; }
.ch-kpi .kpi .delta { display: inline-block; margin-right: 2px; line-height: 1.5; }
.ch-tabsrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.ch-tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; max-width: 100%; }
.ch-tabs button { background: transparent; box-shadow: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 10px; white-space: nowrap; }
.ch-tabs button:hover:not(.on) { background: rgba(255,255,255,.05); color: var(--text); }
.ch-tabs button.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(255,46,126,.28); }

.chx-box { border: 1px solid var(--line); background: rgba(255,255,255,.015); border-radius: 16px; padding: 16px 18px; margin: 0 0 14px; min-width: 0; }
.chx-box h4 { margin: 0 0 12px; font-size: 14.5px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chx-box h4 small { color: var(--dim); font-weight: 500; font-size: 12px; }
.chx-grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
.chx-grid2 .chx-box { margin-bottom: 14px; }
@media (max-width: 1000px) { .chx-grid2 { grid-template-columns: 1fr; } }

/* таблицы товаров */
.chx-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.chx-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chx-chips span { padding: 6px 12px; border-radius: 100px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.chx-chips b { color: var(--text); }
.chx-ctl { display: flex; gap: 8px; align-items: center; }
.chx-ctl .mini { padding: 8px 14px; border-radius: 100px; font-size: 12.5px; }
.chx-ctl .mini.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.chx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.chx-table th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); font-weight: 700; text-align: right; padding: 8px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.chx-table th small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.chx-table th:nth-child(2) { text-align: left; }
.chx-table td { padding: 9px 10px; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; vertical-align: middle; }
.chx-table tr:hover td { background: rgba(255,255,255,.025); }
.chx-table td.n { color: var(--dim); width: 28px; text-align: right; }
.chx-table td.nm { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chx-table td.nm small { color: var(--dim); }
.chx-table td.r { text-align: right; white-space: nowrap; }
.chx-table td.r .delta { margin-left: 4px; font-size: 11.5px; }
.chx-table td.bar { min-width: 130px; white-space: nowrap; }
.chx-table td.bar small { color: var(--dim); margin-left: 8px; font-size: 11.5px; }
.chx-table td.spark svg { width: 86px; height: 24px; display: block; margin-left: auto; }
.chx-bar { display: inline-block; vertical-align: middle; width: calc(100% - 44px); min-width: 70px; height: 8px; border-radius: 100px; background: rgba(255,255,255,.07); overflow: hidden; }
.chx-bar i { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, #ff3ea5, #7c5cff); }
.chx-stack { display: flex; gap: 1px; height: 10px; width: 150px; border-radius: 100px; overflow: hidden; background: rgba(255,255,255,.06); }
.chx-stack i { display: block; min-width: 2px; }

/* часы */
.chx-hours { display: flex; align-items: stretch; gap: 4px; height: 190px; padding-top: 6px; }
.chx-h { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.chx-h b { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; height: 14px; line-height: 14px; font-variant-numeric: tabular-nums; }
.chx-hb { width: 100%; max-width: 26px; display: flex; flex-direction: column-reverse; gap: 1px; border-radius: 6px 6px 3px 3px; overflow: hidden; transition: filter .15s; min-height: 0; }
.chx-hb i { display: block; min-height: 1px; }
.chx-h:hover .chx-hb { filter: brightness(1.2); }
.chx-h.peak b { color: var(--text); }
.chx-h.peak .chx-hb { box-shadow: 0 0 0 2px rgba(255,255,255,.28), 0 6px 20px rgba(255,62,165,.28); }
.chx-h.now::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.chx-h span { font-size: 10.5px; color: var(--dim); margin-top: 6px; height: 13px; font-variant-numeric: tabular-nums; }
.chx-leg { display: flex; gap: 6px 16px; flex-wrap: wrap; margin: 10px 0 2px; font-size: 12px; color: var(--muted); }
.chx-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chx-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.chx-facts b { color: var(--text); }

/* дни недели */
.chx-week { display: flex; align-items: stretch; gap: 8px; height: 190px; padding-top: 6px; }
.chx-w { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.chx-w b { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.chx-wb { width: 100%; max-width: 40px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #7c5cff, #4a3aa8); transition: filter .15s; }
.chx-w:hover .chx-wb { filter: brightness(1.2); }
.chx-w.best .chx-wb { background: linear-gradient(180deg, #ff3ea5, #b3257a); box-shadow: 0 6px 20px rgba(255,62,165,.28); }
.chx-w.best b { color: var(--text); }
.chx-w span { font-size: 12px; color: var(--dim); margin-top: 8px; font-weight: 600; }
.chx-w.today span { color: var(--text); }

/* календарь */
.chx-cal { max-width: 560px; }
.chx-calh, .chx-calb { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chx-calh span { text-align: center; font-size: 11px; color: var(--dim); font-weight: 700; margin-bottom: 6px; }
.chx-cd { position: relative; aspect-ratio: 1.7; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent;
  background: rgba(255, 62, 165, calc(var(--a) * .62)); color: var(--text); box-shadow: none; cursor: pointer; }
.chx-cd:hover:not(:disabled) { border-color: rgba(255,255,255,.35); filter: brightness(1.12); }
.chx-cd em { font-style: normal; font-size: 10.5px; color: rgba(255,255,255,.65); font-weight: 600; }
.chx-cd b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chx-cd.today { border-color: var(--ok); }
.chx-cd.sel { outline: 2px solid #fff; outline-offset: 1px; }
.chx-calb i.e { visibility: hidden; }

/* площадки */
.chx-rank { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 14px; margin-bottom: 16px; }
.chx-rk { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 10px; text-align: left; padding: 8px 12px; border-radius: 12px; background: transparent; border: 1px solid var(--line); box-shadow: none; color: var(--text); font-size: 13px; }
.chx-rk:hover:not(.on) { background: rgba(255,255,255,.04); border-color: var(--line-2); }
.chx-rk.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.chx-rk .nm { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.chx-rk .nm i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.chx-rk .bar { height: 7px; border-radius: 100px; background: rgba(255,255,255,.07); overflow: hidden; }
.chx-rk .bar u { display: block; height: 100%; border-radius: 100px; background: var(--c); text-decoration: none; }
.chx-rk .v { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.chx-rk .v small { color: var(--dim); font-weight: 500; margin-left: 6px; }
.chx-det { border-top: 3px solid var(--gc); padding-top: 14px; }
.chx-dh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.chx-dh h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.chx-dh h3 i { width: 12px; height: 12px; border-radius: 50%; background: var(--gc); }
.chx-det .kpi-grid { margin-bottom: 14px; }
.chx-det .kpi b { font-size: 24px; }
.chx-days { display: flex; align-items: stretch; gap: 3px; height: 190px; padding-top: 6px; }
.chx-dd { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: pointer; }
.chx-dd b { font-size: 9.5px; color: var(--dim); font-weight: 600; margin-bottom: 3px; height: 12px; white-space: nowrap; }
.chx-dd div { width: 100%; max-width: 22px; border-radius: 5px 5px 2px 2px; opacity: .85; transition: opacity .15s, filter .15s; }
.chx-dd:hover div { opacity: 1; filter: brightness(1.2); }
.chx-dd.today div { opacity: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.chx-dd span { font-size: 9.5px; color: var(--dim); margin-top: 6px; height: 12px; white-space: nowrap; }
@media (max-width: 700px) { .chx-rk { grid-template-columns: 110px 1fr auto; } .chx-table td.nm { max-width: 180px; } }

@media (max-width: 700px) {
  .ch-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ch-kpi .kpi { padding: 12px 12px; }
  .ch-kpi .kpi b { font-size: 20px; }
  .ch-kpi .kpi small { padding-right: 0; font-size: 10.5px; }
  .ch-kpi .kpi svg.spark { display: none; }
  .chx-box { padding: 12px 12px; }
  .chx-hours { height: 150px; gap: 2px; }
  .chx-h b { font-size: 8.5px; }
  .chx-week { gap: 4px; height: 150px; }
  .chx-bar-head, .chx-ctl { width: 100%; }
  .chx-ctl .inline-input { max-width: none; flex: 1; }
  .ch-tabsrow { gap: 8px; }
  .ch-tabs button { padding: 8px 11px; font-size: 12.5px; }
  .chx-rank { grid-template-columns: 1fr; }
  .chx-det .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chx-det .kpi b { font-size: 19px; }
}

/* мини-часы в карточках разбора дня */
.chc-meta { font-size: 12px; color: var(--dim); margin: 2px 0 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.chc-meta b { color: var(--muted); }
.chc-hrs { display: flex; align-items: flex-end; gap: 1px; height: 22px; margin: 4px 0 8px; }
.chc-hrs i { flex: 1; background: var(--gc); opacity: .75; border-radius: 1px 1px 0 0; min-height: 1px; }
.ch-table td.share { min-width: 90px; }
.ch-table td.share .chx-bar { width: 60px; min-width: 0; }
.ch-table td.share small { margin-left: 6px; }

/* «Активации» (AutoGPT) */
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:760px){.grid3{grid-template-columns:1fr}}
.ag-h{margin:18px 0 10px;font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.ag-h:first-child{margin-top:4px}
.ag-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px}
.ag-plan{margin:0}
.ag-plan.ag-off{opacity:.62}
.ag-plan label{display:block;margin:10px 0 4px;font-size:12px;color:var(--dim)}
.ag-plan .hint{margin:8px 0 12px}
.ag-genbox{margin-top:14px;padding-top:14px;border-top:1px dashed var(--line)}
.ag-out textarea{width:100%;margin:8px 0;font-family:ui-monospace,Consolas,monospace;font-size:12px}
.ok-t{color:var(--ok)}
#agUnlock.hide,#agAdv.hide,.ag-genbox.hide{display:none!important}
