/* ВБ Мозг — Local UX Preview. Premium-minimal SaaS / Business OS.
   Светлая тема, белые карточки, мягкий серый фон, тонкие линии, синий акцент. */

:root {
  --bg:        #f4f6f9;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --line:      #eceef2;
  --line-2:    #e3e6ec;
  --ink:       #0f172a;
  --ink-2:     #475569;
  --ink-3:     #8b95a5;
  --accent:    #2f6bff;
  --accent-soft:#eaf0ff;
  --primary:   #14161c;

  --green:#15924f;  --green-bg:#e8f7ee;
  --amber:#b9700a;  --amber-bg:#fdf1de;
  --red:#d4382f;    --red-bg:#fdecea;
  --blue:#2f6bff;   --blue-bg:#eaf0ff;
  --violet:#6c4ad6; --violet-bg:#f0ebfd;
  --neutral:#5b6471;--neutral-bg:#f0f2f5;

  --r-sm:8px; --r:12px; --r-lg:16px; --r-xl:20px;
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.05);
  --shadow-lg:0 8px 28px rgba(16,24,40,.10);
  --sb:264px;
  font-synthesis:none;
}

* { box-sizing:border-box; }
html,body { margin:0; padding:0; }
body {
  font-family:"Inter", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  background:var(--bg); color:var(--ink);
  font-size:14px; line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
a { color:inherit; text-decoration:none; }
h1,h2,h3,h4 { margin:0; letter-spacing:-.01em; }
code { font-family:"SFMono-Regular",ui-monospace,Menlo,Consolas,monospace; font-size:.88em; background:var(--neutral-bg); padding:1px 5px; border-radius:5px; }
.ic { display:block; }
.mono { font-variant-numeric:tabular-nums; font-feature-settings:"tnum"; }

/* ── Ribbon (preview-маркер + переключатель роли) ── */
.ribbon {
  position:sticky; top:0; z-index:40;
  height:44px; display:flex; align-items:center; justify-content:space-between;
  padding:0 18px; background:#0f1320; color:#e6e9f2;
  border-bottom:1px solid #1c2233;
}
.ribbon-brand { display:flex; align-items:center; gap:8px; font-weight:700; font-size:13.5px; }
.ribbon-mark { display:grid; place-items:center; width:26px; height:26px; border-radius:8px; background:#2f6bff22; color:#7aa2ff; }
.ribbon-tag { font-weight:500; font-size:11.5px; color:#8b93a8; border-left:1px solid #2a3148; padding-left:10px; margin-left:4px; }

.switch { position:relative; }
.switch summary {
  list-style:none; cursor:pointer; display:flex; align-items:center; gap:8px;
  background:#1a2032; border:1px solid #2a3350; color:#dfe4f0;
  padding:6px 12px; border-radius:9px; font-size:13px;
}
.switch summary::-webkit-details-marker { display:none; }
.switch summary b { font-weight:700; }
.switch-dot { width:8px; height:8px; border-radius:50%; background:var(--blue); }
.switch-dot.tone-all{background:#34d399;} .switch-dot.tone-finance{background:#34d399;}
.switch-dot.tone-zone{background:#60a5fa;} .switch-dot.tone-own{background:#c4b5fd;}
.switch-menu {
  position:absolute; right:0; top:46px; width:296px; background:var(--surface);
  border:1px solid var(--line-2); border-radius:14px; box-shadow:var(--shadow-lg);
  padding:7px; color:var(--ink); animation:pop .12s ease;
}
.switch-head { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-3); padding:8px 10px 6px; }
.switch-item { display:flex; align-items:center; gap:11px; padding:9px 10px; border-radius:10px; }
.switch-item:hover { background:var(--surface-2); }
.switch-item.on { background:var(--accent-soft); }
.switch-ava { width:32px; height:32px; border-radius:9px; background:var(--neutral-bg); color:var(--ink-2);
  display:grid; place-items:center; font-size:12px; font-weight:700; flex:none; }
.switch-item.on .switch-ava { background:var(--accent); color:#fff; }
.switch-txt { display:flex; flex-direction:column; line-height:1.3; flex:1; }
.switch-txt b { font-size:13px; } .switch-txt small { color:var(--ink-3); font-size:11.5px; }
.switch-check { color:var(--accent); }
@keyframes pop { from{opacity:0; transform:translateY(-4px);} to{opacity:1; transform:none;} }

/* ── Shell ── */
.shell { display:grid; grid-template-columns:var(--sb) 1fr; min-height:calc(100vh - 44px); }

/* ── Sidebar ── */
.sidebar {
  background:var(--surface); border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:16px 14px;
  position:sticky; top:44px; height:calc(100vh - 44px); overflow-y:auto;
}
.brand { display:flex; align-items:center; gap:11px; padding:6px 8px 16px; }
.brand-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:11px;
  background:linear-gradient(135deg,#2f6bff,#5b8bff); color:#fff; flex:none; }
.brand-txt { display:flex; flex-direction:column; line-height:1.25; }
.brand-txt b { font-size:14.5px; font-weight:700; }
.brand-txt small { font-size:11px; color:var(--ink-3); }

.nav { display:flex; flex-direction:column; gap:2px; flex:1; }
.nav-group { font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-3);
  font-weight:600; padding:14px 10px 6px; }
.nav-item { display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:10px;
  color:var(--ink-2); font-weight:500; font-size:13.5px; transition:background .12s,color .12s; }
.nav-item:hover { background:var(--surface-2); color:var(--ink); }
.nav-item.active { background:var(--accent-soft); color:var(--accent); font-weight:600; }
.nav-item.active .nav-ic { color:var(--accent); }
.nav-ic { color:var(--ink-3); display:flex; }
.nav-item:hover .nav-ic { color:var(--ink-2); }
.nav-label { flex:1; }
.nav-ext { color:var(--ink-3); }
.nav-item.ext { color:var(--ink-3); }

.usercard { display:flex; align-items:center; gap:10px; padding:10px; margin-top:10px;
  border:1px solid var(--line); border-radius:12px; }
.avatar { width:34px; height:34px; border-radius:9px; background:var(--accent); color:#fff;
  display:grid; place-items:center; font-size:12.5px; font-weight:700; flex:none; }
.avatar.sm { width:26px; height:26px; font-size:10.5px; border-radius:7px; background:var(--neutral-bg); color:var(--ink-2); }
.userinfo { display:flex; flex-direction:column; flex:1; line-height:1.25; }
.userinfo b { font-size:13px; } .userinfo small { font-size:11.5px; color:var(--ink-3); }
.icon-btn { background:none; border:none; color:var(--ink-3); cursor:pointer; padding:5px; border-radius:7px; }
.icon-btn:hover { background:var(--surface-2); color:var(--ink-2); }

/* ── Main / topbar ── */
.main { display:flex; flex-direction:column; min-width:0; }
.topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding:26px 32px 18px; }
.topbar-title h1 { font-size:25px; font-weight:800; }
.topbar-title p { margin:4px 0 0; color:var(--ink-3); font-size:13.5px; }
.topbar-actions { display:flex; gap:9px; flex:none; }
.content { padding:4px 32px 8px; }
.foot { padding:20px 32px 30px; color:var(--ink-3); font-size:11.5px; }

/* ── Buttons ── */
.btn { display:inline-flex; align-items:center; gap:7px; height:38px; padding:0 14px;
  border-radius:10px; font-size:13px; font-weight:600; cursor:pointer; border:1px solid transparent;
  font-family:inherit; transition:background .12s,border-color .12s,transform .04s; white-space:nowrap; }
.btn:active { transform:translateY(1px); }
.btn-ghost { background:var(--surface); border-color:var(--line-2); color:var(--ink-2); }
.btn-ghost:hover { background:var(--surface-2); }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:#23262f; }
.btn-sm { height:32px; padding:0 11px; font-size:12.5px; }

/* ── KPI cards ── */
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:18px; }
.kpi { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:16px 18px; box-shadow:var(--shadow); }
.kpi-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.kpi-ic { width:36px; height:36px; border-radius:10px; display:grid; place-items:center; flex:none; }
.kpi-label { color:var(--ink-2); font-size:12.5px; font-weight:500; }
.kpi-value { font-size:25px; font-weight:800; letter-spacing:-.02em; }
.kpi-sub { font-size:12px; color:var(--ink-3); margin-top:5px; }

/* ── Panels / grid ── */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:18px 20px; box-shadow:var(--shadow); }
.panel + .panel { margin-top:16px; }
.panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.panel-head h3 { font-size:15.5px; font-weight:700; }
.panel-count { color:var(--ink-3); font-weight:600; margin-left:4px; }
.panel-link { color:var(--accent); font-size:12.5px; font-weight:600; cursor:pointer; }
.panel-link:hover { text-decoration:underline; }
.grid { display:grid; gap:16px; }
.g-2 { grid-template-columns:1fr 1fr; }
.g-3 { grid-template-columns:repeat(3,1fr); }
.g-21 { grid-template-columns:1.7fr 1fr; }
.g-12 { grid-template-columns:1fr 1.7fr; }
@media (max-width:1100px){ .g-2,.g-3,.g-21,.g-12 { grid-template-columns:1fr; } }
.mt { margin-top:16px; }

/* ── Tables ── */
.table { width:100%; border-collapse:collapse; }
.table th { text-align:left; font-size:11.5px; font-weight:600; color:var(--ink-3);
  padding:9px 10px; border-bottom:1px solid var(--line-2); white-space:nowrap; }
.table td { padding:11px 10px; border-bottom:1px solid var(--line); font-size:13px; vertical-align:middle; }
.table tr:last-child td { border-bottom:none; }
.table tbody tr:hover { background:var(--surface-2); }
.table .num { text-align:right; font-variant-numeric:tabular-nums; }
.table .total td { font-weight:700; border-top:2px solid var(--line-2); background:var(--surface-2); }
.t-strong { font-weight:600; }
.t-muted { color:var(--ink-3); }
.photo-cell { font-size:18px; }

/* ── Chips ── */
.chip { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600;
  padding:3px 9px; border-radius:999px; white-space:nowrap; }
.chip-green{background:var(--green-bg);color:var(--green);} .chip-amber{background:var(--amber-bg);color:var(--amber);}
.chip-red{background:var(--red-bg);color:var(--red);} .chip-blue{background:var(--blue-bg);color:var(--blue);}
.chip-violet{background:var(--violet-bg);color:var(--violet);} .chip-neutral{background:var(--neutral-bg);color:var(--neutral);}

/* ── Tones (icon tiles + text) ── */
.tone-blue{background:var(--blue-bg);color:var(--blue);} .tone-green{background:var(--green-bg);color:var(--green);}
.tone-amber{background:var(--amber-bg);color:var(--amber);} .tone-red{background:var(--red-bg);color:var(--red);}
.tone-violet{background:var(--violet-bg);color:var(--violet);} .tone-neutral{background:var(--neutral-bg);color:var(--neutral);}
.tone-text-green{color:var(--green);} .tone-text-red{color:var(--red);} .tone-text-amber{color:var(--amber);}
.dot-tone { width:8px; height:8px; border-radius:50%; display:inline-block; }

/* ── Progress bars ── */
.bar { height:6px; background:var(--line-2); border-radius:999px; overflow:hidden; margin-top:8px; }
.bar-fill { display:block; height:100%; border-radius:999px; }
.bar-blue{background:var(--blue);} .bar-green{background:var(--green);} .bar-amber{background:#e3941a;}
.bar-red{background:var(--red);} .bar-violet{background:var(--violet);} .bar-neutral{background:var(--neutral);}

/* ── Charts ── */
.chart { width:100%; height:auto; display:block; }
.chart-line { fill:none; stroke-width:2.4; }
.line-blue{stroke:var(--blue);} .line-green{stroke:var(--green);} .line-violet{stroke:var(--violet);}
.line-amber{stroke:#e3941a;} .line-red{stroke:var(--red);}
.grad-blue-a{stop-color:#2f6bff;stop-opacity:.18;} .grad-blue-b{stop-color:#2f6bff;stop-opacity:0;}
.grad-green-a{stop-color:#15924f;stop-opacity:.16;} .grad-green-b{stop-color:#15924f;stop-opacity:0;}
.grad-violet-a{stop-color:#6c4ad6;stop-opacity:.16;} .grad-violet-b{stop-color:#6c4ad6;stop-opacity:0;}
.grad-amber-a{stop-color:#e3941a;stop-opacity:.16;} .grad-amber-b{stop-color:#e3941a;stop-opacity:0;}
.grad-red-a{stop-color:#d4382f;stop-opacity:.16;} .grad-red-b{stop-color:#d4382f;stop-opacity:0;}
.chart-zero { stroke:var(--red); stroke-width:1; stroke-dasharray:4 4; opacity:.6; }
.chart-wrap { position:relative; }
.chart-axis { display:flex; justify-content:space-between; color:var(--ink-3); font-size:11px; margin-top:6px; }

/* ── List rows ── */
.lrow { display:flex; align-items:center; gap:12px; padding:11px 2px; border-bottom:1px solid var(--line); }
.lrow:last-child { border-bottom:none; }
.lrow-main { flex:1; min-width:0; }
.lrow-main b { font-weight:600; font-size:13.5px; }
.lrow-main small { display:block; color:var(--ink-3); font-size:12px; margin-top:2px; }
.lrow-side { text-align:right; flex:none; }

/* dotted leader item (insights/risks) */
.feed-item { display:flex; gap:11px; padding:11px 0; border-bottom:1px solid var(--line); }
.feed-item:last-child { border-bottom:none; }
.feed-ic { width:30px; height:30px; border-radius:8px; display:grid; place-items:center; flex:none; }
.feed-txt { font-size:13px; color:var(--ink); align-self:center; }

/* checklist */
.check { display:flex; align-items:center; gap:11px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13.5px; }
.check:last-child { border-bottom:none; }
.check .box { width:19px; height:19px; border-radius:6px; border:1.6px solid var(--line-2); flex:none; display:grid; place-items:center; }
.check.done .box { background:var(--accent); border-color:var(--accent); color:#fff; }
.check.done .box::after { content:"✓"; font-size:12px; font-weight:700; }
.check.done span { color:var(--ink-3); text-decoration:line-through; }

/* ── Kanban ── */
.kanban { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; align-items:start; }
@media (max-width:1200px){ .kanban { grid-template-columns:repeat(2,1fr); } }
.kcol { background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-lg); padding:12px; }
.kcol-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:11px; font-size:12.5px; font-weight:700; }
.kcol-head .cnt { background:var(--surface); border:1px solid var(--line-2); color:var(--ink-3); border-radius:999px; padding:0 8px; font-size:11px; }
.kcol-bar { height:3px; border-radius:999px; margin-bottom:11px; }
.kcard { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:12px; margin-bottom:10px; box-shadow:var(--shadow); cursor:grab; }
.kcard:last-child { margin-bottom:0; }
.kcard:hover { border-color:var(--line-2); box-shadow:var(--shadow-lg); }
.kcard-title { font-size:13px; font-weight:600; line-height:1.35; margin-bottom:9px; }
.kcard-meta { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.kcard-link { display:flex; align-items:center; gap:6px; color:var(--ink-3); font-size:11px; margin-top:9px; padding-top:9px; border-top:1px dashed var(--line-2); }

/* ── Hidden / denied notes ── */
.hidden-note { display:flex; align-items:flex-start; gap:9px; padding:13px 15px; margin-top:16px;
  border:1px dashed var(--line-2); border-radius:var(--r); background:var(--surface-2);
  color:var(--ink-2); font-size:12.5px; }
.hidden-note .ic { color:var(--ink-3); margin-top:1px; flex:none; }

.zone-flag { display:inline-flex; align-items:center; gap:7px; background:var(--blue-bg); color:var(--blue);
  border-radius:999px; padding:5px 12px; font-size:12.5px; font-weight:600; }

.denied { max-width:560px; margin:60px auto; text-align:center; background:var(--surface);
  border:1px solid var(--line); border-radius:var(--r-xl); padding:40px 34px; box-shadow:var(--shadow); }
.denied-ic { display:inline-grid; place-items:center; width:60px; height:60px; border-radius:16px;
  background:var(--red-bg); color:var(--red); margin-bottom:16px; }
.denied h2 { font-size:20px; margin-bottom:12px; }
.denied p { color:var(--ink-2); margin:0 0 12px; font-size:13.5px; }
.denied-hint { color:var(--ink-3); font-size:12.5px; }
.denied .btn { margin-top:12px; }

/* ── Org tree ── */
.org-dept { border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; margin-bottom:12px; background:var(--surface); }
.org-dept-head { padding:12px 16px; font-weight:700; font-size:14px; background:var(--surface-2); border-bottom:1px solid var(--line); }
.org-role { display:flex; align-items:center; gap:14px; padding:11px 16px; border-bottom:1px solid var(--line); }
.org-role:last-child { border-bottom:none; }
.org-role-name { width:170px; font-weight:600; font-size:13px; flex:none; }
.org-role-people { flex:1; color:var(--ink-2); font-size:13px; }
.org-role-load { width:160px; flex:none; }

/* misc */
.sub-title { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-3); font-weight:600; margin-bottom:10px; }
.tag-row { display:flex; flex-wrap:wrap; gap:8px; }
.tag { border:1px solid var(--line-2); border-radius:999px; padding:5px 12px; font-size:12.5px; color:var(--ink-2); background:var(--surface); }
.legend { display:flex; flex-wrap:wrap; gap:14px; margin-top:14px; }
.legend-item { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--ink-2); }
.metric-mini { text-align:center; padding:14px 8px; border:1px solid var(--line); border-radius:var(--r); }
.metric-mini .v { font-size:22px; font-weight:800; }
.metric-mini .l { font-size:11.5px; color:var(--ink-3); margin-top:4px; }
.metric-mini .d { font-size:11px; font-weight:600; margin-top:3px; }

/* ════════════════════════════════════════════════════════════════════════════
   Юнит-экономика (планирование) — комбобокс с поиском, сегменты, таблица-калькулятор.
   Премиум-минимал в духе платформы: тонкие линии, синий акцент, зелёные KPI-зоны.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Сегмент-переключатель (вид таблица/деталь, тип поставки) ── */
.seg { display:inline-flex; background:var(--surface-2); border:1px solid var(--line-2);
  border-radius:10px; padding:3px; gap:2px; }
.seg button { appearance:none; border:none; background:none; cursor:pointer; font-family:inherit;
  font-size:12.5px; font-weight:600; color:var(--ink-2); padding:6px 13px; border-radius:7px;
  display:inline-flex; align-items:center; gap:6px; transition:background .14s,color .14s,box-shadow .14s; white-space:nowrap; }
.seg button:hover { color:var(--ink); }
.seg button.on { background:var(--surface); color:var(--accent); box-shadow:var(--shadow); }
.seg.seg-sm button { padding:4px 9px; font-size:11.5px; }

/* ── Поисковый комбобокс (категория ≈7418, склады) ── */
.combo-trigger { display:flex; align-items:center; justify-content:space-between; gap:8px;
  width:100%; min-width:0; background:var(--surface); border:1px solid var(--line-2);
  border-radius:8px; padding:7px 10px; font:inherit; font-size:13px; color:var(--ink);
  cursor:pointer; text-align:left; transition:border-color .12s, box-shadow .12s; }
.combo-trigger:hover { border-color:var(--ink-3); }
.combo-trigger:focus-visible, .combo-trigger.open { outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft); }
.combo-trigger .ct-val { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.combo-trigger.placeholder .ct-val { color:var(--ink-3); }
.combo-trigger .ct-chev { color:var(--ink-3); flex:none; transition:transform .15s; }
.combo-trigger.open .ct-chev { transform:rotate(180deg); }
.combo-trigger.sm { padding:5px 8px; font-size:12.5px; border-radius:7px; }

.combo-pop { position:fixed; z-index:80; width:320px; max-width:92vw; background:var(--surface);
  border:1px solid var(--line-2); border-radius:13px; box-shadow:var(--shadow-lg);
  padding:8px; animation:pop .12s ease; }
.combo-search-wrap { position:relative; margin-bottom:6px; }
.combo-search-wrap .ic { position:absolute; left:10px; top:50%; transform:translateY(-50%);
  color:var(--ink-3); pointer-events:none; }
.combo-search { width:100%; background:var(--surface-2); border:1px solid var(--line-2);
  border-radius:9px; padding:9px 11px 9px 34px; font:inherit; font-size:13.5px; color:var(--ink); }
.combo-search:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); background:var(--surface); }
.combo-list { max-height:288px; overflow-y:auto; margin:0; padding:2px; list-style:none; }
.combo-opt { display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:8px 10px; border-radius:8px; font-size:13px; color:var(--ink-2); cursor:pointer; }
.combo-opt:hover { background:var(--surface-2); color:var(--ink); }
.combo-opt.active { background:var(--accent-soft); color:var(--accent); }
.combo-opt.sel { color:var(--ink); font-weight:600; }
.combo-opt .co-check { color:var(--accent); flex:none; opacity:0; }
.combo-opt.sel .co-check { opacity:1; }
.combo-opt small { color:var(--ink-3); font-weight:500; font-variant-numeric:tabular-nums; flex:none; }
.combo-opt small.cheap { color:var(--green); font-weight:700; }
.combo-opt .co-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.combo-sort { display:flex; align-items:center; gap:6px; padding:0 2px 8px; margin-bottom:6px;
  font-size:11px; color:var(--ink-3); border-bottom:1px solid var(--line); flex-wrap:wrap; }
.combo-sort span { flex:1; min-width:140px; }
.combo-sort button { appearance:none; border:1px solid var(--line-2); background:var(--surface);
  color:var(--ink-2); font:inherit; font-size:11px; font-weight:600; padding:3px 9px; border-radius:7px; cursor:pointer; }
.combo-sort button.on { background:var(--accent-soft); color:var(--accent); border-color:transparent; }
.combo-empty, .combo-more { padding:12px 10px; text-align:center; color:var(--ink-3); font-size:12.5px; }
.combo-more { border-top:1px dashed var(--line-2); margin-top:2px; }

/* ── Панель глобальных параметров расчёта ── */
.ue-bar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:14px 18px;
  background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:14px 16px; margin-bottom:16px; }
.ue-field { display:flex; flex-direction:column; gap:5px; }
.ue-field > label { font-size:11px; font-weight:600; color:var(--ink-3); letter-spacing:.02em;
  text-transform:uppercase; }
.ue-field .ue-num, .ue-field .ue-sel { height:34px; }
.ue-pair-group { display:flex; gap:14px; align-items:flex-end; background:var(--accent-soft);
  border-radius:10px; padding:8px 12px; }
.ue-pair-group > .ue-field > label { color:var(--accent); }
.ue-pair-group .ue-num { width:76px; }
.ue-sel { background:var(--surface); border:1px solid var(--line-2); border-radius:8px; padding:6px 9px;
  font:inherit; font-size:13px; color:var(--ink); cursor:pointer; min-width:150px;
  transition:border-color .12s, box-shadow .12s; }
.ue-sel:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.ue-num { width:88px; background:var(--surface); border:1px solid var(--line-2); border-radius:8px;
  padding:6px 9px; font:inherit; font-size:13px; color:var(--ink); text-align:right;
  font-variant-numeric:tabular-nums; transition:border-color .12s, box-shadow .12s; }
.ue-num:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.ue-num.w-sm, .ue-num.w-dim { width:48px; padding:6px 4px; text-align:center; }
.ue-num.w-lg { width:130px; text-align:left; }
.ue-num.w-art { width:84px; text-align:left; }
.ue-num.w-name { width:148px; text-align:left; }
/* поля без «ползунков» (все ввод — type=text) */
.ue-num::-webkit-outer-spin-button, .ue-num::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

/* ── Таблица-калькулятор ── */
.ue-scroll { overflow-x:auto; margin:0 -20px; padding:0 20px; }
.ue-table { width:100%; border-collapse:separate; border-spacing:0; min-width:1320px; }
.ue-table th { position:sticky; top:0; z-index:1; text-align:right; font-size:10.5px; font-weight:600;
  color:var(--ink-3); text-transform:uppercase; letter-spacing:.03em; padding:8px 10px;
  background:var(--surface); border-bottom:1px solid var(--line-2); white-space:nowrap; }
.ue-table th.l { text-align:left; }
.ue-table th.zone { background:var(--green-bg); color:var(--green); }
.ue-table td { padding:7px 10px; border-bottom:1px solid var(--line); font-size:13px;
  vertical-align:middle; white-space:nowrap; }
.ue-table td.zone { background:var(--green-bg); }
.ue-table tbody tr:hover td { background:var(--surface-2); }
.ue-table tbody tr:hover td.zone { background:#dff2e6; }
/* цветовое разделение групп: себестоимость (тёплый) ↔ габариты (холодный) */
.ue-table th.g-cost, .ue-table td.g-cost { background:#fcf6ec; }
.ue-table th.g-dim,  .ue-table td.g-dim  { background:#eef3fc; }
.ue-table tbody tr:hover td.g-cost { background:#f8eeda; }
.ue-table tbody tr:hover td.g-dim  { background:#e3ecfa; }
.ue-table th.c, .ue-table td.c { text-align:center; }
.ue-table td.calc { text-align:right; font-variant-numeric:tabular-nums; color:var(--ink-2); }
.ue-table td.kpi { text-align:right; font-variant-numeric:tabular-nums; font-weight:700; }
.ue-table .dims { display:inline-flex; align-items:center; gap:3px; }
.ue-table .dims span { color:var(--ink-3); font-size:11px; }
.ue-row-del { background:none; border:none; cursor:pointer; color:var(--ink-3); padding:5px;
  border-radius:7px; line-height:0; }
.ue-row-del:hover { background:var(--red-bg); color:var(--red); }
.ue-table tfoot td { padding:12px 10px; font-weight:800; font-size:13.5px;
  border-top:2px solid var(--line-2); background:var(--surface-2); }
.ue-table tfoot td.zone { background:#dff2e6; }
.ue-add { margin-top:14px; }
.ue-err-cell { color:var(--red); font-size:11.5px; font-weight:600; }

/* ── KPI-полоска итогов ── */
.ue-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px; }
@media (max-width:900px){ .ue-kpis { grid-template-columns:repeat(2,1fr); } }

/* ── Детальный (what-if) вид ── */
.ue-detail { display:grid; grid-template-columns:1fr 380px; gap:18px; align-items:start; }
@media (max-width:1100px){ .ue-detail { grid-template-columns:1fr; } }
.ue-form-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:13px 14px; }
.ue-form-grid.full label { display:flex; flex-direction:column; gap:5px; }
.ue-form-grid label { font-size:11.5px; color:var(--ink-2); display:flex; flex-direction:column; gap:5px; }
.ue-form-grid label span { font-weight:600; color:var(--ink-3); font-size:11px; }
.ue-form-grid .ue-num { width:100%; text-align:left; }
.ue-sub { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-3);
  font-weight:700; margin:18px 0 12px; padding-bottom:7px; border-bottom:1px solid var(--line); }
.ue-sub:first-child { margin-top:0; }

.ue-result { position:sticky; top:18px; }
.ue-result .kpi-tiles { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:16px; }
.ue-tile { background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r);
  padding:12px 10px; text-align:center; }
.ue-tile.hero { background:var(--green-bg); border-color:#bfe6cd; }
.ue-tile .tl { font-size:11px; color:var(--ink-3); font-weight:600; }
.ue-tile .tv { font-size:21px; font-weight:800; margin-top:3px; font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
.ue-break { width:100%; }
.ue-break tr td { padding:7px 0; border-bottom:1px solid var(--line); font-size:13px; }
.ue-break tr:last-child td { border-bottom:none; }
.ue-break td.r { text-align:right; font-variant-numeric:tabular-nums; }
.ue-break tr.sect td { color:var(--ink-3); font-size:10.5px; text-transform:uppercase;
  letter-spacing:.04em; font-weight:700; padding-top:14px; border-bottom:none; }
.ue-break tr.grand td { font-weight:800; font-size:14px; border-top:2px solid var(--line-2); }
.ue-detail-pick { margin-bottom:16px; }
.ue-detail-head { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.ue-detail-head h4 { font-size:15px; font-weight:700; color:var(--ink); }
.ue-row-detail { display:inline-grid; place-items:center; width:30px; height:30px; margin:0 auto;
  border:1px solid var(--line-2); background:var(--surface); color:var(--ink-2); border-radius:8px;
  cursor:pointer; transition:background .12s, color .12s, border-color .12s; }
.ue-row-detail:hover { background:var(--accent-soft); color:var(--accent); border-color:transparent; }
/* артикул: ссылка на WB + красный артикул конкурента/неподтверждённого */
.ue-art-wrap { display:flex; align-items:center; gap:3px; }
.ue-wb { display:inline-grid; place-items:center; width:24px; height:30px; flex:none; border:none;
  background:none; color:var(--ink-3); cursor:pointer; border-radius:6px; }
.ue-wb:hover { background:var(--accent-soft); color:var(--accent); }
.ue-num.sku-red { color:var(--red); }
.ue-num.sku-red::placeholder { color:var(--red); opacity:.6; }
/* кнопки действий в детальном виде */
.ue-detail-actions { display:flex; gap:8px; margin-left:auto; flex-wrap:wrap; }
.btn.ue-confirm { background:var(--green); color:#fff; border-color:transparent; }
.btn.ue-confirm:hover { background:#127a42; }
/* result hero (прибыль/маржа/ROI) — фон по прибыльности */
.ue-result-hero { border-radius:14px; padding:18px 20px; margin-bottom:16px; border:1px solid var(--line-2); background:var(--surface-2); }
.ue-result-hero.pos { background:var(--green-bg); border-color:#bfe6cd; }
.ue-result-hero.neg { background:var(--red-bg); border-color:#f0c7c3; }
.ue-result-hero .rh-label { font-size:12px; color:var(--ink-2); font-weight:600; }
.ue-result-hero .rh-value { font-size:33px; font-weight:800; letter-spacing:-.02em; margin-top:2px;
  font-variant-numeric:tabular-nums; color:var(--ink); }
.ue-result-hero.pos .rh-value { color:var(--green); }
.ue-result-hero.neg .rh-value { color:var(--red); }
.rh-sub { display:flex; gap:28px; margin-top:14px; padding-top:14px; border-top:1px solid rgba(15,23,42,.08); }
.rh-sub > div { display:flex; flex-direction:column; }
.rh-sub span { font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.rh-sub small { font-size:11px; color:var(--ink-3); margin-top:3px; }
/* зелёная зона — мягкий ровный пастельный фон, спокойный тёмно-зелёный текст (как в MP Systems);
   заголовки белые с зелёной подписью */
.ue-table th.zone { background:var(--surface); color:#1c7a46; }
.ue-table td.zone { text-align:right; font-variant-numeric:tabular-nums; }
.ue-table td.zone, .ue-table tfoot td.zone { background:#f2f8f4; }
.ue-table td.zone.pos, .ue-table tfoot td.zone.pos { background:#e8f6ee; color:#1c7a46; }
.ue-table td.zone.neg, .ue-table tfoot td.zone.neg { background:#fceceb; color:#c1392f; }
.ue-table tbody tr:hover td.zone.pos { background:#ddf0e5; }
.ue-table tbody tr:hover td.zone.neg { background:#f8ddd9; }
/* перенесённый, но НЕ подтверждённый товар — оранжевая заливка строки */
.ue-table tbody tr.unconfirmed td { background:#fdf3e3; }
.ue-table tbody tr.unconfirmed:hover td { background:#fbeace; }
/* строка-сценарий «что если» — лавандовая подсветка (зона остаётся зелёной/красной) */
.ue-table tbody tr.ue-scenario td { background:#f3effc; }
.ue-table tbody tr.ue-scenario:hover td { background:#ece5fb; }
.ue-sc-tag { display:inline-block; font-size:10px; font-weight:700; color:var(--violet);
  background:var(--violet-bg); border-radius:5px; padding:1px 6px; margin-right:5px; vertical-align:middle; }
.ue-rowactions { display:flex; align-items:center; gap:1px; justify-content:center; }
.ue-row-exp { display:inline-grid; place-items:center; width:24px; height:30px; border:none; background:none;
  color:var(--ink-3); cursor:pointer; border-radius:7px; }
.ue-row-exp:hover { background:var(--accent-soft); color:var(--accent); }
.ue-row-exp.open { color:var(--accent); }
.ue-row-exp .exp-chev { transition:transform .15s; }
.ue-row-exp.open .exp-chev { transform:rotate(180deg); }
.ue-hint { color:var(--amber); padding:12px 2px; font-size:12.5px; }
/* финансовые отчёты: фото-превью SKU + селектор периода */
.uf-photo { height:36px; width:36px; object-fit:cover; border-radius:7px; display:block; background:var(--surface-2); }
.uf-period { display:flex; align-items:center; gap:8px; }
/* поиск (таблица + детальный вид) */
.ue-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.ue-search { position:relative; flex:0 1 340px; min-width:220px; }
.ue-search .ic { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--ink-3); pointer-events:none; }
.ue-search input { width:100%; background:var(--surface); border:1px solid var(--line-2); border-radius:9px;
  padding:8px 12px 8px 34px; font:inherit; font-size:13px; color:var(--ink); transition:border-color .12s, box-shadow .12s; }
.ue-search input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
/* список SKU в детальном виде (масштаб на 100+ SKU) */
.ue-pick-list { display:flex; flex-direction:column; gap:4px; max-height:168px; overflow-y:auto; margin-top:8px; padding:2px; }
.ue-pick-item { display:flex; align-items:center; gap:12px; width:100%; text-align:left; cursor:pointer;
  background:var(--surface); border:1px solid var(--line); border-radius:9px; padding:8px 12px;
  font:inherit; font-size:13px; color:var(--ink-2); transition:background .12s, border-color .12s; }
.ue-pick-item:hover { background:var(--surface-2); }
.ue-pick-item.on { background:var(--accent-soft); border-color:transparent; }
.ue-pick-item .pk-art { font-variant-numeric:tabular-nums; color:var(--ink-3); flex:none; min-width:66px; }
.ue-pick-item .pk-name { flex:1; font-weight:600; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ue-pick-item.on .pk-name, .ue-pick-item.on .pk-art { color:var(--accent); }
.ue-pick-item .pk-profit { flex:none; font-variant-numeric:tabular-nums; font-weight:700; }
.ue-vol { margin:2px 0 2px; font-size:12.5px; color:var(--ink-2); }
.ue-vol b { color:var(--accent); font-weight:700; }
.ue-prices { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:16px; }
.ue-prices .ue-tile { text-align:left; }
.ue-prices .tv { font-size:17px; margin-top:4px; }
/* секции-«колодцы» детального вида (структура без вложенных карточек) */
.ue-card { background:var(--surface-2); border-radius:var(--r); padding:14px 16px; margin-bottom:12px; }
.ue-card:last-child { margin-bottom:0; }
.ue-card .ue-sub { margin-top:0; }
.ue-actions { margin-top:14px; }
.ue-maint { display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
.ue-tariffs { display:flex; align-items:center; gap:9px; margin-bottom:14px; font-size:12.5px; color:var(--ink-2); }
.ue-tariffs-dot { width:8px; height:8px; border-radius:50%; background:var(--ink-3); flex:none; }
.ue-tariffs-dot.ok { background:var(--green); } .ue-tariffs-dot.warn { background:var(--amber); }
.ue-tariffs-warn { color:var(--amber); font-weight:600; } .ue-tariffs-ok { color:var(--green); font-weight:600; }
.ue-tariffs .btn { margin-left:auto; }

.ue-banner { display:flex; align-items:flex-start; gap:9px; padding:11px 14px; margin-bottom:16px;
  border:1px solid #cfe0ff; background:var(--blue-bg); border-radius:var(--r); color:var(--ink-2); font-size:12.5px; }
.ue-banner .ic { color:var(--accent); flex:none; margin-top:1px; }

/* ── Toast ── */
.toast { position:fixed; left:50%; bottom:28px; transform:translateX(-50%) translateY(20px);
  background:var(--primary); color:#fff; padding:11px 18px; border-radius:11px; font-size:13px; font-weight:500;
  box-shadow:var(--shadow-lg); opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; z-index:60; max-width:90vw; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
