:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #6b7280;
  --accent: #2f6fed;
  --border: #e3e5e8;
  --error: #d1453b;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid-line: #e3e5e8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 600; color: var(--text); text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { color: var(--muted); font-size: 14px; }
.logout { color: var(--accent); text-decoration: none; font-size: 14px; }

.content { max-width: 960px; margin: 0 auto; padding: 32px 24px; }
/* Страница "Анализ конкурентов" — без общего ограничения ширины, во
   всю ширину окна (как сплит-скрин на маке), только небольшие поля
   по бокам, чтобы контент не упирался в самый край. */
.content-wide { max-width: none; padding-left: 16px; padding-right: 16px; }

/* У грид-элементов по умолчанию min-width:auto — они не сжимаются уже,
   чем самый широкий child (в нашем случае — таблица), и вместо
   внутреннего скролла у таблицы начинает скроллиться вся страница.
   min-width:0 отдаёт скролл таблице (.price-table обёрнута в
   overflow-x:auto), а не странице целиком. */
#pairs-grid > * { min-width: 0; }

@media (max-width: 900px) {
  #pairs-grid { grid-template-columns: 1fr !important; }
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.tile {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
}

.tile-active { border-color: var(--accent); box-shadow: 0 1px 3px rgba(47,111,237,0.15); }
.tile-empty { color: var(--muted); cursor: default; }
.tile-title { font-weight: 600; margin-bottom: 6px; }
.tile-desc { font-size: 14px; color: var(--muted); }

.login-wrap { display: flex; justify-content: center; margin-top: 10vh; }
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.login-card input {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.login-card button, .controls button, .fbs-confirm button {
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.login-card button:disabled, .controls button:disabled, .fbs-confirm button:disabled { opacity: 0.6; cursor: default; }
.error { color: var(--error); font-size: 14px; margin: 0; }

.controls { display: flex; align-items: center; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.controls select { padding: 8px; border-radius: 8px; border: 1px solid var(--border); }

.econ-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.econ-toolbar .controls { margin: 0; }

.econ-settings {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  max-width: 560px;
}
.econ-settings-label { font-size: 13px; color: var(--muted); white-space: nowrap; align-self: flex-end; }
.econ-settings-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
.econ-settings-field { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.econ-settings-field input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fffef0;
}
.wallet-field { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.wallet-field input { width: 80px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.table-wrap { overflow: auto; max-height: calc(100vh - 260px); }

.status { color: var(--muted); min-height: 20px; }
.status-error { color: var(--error); }

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.price-table th, .price-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}
.price-table th { background: #fafbfc; color: var(--muted); font-weight: 600; position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--border); }
.price-table tfoot td { border-top: 2px solid var(--border); }
.price-table input {
  width: 110px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.price-table input.invalid { border-color: var(--error); background: rgba(209, 69, 59, 0.08); }
.price-table tr.rrc-below { background: rgba(209, 69, 59, 0.1); }
.price-table tr.rrc-below td:nth-child(2) { color: var(--error); font-weight: 600; }
.price-table .calc-cell { color: var(--muted); }
.price-table td.stock-low { background: rgba(209, 69, 59, 0.1); color: var(--error); font-weight: 600; }
.price-table td.ff-cell input { width: 70px; }

/* Таблица "Остатки" (Карина, 25.09.2026, второй заход): таблица
   снова на всю ширину экрана, как и остальные таблицы на сайте
   (width:100%). Раньше при обычном auto-layout колонки "Следить" и
   "Артикул" растягивались непропорционально своему короткому
   содержимому — теперь используем table-layout:fixed и задаём явную
   ширину только этим двум колонкам (id, а не общий класс — чтобы не
   задеть другие таблицы на сайте): "Следить" — узкая, "Артикул" —
   шире, чем было, и обе по центру. У остальных колонок (Размер, ВБ
   ФБО/ФБС, Ozon ФБО/ФБС, ФФ) ширина не задана, поэтому при
   table-layout:fixed они делят оставшееся место поровну между собой,
   то есть растягиваются, как и раньше. Чекбокс сделан чуть крупнее,
   чтобы по нему было удобнее попадать курсором. */
#stock-table { width: 100%; table-layout: fixed; }
#stock-table th:nth-child(1), #stock-table td:nth-child(1) { width: 70px; text-align: center; }
#stock-table th:nth-child(2), #stock-table td:nth-child(2) { width: 220px; text-align: center; }
#stock-table th, #stock-table td { white-space: nowrap; }
/* Столбец "Категория" (30.09.2026) — фиксированной ширины, длинное
   название обрезается многоточием, полностью видно по наведению. */
#stock-table th:nth-child(4), #stock-table td:nth-child(4) { width: 170px; overflow: hidden; text-overflow: ellipsis; }
/* Правка остатков ФБС прямо в таблице (30.09.2026): изменённая, ещё
   не отправленная ячейка — жёлтая; ошибка отправки — красная рамка. */
#stock-table td.fbs-edit input { width: 70px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 4px; font: inherit; }
#stock-table td.fbs-changed input { background: #fff4c2; border-color: #d9a400; color: #000; }
#stock-table td.fbs-failed input { border: 2px solid var(--error); }
#stock-table td.wh-missing { color: var(--error); }
/* Остаток ФБС лежит не на складе из листа ФФ (30.09.2026) */
#stock-table td.wh-mismatch { color: #b26a00; }
#stock-table .wh-note { font-size: 11px; white-space: normal; line-height: 1.2; }
#stock-table .wh-auto { color: var(--muted); }
#stock-table .fbs-total-hint { margin-left: 6px; font-size: 12px; color: #b26a00; }
.fbs-confirm { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; background: rgba(47, 111, 237, 0.06); }
.fbs-confirm ul { margin: 8px 0 12px; padding-left: 20px; max-height: 240px; overflow: auto; font-size: 14px; }
.controls button.btn-secondary, .fbs-confirm button.btn-secondary { background: transparent; color: inherit; border: 1px solid var(--border); }
#stock-table .filter-row select {
  width: 100%;
  font: inherit;
  font-weight: 400;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-sizing: border-box;
  background: var(--bg, #fff);
  color: inherit;
}
#stock-table input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
/* Отмеченные строки "Следить" подсвечиваются бледно-голубым (Карина,
   25.09.2026, третий заход) — чисто через CSS :has(), без JS: цвет
   меняется мгновенно по клику, ещё до ответа сервера. */
#stock-table tbody tr:has(.watch-checkbox:checked) { background: rgba(47, 111, 237, 0.08); }
/* Красная подсветка "мало товара" не должна тускнеть/менять оттенок на
   отмеченных (бледно-голубых) строках (Карина, 25.09.2026, пятый
   заход) — без этого полупрозрачный красный фон ячейки смешивался бы с
   полупрозрачным голубым фоном строки под ним, давая грязно-сиреневый
   цвет. Явно перекрываем плоским цветом — тем же, что получается от
   исходного rgba(209, 69, 59, 0.1) поверх белого фона обычной строки,
   так что ячейка выглядит одинаково и в отмеченной, и в обычной строке. */
#stock-table tbody tr:has(.watch-checkbox:checked) td.stock-low { background: rgb(250, 236, 235); }
/* Строка-фильтр под заголовками, как автофильтр в Excel — по ней можно
   набрать часть артикула и таблица сузится до совпадений; отметки
   "Следить" на скрытых фильтром строках при этом не сбрасываются. */
/* Строка заголовков и строка-фильтр закрепляются ОБЕ при прокрутке —
   без этого у них было одинаковое position:sticky;top:0 (общее правило
   .price-table th), и строка-фильтр (вторая в разметке) просто
   перекрывала собой заголовки, а не показывала их друг под другом
   (Карина, 28.09.2026). Высоту первой строки подставляет JS
   (см. stock.js: syncStickyFilterOffset) в переменную
   --stock-filter-top; число 42px — запасной вариант на случай, если JS
   почему-то ещё не отработал (например, самый первый кадр отрисовки). */
#stock-table thead tr:first-child th { top: 0; z-index: 3; }
#stock-table .filter-row th { top: var(--stock-filter-top, 42px); z-index: 2; padding: 4px 8px; }
#stock-table .filter-row input[type="text"] {
  width: 100%;
  font: inherit;
  font-weight: 400;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-sizing: border-box;
}
#submit-results { margin: 8px 0 16px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }

.str-cell-label { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.str-cell-pct { font-weight: 600; font-size: 15px; }
.str-cell-qty { font-size: 12px; color: var(--muted); }

/* 03.11.2026: «Светлая» всегда светлая — без подстройки под тёмный режим системы (для этого есть «Тёмная») */

/* Линейный график сравнения периодов ("Анализ конкурентов WB") */
.chart-wrap { margin: 12px 0; position: relative; max-width: 620px; }
.chart-legend { display: flex; gap: 16px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.chart-legend-item { display: flex; align-items: center; gap: 6px; }
.chart-legend-swatch { display: inline-block; width: 16px; height: 2px; border-radius: 1px; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-grid-line { stroke: var(--grid-line); stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font-size: 11px; }
.chart-line-1, .chart-line-2 { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-1 { stroke: var(--series-1); }
.chart-line-2 { stroke: var(--series-2); }
.chart-dot-1 { fill: var(--series-1); stroke: var(--card); stroke-width: 2; }
.chart-dot-2 { fill: var(--series-2); stroke: var(--card); stroke-width: 2; }
.chart-hover-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3,3; }
.chart-hitarea { fill: transparent; cursor: crosshair; }
.hidden { display: none !important; }
.wb-compare-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.wb-compare-table th, .wb-compare-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: left; }
.wb-delta-up { color: #2a9d4a; }
.wb-delta-down { color: #d64545; }
.chart-tooltip {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  white-space: nowrap;
  z-index: 5;
}
.chart-tooltip-row { display: flex; align-items: center; gap: 6px; }
.chart-tooltip-key { display: inline-block; width: 10px; height: 2px; }
.chart-tooltip-value { font-weight: 600; }

/* Плавающая кнопка внизу справа (Карина, 25.09.2026): раньше сразу
   открывала мини-игру, теперь сначала открывает маленькое меню
   ("Поддержка" / "Игра") — .fab-wrap задаёт фиксированную позицию
   всего блока, сама кнопка внутри него уже не position:fixed. */
.fab-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
}
.game-fab {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.game-fab:hover { transform: scale(1.06); }
.game-fab img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fab-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.fab-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fab-menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.fab-menu-item:hover { background: var(--bg); }

.game-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 30, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.game-overlay.open { display: flex; }

.game-card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
}
.game-card-header { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.game-card-title { font-weight: 600; font-size: 14px; color: var(--text); }
.game-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.game-close:hover { background: var(--bg); color: var(--text); }

#flappy-canvas {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  border: 1px solid var(--border);
}

.game-leaderboard {
  width: 100%;
  max-width: 420px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.game-leaderboard-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.game-leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.game-leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
.game-leaderboard-row.is-me {
  background: var(--bg);
  font-weight: 600;
}
.game-leaderboard-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.game-leaderboard-score {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.game-leaderboard-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 8px;
}

.econ-remove {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  line-height: 1;
  cursor: pointer;
}
.econ-remove:hover { color: var(--error); border-color: var(--error); }
.econ-table th, .econ-table td { white-space: nowrap; }

/* ---------- ТЗ для ФФ (30.09.2026) ---------- */
.link-button { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.link-button:hover { text-decoration: underline; }
.controls .btn-link, .btn-link {
  display: inline-block; padding: 10px 16px; background: var(--accent); color: white;
  border-radius: 8px; font-size: 14px; text-decoration: none;
}
.btn-link.btn-secondary { background: transparent; color: inherit; border: 1px solid var(--border); }
.controls button.btn-secondary { padding: 9px 15px; }
.ff-created { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.ff-created ul { margin: 8px 0 0; padding-left: 20px; }
.ff-warn, .ff-warn a { color: #b26a00; }

#ff-table { table-layout: fixed; width: 100%; min-width: 1300px; }
#ff-table th, #ff-table td { white-space: normal; vertical-align: top; text-align: left; padding: 6px; }
#ff-table th { font-size: 13px; line-height: 1.2; }
#ff-table th:nth-child(1), #ff-table td:nth-child(1) { width: 36px; color: var(--muted); }
#ff-table th[data-key=sku] { width: 170px; }
#ff-table th[data-key=qty] { width: 90px; }
#ff-table th[data-key=barcode] { width: 140px; }
#ff-table th[data-key=marking] { width: 260px; }
#ff-table th[data-key=defect_check], #ff-table th[data-key=measure_item], #ff-table th[data-key=measure_pack] { width: 100px; }
#ff-table th[data-key=warehouse] { width: 180px; }
#ff-table th[data-key=box_no], #ff-table th[data-key=box_qty] { width: 90px; }
#ff-table th[data-key=box_barcode] { width: 130px; }
#ff-table th:last-child, #ff-table td:last-child { width: 28px; }
#ff-table input, #ff-table select, #ff-table textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 4px 6px;
  border: 1px solid var(--border); border-radius: 4px; background: transparent; color: inherit;
}
#ff-table textarea { resize: vertical; min-height: 34px; white-space: pre-wrap; }
#ff-table tr.ff-first-row { background: rgba(47, 111, 237, 0.06); }
#ff-table .ff-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
#ff-table td.ff-bad { background: rgba(209, 69, 59, 0.1); }
#ff-table td.ff-bad input { border-color: var(--error); color: var(--error); font-weight: 600; }
#ff-table td.ff-bad .ff-sub { color: var(--error); }
#ff-table td.ff-missing input { border-color: #d9a400; background: #fff4c2; color: #000; }
.ff-file-info { margin: -8px 0 8px; font-size: 14px; color: var(--muted); }
.ff-file-info.status-error { color: var(--error); }
.ff-upload .wallet-field input[type=file] { width: 280px; padding: 4px; }
#ff-table td.ff-zero .ff-sub { font-style: italic; }

/* Блоки "в разработке" (01.10.2026): не подсвечены; не-админам не кликаются */
.tile-dev { border-style: dashed; box-shadow: none; }
.tile-dev .tile-title { color: var(--muted); }
.tile-locked { cursor: not-allowed; opacity: 0.7; }
.tile-badge { font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 10px; padding: 1px 7px; margin-left: 6px; white-space: nowrap; }

/* ---------- План поставок на неделю (01.10.2026) ---------- */
.sp-summary { font-weight: 600; margin: 4px 0 8px; }
.sp-table { width: auto; border-collapse: collapse; }
.sp-table th, .sp-table td { padding: 5px 8px; white-space: nowrap; border-right: 1px solid var(--border); vertical-align: middle; }
.sp-table .sp-label { text-align: left; font-weight: 500; background: rgba(0,0,0,0.03); min-width: 230px; position: sticky; left: 0; z-index: 1; }
.sp-table td input, .sp-table td select {
  width: 120px; box-sizing: border-box; font: inherit; font-size: 13px; padding: 3px 6px;
  border: 1px solid var(--border); border-radius: 4px; background: transparent; color: inherit;
}
.sp-table td input[type=checkbox] { width: 18px; height: 18px; }
.sp-table .sp-comment input { width: 150px; }
.sp-table td.sp-note { vertical-align: middle; padding: 6px 8px; background: #fffdf3; cursor: pointer; }
.sp-table td.sp-note:hover { background: #fff7d6; }
.sp-table .sp-note-text { text-align: center; font-size: 13px; line-height: 1.5; max-width: 300px; margin: 0 auto; word-break: break-word; }
.sp-table .sp-note-ph { color: #a3a3a3; }
.sp-order-pop { position: fixed; z-index: 1000; width: 320px; background: #fff; color: #1f2937; border: 1px solid #d1d5db;
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 8px; font-size: 13px; }
.sp-order-head { display: flex; gap: 6px; margin-bottom: 6px; }
.sp-order-head input { flex: 1; min-width: 0; padding: 5px 8px; }
.sp-order-head button { padding: 4px 10px; }
.sp-order-list { max-height: 280px; overflow-y: auto; }
.sp-order-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.sp-order-item:hover { background: #f3f4f6; }
.sp-order-no { font-weight: 600; white-space: nowrap; }
.sp-order-ff { color: #4b5563; flex: 1; }
.sp-order-used { color: #b45309; font-size: 11px; white-space: nowrap; }
.sp-order-empty { color: #6b7280; padding: 8px 6px; }
.sp-table .sp-plan { text-align: right; font-weight: 600; }
.sp-table .sp-num { text-align: right; }
.sp-table .sp-zero { color: var(--muted); }
.sp-table .sp-strong { font-weight: 600; }
.sp-table .sp-loss { color: var(--error); font-weight: 600; background: rgba(209, 69, 59, 0.08); }
.sp-table tr.sp-wh-row th { background: rgba(47, 111, 237, 0.85); color: white; position: static; }
.sp-table tr.sp-wh-row .sp-tz-link { color: white; font-size: 11px; margin-left: 6px; text-decoration: underline; }
.sp-table tr.sp-wh-row .sp-del { color: white; margin-left: 6px; }
.sp-table tr.sp-total td, .sp-table tr.sp-total th { background: rgba(0,0,0,0.06); font-weight: 700; }
.sp-table tr.sp-head th, .sp-table tr.sp-bottom th { position: sticky; }
.sp-table .sp-empty { text-align: center; color: var(--muted); padding: 16px; }
.sp-table select[data-status="Отгружена"] { background: #fff4c2; color: #000; }
.sp-table select[data-status="В пути"] { background: #dbe8ff; color: #000; }
.sp-table select[data-status="Принята"] { background: #d6f5dd; color: #000; }
.sp-table select[data-status="Принята с расхождениями"] { background: #fbdcd9; color: #000; }
.sp-table td select[data-status] { width: 190px; }

/* План поставок — данные с маркетплейса (этап 2, 01.10.2026) */
.sp-mp-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sp-mp-no { font-weight: 600; }
.sp-mp-badge { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 0 5px; }
.sp-unbind { color: var(--muted); }
.sp-mp-badge-warn { color: #b45309; border-color: #f5c27a; }
.sp-manual-btn { font-size: 12px; color: var(--accent); }
.sp-manual-input { width: 130px; padding: 3px 6px; font: inherit; font-size: 13px; }
.sp-manual-ok { padding: 3px 8px; font-size: 12px; }
.sp-pick-btn { background: #fff4c2; color: #000; border: 1px solid #d9a400; border-radius: 6px; padding: 3px 8px; cursor: pointer; font: inherit; font-size: 12px; }
.sp-muted { color: var(--muted); font-size: 12px; }
.sp-mp-state { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,0.05); }
.sp-mp-state[data-state=DATA_FILLING], .sp-mp-state[data-state=REPORTS_CONFIRMATION_AWAITING] { background: #ffe9cc; color: #8a4b00; }
.sp-mp-state[data-state=READY_TO_SUPPLY] { background: #d8f3ee; color: #0b6b5c; }
.sp-mp-state[data-state=ACCEPTED_AT_SUPPLY_WAREHOUSE], .sp-mp-state[data-state=IN_TRANSIT], .sp-mp-state[data-state=ACCEPTANCE_AT_STORAGE_WAREHOUSE] { background: #dbe8ff; color: #1d4ea8; }
.sp-mp-state[data-state=COMPLETED] { background: #d6f5dd; color: #17663a; }
/* статусы поставок ВБ (15.10.2026) */
.sp-mp-state[data-state=WB_1], .sp-mp-state[data-state=WB_2] { background: #ffe9cc; color: #8a4b00; }
.sp-mp-state[data-state=WB_3] { background: #d8f3ee; color: #0b6b5c; }
.sp-mp-state[data-state=WB_4], .sp-mp-state[data-state=WB_6] { background: #dbe8ff; color: #1d4ea8; }
.sp-mp-state[data-state=WB_5] { background: #d6f5dd; color: #17663a; }
.sp-table .sp-num-text { display: block; text-align: right; }
#sp-picker ul { padding-left: 18px; }
#sp-picker li { margin: 6px 0; }

/* Подбор даты поставки (01.10.2026) */
.ff-dates { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; }
.ff-dates summary { cursor: pointer; }
.dp-options { margin: 6px 0 4px; padding-left: 20px; }
.dp-options li { margin: 5px 0; }
.dp-options li.dp-chosen { font-weight: 600; color: #17663a; }

.sp-table td, .sp-table th { min-width: 140px; }
.sp-table .sp-planned { color: var(--muted); font-style: italic; }
.sp-table .sp-plan-diff { color: #b26a00; font-size: 12px; margin-left: 4px; }
.dp-current { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.dp-current button { font-size: 13px; }
.dp-options li.dp-chosen-extra { color: #17663a; font-weight: 600; list-style: none; margin-left: -18px; }

/* Поставка на Озоне из ТЗ (01.10.2026) */
.oz-slot { font-size: 13px; margin: 2px 0 4px 18px; color: #17663a; font-weight: 400; }
.oz-slot select { font: inherit; font-size: 13px; padding: 2px 4px; margin-left: 4px; }
.oz-slot.oz-none { color: var(--error); }
.oz-supply { margin: 10px 0 4px; }
.oz-create-btn { padding: 8px 14px; background: var(--accent); color: white; border: none; border-radius: 8px; cursor: pointer; font: inherit; }
.oz-create-btn:disabled { opacity: 0.5; cursor: default; }

.oz-supply .muted { color: #6b7280; font-size: 0.9em; margin-top: 4px; }

/* План поставок: лента недель (04.10.2026) */
.sp-week { margin: 0 0 28px; border: 2px solid #111; border-radius: 12px; padding: 0 16px 14px; }
.sp-week-head { border-radius: 10px 10px 0 0; }
/* таблицы по ФФ внутри недели (14.10.2026) */
.sp-ff-title { font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.sp-ff-title:first-child { margin-top: 4px; }
.sp-ff-none { color: #b45309; }
.sp-week-head { position: sticky; top: 0; z-index: 5; background: var(--bg, #f6f7f9); padding: 10px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.sp-week-title { font-size: 20px; font-weight: 700; margin: 0 6px 4px 0; display: inline-block; }
.sp-week-now { font-size: 12px; font-weight: 600; color: #fff; background: #2f6fed; border-radius: 10px; padding: 2px 8px; vertical-align: middle; }
.sp-week-head .controls { margin: 6px 0 0; }
.sp-week-past .sp-week-title { color: #555; }
.sp-week .table-wrap { max-height: none; }

/* Анализ конкурентов Ozon: карточка пары (04.10.2026) */
.pair-card { position: relative; border: 1px solid var(--border, #ddd); border-radius: 10px; padding: 16px; margin-bottom: 24px; background: #fff; }
.pair-heads { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.pair-side { display: flex; gap: 12px; align-items: flex-start; }
.pair-side-empty { display: block; }
.pair-photo { width: 90px; height: 120px; object-fit: contain; background: #f5f5f5; border: 1px solid #eee; border-radius: 6px; flex-shrink: 0; }
.pair-photo-empty { display: flex; align-items: center; justify-content: center; font-size: 12px; color: #999; }
.pair-name { font-weight: 700; font-size: 16px; }
.pair-badge { display: inline-block; font-size: 12px; border-radius: 4px; padding: 1px 8px; background: #e6ecf8; color: #24406f; margin-bottom: 2px; }
.pair-badge-own { background: #d8cf9a; color: #3a3620; }
.pair-period { margin: 6px 0 10px; }
.pair-period select { margin: 0 4px; }
.pair-table td:not(:first-child), .pair-table th:not(:first-child) { text-align: right; }
.pair-up { color: #17663a; }
.pair-down { color: var(--error, #c0392b); }
.pair-paste { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0; }
.pair-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-top: 12px; }
@media (max-width: 900px) { .pair-heads, .pair-paste, .pair-details { grid-template-columns: 1fr; } }

/* Доступ к блокам (05.10.2026) */
.ba-menu { position: fixed; z-index: 1000; background: #fff; color: #1c1e21; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); padding: 4px; display: flex; flex-direction: column; min-width: 200px; }
.ba-menu[hidden] { display: none; }
.ba-menu button { background: none; color: inherit; border: none; text-align: left; padding: 8px 12px; border-radius: 6px; cursor: pointer; font: inherit; }
.ba-menu button:hover { background: rgba(47,111,237,0.08); }
.ba-menu button[hidden] { display: none; }
.ba-modal { position: fixed; inset: 0; z-index: 1001; color: #1c1e21; background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; }
.ba-modal[hidden] { display: none; }
.ba-box { background: #fff; border-radius: 12px; padding: 20px 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.ba-box h3 { margin: 0 0 6px; }
.ba-users { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-height: 300px; overflow: auto; }
.ba-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* STR: итог по категории (05.10.2026) */
#str-table tr.str-total td { background: rgba(0,0,0,0.06); font-weight: 700; border-top: 2px solid #333; }
.pair-delete { position: absolute; top: 8px; right: 10px; border: none; background: none; color: #999; font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.pair-delete:hover { color: var(--error, #c0392b); background: rgba(192,57,43,0.08); }
.pair-price { margin-top: 4px; }
.pair-table tr.pair-sep td { border-bottom: 2px solid #ccc; }

/* Воронка ФБС (12.10.2026) */
#fn-table .fn-num { text-align: right; }
#fn-table th { white-space: normal; }
#fn-table tr.fn-total td { font-weight: 700; background: rgba(0,0,0,0.06); }
#fn-table tr.fn-art { cursor: pointer; }
#fn-table tr.fn-art:hover td { background: rgba(47,111,237,0.05); }
#fn-table tr.fn-art td:first-child { font-weight: 600; white-space: nowrap; }
#fn-table tr.fn-size td { color: #444; font-size: 13px; }
#fn-table .fn-caret { display: inline-block; width: 12px; color: var(--muted); }
#fn-table .fn-sold { color: #17663a; font-weight: 600; }
#fn-table .fn-declined, #fn-table .fn-canceled_client, #fn-table .fn-defect { color: var(--error, #c0392b); }
.fn-quick .link-button { margin: 0 4px; }
#fn-table th.fn-num { text-align: right; }
#fn-table th, #fn-table td { border-left: 1px solid var(--border, #e3e6ea); }
#fn-table th:first-child, #fn-table td:first-child { border-left: none; }
#fn-table tr.fn-size td:first-child + td { border-left: none; }
#fn-table td.fn-num, #fn-table th.fn-num { min-width: 70px; }

/* Знак бренда «кометой» на главной (12.10.2026, только админ) */
.comet-trail { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; }
.content h1, .tiles { position: relative; z-index: 1; }
.brand3d { position: fixed; z-index: 2; top: 50%;
  width: clamp(240px, calc((100vw - 960px) / 2 - 70px), 430px); aspect-ratio: 499 / 354;
  left: calc((100vw - 960px) / 4 - clamp(240px, calc((100vw - 960px) / 2 - 70px), 430px) / 2);
  transform: translateY(-50%); perspective: 900px; }
.brand3d-spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
  transform: rotateY(20deg) rotateX(10deg); transition: transform 0.35s cubic-bezier(.2,.8,.3,1); }
.brand3d-layer { position: absolute; inset: 0;
  -webkit-mask: url("brand-mark.png") center / contain no-repeat; mask: url("brand-mark.png") center / contain no-repeat;
  background: hsl(226, 10%, calc(28% - var(--i) * 0.9%));
  transform: translateZ(calc(var(--i) * -1.6px)); }
.brand3d-layer.brand3d-front { background: linear-gradient(135deg, #727a8b 0%, #2b2f38 36%, #0d0e11 68%, #444a57 100%); }
@media (max-width: 1400px) { .brand3d, .comet-trail { display: none; } }
@media (prefers-reduced-motion: reduce) { .brand3d-spin { transition: none; } }

/* ================= Оформление главной (12.10.2026) ================= */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; position: relative; z-index: 3; margin-bottom: 20px; }
.home-head h1 { margin: 0; }
.home-date { color: var(--muted); margin-top: 6px; font-size: 15px; }
.home-date:empty { display: none; }
.theme-pick { position: relative; }
.theme-btn { background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.theme-btn:hover { color: var(--text); border-color: var(--muted); }
/* бегущая подсветка по рамке кнопки «Оформление» (13.10.2026) — цвет под тему */
@property --tb-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.theme-btn { position: relative; --tb-glow: var(--accent); }
body.theme-aurora .theme-btn { --tb-glow: #63e6be; }
body.theme-glass .theme-btn { --tb-glow: #ffffff; }
body.theme-bento .theme-btn { --tb-glow: #ff9f0a; }
.theme-btn::before, .theme-btn::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--tb-a), transparent 0 31%, var(--tb-glow) 40%, transparent 46% 81%, var(--tb-glow) 90%, transparent 96% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: tb-run 3.2s linear infinite;
}
.theme-btn::after { filter: blur(4px); opacity: 0.7; padding: 2px; }
@keyframes tb-run { to { --tb-a: 360deg; } }
@media (prefers-reduced-motion: reduce) { .theme-btn::before, .theme-btn::after { animation: none; } }
.theme-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; background: #fff; color: #1c1e21; border: 1px solid #e3e5e8; border-radius: 14px; padding: 6px; min-width: 230px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); }
.theme-menu[hidden] { display: none; }
.theme-opt { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; padding: 8px 10px; border-radius: 10px; font: inherit; font-size: 14px; color: inherit; cursor: pointer; text-align: left; }
.theme-opt:hover { background: rgba(0,0,0,0.05); }
.theme-opt.is-on { font-weight: 600; }
.theme-opt.is-on::after { content: "✓"; margin-left: auto; color: #20c997; }
.theme-sw { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.08); }
.sw-classic { background: linear-gradient(135deg, #f6f7f9 50%, #2f6fed 50%); }
.sw-aurora { background: radial-gradient(circle at 30% 70%, #20c997, transparent 60%), radial-gradient(circle at 75% 25%, #7452e0, transparent 55%), #07090d; }
.sw-glass { background: linear-gradient(135deg, #ff7a59, #c13dff 50%, #4f8bff); }
.sw-bento { background: conic-gradient(#d3f9d8 0 25%, #e5dbff 0 50%, #fff3bf 0 75%, #d0ebff 0); }
.home-sky { display: none; }
.page-home .tiles { position: relative; z-index: 1; }
.page-home .tile { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.page-home:not(.theme-classic) .tile:not(.tile-empty):hover { transform: translateY(-3px); }

/* иконки разделов (стекло, бенто) */
.theme-glass .tile[data-key]::before, .theme-bento .tile[data-key]::before {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px;
  margin-bottom: 14px; font-size: 19px; background: rgba(255,255,255,0.55); }
:is(.theme-glass, .theme-bento) .tile[data-key="prices"]::before { content: "🏷️"; }
:is(.theme-glass, .theme-bento) .tile[data-key="competitors"]::before { content: "🔎"; }
:is(.theme-glass, .theme-bento) .tile[data-key="str"]::before { content: "📈"; }
:is(.theme-glass, .theme-bento) .tile[data-key="unit"]::before { content: "🧮"; }
:is(.theme-glass, .theme-bento) .tile[data-key="stock"]::before { content: "📦"; }
:is(.theme-glass, .theme-bento) .tile[data-key="ff_tasks"]::before { content: "📋"; }
:is(.theme-glass, .theme-bento) .tile[data-key="fbs_funnel"]::before { content: "🚚"; }
:is(.theme-glass, .theme-bento) .tile[data-key="supply_plan"]::before { content: "🗓️"; }

/* ---------- Северное сияние ---------- */
body.theme-aurora:not(.page-deep) { --bg: #07090d; --card: rgba(255,255,255,0.05); --text: #e9eef3; --muted: #95a1ad; --border: rgba(150,242,215,0.16); --accent: #63e6be; color-scheme: dark; }
.theme-aurora .topbar { background: rgba(7,9,13,0.55); backdrop-filter: blur(10px); position: relative; z-index: 5; }
.theme-aurora .home-sky, .theme-glass .home-sky { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.home-sky > div { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.theme-aurora .sky-a { width: 70vw; height: 45vh; left: 5vw; top: 48vh; background: radial-gradient(closest-side, rgba(32,201,151,0.45), transparent); animation: sky-drift-a 38s ease-in-out infinite alternate; }
.theme-aurora .sky-b { width: 55vw; height: 35vh; left: 35vw; top: 18vh; background: radial-gradient(closest-side, rgba(56,217,169,0.22), transparent); animation: sky-drift-b 46s ease-in-out infinite alternate; }
.theme-aurora .sky-c { width: 45vw; height: 35vh; left: 55vw; top: -5vh; background: radial-gradient(closest-side, rgba(116,82,224,0.30), transparent); animation: sky-drift-c 52s ease-in-out infinite alternate; }
.theme-aurora .sky-stars { inset: 0; border-radius: 0; filter: none; opacity: 0.55;
  background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 140px 80px, #cfe, transparent),
    radial-gradient(1.5px 1.5px at 260px 160px, #fff, transparent), radial-gradient(1px 1px at 380px 40px, #fff, transparent),
    radial-gradient(1px 1px at 330px 200px, #bdf, transparent), radial-gradient(1.2px 1.2px at 90px 190px, #fff, transparent);
  background-size: 420px 230px; animation: sky-twinkle 6s ease-in-out infinite alternate, stars-drift 200s linear infinite; }
/* звёзды медленно плывут сами (14.10.2026): два слоя с разной скоростью — дальние мельче и медленнее */
.theme-aurora .sky-stars::before { content: ""; position: absolute; inset: 0; opacity: 0.8;
  background-image: radial-gradient(0.8px 0.8px at 30px 40px, #fff, transparent), radial-gradient(0.8px 0.8px at 170px 20px, #dff, transparent),
    radial-gradient(0.7px 0.7px at 110px 120px, #fff, transparent), radial-gradient(0.9px 0.9px at 220px 95px, #cde, transparent),
    radial-gradient(0.7px 0.7px at 60px 140px, #fff, transparent);
  background-size: 260px 150px; animation: stars-drift-far 320s linear infinite; }
@keyframes stars-drift { from { background-position: 0 0; } to { background-position: -420px 230px; } }
@keyframes stars-drift-far { from { background-position: 0 0; } to { background-position: -260px 150px; } }
.sky-shoot { display: none; }
.theme-aurora .sky-shoot { display: block; width: 170px; height: 1.6px; border-radius: 2px; filter: none; opacity: 0;
  background: linear-gradient(90deg, #fff, rgba(180,255,230,0.55) 25%, transparent);
  box-shadow: 0 0 8px rgba(190,255,235,0.7); transform-origin: left center;
  animation: sky-shoot 60s linear 8s infinite; }
@keyframes sky-shoot {
  0% { transform: translate(0, 0) rotate(-24deg); opacity: 0; }
  0.25% { opacity: 1; }
  1.6% { opacity: 0.9; }
  2.2% { transform: translate(-560px, 250px) rotate(-24deg); opacity: 0; }
  100% { transform: translate(-560px, 250px) rotate(-24deg); opacity: 0; }
}
@keyframes sky-drift-a { to { transform: translate(8vw, -6vh) scale(1.15) rotate(6deg); } }
@keyframes sky-drift-b { to { transform: translate(-10vw, 5vh) scale(0.9) rotate(-8deg); } }
@keyframes sky-drift-c { to { transform: translate(-6vw, 8vh) scale(1.2); } }
@keyframes sky-twinkle { from { opacity: 0.35; } to { opacity: 0.7; } }
.theme-aurora .tile { background: rgba(255,255,255,0.045); border-color: rgba(150,242,215,0.16); backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(0,0,0,0.35); }
.theme-aurora .tile-active { border-color: rgba(150,242,215,0.32); }
.theme-aurora .tile:not(.tile-empty):hover { border-color: rgba(150,242,215,0.7); box-shadow: 0 0 0 1px rgba(150,242,215,0.25), 0 0 40px rgba(32,201,151,0.22); }
.theme-aurora .tile-dev { border-color: rgba(255,255,255,0.22); }
.theme-aurora .tile-dev .tile-title, .theme-aurora .tile-empty { color: #aeb8c2; }
.theme-aurora .tile-badge { border-color: rgba(255,255,255,0.25); color: #aeb8c2; }
.theme-aurora .brand3d-layer { background: hsl(212, 9%, calc(72% - var(--i) * 2%)); }
.theme-aurora .brand3d-layer.brand3d-front { background: linear-gradient(135deg, #ffffff 0%, #d0d7de 30%, #7d8590 58%, #e6edf3 100%); }
.theme-aurora .brand3d { filter: drop-shadow(0 0 24px rgba(99,230,190,0.35)); }

/* ---------- Стекло на градиенте ---------- */
body.theme-glass:not(.page-deep) { --bg: #2c1f7e; --card: rgba(255,255,255,0.14); --text: #ffffff; --muted: rgba(255,255,255,0.78); --border: rgba(255,255,255,0.3); --accent: #ffffff; color-scheme: dark; }
.theme-glass .topbar { background: rgba(255,255,255,0.08); backdrop-filter: blur(16px); border-bottom-color: rgba(255,255,255,0.18); position: relative; z-index: 5; }
.theme-glass .home-sky { background: linear-gradient(135deg, #2a1d7a, #5a2ca8); }
.theme-glass .home-sky > div { filter: blur(60px); }
.theme-glass .sky-a { width: 60vw; height: 60vw; left: -15vw; top: -20vw; background: radial-gradient(closest-side, #ff7a59, transparent); animation: glass-a 16s ease-in-out infinite alternate; }
.theme-glass .sky-b { width: 60vw; height: 60vw; right: -20vw; left: auto; top: -10vw; background: radial-gradient(closest-side, #4f8bff, transparent); animation: glass-b 19s ease-in-out infinite alternate; }
.theme-glass .sky-c { width: 70vw; height: 60vw; left: 15vw; top: 35vh; background: radial-gradient(closest-side, #c13dff, transparent); animation: glass-c 22s ease-in-out infinite alternate; }
.theme-glass .home-sky { animation: glass-hue 24s ease-in-out infinite alternate; }
/* мягкий свет, который плывёт за курсором (координаты ставит скрипт на главной) */
.theme-glass .sky-stars { display: block; inset: auto; border-radius: 50%; width: 46vw; height: 46vw; filter: blur(80px); opacity: 0.55;
  left: calc(var(--mx, 50vw) - 23vw); top: calc(var(--my, 50vh) - 23vw);
  background: radial-gradient(closest-side, #ffd6a5, rgba(255,120,190,0.6) 45%, transparent); transition: left 1.6s ease-out, top 1.6s ease-out; }
@keyframes glass-a { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(28vw, 18vh) scale(1.25); } 100% { transform: translate(10vw, 42vh) scale(0.95); } }
@keyframes glass-b { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30vw, 25vh) scale(1.2); } 100% { transform: translate(-12vw, 50vh) scale(0.9); } }
@keyframes glass-c { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-22vw, -30vh) scale(1.15); } 100% { transform: translate(18vw, -18vh) scale(1.3); } }
@keyframes glass-hue { from { filter: hue-rotate(-18deg); } to { filter: hue-rotate(22deg); } }

.theme-glass .tile { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); border-radius: 24px; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: 0 10px 40px rgba(20,0,60,0.25); }
.theme-glass .tile:not(.tile-empty):hover { background: rgba(255,255,255,0.2); box-shadow: 0 16px 50px rgba(20,0,60,0.35); }
.theme-glass .tile[data-key]::before { background: rgba(255,255,255,0.25); }
.theme-glass .tile-dev { border-style: dashed; }
.theme-glass .tile-dev .tile-title { color: rgba(255,255,255,0.85); }
.theme-glass .tile-badge { border-color: rgba(255,255,255,0.4); color: #fff; background: rgba(255,255,255,0.15); }
.theme-glass .tile-empty, .theme-bento .tile-empty { display: none; }
.theme-classic .brand3d, .theme-classic .comet-trail, .theme-glass .brand3d, .theme-glass .comet-trail, .theme-bento .brand3d, .theme-bento .comet-trail { display: none !important; }
.theme-glass .theme-btn, .theme-aurora .theme-btn { color: var(--text); }

/* ---------- Бенто ---------- */
body.theme-bento:not(.page-deep) { --bg: #f7f6f3; --text: #1d1d1f; --muted: #6e6e73; --border: #e9e7e1; --accent: #1d1d1f; }
.theme-bento .topbar { background: transparent; border-bottom: none; }
.theme-bento.page-home .content { max-width: 1080px; }
.theme-bento .tiles { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(170px, auto); grid-auto-flow: dense; gap: 16px; }
.theme-bento .tile { border: none; border-radius: 28px; padding: 22px 24px; box-shadow: none; }
.theme-bento .tile:not(.tile-empty):hover { box-shadow: 0 14px 34px rgba(0,0,0,0.08); }
.theme-bento .tile-title { font-size: 18px; }
.theme-bento .tile[data-key="stock"] { grid-column: span 2; grid-row: span 2; background: #d3f9d8; }
.theme-bento .tile[data-key="stock"] .tile-title { font-size: 28px; margin-top: 8px; }
.theme-bento .tile[data-key="stock"] .tile-desc { font-size: 16px; }
.theme-bento .tile[data-key="fbs_funnel"] { grid-column: span 2; background: #e5dbff; }
.theme-bento .tile[data-key="competitors"] { background: #fff3bf; }
.theme-bento .tile[data-key="ff_tasks"] { background: #d0ebff; }
.theme-bento .tile[data-key="supply_plan"] { background: #ffe3e3; }
.theme-bento .tile[data-key="unit"] { background: #fff; }
.theme-bento .tile[data-key="str"] { background: #1d1d1f; color: #fff; }
.theme-bento .tile[data-key="str"] .tile-desc { color: rgba(255,255,255,0.7); }
.theme-bento .tile[data-key="str"]::before { background: rgba(255,255,255,0.15); }
.theme-bento .tile[data-key="prices"] { background: #fff4e6; }
.theme-bento .tile-dev { border: 1.5px dashed rgba(0,0,0,0.18); }
.theme-bento .tile-dev .tile-title { color: var(--text); }
.theme-bento .tile-badge { background: rgba(0,0,0,0.07); border: none; }
@media (max-width: 900px) { .theme-bento .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .home-sky > div, .home-sky > div::before { animation: none !important; } }

/* ===== Оформление на всех страницах (12.10.2026) =====
   Главная и разделы-«плитки» (Цены, Конкуренты, Юнит-экономика) — полностью в теме.
   Страницы с таблицами (page-deep) — меняется только фон и шапка, само содержимое
   остаётся на светлой подложке в классическом виде, чтобы таблицы читались как раньше. */
:is(.page-home, .page-hub) main.content { position: relative; z-index: 1; }
body.theme-aurora.page-deep { background: #07090d; }
body.theme-glass.page-deep { background: #2c1f7e; }
body.theme-bento.page-deep { background: #ebe7df; }
:is(.theme-glass, .theme-bento).page-deep main.content {
  position: relative; z-index: 1; background: #f6f7f9; border-radius: 18px;
  margin: 24px auto; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.theme-bento.page-deep main.content { box-shadow: 0 10px 40px rgba(0,0,0,0.08); }
:is(.theme-glass, .theme-bento).page-deep main.content.content-wide { margin: 20px; }
/* шапка — в теме на всех страницах */
.theme-aurora .topbar { background: rgba(7,9,13,0.6); border-bottom-color: rgba(255,255,255,0.08); }
.theme-aurora .topbar .brand { color: #e9eef3; }
.theme-aurora .topbar .logout { color: #63e6be; }
.theme-aurora .topbar .user-chip { color: #95a1ad; }
.theme-glass .topbar .brand, .theme-glass .topbar .logout { color: #fff; }
.theme-glass .topbar .user-chip { color: rgba(255,255,255,0.75); }
.theme-bento .topbar .brand, .theme-bento .topbar .logout { color: #1d1d1f; }
/* плитки разделов-хабов в бенто — пастельные */
.theme-bento.page-hub .tiles { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.theme-bento.page-hub .tile:nth-child(4n+1) { background: #d3f9d8; }
.theme-bento.page-hub .tile:nth-child(4n+2) { background: #e5dbff; }
.theme-bento.page-hub .tile:nth-child(4n+3) { background: #fff3bf; }
.theme-bento.page-hub .tile:nth-child(4n+4) { background: #d0ebff; }

/* История изменений на главной (12.10.2026): видно две строки, остальное — прокруткой */
.changelog { position: relative; z-index: 1; margin-top: 28px; padding: 14px 18px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border); color: var(--text); }
.changelog-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
.changelog-list { list-style: none; margin: 0; padding: 0 6px 0 0; max-height: calc(2 * 1.75em); overflow-y: auto; line-height: 1.75; font-size: 14px; scrollbar-width: thin; }
.changelog-list li { padding-left: 16px; position: relative; }
.changelog-list li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.8; }
.theme-glass .changelog { background: rgba(255,255,255,0.12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-color: rgba(255,255,255,0.28); border-radius: 20px; }
.theme-aurora .changelog { background: rgba(255,255,255,0.04); backdrop-filter: blur(10px); }
.theme-bento .changelog { background: #fff; border: none; border-radius: 22px; }
/* ползунок «Что нового»: прозрачная дорожка, тонкий полупрозрачный бегунок */
.changelog-list { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.22) transparent; }
:is(.theme-aurora, .theme-glass) .changelog-list { scrollbar-color: rgba(255,255,255,0.35) transparent; }
.changelog-list::-webkit-scrollbar { width: 6px; background: transparent; }
.changelog-list::-webkit-scrollbar-track { background: transparent; }
.changelog-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.22); border-radius: 6px; }
:is(.theme-aurora, .theme-glass) .changelog-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.35); }
/* меню и окно выдачи доступа — всегда светлые, независимо от темы оформления */
.ba-menu, .ba-modal { --bg: #f6f7f9; --card: #ffffff; --text: #1c1e21; --muted: #6b7280; --accent: #2f6fed; --border: #e3e5e8; color-scheme: light; }

/* ТЗ для ФФ: ФФ обязателен (14.10.2026) */
.dp-req { color: #d1453b; margin-left: 1px; }
select.dp-need { border-color: #d1453b; box-shadow: 0 0 0 2px rgba(209,69,59,0.18); }
#ff-table td.ff-nosku input { border-color: #d1453b; background: #fdecea; }
.ff-nosku-hint { font-size: 11px; color: #d1453b; margin-top: 2px; line-height: 1.25; max-width: 170px; }
/* .controls{display:flex} перебивал атрибут hidden — блок «Склад Озона» был виден и в ТЗ на ВБ */
#oz-box[hidden], #wb-box[hidden] { display: none; }
.wb-acc { white-space: nowrap; margin-left: 8px; font-size: 12px; padding: 1px 7px; border-radius: 8px; background: #e8f5ee; color: #17663a; }
.wb-acc.wb-paid { background: #fff4c2; color: #7a5a00; }
.wb-acc.wb-none { background: #fdecea; color: #b42318; }
.wb-acc.wb-unknown { background: #f0f1f3; color: #6b7280; }
/* Акции (15.10.2026) */
.pr-h { font-size: 18px; margin: 18px 0 8px; }
.pr-sep { border: none; border-top: 2px solid #1c1e21; margin: 22px 0 6px; }
.pr-list { display: flex; flex-direction: column; gap: 10px; }
.pr-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; background: var(--card, #fff); }
.pr-card-active { border-color: #9ec5a8; }
.pr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pr-cb { width: 18px; height: 18px; cursor: pointer; }
.pr-titlebox { flex: 1; min-width: 240px; }
.pr-title { font-weight: 700; font-size: 15px; }
.pr-dates { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pr-nums { display: flex; gap: 6px; flex-wrap: wrap; }
.pr-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #f0f1f3; color: #374151; white-space: nowrap; }
.pr-badge-on { background: #d6f5dd; color: #17663a; }
.pr-badge-soon { background: #fff4c2; color: #7a5a00; }
.pr-more { font-size: 13px; margin-top: 6px; }
.pr-body { margin-top: 8px; }
.pr-table-wrap { max-height: 420px; }
.pr-auto { color: #b45309; font-weight: 600; }
.pr-below { color: #b42318; }
.pr-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.pr-modal-bg[hidden] { display: none; }
.pr-modal { background: #fff; color: #1c1e21; border-radius: 14px; padding: 18px 22px; max-width: 480px; width: calc(100% - 32px); box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.pr-modal h3 { margin: 0 0 8px; }
.pr-modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.pr-auto-box { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px 10px; background: var(--card, #fff); }
.pr-off { color: #17663a; }
.pr-badge-bad { background: #fdecea; color: #b42318; font-weight: 600; }
.pr-alert-box { border-color: #f3b4ae; }
/* Рейтинг карточек (15.10.2026) */
.cr-r { font-weight: 700; }
.cr-bad { color: #b42318; } .cr-mid { color: #b45309; } .cr-ok { color: #17663a; }
.cr-todo { margin: 0; padding-left: 16px; font-size: 12px; color: #374151; }
.cr-todo li { margin: 1px 0; }
.cr-sizes { font-size: 12px; color: var(--muted); }
/* Юнит-экономика: своя комиссия / СПП в строке (20.10.2026) */
.econ-ovr-cell { white-space: nowrap; cursor: text; }
.econ-ovr-cell .econ-ovr { width: 46px; border: 1px solid transparent; background: transparent; color: var(--muted); padding: 2px 3px; font: inherit; text-align: right; }
.econ-ovr-cell .econ-ovr::placeholder { color: var(--muted); opacity: 1; }
.econ-ovr-cell .econ-ovr:hover, .econ-ovr-cell .econ-ovr:focus { border-color: #c7cbd1; background: #fff; color: #1c1e21; outline: none; }
.econ-ovr-pct { color: var(--muted); }
.econ-ovr-cell.is-own .econ-ovr, .econ-ovr-cell.is-own .econ-ovr-pct { color: #1d4ed8; font-weight: 600; }

/* ---------- Прогнозный СПП (21.10.2026) ---------- */
.spp-calc { display: flex; flex-wrap: wrap; gap: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin: 16px 0; }
.spp-inputs { display: flex; flex-direction: column; gap: 12px; flex: 1 1 280px; }
.spp-inputs label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.spp-inputs input[type=text], .spp-inputs select { font: inherit; font-size: 15px; color: var(--text); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.spp-inputs label.spp-check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.spp-result { flex: 1 1 280px; }
.spp-big { font-size: 44px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.spp-lines { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.spp-line { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.spp-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.spp-muted { color: var(--muted); font-size: 14px; }
.spp-how { margin: 8px 0 24px; color: var(--muted); font-size: 14px; }
.spp-how summary { cursor: pointer; color: var(--accent); }

/* Юнит-экономика (22.10.2026): артикул и цена для клиента закреплены при прокрутке вбок.
   Цена остаётся на своём месте и «прилипает» справа от артикула, когда до неё докрутили. */
.econ-table .econ-pin { position: sticky; z-index: 1; background: var(--card); }
.econ-table td.econ-pin.calc-cell { background: var(--card); }
.econ-table th.econ-pin { z-index: 3; background: #fafbfc; }
.econ-table .econ-pin-1 { left: 0; }
.econ-table .econ-pin-2 { left: var(--econ-pin-left, 0px); box-shadow: 2px 0 0 var(--border); }
.econ-table td.econ-pin-1 { box-shadow: -4px 0 0 var(--card); }
.econ-table th.econ-pin-1 { box-shadow: -4px 0 0 #fafbfc, 0 1px 0 var(--border); }
.econ-table th.econ-pin-2 { box-shadow: 2px 0 0 var(--border), 0 1px 0 var(--border); }

/* ---------- Бот документов (26.10.2026) ---------- */
.md-card { margin-bottom: 18px; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; font-size: 14px; margin-bottom: 12px; }
.md-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.md-actions button, #md-save { padding: 9px 15px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; cursor: pointer; }
.md-actions button.btn-secondary { background: transparent; color: inherit; border: 1px solid var(--border); }
.md-check { margin-top: 10px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.md-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px 18px; margin: 8px 0 14px; }
.md-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.md-form input, .md-form textarea { font: inherit; font-size: 14px; color: var(--text); padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); }
.md-form label.md-check-row { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.md-note { white-space: normal; max-width: 420px; color: var(--muted); font-size: 13px; }
.md-raw { white-space: pre-wrap; word-break: break-all; font-size: 12px; background: #f6f7f9; padding: 8px; border-radius: 6px; max-height: 300px; overflow: auto; }

/* ---------- Сборка ФБС (26.10.2026) ---------- */
.fa-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.fa-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); max-width: 260px; }
.fa-field select { font: inherit; font-size: 15px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.fa-drop { position: relative; border: 2px dashed var(--border); border-radius: 10px; padding: 22px; text-align: center; cursor: pointer; }
.fa-drop.over { border-color: var(--accent); background: rgba(47, 111, 237, 0.06); }
.fa-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fa-drop ul { list-style: none; padding: 0; margin: 10px 0 0; }
#fa-go { align-self: flex-start; padding: 10px 18px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 15px; cursor: pointer; }
#fa-go:disabled { opacity: 0.5; cursor: default; }
.fa-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.fa-btn { padding: 8px 12px; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; font-size: 14px; }
.fa-btn-sec { background: transparent; color: var(--text); border: 1px solid var(--border); }
.fa-warn { background: #fff4e5; border: 1px solid #f0c27b; border-radius: 8px; padding: 8px 12px; font-size: 14px; color: #6b4500; }
.fa-table { max-width: 360px; margin-top: 8px; }
.fa-auto h2 { margin: 0 0 4px; font-size: 18px; }
.fa-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fa-row select { font: inherit; font-size: 14px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; min-width: 320px; max-width: 100%; background: var(--card); color: var(--text); }
#fa-build { padding: 9px 16px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; cursor: pointer; }
#fa-build:disabled { opacity: .5; }
.fa-btn-sec2 { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; cursor: pointer; font-size: 15px; }
.fa-or { color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); padding-top: 12px; }

/* ---------- Калькулятор юнит-экономики (26.10.2026) ---------- */
.uc-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 4px; }
.uc-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--card); }
.uc-seg button { border: none; background: transparent; padding: 9px 16px; font-size: 14px; cursor: pointer; color: var(--muted); }
.uc-seg button.on { background: var(--accent); color: #fff; }
.uc-reset { border: 1px solid var(--border); background: transparent; border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 14px; color: inherit; }
.uc-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .uc-wrap { grid-template-columns: 1fr; } }
.uc-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.uc-card h3 { margin: 0 0 10px; font-size: 16px; }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.uc-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.uc-in { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.uc-in input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; font-size: 15px; color: var(--text); padding: 7px 9px; outline: none; }
.uc-in i { font-style: normal; color: var(--muted); padding-right: 9px; font-size: 13px; }
.uc-in:focus-within { border-color: var(--accent); }
.uc-f select { font: inherit; font-size: 14px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.uc-res-wrap { position: sticky; top: 12px; }
.uc-res h3 { margin: 18px 0 8px; }
.uc-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.uc-kpi div { background: rgba(47, 111, 237, 0.06); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.uc-kpi span { font-size: 12px; color: var(--muted); }
.uc-kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.uc-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.uc-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: #12804a; } .neg { color: #b42318; }
.uc-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: var(--border); margin-bottom: 10px; }
.uc-bar span { display: block; height: 100%; }
.uc-parts div { display: grid; grid-template-columns: 12px 1fr auto 54px; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.uc-parts i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.uc-parts b { font-variant-numeric: tabular-nums; font-weight: 600; }
.uc-parts em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.uc-grid-t td, .uc-grid-t th { padding: 6px 8px; font-size: 13px; text-align: right; white-space: nowrap; }
.uc-grid-t td:first-child, .uc-grid-t th:first-child { text-align: left; }
.uc-grid-t td.cur { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; }

/* Меню владельца под именем в шапке (27.10.2026; на телефоне — «Пользователи» и «Доступы») */
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 180px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; }
.user-menu-list a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 14px; }
.user-menu-list a:hover { background: rgba(47, 111, 237, 0.08); }
.tile-badge-acc { opacity: .85; }

/* Остатки: столбцы ФБС по складам и оборачиваемость (28.10.2026) */
#stock-table td.turnover { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#stock-table td.turnover-idle { color: var(--muted, #8a8f98); }
#stock-table th.th-wrap { white-space: pre-line; line-height: 1.25; }

/* Юнитка: длинное название в «Артикул» переносится вниз (28.10.2026) */
.econ-table td.econ-pin-1 { white-space: normal; vertical-align: top; }
.econ-table textarea.econ-article {
  display: block; width: 200px; min-height: 32px; padding: 6px 8px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px; font: inherit; line-height: 1.3;
  resize: none; overflow: hidden; white-space: pre-wrap; word-break: break-word;
  background: inherit; color: inherit;
}
#stock-table td.turnover .turnover-buyout { font-size: 11px; color: var(--muted, #8a8f98); font-weight: normal; margin-top: 2px; }

/* Юнитка: загрузка тарифов логистики Ozon (28.10.2026) */
.ozlog-panel { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 8px 0 4px; background: var(--card); }
.ozlog-panel .status { margin: 4px 0 0; }
.ozlog-btn { cursor: pointer; }
.ozlog-hint { font-size: 12px; margin: 0 0 16px; }
.econ-table th.econ-auto { cursor: help; }

/* ================= Оформление «Глаза» (28.10.2026) =================
   Чёрный фон; под плитками по центру два вытянутых по вертикали прямоугольных
   глаза следят за мышью и иногда моргают (static: dashboard.html). */
body.theme-eyes .theme-btn { --tb-glow: #ffffff; }
.sw-eyes { background:
  linear-gradient(#fff, #fff) 7px 6px / 5px 13px no-repeat,
  linear-gradient(#fff, #fff) 14px 6px / 5px 13px no-repeat, #000; }
body.theme-eyes:not(.page-deep) { --bg: #000; --card: rgba(255,255,255,0.05); --text: #f1f3f5; --muted: #8e959c;
  --border: rgba(255,255,255,0.14); --accent: #4dabf7; color-scheme: dark; background: #000; }
body.theme-eyes.page-deep { background: #000; }

.theme-eyes .topbar { background: #000; border-bottom-color: rgba(255,255,255,0.1); position: relative; z-index: 5; }
.theme-eyes .topbar .brand { color: #f1f3f5; }
.theme-eyes .topbar .logout { color: #4dabf7; }
.theme-eyes .topbar .user-chip { color: #8e959c; }
.theme-eyes .theme-btn { color: var(--text); }
.theme-eyes .brand3d, .theme-eyes .comet-trail { display: none !important; }
.theme-eyes .tile { background: #0d0d0d; border-color: rgba(255,255,255,0.14); box-shadow: none; }
.theme-eyes .tile-active { border-color: rgba(255,255,255,0.26); }
.theme-eyes .tile:not(.tile-empty):hover { border-color: rgba(255,255,255,0.7); box-shadow: 0 0 0 1px rgba(255,255,255,0.18); }
.theme-eyes .tile-dev { border-color: rgba(255,255,255,0.22); }
.theme-eyes .tile-dev .tile-title, .theme-eyes .tile-empty { color: #9aa1a8; }
.theme-eyes .tile-badge { border-color: rgba(255,255,255,0.25); color: #9aa1a8; }
.theme-eyes .tile-empty { display: none; }
.theme-eyes .changelog { background: #0d0d0d; }
.theme-eyes .changelog-list { scrollbar-color: rgba(255,255,255,0.35) transparent; }

.home-eyes { display: none; }
.theme-eyes .home-eyes { display: flex; justify-content: center; gap: 34px; margin: 46px auto 10px; position: relative; z-index: 1; }
.home-eyes .eye { width: 74px; height: 128px; background: #fff; border-radius: 14px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(255,255,255,0.08);
  transform-origin: 50% 50%; transition: transform 0.07s ease-in; }
.home-eyes .eye.is-blink { transform: scaleY(0.06); }
.home-eyes .pupil { width: 28px; height: 50px; background: #000; border-radius: 8px; transition: transform 0.08s linear; }
@media (prefers-reduced-motion: reduce) { .home-eyes .eye, .home-eyes .pupil { transition: none; } }

/* Множественный выбор в фильтрах (28.10.2026, static/multiselect.js) */
.ms { position: relative; display: inline-block; vertical-align: middle; }
.ms-btn { font: inherit; font-size: 14px; color: inherit; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 30px 8px 10px; min-width: 160px; max-width: 280px; text-align: left; cursor: pointer; position: relative;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-btn::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.6; }
.ms-btn.is-set { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ms-panel { position: fixed; z-index: 1000; min-width: 100%; max-width: 360px; max-height: 340px; overflow-y: auto;
  background: #fff; color: #1c1e21; border: 1px solid #e3e5e8; border-radius: 10px; padding: 6px; box-shadow: 0 12px 34px rgba(0,0,0,0.16); }
.ms-panel[hidden] { display: none; }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: normal; white-space: nowrap; }
.ms-opt:hover { background: rgba(0,0,0,0.05); }
.ms-opt input { width: auto; margin: 0; }
.ms-opt[hidden] { display: none; }
.ms-all { border-bottom: 1px solid #eef0f2; border-radius: 6px 6px 0 0; margin-bottom: 2px; font-weight: 600; }
.ms-search { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 8px; margin-bottom: 4px; border: 1px solid #e3e5e8; border-radius: 6px; }
.ms-empty { padding: 6px 8px; color: #8a8f98; font-size: 13px; }
#stock-table .filter-row .ms-btn { font-size: 13px; padding: 6px 28px 6px 8px; min-width: 150px; }

/* ================= Оформление «Газета» (28.10.2026) =================
   Не просто фон, а другая вёрстка главной: шапка-«масthead» с двойными линейками,
   разделы — как заметки в колонках, первая — главная новость на две колонки,
   «Что нового» — колонка хроники. Всё на текущей разметке, только CSS. */
body.theme-paper .theme-btn { --tb-glow: #b3261e; }
.sw-paper { background: linear-gradient(#1a1a1a, #1a1a1a) 4px 6px / 18px 2px no-repeat,
  linear-gradient(#1a1a1a, #1a1a1a) 4px 11px / 18px 1px no-repeat,
  linear-gradient(#b3261e, #b3261e) 4px 15px / 8px 6px no-repeat,
  linear-gradient(#999, #999) 14px 16px / 8px 1px no-repeat, #f4efe6; }
body.theme-paper:not(.page-deep) { --bg: #f4efe6; --card: #fbf8f2; --text: #1a1a1a; --muted: #5f5a52; --border: #d9d1c3; --accent: #b3261e; background: #f4efe6; }
body.theme-paper.page-deep { background: #e9e2d4; }
.theme-paper.page-deep main.content { position: relative; z-index: 1; background: #fbf8f2; border-radius: 4px; margin: 24px auto;
  box-shadow: 0 1px 0 #d9d1c3, 0 18px 50px rgba(60,40,10,0.12); }
.theme-paper.page-deep main.content.content-wide { margin: 20px; }
.theme-paper .topbar { background: #f4efe6; border-bottom: 1px solid #1a1a1a; }
.theme-paper .topbar .brand { color: #1a1a1a; font-family: Georgia, "Times New Roman", serif; font-style: italic; letter-spacing: 0.02em; }
.theme-paper .topbar .logout { color: #b3261e; }
.theme-paper .topbar .user-chip { color: #5f5a52; }
.theme-paper .brand3d, .theme-paper .comet-trail { display: none !important; }
.theme-paper .theme-btn { color: #1a1a1a; border-color: #1a1a1a; border-radius: 0; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }

/* шапка главной — как у газеты */
.theme-paper.page-home .content { max-width: 1080px; }
.theme-paper .home-head { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 0 14px;
  border-top: 4px double #1a1a1a; border-bottom: 4px double #1a1a1a; margin-bottom: 26px; }
.theme-paper .home-head::before { content: "ВЕСТНИК · ПАНЕЛЬ ИНСТРУМЕНТОВ · МАРКЕТПЛЕЙСЫ"; font-size: 11px; letter-spacing: 0.32em; color: #5f5a52; }
.theme-paper .home-head h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 5.4vw, 60px); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
.theme-paper .home-date { font-family: Georgia, serif; font-style: italic; font-size: 15px; color: #5f5a52; }
.theme-paper .home-date::before, .theme-paper .home-date::after { content: " ❦ "; color: #b3261e; font-style: normal; }
.theme-paper .theme-pick { position: absolute; right: 0; top: 14px; }
@media (max-width: 700px) { .theme-paper .theme-pick { position: static; } }

/* разделы — заметки в колонках с вертикальными линейками */
.theme-paper .tiles { counter-reset: paper; grid-template-columns: repeat(3, 1fr); gap: 0; grid-auto-flow: dense;
  border-bottom: 1px solid #1a1a1a; }
.theme-paper .tile { counter-increment: paper; background: transparent; border: none; border-radius: 0; box-shadow: none;
  padding: 18px 22px 22px; border-left: 1px solid #cfc6b6; border-top: 1px solid #cfc6b6; color: #1a1a1a; }
.theme-paper .tile:not(.tile-empty):hover { transform: none; background: rgba(179,38,30,0.04); }
.theme-paper .tile::after { content: counter(paper, decimal-leading-zero); position: absolute; top: 18px; right: 20px;
  font-family: Georgia, serif; font-size: 13px; color: #b3261e; }
.theme-paper .tile { position: relative; }
.theme-paper .tile-title { font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 700; line-height: 1.2; margin: 0 28px 8px 0; }
.theme-paper .tile:hover .tile-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.theme-paper .tile-desc { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.5; color: #3d3a35; hyphens: auto; }
/* главная новость — первая плитка на две колонки и две строки */
.theme-paper.page-home .tiles > .tile:first-child { grid-column: span 2; grid-row: span 2; padding: 24px 28px 28px; border-left: none; }
.theme-paper.page-home .tiles > .tile:first-child .tile-title { font-size: 40px; line-height: 1.08; margin-top: 18px; }
.theme-paper.page-home .tiles > .tile:first-child .tile-desc { font-size: 19px; line-height: 1.55; max-width: 520px; }
.theme-paper.page-home .tiles > .tile:first-child::before { content: "ГЛАВНОЕ"; display: inline-block; font-size: 11px; letter-spacing: 0.25em;
  color: #fff; background: #b3261e; padding: 3px 8px; }
.theme-paper.page-home .tiles > .tile:nth-child(3n+1):not(:first-child) { border-left: none; }
/* статусы — как рубрики */
.theme-paper .tile-badge { border: none; border-radius: 0; padding: 0; margin-left: 8px; font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #b3261e; vertical-align: middle; }
.theme-paper .tile-dev { border-style: none; border-left: 1px solid #cfc6b6; border-top: 1px solid #cfc6b6; }
.theme-paper .tile-dev .tile-title { color: #5f5a52; font-style: italic; }
.theme-paper .tile-empty { display: none; }
.theme-paper .home-eyes { display: none; }
/* «Что нового» — колонка хроники */
.theme-paper .changelog { background: transparent; border: none; border-top: 3px solid #1a1a1a; border-radius: 0; padding: 12px 0 0; margin-top: 30px; }
.theme-paper .changelog-title { font-family: Georgia, serif; font-size: 18px; letter-spacing: 0.04em; text-transform: none; font-style: italic; color: #1a1a1a; }
.theme-paper .changelog-list { font-family: Georgia, serif; font-size: 15px; }
.theme-paper .changelog-list li::before { background: #b3261e; border-radius: 0; width: 5px; height: 5px; }
@media (max-width: 900px) {
  .theme-paper .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .theme-paper .tiles { grid-template-columns: 1fr; }
  .theme-paper.page-home .tiles > .tile:first-child { grid-column: auto; grid-row: auto; }
  .theme-paper .tile { border-left: none; }
}
.theme-paper .content h1 { font-family: Georgia, "Times New Roman", serif; }

/* Остатки (02.11.2026): красным — только оборачиваемость < 5 дн; журнал действий */
#stock-table td.turnover-low { background: rgba(209, 69, 59, 0.12); color: var(--error); font-weight: 600; }
#stock-table td.turnover-low .turnover-buyout { color: var(--error); opacity: 0.8; }
.stock-log { margin: 0 0 14px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; background: var(--card); }
.stock-log summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.stock-log-list { list-style: none; margin: 8px 0 2px; padding: 0; max-height: 280px; overflow-y: auto; font-size: 13px; line-height: 1.6; }
.stock-log-list li { padding: 2px 0; border-bottom: 1px solid var(--border); }
.stock-log-list li:last-child { border-bottom: none; }
.stock-log-list .log-when { color: var(--muted); margin-right: 10px; font-variant-numeric: tabular-nums; }
.stock-log-list .log-who { font-weight: 600; margin-right: 8px; }
.stock-log-list li.log-err { color: var(--error); }

/* Остатки (02.11.2026): склады цветом, калькулятор, ФФ из таблиц */
#stock-table th.wh-fulmart, #stock-table td.wh-fulmart { background: #fde4ee; }
#stock-table th.wh-krv, #stock-table td.wh-krv { background: #e2eefc; }
#stock-table td.fbs-edit input[type=text] { width: 72px; }
#stock-table td.calc-bad input { border-color: var(--error); }
#stock-table td.ff-ro { text-align: center; }
.stock-log ul { margin: 6px 0 0; padding-left: 18px; }

/* Оборачиваемость по артикулам (02.11.2026) */
#to-table { width: auto; min-width: 560px; }
#to-table td.turnover { text-align: right; min-width: 170px; font-variant-numeric: tabular-nums; }
#to-table td.turnover > div:first-child { font-size: 17px; font-weight: 600; }
#to-table td.turnover-low { background: rgba(209, 69, 59, 0.12); color: var(--error); }
#to-table td.turnover-idle { color: var(--muted); }
#to-table .turnover-buyout { font-size: 12px; color: var(--muted); }
#to-table .turnover-meta { font-size: 11px; color: var(--muted); opacity: 0.8; }
#to-table th.to-sortable { cursor: pointer; user-select: none; }
#to-table th.to-sortable[data-dir]:not([data-dir=""])::after { content: " " attr(data-dir); }
#to-table th.th-wrap { white-space: pre-line; line-height: 1.25; }
.controls .ms-btn, .controls .ms-btn:hover { background: var(--card, #fff); color: var(--text); border: 1px solid var(--border); padding: 8px 30px 8px 10px; font-weight: normal; }
.controls .ms-btn.is-set { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
#to-table tr.to-art { cursor: pointer; }
#to-table tr.to-art td:nth-child(2) { font-weight: 600; white-space: nowrap; }
#to-table td.to-home, #to-table th.to-home-th { text-align: center; width: 70px; cursor: default; }
#to-table td.to-home input { width: 16px; height: 16px; cursor: pointer; }
#to-table .to-caret { display: inline-block; width: 12px; color: var(--muted); }
#to-table tr.to-size td { background: rgba(127,127,127,0.05); font-size: 13px; }
#to-table tr.to-size td:first-child { padding-left: 34px; color: var(--muted); }
#to-table tr.to-size td.turnover > div:first-child { font-size: 14px; }
#to-table td.to-stock { white-space: nowrap; font-variant-numeric: tabular-nums; }
#to-table .to-mp { display: inline-block; min-width: 38px; color: var(--muted); font-size: 12px; }
#to-table tfoot tr.to-total td { border-top: 2px solid var(--border); font-weight: 600; background: rgba(127,127,127,0.06); }
/* Оборачиваемость: таблица по центру (02.11.2026) */
#to-table { margin: 0 auto; }
#to-table td.to-rub { text-align: right; }

/* ================= Навигация (03.11.2026, тестово у главного администратора) ================= */
.side-nav { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 6; overflow-y: auto; padding: 64px 10px 20px;
  background: var(--nav-bg, #fff); color: var(--nav-text, #1c1e21); border-right: 1px solid var(--nav-border, #e3e5e8);
  box-sizing: border-box; transition: width .15s ease; }
.side-nav-head { position: relative; margin-top: 10px; }
/* кнопка закрепления — поверх строки «Главная», не отнимает у неё место: в свёрнутом меню подсветка не сжимается */
.side-nav-head .side-nav-toggle { position: absolute; right: 0; top: 50%; margin-top: -12px; }
.side-nav-head .side-nav-home { margin: 0; width: calc(100% - 32px); min-width: 36px; box-sizing: border-box; }
.side-nav-toggle { flex-shrink: 0; background: none; border: 1px solid var(--nav-border, #e3e5e8);
  color: inherit; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
.side-nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--nav-muted, #8a8f98); margin: 16px 10px 4px; }
.side-nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: inherit;
  text-decoration: none; font-size: 14px; white-space: nowrap; }
.side-nav-item:hover { background: var(--nav-hover, rgba(0,0,0,0.05)); }
.side-nav-item.is-active { background: var(--nav-active, rgba(47,111,237,0.12)); font-weight: 600; }
.side-nav-ic { width: 20px; text-align: center; flex-shrink: 0; }
.side-nav-item { min-width: 0; }
.side-nav-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.has-side-nav .topbar { position: relative; z-index: 7; }
body.has-side-nav main.content { margin-left: calc(250px + max(0px, (100vw - 250px - 960px) / 2)); }
body.has-side-nav main.content.content-wide { margin-left: 270px !important; }
/* 03.11.2026: по умолчанию меню свёрнуто до значков и плавно выезжает при наведении (поверх страницы),
   заезжает обратно, когда курсор уходит. Кнопка ⟨/⟩ — закрепить открытым. */
.side-nav { overflow-x: hidden; }
body.side-nav-ready .side-nav { transition: width .4s cubic-bezier(.4, 0, .2, 1), box-shadow .4s ease; }
body.side-nav-collapsed .side-nav { width: 56px; }
body.side-nav-collapsed .side-nav:hover { width: 250px; box-shadow: 6px 0 24px rgba(0,0,0,0.14); transition-delay: .1s; }
.side-nav-t, .side-nav-group, .side-nav-toggle { transition: opacity .3s ease; }
body.side-nav-collapsed .side-nav:not(:hover) .side-nav-t,
body.side-nav-collapsed .side-nav:not(:hover) .side-nav-group,
body.side-nav-collapsed .side-nav:not(:hover) .side-nav-toggle { opacity: 0; pointer-events: none; }
.side-nav-group, .side-nav-t { white-space: nowrap; }
body.side-nav-collapsed.has-side-nav main.content { margin-left: calc(56px + max(0px, (100vw - 56px - 960px) / 2)); }
body.side-nav-collapsed.has-side-nav main.content.content-wide { margin-left: 76px !important; }
body.has-side-nav .brand3d, body.has-side-nav .comet-trail { display: none !important; }
@media (max-width: 900px) { .side-nav { display: none; } body.has-side-nav main.content, body.has-side-nav main.content.content-wide { margin-left: auto !important; } }
/* цвета меню под темы */
body.theme-aurora, body.theme-eyes { --nav-bg: #0b0d10; --nav-text: #e9eef3; --nav-border: rgba(255,255,255,0.1); --nav-muted: #8e959c;
  --nav-hover: rgba(255,255,255,0.06); --nav-active: rgba(99,230,190,0.16); }
body.theme-eyes { --nav-bg: #000; --nav-active: rgba(255,255,255,0.12); }
body.theme-glass { --nav-bg: rgba(30,10,70,0.55); --nav-text: #fff; --nav-border: rgba(255,255,255,0.2); --nav-muted: rgba(255,255,255,0.7);
  --nav-hover: rgba(255,255,255,0.1); --nav-active: rgba(255,255,255,0.2); }
body.theme-glass .side-nav { backdrop-filter: blur(16px); }
body.theme-paper { --nav-bg: #f4efe6; --nav-border: #1a1a1a; --nav-active: rgba(179,38,30,0.1); }
body.theme-bento { --nav-bg: #f7f6f3; --nav-border: #e9e7e1; }

/* сводка дня и «Мои блоки» */
.home-summary, .my-blocks { position: relative; z-index: 1; margin: 0 0 22px; }
.home-sec-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.home-sec-at { text-transform: none; letter-spacing: 0; font-weight: normal; margin-left: 6px; }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.summary-card { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.summary-card:hover { border-color: var(--accent); }
.summary-card.lvl-bad { border-left-color: #d1453b; }
.summary-card.lvl-warn { border-left-color: #e8a33d; }
.summary-card.lvl-ok { border-left-color: #2f9e6e; }
.summary-card.lvl-info { border-left-color: var(--accent); }
.summary-value { font-size: 24px; font-weight: 700; line-height: 1.1; }
.summary-card.lvl-bad .summary-value { color: #d1453b; }
.summary-title { font-size: 13px; font-weight: 600; margin-top: 2px; }
.summary-detail { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.summary-loading { color: var(--muted); }
.my-blocks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.my-block { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; border-radius: 999px; text-decoration: none;
  color: var(--text); background: var(--card); border: 1px solid var(--border); font-size: 14px; }
.my-block:hover { border-color: var(--accent); }
.my-block.is-pinned { border-color: var(--accent); }
.pin-btn { background: none; border: none; cursor: pointer; color: #e8a33d; font-size: 15px; padding: 0 2px; line-height: 1; }
.tile { position: relative; }
.tile-pin { position: absolute; top: 10px; right: 12px; opacity: 0.35; }
.tile:hover .tile-pin, .tile-pin[data-pinned="1"] { opacity: 1; }

/* ================= Новая главная (03.11.2026, тестово у главного администратора) ================= */
.home-card { position: relative; z-index: 1; background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; margin: 0 0 18px; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.home-grid .home-card { margin: 0 0 18px; }
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; } }
.sales-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.sales-controls { display: flex; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: none; padding: 5px 10px; cursor: pointer; color: var(--muted); font-size: 13px; }
.seg button.is-on { background: var(--accent); color: #fff; }
.sales-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 10px 0 6px; }
@media (max-width: 900px) { .sales-kpis { grid-template-columns: repeat(3, 1fr); } }
.kpi-t { font-size: 12px; color: var(--muted); }
.kpi-v { font-size: 20px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.kpi-d { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi-d.up { color: #2f9e6e; } .kpi-d.down { color: #d1453b; }
.sales-chart-wrap { position: relative; }
.sales-chart { width: 100%; height: 260px; display: block; }
.mp-dots { position: absolute; top: 2px; left: 56px; display: flex; gap: 6px; z-index: 2; }
.mp-dot { border: 2px solid var(--c); background: var(--card); color: var(--c); border-radius: 999px; min-width: 34px; height: 26px;
  padding: 0 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.mp-dot.is-on { background: var(--c); color: #fff; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-ax { fill: var(--muted); font-size: 11px; }
.ch-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-prev { fill: none; stroke-width: 1.6; stroke-dasharray: 5 5; opacity: .35; }
.ch-o { stroke: var(--accent); } .ch-b { stroke: #2f9e6e; }
.ch-pt { stroke-width: 2; fill: var(--card); }
.ch-area { fill: var(--accent); opacity: .07; stroke: none; }
.ch-hover { stroke: var(--muted); stroke-dasharray: 2 3; }
.sales-tip { position: absolute; top: 40px; width: auto; min-width: 200px; background: var(--tip-bg, #fff); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); pointer-events: none; z-index: 3; }
.sales-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.lg { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.lg-o { background: var(--accent); } .lg-b { background: #2f9e6e; }
.lg-prev { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); opacity: .6; }
.ship-row { margin: 0 0 12px; }
.ship-head { display: flex; justify-content: space-between; font-size: 14px; }
.ship-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 5px 0 3px; }
.ship-bar i { display: block; height: 100%; background: #2f9e6e; }
.ship-total { font-size: 13px; border-top: 1px solid var(--border); padding-top: 8px; }
.movers-box { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mv-h { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.mv-h.up { color: #2f9e6e; } .mv-h.down { color: #d1453b; }
.mv-row { display: flex; gap: 6px; align-items: baseline; font-size: 13px; padding: 2px 0; }
.mv-art { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reviews-top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.reviews-avg { min-width: 120px; text-align: center; }
.reviews-num { font-size: 34px; font-weight: 700; line-height: 1; }
.reviews-stars { color: #e8a33d; letter-spacing: 1px; }
.review-form { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.review-form textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.review-form button[type=submit] { align-self: flex-start; }
.review-stars button { background: none; border: none; font-size: 24px; color: var(--border); cursor: pointer; padding: 0 1px; }
.review-stars button.is-on { color: #e8a33d; }
.reviews-list { margin-top: 12px; max-height: 360px; overflow-y: auto; }
.review { border-top: 1px solid var(--border); padding: 8px 0; font-size: 14px; }
.review-head { margin-bottom: 2px; }
.home-card .status { font-size: 12px; min-height: 0; }
.review-form button[type=submit] { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 8px 16px;
  cursor: pointer; font: inherit; font-size: 14px; }
.review-form textarea { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; background: var(--card); color: var(--text); }
.hstock-main { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .hstock-main { grid-template-columns: 1fr; } }
.hstock-num { font-size: 26px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.hstock-num span { font-size: 15px; font-weight: 600; color: var(--muted); }
.hstock-split { font-size: 13px; line-height: 1.7; }
.hstock-cats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.hstock-cat { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px; padding: 4px 11px;
  font-size: 13px; cursor: pointer; }
.hstock-cat b { color: var(--muted); font-weight: 600; margin-left: 3px; }
.hstock-cat:hover { border-color: var(--accent); }
.hstock-cat.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.hstock-cat.is-on b { color: #fff; }
/* «Доступы» */
.acc-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .acc-wrap { grid-template-columns: 1fr; } }
.acc-users { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 8px; max-height: 70vh; overflow-y: auto; }
.acc-users input { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.acc-user { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; }
.acc-user:hover { background: rgba(0,0,0,0.05); }
.acc-user.is-on { background: var(--accent); color: #fff; }
.acc-user .status { font-size: 12px; min-height: 0; }
.acc-user.is-on .status { color: #fff; }
.acc-panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.acc-block { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.acc-block:last-of-type { border-bottom: none; }
.acc-block .status { margin-left: auto; font-size: 12px; min-height: 0; }
.acc-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 2px; }
.acc-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.acc-actions button { font: inherit; padding: 7px 14px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.acc-actions button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.acc-users input[type=search] { border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font: inherit; background: var(--card); color: var(--text); }

.idle-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.idle-sum { display: flex; gap: 28px; flex-wrap: wrap; margin: 8px 0 10px; }
.idle-list { display: grid; grid-template-columns: 1fr auto auto; gap: 3px 16px; font-size: 13px; font-variant-numeric: tabular-nums; }
.idle-list .h { color: var(--muted); font-size: 12px; }
.idle-list .r { text-align: right; white-space: nowrap; }

/* бот документов: тумблер (03.11.2026) */
.md-power { display: flex; align-items: center; gap: 14px; }
.md-power.is-off { border-color: #d1453b; background: rgba(209, 69, 59, 0.06); }
.md-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.md-switch input { opacity: 0; width: 0; height: 0; }
.md-slider { position: absolute; inset: 0; background: #c4c8cf; border-radius: 13px; transition: background .15s; }
.md-slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.md-switch input:checked + .md-slider { background: #2f9e6e; }
.md-switch input:checked + .md-slider::before { transform: translateX(20px); }

/* плитки на главной — только на узком экране, где боковое меню скрыто (03.11.2026) */
.home-tiles-mobile { display: none; }
@media (max-width: 900px) { .home-tiles-mobile { display: block; } }

/* карточка сводки со слайдами (03.11.2026): «< 5 дн» / «> 35 дн» */
.summary-slides { position: relative; overflow: hidden; }
.summary-tabs { display: flex; gap: 4px; margin: -2px 0 6px; }
.summary-tab { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; white-space: nowrap; }
.summary-tab.is-on { color: var(--text); border-color: currentColor; }
.summary-tab.is-on.lvl-bad { color: #d1453b; } .summary-tab.is-on.lvl-warn { color: #e8a33d; } .summary-tab.is-on.lvl-ok { color: #2f9e6e; }
.summary-track { display: grid; }
.summary-slide { grid-area: 1 / 1; opacity: 0; transform: translateX(18px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.summary-slide.is-on { opacity: 1; transform: none; pointer-events: auto; }
.summary-slide[data-level="bad"] .summary-value { color: #d1453b; }
.summary-slide[data-level="warn"] .summary-value { color: #e8a33d; }
.hstock-nocost { color: #e8a33d; cursor: help; border-bottom: 1px dotted currentColor; }
.hstock-cats .link-button { font-size: 13px; }

/* подсказка графика — непрозрачная, поверх линий (03.11.2026) */
body.theme-aurora, body.theme-eyes, body.theme-glass { --tip-bg: #15181d; }
.sales-tip { z-index: 5; }
.sales-tip div { white-space: nowrap; }
/* «Сегодня» над графиком */
.sales-today { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 10px 0 2px; padding: 8px 12px;
  border-radius: 10px; background: rgba(127, 127, 127, 0.08); }
.st-h { font-weight: 700; }
.st-v b { font-size: 18px; }
.st-w { margin-left: auto; font-size: 12px; }


/* ================= Тёмные темы внутри разделов (03.11.2026) =================
   «Северное сияние» и «Тёмная» теперь не только на главной: таблицы, поля, кнопки, всплывающие окна —
   в тёмных тонах. Спокойно: без анимаций и свечения, плотные фоны (таблицы читаются как в светлой),
   цветные пометки — приглушённые полупрозрачные, а не яркие пастельные плашки. */
body:is(.theme-aurora, .theme-eyes) { color-scheme: dark; --text: #e6eaee; --muted: #959ea8; --error: #ff6b61;
  --grid-line: rgba(255,255,255,0.08); --tip-bg: #15181d; --hover: rgba(255,255,255,0.05);
  --tint-yellow: rgba(232,163,61,0.18); --tint-blue: rgba(77,141,247,0.18); --tint-green: rgba(47,158,110,0.2);
  --tint-red: rgba(209,69,59,0.2); --tint-pink: rgba(230,90,150,0.16); --tint-gray: rgba(255,255,255,0.07); }
body.theme-aurora { --bg: #07090d; --card: #0e1217; --raise: #151a20; --border: rgba(150,242,215,0.13); --accent: #63e6be; --accent-ink: #062a20; }
body.theme-eyes { --bg: #000; --card: #0c0c0e; --raise: #161719; --border: rgba(255,255,255,0.12); --accent: #4dabf7; --accent-ink: #03121f; }
/* на главной и в разделах-плитках карточки остаются полупрозрачными поверх фона темы */
body.theme-aurora:not(.page-deep), body.theme-eyes:not(.page-deep) { --card: rgba(255,255,255,0.05); }
body:is(.theme-aurora, .theme-eyes) a:not([class]) { color: var(--accent); }
body:is(.theme-aurora, .theme-eyes).page-deep main.content { background: transparent; box-shadow: none; }

/* таблицы */
body:is(.theme-aurora, .theme-eyes) .price-table { background: var(--card); }
body:is(.theme-aurora, .theme-eyes) .price-table th { background: var(--raise); }
body:is(.theme-aurora, .theme-eyes) .econ-table th.econ-pin { background: var(--raise); }
body:is(.theme-aurora, .theme-eyes) :is(.sp-table .sp-label) { background: var(--raise); }
body:is(.theme-aurora, .theme-eyes) :is(.sp-table tr.sp-total td, .sp-table tr.sp-total th, #str-table tr.str-total td, #fn-table tr.fn-total td) { background: var(--tint-gray); }
body:is(.theme-aurora, .theme-eyes) #str-table tr.str-total td { border-top-color: var(--border); }
body:is(.theme-aurora, .theme-eyes) #fn-table tr.fn-size td { color: var(--muted); }

/* поля ввода и выпадающие списки */
/* :where — низкий приоритет: свои подсветки полей (ошибка, изменено) остаются */
body:is(.theme-aurora, .theme-eyes) :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) {
  background-color: var(--raise); color: var(--text); border-color: var(--border); }
body:is(.theme-aurora, .theme-eyes) :is(input, textarea)::placeholder { color: #6c757d; }
body:is(.theme-aurora, .theme-eyes) .econ-settings-field input { background: var(--tint-yellow); }
body:is(.theme-aurora, .theme-eyes) :is(#stock-table td.fbs-changed input, #ff-table td.ff-missing input) { background: var(--tint-yellow); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) #ff-table td.ff-nosku input { background: var(--tint-red); }
body:is(.theme-aurora, .theme-eyes) .econ-ovr-cell .econ-ovr:is(:hover, :focus) { background: var(--raise); color: var(--text); border-color: var(--border); }

/* кнопки: на светлом акценте — тёмный текст */
body:is(.theme-aurora, .theme-eyes) :is(.login-card button, .controls button, .fbs-confirm button):not(.btn-secondary):not(.link-button):not(.ms-btn) { color: var(--accent-ink); }
body:is(.theme-aurora, .theme-eyes) :is(.review-form button[type=submit], .acc-actions button.primary, .seg button.is-on, .hstock-cat.is-on, .acc-user.is-on) { color: var(--accent-ink); }
body:is(.theme-aurora, .theme-eyes) .hstock-cat.is-on b, body:is(.theme-aurora, .theme-eyes) .acc-user.is-on .status { color: var(--accent-ink); }
body:is(.theme-aurora, .theme-eyes) .acc-actions button:not(.primary) { background: var(--raise); }

/* цветные пометки — приглушённые */
body:is(.theme-aurora, .theme-eyes) #stock-table td.wh-fulmart { background: var(--tint-pink); }
body:is(.theme-aurora, .theme-eyes) #stock-table td.wh-krv { background: var(--tint-blue); }
/* шапка закреплена при прокрутке — её фон должен быть непрозрачным, иначе под ней видно строки */
body:is(.theme-aurora, .theme-eyes) #stock-table th.wh-fulmart { background: linear-gradient(var(--tint-pink), var(--tint-pink)), var(--raise); }
body:is(.theme-aurora, .theme-eyes) #stock-table th.wh-krv { background: linear-gradient(var(--tint-blue), var(--tint-blue)), var(--raise); }
body:is(.theme-aurora, .theme-eyes) :is(#stock-table td.wh-mismatch, #stock-table .fbs-total-hint, .ff-warn, .ff-warn a, .sp-table .sp-plan-diff, .sp-order-used, .sp-ff-none, .pr-auto, .sp-mp-badge-warn) { color: #e8a33d; }
body:is(.theme-aurora, .theme-eyes) :is(.dp-options li.dp-chosen, .dp-options li.dp-chosen-extra, .oz-slot, .pair-up, #fn-table .fn-sold) { color: #5fd39a; }
body:is(.theme-aurora, .theme-eyes) .pr-below { color: var(--error); }
body:is(.theme-aurora, .theme-eyes) :is(.sp-week-past .sp-week-title, .oz-supply .muted, .sp-order-ff, .sp-order-empty) { color: var(--muted); }
body:is(.theme-aurora, .theme-eyes) .sp-table td.sp-note { background: var(--tint-yellow); }
body:is(.theme-aurora, .theme-eyes) .sp-table td.sp-note:hover { background: rgba(232,163,61,0.26); }
body:is(.theme-aurora, .theme-eyes) .sp-table select[data-status="Отгружена"] { background: var(--tint-yellow); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .sp-table select[data-status="В пути"] { background: var(--tint-blue); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .sp-table select[data-status="Принята"] { background: var(--tint-green); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .sp-table select[data-status="Принята с расхождениями"] { background: var(--tint-red); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .sp-pick-btn { background: var(--tint-yellow); color: var(--text); border-color: rgba(232,163,61,0.5); }
body:is(.theme-aurora, .theme-eyes) .sp-mp-state { background: var(--tint-gray); color: var(--text) !important; }
body:is(.theme-aurora, .theme-eyes) .sp-mp-state:is([data-state=DATA_FILLING], [data-state=REPORTS_CONFIRMATION_AWAITING], [data-state=WB_1], [data-state=WB_2]) { background: var(--tint-yellow); }
body:is(.theme-aurora, .theme-eyes) .sp-mp-state:is([data-state=READY_TO_SUPPLY], [data-state=WB_3]) { background: rgba(32,201,151,0.18); }
body:is(.theme-aurora, .theme-eyes) .sp-mp-state:is([data-state=ACCEPTED_AT_SUPPLY_WAREHOUSE], [data-state=IN_TRANSIT], [data-state=ACCEPTANCE_AT_STORAGE_WAREHOUSE], [data-state=WB_4], [data-state=WB_6]) { background: var(--tint-blue); }
body:is(.theme-aurora, .theme-eyes) .sp-mp-state:is([data-state=COMPLETED], [data-state=WB_5]) { background: var(--tint-green); }
body:is(.theme-aurora, .theme-eyes) .wb-acc { background: var(--tint-green); color: #5fd39a; }
body:is(.theme-aurora, .theme-eyes) .wb-acc.wb-paid { background: var(--tint-yellow); color: #e8a33d; }
body:is(.theme-aurora, .theme-eyes) .wb-acc.wb-none { background: var(--tint-red); color: var(--error); }
body:is(.theme-aurora, .theme-eyes) .wb-acc.wb-unknown { background: var(--tint-gray); color: var(--muted); }
body:is(.theme-aurora, .theme-eyes) .pr-badge { background: var(--tint-gray); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .pr-badge-on { background: var(--tint-green); color: #5fd39a; }
body:is(.theme-aurora, .theme-eyes) .pr-badge-soon { background: var(--tint-yellow); color: #e8a33d; }
body:is(.theme-aurora, .theme-eyes) .pr-badge-bad { background: var(--tint-red); color: var(--error); }
body:is(.theme-aurora, .theme-eyes) .pr-card-active { border-color: rgba(95,211,154,0.45); }
body:is(.theme-aurora, .theme-eyes) .pair-card { background: var(--card); }
body:is(.theme-aurora, .theme-eyes) .pair-badge { background: var(--tint-blue); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .pair-badge-own { background: var(--tint-yellow); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .fa-warn { background: var(--tint-yellow); border-color: rgba(232,163,61,0.45); color: var(--text); }
body:is(.theme-aurora, .theme-eyes) .md-raw { background: var(--raise); }
body:is(.theme-aurora, .theme-eyes) .sp-week-now { background: var(--accent); color: var(--accent-ink); }
body:is(.theme-aurora, .theme-eyes) .econ-settings { background: var(--tint-gray); }

/* всплывающие окна и меню */
body:is(.theme-aurora, .theme-eyes) :is(.sp-order-pop, .ms-panel, .pr-modal, .theme-menu) { background: var(--raise); color: var(--text); border-color: var(--border); }
body:is(.theme-aurora, .theme-eyes) :is(.ms-all) { border-bottom-color: var(--border); }
body:is(.theme-aurora, .theme-eyes) :is(.ms-opt:hover, .acc-user:hover, .theme-opt:hover, .sp-order-item:hover) { background: var(--hover); }
body:is(.theme-aurora, .theme-eyes) .ms-search { border-color: var(--border); }
/* внутри разделов — без движущегося неба и звёзд: только спокойный неподвижный фон, чтобы ничего не отвлекало от таблиц */
body.theme-aurora.page-deep .home-sky { display: none !important; }
body.theme-aurora.page-deep { background: radial-gradient(1200px 600px at 75% -10%, rgba(116,82,224,0.10), transparent 60%),
  radial-gradient(1000px 500px at 10% 110%, rgba(32,201,151,0.08), transparent 60%), #07090d; background-attachment: fixed; }

/* подсветка «крестом» в таблицах (03.11.2026, static/table-hover.js): строка и столбец под курсором.
   Полупрозрачный слой поверх своего фона ячейки; в пересечении — чуть плотнее. */
:root { --hl: rgba(47, 111, 237, 0.09); }
body:is(.theme-aurora, .theme-eyes) { --hl: rgba(255, 255, 255, 0.06); }
/* слоем-тенью внутри ячейки, а не фоном — фон ячейки (и непрозрачный фон закреплённой шапки) не трогаем */
table tbody tr:hover > :is(td, th), table :is(td, th).hl-col { box-shadow: inset 0 0 0 9999px var(--hl); }
table tbody tr:hover > .hl-col { box-shadow: inset 0 0 0 9999px var(--hl), inset 0 0 0 9999px var(--hl); }
table thead th.hl-col { box-shadow: inset 0 0 0 9999px var(--hl), inset 0 0 0 9999px var(--hl), 0 1px 0 var(--border); }

/* ↻ обновить график (04.11.2026) */
.sales-refresh { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--muted);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.sales-refresh:hover { color: var(--text); border-color: var(--accent); }
/* крутится только стрелка, сама кнопка стоит; обновилось — стрелка замирает */
.sales-refresh .sr-ic { display: inline-block; line-height: 1; }
.sales-refresh.is-busy { cursor: default; color: var(--accent); }
.sales-refresh.is-busy .sr-ic { animation: sr-spin 1s linear infinite; }
@keyframes sr-spin { to { transform: rotate(360deg); } }
.tip-mp { font-size: 12px; margin-top: 2px; }

/* ================= «Аналитика» (05.11.2026) ================= */
.an-mp { display: flex; gap: 6px; margin: 6px 0 12px; }
.an-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0 0 8px; }
/* «> label» — только подписи фильтров, не пункты выпадающего списка категорий (галочки — слева, как обычно) */
.an-filters > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.an-filters > label > select, .an-filters > label > input, .an-filters .an-dates input { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); min-width: 150px; }
.an-filters .an-dates { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
.an-filters .an-dates input { min-width: 0; }
.an-wrap { max-height: calc(100vh - 250px); }
.an-table { width: auto; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.an-table th, .an-table td { white-space: nowrap; padding: 7px 10px; font-variant-numeric: tabular-nums; }
.an-table .an-num { text-align: right; }
.an-table .an-wd { font-size: 11px; font-weight: 400; color: var(--muted); }
.an-table th.an-we, .an-table td.an-we:not([style]) { background-color: rgba(127,127,127,0.04); }
/* 09.11.2026: шапка выходных — непрозрачная (иначе при прокрутке сквозь неё видны строки) */
.an-table thead th.an-we { background-color: var(--raise, #fafbfc); background-image: linear-gradient(rgba(127,127,127,0.06), rgba(127,127,127,0.06)); }
/* закреплены слева — название и показатель, справа — «Итого» */
.an-table .an-g { position: sticky; left: 0; z-index: 2; width: 150px; min-width: 150px; max-width: 150px; vertical-align: top;
  background-color: var(--raise, #f6f7f9); border-right: 1px solid var(--border); }
.an-table .an-gname { font-weight: 700; white-space: normal; word-break: break-word; }
.an-table td.an-g .an-wd { white-space: normal; }
.an-table .an-m { position: sticky; left: 150px; z-index: 2; min-width: 150px; background-color: var(--card); border-right: 3px solid var(--border); }
.an-table .an-tot { position: sticky; right: 0; z-index: 2; background-color: var(--card); font-weight: 700; border-left: 2px solid var(--border); }
.an-table thead th.an-g, .an-table thead th.an-m, .an-table thead th.an-tot { z-index: 4; background-color: var(--raise, #fafbfc); }
.an-table tr.an-sec td { background-color: var(--raise, #f3f4f7); padding-top: 9px; padding-bottom: 5px; }
.an-table tr.an-sec td.an-g { background-color: var(--raise, #f6f7f9); }
.an-table .an-sec-t { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background-color: var(--raise, #f3f4f7) !important; }
body:is(.theme-aurora, .theme-eyes) { --heat-a: 0.26; }
.an-table td.an-g-cont { border-bottom-color: transparent; }
.an-table tr.an-sec.an-first td.an-g { border-top: 2px solid var(--border); }
/* кнопки-переключатели внутри панели фильтров в тёмных темах — обычный цвет, тёмный текст только у выбранной */
body:is(.theme-aurora, .theme-eyes) .controls .seg button:not(.is-on):not(.ms-btn) { color: var(--muted); }
.an-statusbar { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 0 0 8px; }
.an-statusbar .status { margin: 0; }
.an-statusbar .sales-refresh { flex-shrink: 0; }
.an-table.is-loading { opacity: .55; transition: opacity .15s; }

/* второе окно подразделов в боковом меню (05.11.2026) */
.side-nav-more { margin-left: auto; color: var(--nav-muted, #8a8f98); font-size: 15px; }
body.side-nav-collapsed .side-nav:not(:hover) .side-nav-more { opacity: 0; }
body.side-nav-collapsed.side-nav-hold .side-nav { width: 250px; box-shadow: 6px 0 24px rgba(0,0,0,0.14); }
body.side-nav-collapsed.side-nav-hold .side-nav .side-nav-t, body.side-nav-collapsed.side-nav-hold .side-nav .side-nav-group,
body.side-nav-collapsed.side-nav-hold .side-nav .side-nav-toggle { opacity: 1; pointer-events: auto; }
.side-sub { position: fixed; left: 254px; z-index: 8; min-width: 190px; padding: 8px; border-radius: 12px;
  background: var(--nav-bg, #fff); color: var(--nav-text, #1c1e21); border: 1px solid var(--nav-border, #e3e5e8);
  box-shadow: 0 10px 30px rgba(0,0,0,0.16); opacity: 0; transform: translateX(-10px); pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.4, 0, .2, 1); }
.side-sub.is-open { opacity: 1; transform: none; pointer-events: auto; }
.side-sub-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--nav-muted, #8a8f98); margin: 2px 8px 6px; }
.side-sub-item { display: block; padding: 7px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 14px; white-space: nowrap; }
.side-sub-item:hover { background: var(--nav-hover, rgba(0,0,0,0.05)); }
.side-sub-item.is-active { background: var(--nav-active, rgba(47,111,237,0.12)); font-weight: 600; }
@media (max-width: 900px) { .side-sub { display: none; } }
/* «Аналитика»: вкладки, План/Факт (05.11.2026) */
.an-tabs { display: flex; gap: 4px; margin: -6px 0 14px; border-bottom: 1px solid var(--border); }
.an-tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.an-tabs a:hover { color: var(--text); }
.an-tabs a.is-on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.pf-table th, .pf-table td { white-space: nowrap; padding: 7px 10px; font-variant-numeric: tabular-nums; }
.pf-table .an-num { text-align: right; }
.pf-table th.pf-grp { text-align: center; border-left: 2px solid var(--border); }
.pf-table .pf-name { position: sticky; left: 0; background-color: var(--card); z-index: 1; min-width: 180px; }
.pf-table thead .pf-name { background-color: var(--raise, #fafbfc); z-index: 3; }
.pf-table tr.pf-total td { border-top: 2px solid var(--border); font-weight: 600; background-color: var(--raise, #fafbfc); }
.pf-ok { color: #2f9e6e; font-weight: 600; } .pf-warn { color: #e8a33d; font-weight: 600; } .pf-bad { color: #d1453b; font-weight: 600; }
.pf-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 18px; }
@media (max-width: 1000px) { .pf-cards { grid-template-columns: repeat(2, 1fr); } }
.pf-card { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.pf-card.pf-l-ok { border-left-color: #2f9e6e; } .pf-card.pf-l-warn { border-left-color: #e8a33d; } .pf-card.pf-l-bad { border-left-color: #d1453b; }
.pf-big { font-size: 26px; font-weight: 700; line-height: 1.25; }
.pf-bar { position: relative; height: 7px; background: var(--border); border-radius: 4px; margin: 7px 0 5px; overflow: visible; }
.pf-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.pf-bar s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .5; }
.pf-mini { width: 100%; }
.pf-mini td, .pf-mini th { padding: 6px 8px; font-size: 13px; }
.pf-mini .an-num { text-align: right; white-space: nowrap; }
/* «Аналитика → Главная» (05.11.2026) */
.ah-big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 6px 0 14px; }
@media (max-width: 1750px) { .ah-big { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1100px) { .ah-big { grid-template-columns: 1fr; } }
.ah-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.ah-card-t { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.ah-card-body { display: flex; align-items: center; gap: 12px; }
.ah-kv { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ah-kv > div, .pf-kv { border-left: 3px solid var(--border); padding-left: 10px; }
.ah-kv > div:nth-child(1), .ah-kv > div:nth-child(2) { border-left-color: #20c997; }
.ah-v { font-size: 24px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.ah-k { font-size: 12px; color: var(--muted); }
.ah-ring { width: 118px; height: 118px; flex-shrink: 0; }
.ah-ring-bg { fill: none; stroke: var(--border); stroke-width: 12; }
.ah-ring-v { fill: none; stroke-width: 12; stroke-linecap: round; stroke: var(--accent); transition: stroke-dasharray .6s ease; }
.ah-ring-v.ah-ok { stroke: #2f9e6e; } .ah-ring-v.ah-warn { stroke: #e8a33d; } .ah-ring-v.ah-bad { stroke: #d1453b; }
.ah-ring-t { font-size: 22px; font-weight: 700; fill: var(--text); }
.ah-ring-s { font-size: 11px; fill: var(--muted); }
.ah-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0 0 18px; }
@media (max-width: 1200px) { .ah-tiles { grid-template-columns: repeat(3, 1fr); } }
.ah-tile { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.ah-tile-t { font-size: 14px; color: var(--muted); }
.ah-tile-v { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.ah-tile-v > span:first-child { font-size: 20px; font-weight: 600; white-space: nowrap; }
.ah-tile-x { font-size: 15px; color: var(--muted); border-left: 1px solid var(--border); padding-left: 8px; }
.ah-soon { opacity: .5; }
.ah-arrow { font-size: 12px; } .ah-arrow.up { color: #2f9e6e; } .ah-arrow.down { color: #d1453b; }
/* «План/Факт» */
.pf-top { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 14px; margin: 6px 0 14px; }
@media (max-width: 1200px) { .pf-top { grid-template-columns: 1fr; } }
.pf-top .home-card { margin: 0; }
.pf-kpi-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.pf-gs { color: var(--accent); text-decoration: none; font-size: 14px; }
.pf-kpi-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(120px, 44%); gap: 10px; align-items: center; margin-bottom: 4px; }
.pf-kpi-row .ah-v { font-size: clamp(20px, 1.9vw, 32px); overflow: hidden; text-overflow: ellipsis; }
.pf-kpi-row .ah-k { font-size: 13px; }
.pf-gauge { width: 100%; height: auto; max-height: 120px; display: block; }
.pf-gauge .ah-ring-bg, .pf-gauge .ah-ring-v { stroke-width: 18; stroke-linecap: butt; }
.pf-gauge-t { font-size: 30px; font-weight: 700; fill: var(--text); }
.pf-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.pf-lg-plan { background: var(--muted); opacity: .6; }
.pf-chart { width: 100%; height: 220px; display: block; overflow: visible; }
.pf-area { opacity: .35; stroke: none; } .pf-line { fill: none; stroke-width: 2; }
.pf-area.pf-plan { fill: var(--muted); opacity: .25; } .pf-line.pf-plan { stroke: var(--muted); stroke-dasharray: 4 4; }
.pf-area.pf-fact { fill: var(--accent); } .pf-line.pf-fact { stroke: var(--accent); }
.pf-dyn-tabs button { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 14px; padding: 2px 6px; }
.pf-dyn-tabs button.is-on { color: var(--accent); font-weight: 600; }
.pf-table th.pf-g1, .pf-table td.pf-g1 { border-left: 2px solid var(--border); }
.pf-table tr.pf-cat { cursor: pointer; background-color: var(--raise, #fafbfc); }
.pf-table tr.pf-cat td.pf-name { background-color: var(--raise, #fafbfc); }
.pf-table tr.pf-art td.pf-name { padding-left: 34px; }
.pf-soon { color: var(--muted); }
/* «Аналитика → Главная»: кольцо крупнее — на всю высоту карточки, сама карточка не растёт (05.11.2026) */
.ah-card { position: relative; }
.ah-card-body { padding-right: 168px; min-height: 120px; }
.ah-card .ah-ring { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: auto; height: calc(100% - 16px); max-height: 168px; aspect-ratio: 1; }
.ah-ring-t { font-size: 24px; }
@media (max-width: 1100px) { .ah-card .ah-ring { height: 150px; } }
/* «Юнит-экономика» */
.un-kpi { grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1200px) { .un-kpi { grid-template-columns: repeat(3, 1fr); } }
.un-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 8px; }
.un-sort { cursor: pointer; user-select: none; }
.un-sort.is-on { text-decoration: underline; }
.un-common td { color: var(--muted); font-style: italic; }
.un-warn { color: #e8a33d; cursor: help; }
.pf-table td.pf-bad, .un-table td.pf-bad b { color: #d1453b; }
.pf-table .muted { color: var(--muted); font-weight: 400; }
.un-tax { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.un-tax input { width: 48px; padding: 4px 6px; }
.un-tax select { padding: 4px 6px; }
.un-table th, .un-table td { padding: 6px 8px; font-size: 13px; }
.un-table th { white-space: normal; vertical-align: bottom; }
.un-table .un-sep { border-left: 2px solid var(--border); }
/* «Оборачиваемость → Размерная сетка» (06.11.2026) */
.ts-card { margin-top: 18px; }
.ts-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; }
.ts-table { width: 100%; }
.ts-table th, .ts-table td { padding: 5px 8px; font-size: 13px; }
.ts-table thead th:first-child { font-size: 14px; }
.ts-mps { font-weight: 400; color: var(--muted); font-size: 12px; }
.ts-table tfoot td { border-top: 2px solid var(--border); }
.ts-table tr.ts-more .ts-diff { color: #2f9e6e; font-weight: 600; }
.ts-table tr.ts-less .ts-diff { color: #d1453b; font-weight: 600; }
.ts-controls input[type=date] { width: auto; min-width: 140px; }
.ts-upload { cursor: pointer; display: inline-block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); font-size: 14px; }
.ts-upres { color: #2f9e6e; }
.ts-table td.ts-more { color: #2f9e6e; font-weight: 600; }
.ts-table td.ts-less { color: #d1453b; font-weight: 600; }
.ts-table .ts-x { background: rgba(32, 201, 151, .07); }
.ts-table.ts-wide { grid-column: 1 / -1; }
/* 06.11.2026: таблицы размерной сетки — по своей ширине, в ряд с переносом (без растягивания на всю строку) */
.ts-grid { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.ts-table, .ts-table.ts-wide { width: auto; min-width: 440px; flex: 0 0 auto; }
.ts-table th, .ts-table td { white-space: nowrap; }
.ts-table td.an-num, .ts-table th.an-num { min-width: 52px; }
/* размерная сетка: чёткая рамка у каждого артикула, сворачиваемый «доп. закуп» */
.ts-table { border: 2px solid color-mix(in srgb, var(--text) 45%, transparent); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.ts-table thead th { border-bottom: 2px solid color-mix(in srgb, var(--text) 25%, transparent); }
.ts-table .ts-x1 { border-left: 2px solid color-mix(in srgb, #20c997 60%, transparent); }
.ts-xt { border: 1px solid var(--border); background: var(--card); color: var(--accent); border-radius: 6px; padding: 0 6px; font-size: 12px; line-height: 18px; cursor: pointer; }
.ts-xt:hover { background: var(--accent); color: #fff; }
.ts-xc { width: 1%; white-space: nowrap; background: rgba(32, 201, 151, .07); }
/* ластик у фильтров (06.11.2026) */
.flt-clear { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; padding: 0;
  border: none; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; vertical-align: middle; opacity: .7; }
.flt-clear:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); opacity: 1; }
.flt-cap { display: inline-flex; align-items: center; gap: 2px; }
.flt-ic { display: block; opacity: .85; } .flt-clear:hover .flt-ic { opacity: 1; }
.ah-tile-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* фильтр «Метрики» с деревом галочек (09.11.2026) */
.an-filters > .an-flt { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.mt-pick { position: relative; display: inline-block; }
.mt-btn { min-width: 170px; }
.mt-car { display: none; }
.mt-pop { position: absolute; z-index: 1000; top: calc(100% + 4px); left: 0; min-width: 260px; max-height: 360px; overflow-y: auto;
  background: #fff; color: #1c1e21; border: 1px solid #e3e5e8; border-radius: 10px; padding: 6px; box-shadow: 0 12px 34px rgba(0,0,0,0.16); font-size: 14px; }
.mt-pop[hidden] { display: none; }
body:is(.theme-aurora, .theme-eyes) .mt-pop { background: var(--raise); color: var(--text); border-color: var(--border); }
.mt-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; user-select: none; white-space: nowrap; }
.mt-row:hover { background: rgba(0,0,0,0.05); }
body:is(.theme-aurora, .theme-eyes) .mt-row:hover { background: var(--hover); }
.mt-sec { font-weight: 600; } .mt-it { padding-left: 34px; }
.mt-tw { width: 14px; text-align: center; color: var(--muted); }
.mt-all { padding-left: 28px; }
.mt-box { flex: none; width: 15px; height: 15px; border: 1.5px solid var(--muted); border-radius: 4px; position: relative; }
.mt-box.is-on { background: var(--accent); border-color: var(--accent); }
.mt-box.is-on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mt-box.is-mid { border-color: var(--accent); }
.mt-box.is-mid::after { content: ""; position: absolute; left: 3px; top: 6px; width: 6px; height: 2px; background: var(--accent); }

/* «Аналитика → Периоды» (09.11.2026) */
.pr-filters { margin-top: -4px; }
.pr-p2 { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 14px !important; }
.pr-auto { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pr-auto.is-on { border-color: var(--accent); color: var(--accent); }
.pr-table th, .pr-table td { white-space: nowrap; }
.pr-table th.pr-d, .pr-table td.pr-d { font-size: 12.5px; color: var(--muted); }
.pr-table td.pr-up { color: #2f9e6e; } .pr-table td.pr-dn { color: #d1453b; }
.pr-table .un-sep { border-left: 1px solid var(--border); }
.pr-table th.pr-sec, .pr-table td.pr-sec { border-left: 3px solid color-mix(in srgb, var(--muted) 55%, transparent); }
.an-table .an-pin { opacity: .85; }
/* ВЭД: проверка этикеток (09.11.2026) */
.ved-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 10px 0; }
@media (max-width: 1100px) { .ved-grid { grid-template-columns: 1fr; } }
.ved-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.ved-card h2 { font-size: 16px; margin: 0 0 10px; }
.ved-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ved-f input, .ved-f textarea { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.ved-or { font-size: 12px; color: var(--muted); margin: 4px 0 6px; }
.ved-drop { display: block; border: 1.5px dashed var(--border); border-radius: 10px; padding: 14px; text-align: center; cursor: pointer; font-size: 14px; }
.ved-drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ved-drop input { display: none; }
.ved-run { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.ved-run button { font: inherit; font-size: 15px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; }
.ved-run button:disabled { opacity: .5; cursor: wait; }
.ved-sum { font-size: 17px; font-weight: 600; padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; }
.ved-sum.is-bad { background: rgba(209, 69, 59, .12); color: #c03a30; } .ved-sum.is-ok { background: rgba(47, 158, 110, .12); color: #2f9e6e; }
.ved-warn { color: #b7791f; font-size: 14px; margin: 4px 0; }
.ved-file { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; margin: 8px 0; padding: 8px 12px; background: var(--card); }
.ved-file.is-bad { border-left-color: #d1453b; } .ved-file.is-ok { border-left-color: #2f9e6e; } .ved-file.is-warn { border-left-color: #e0a800; }
.ved-file summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ved-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.ved-b { font-size: 12px; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.ved-b.ved-ok { background: rgba(47, 158, 110, .12); color: #2f9e6e; } .ved-b.ved-err { background: rgba(209, 69, 59, .14); color: #c03a30; }
.ved-b.ved-warn { background: rgba(224, 168, 0, .16); color: #a67c00; }
.ved-t { margin: 8px 0; width: 100%; } .ved-t td { padding: 5px 8px; vertical-align: top; } .ved-t tr.ved-err td { color: #c03a30; }
.ved-t td:first-child { width: 18px; } .ved-t td:nth-child(2) { white-space: nowrap; font-weight: 600; width: 200px; }
.ved-lab { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.ved-sum.is-warn { background: rgba(224, 168, 0, .14); color: #a67c00; }
.ved-jh { font-size: 17px; margin: 22px 0 8px; }
.ved-j td { vertical-align: top; } .ved-j .ved-arts { white-space: normal; max-width: 520px; }
.ved-j .ved-jbad { color: #c03a30; font-weight: 600; } .ved-j .ved-jok { color: #2f9e6e; }
.ved-open { font: inherit; font-size: 12px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 7px; background: none; color: var(--accent); cursor: pointer; }
.ved-lab .ved-fok { color: #2f9e6e; } .ved-lab .ved-ferr { color: #c03a30; font-weight: 600; } .ved-lab .ved-fno { color: var(--muted); }
.ved-lab .ved-fok i, .ved-lab .ved-ferr i, .ved-lab .ved-fno i { color: inherit; opacity: .8; }

/* «Аналитика → Реклама» (09.11.2026) */
#ad-big { display: grid; grid-template-columns: minmax(340px, 1.1fr) 2fr; gap: 12px; margin: 0 0 18px; align-items: stretch; }
@media (max-width: 1000px) { #ad-big { grid-template-columns: 1fr; } }
.ad-tiles { grid-template-columns: repeat(3, 1fr); margin: 0; }
.ad-main .ah-v small { font-size: 13px; font-weight: 400; color: var(--muted); }
.ad-mps { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.ad-mp i, .ad-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.ad-grid { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 1100px) { .ad-grid { grid-template-columns: 1fr; } }
.ad-ctl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ad-ctl select { font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.ad-chart { height: 240px; }
.ad-bar { fill: var(--accent); opacity: .55; }
.ad-line { fill: none; stroke: #e8590c; stroke-width: 2; }
.ad-pt { fill: #e8590c; }
.ad-ax-l { fill: #e8590c; opacity: .8; }
.ad-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ad-lg-bar, .ad-lg-line { display: inline-block; width: 14px; height: 8px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.ad-lg-bar { background: var(--accent); opacity: .55; } .ad-lg-line { height: 2px; background: #e8590c; }
.ad-fn { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.ad-col { display: flex; align-items: center; gap: 10px; }
.ad-step { flex: 1; background: var(--accent); color: #fff; border-radius: 8px; padding: 6px 12px; margin: 0 auto; text-align: center; }
.ad-step.w1 { max-width: 100%; } .ad-step.w2 { max-width: 86%; opacity: .9; } .ad-step.w3 { max-width: 72%; opacity: .82; } .ad-step.w4 { max-width: 58%; opacity: .75; }
.ad-step-v { font-size: 18px; font-weight: 700; }
.ad-step-t { font-size: 12px; opacity: .9; }
.ad-step .ah-arrow { background: rgba(255,255,255,.85); border-radius: 6px; padding: 0 4px; }
.ad-conv { text-align: center; font-size: 12px; color: var(--muted); }
.ad-conv b { margin: 0 6px; color: var(--text); }
.ad-cost { width: 130px; flex-shrink: 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; }
.ad-cost b { color: var(--text); font-size: 14px; }
.ad-table th[data-k] { cursor: pointer; }
.ad-table th.is-sort { color: var(--accent); }
.ad-table td.ad-name, .ad-table th.ad-name { text-align: left; min-width: 240px; max-width: 360px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.ad-grp { cursor: pointer; font-weight: 500; }
.ad-grp:hover td { background: rgba(47,111,237,.05); }
.ad-tw { display: inline-block; width: 14px; color: var(--muted); }
.ad-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 28px; }
.ad-child td { font-size: 13px; color: var(--muted); }
.ad-child td.ad-name { padding-left: 36px; }
.ad-table tfoot td { font-weight: 600; border-top: 2px solid var(--border); }
/* «РК детализация» (09.11.2026) */
.ad-detail td.ad-name, .ad-detail th.ad-name { min-width: 230px; }
.ad-detail .ad-sum1 { border-left: 2px solid var(--border); }
.ad-detail tr.ad-sec td { background: var(--raise, #fafbfc); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); cursor: pointer; }
.ad-detail tr.ad-chg td { font-size: 12px; color: var(--muted); padding-top: 2px; padding-bottom: 2px; }
.ad-detail tr.ad-chg td.ad-name { text-align: right; font-style: italic; }
.ad-detail tr.ad-chg td.up { color: #2f9e6e; } .ad-detail tr.ad-chg td.down { color: #d1453b; }
.ad-detail td[style*="hsl"] { color: #1c1e21; }
/* дерево в фильтре (09.11.2026) */
.ms-grp { display: flex; align-items: center; }
.ms-grp[hidden], .ms-kids[hidden] { display: none; }
.ms-tw { width: 18px; flex-shrink: 0; text-align: center; color: var(--muted, #8a8f98); cursor: pointer; font-size: 12px; user-select: none; }
.ms-grp .ms-opt { flex: 1; }
.ms-kid { padding-left: 34px; }
/* «Допоставки» (09.11.2026) */
.rs-page #pf-mp { display: none; }
.rs-ctl { align-items: flex-end; }
.rs-n input { width: 64px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; }
.rs-chk { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 8px; font-size: 14px; }
.rs-chk label { cursor: pointer; }
.rs-table th, .rs-table td { padding: 6px 8px; }
.rs-table th[data-k] { cursor: pointer; white-space: normal; min-width: 64px; font-size: 12px; vertical-align: bottom; }
.rs-table th.is-sort { color: var(--accent); }
.rs-table .rs-name { position: sticky; left: 0; background: var(--card); z-index: 2; text-align: left; min-width: 150px; }
.rs-table thead .rs-name { z-index: 4; background-color: var(--raise, #fafbfc); }
.rs-table .rs-sub { font-weight: 400; color: var(--muted); font-size: 12px; }
.rs-table th.rs-grp { text-align: left; }
.rs-table .rs-g1 { border-left: 2px solid var(--border); }
.rs-table td.rs-red { background: #f4a19a; color: #1c1e21; }
.rs-table td.rs-sup { background: rgba(47,111,237,.06); font-weight: 600; }
.rs-table tr.pf-total td.rs-name { background-color: var(--raise, #fafbfc); }
/* «Допоставки → Заказы по складам» (09.11.2026) */
.rs-subnav { display: flex; gap: 6px; margin: -4px 0 12px; }
.rs-subnav a { padding: 5px 12px; border-radius: 16px; border: 1px solid var(--border); color: var(--muted); text-decoration: none; font-size: 13px; }
.rs-subnav a.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ro-bars { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; }
.ro-bars:empty { display: none; }
.ro-bars-t { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.ro-bar { display: grid; grid-template-columns: minmax(120px, 260px) 1fr 130px; gap: 10px; align-items: center; font-size: 13px; padding: 2px 0; }
.ro-bar-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-bar-b { height: 12px; background: rgba(127,127,127,.12); border-radius: 6px; overflow: hidden; }
.ro-bar-b i, .ro-mini i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.ro-bar-v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ro-more { color: var(--muted); display: block; }
.ro-table th[data-k] { cursor: pointer; } .ro-table th.is-sort { color: var(--accent); }
.ro-table .ro-name { text-align: left; min-width: 220px; position: sticky; left: 0; background: var(--card); }
.ro-table .ro-child { padding-left: 32px; color: var(--muted); }
.ro-grp { cursor: pointer; font-weight: 500; }
.ro-mini { display: inline-block; width: 120px; height: 8px; background: rgba(127,127,127,.12); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.ro-mini2 i { background: #20c997; }
@media (max-width: 700px) { .ro-bar { grid-template-columns: 110px 1fr 90px; } }
/* «Справка» (09.11.2026) */
.rf-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(300px, 1fr) minmax(420px, 1.6fr); gap: 14px; align-items: start; }
@media (max-width: 1200px) { .rf-grid { grid-template-columns: 1fr 1fr; } .rf-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .rf-grid { grid-template-columns: 1fr; } }
.rf-grid .home-card { margin: 0; }
.rf-table { width: 100%; font-size: 13px; }
.rf-table th, .rf-table td { padding: 5px 8px; }
.rf-table tr.rf-mp td { font-weight: 600; background: var(--raise, #fafbfc); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.rf-table td.rf-d { text-align: center; font-variant-numeric: tabular-nums; border-radius: 4px; }
.rf-table td.rf-d.ok { background: #b7e4c7; color: #1c1e21; } .rf-table td.rf-d.bad { background: #f4a19a; color: #1c1e21; cursor: help; }
.rf-table tr.rf-bad td { background: rgba(209,69,59,.12); }
.rf-wrap { max-height: 560px; overflow: auto; }
.rf-ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 8px; }
.rf-ctl input[type=search] { flex: 1; min-width: 180px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; }
/* «Доступы»: право редактировать (10.11.2026) */
.acc-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.acc-row .acc-block { flex: 1; border-bottom: none; }
.acc-edit { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; cursor: pointer; padding: 4px 8px; border: 1px solid var(--border); border-radius: 14px; }
.acc-edit:has(input:checked) { color: var(--accent); border-color: var(--accent); }
/* «Инструкции» (10.11.2026) */
.ins-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.ins-bar input[type=search] { flex: 1; min-width: 200px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; }
.ins-bar select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; }
.ins-add { padding: 8px 14px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
.ins-sec { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin: 18px 0 6px; }
.ins-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; }
.ins-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; flex-wrap: wrap; }
.ins-tw { color: var(--muted); width: 12px; }
.ins-badge { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 10px; padding: 0 7px; }
.ins-tools { margin-left: auto; display: flex; gap: 4px; }
.ins-tools button { font: inherit; font-size: 12.5px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.ins-body { padding: 0 14px 14px 34px; }
.ins-text { line-height: 1.55; margin-bottom: 10px; }
.ins-video { position: relative; width: 100%; max-width: 860px; aspect-ratio: 16 / 9; margin: 8px 0; border-radius: 10px; overflow: hidden; background: #000; display: block; }
.ins-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ins-link { display: inline-block; margin: 6px 0; padding: 7px 12px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); text-decoration: none; }
.ins-meta { font-size: 12px; margin-top: 6px; }
.ins-form { background: var(--card); border: 1px solid var(--accent); border-radius: 12px; padding: 14px; margin-bottom: 10px; display: grid; gap: 10px; }
.ins-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.ins-form input, .ins-form textarea { font: inherit; color: var(--text); background: var(--bg, #fff); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.ins-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ins-actions button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--text); cursor: pointer; }
.ins-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 600px) { .ins-body { padding-left: 14px; } .ins-tools { margin-left: 0; width: 100%; } }
/* «Автопополнение РК ВБ» (10.11.2026) */
.ab-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin: 6px 0 10px; }
.ab-main { display: flex; align-items: center; gap: 14px; }
.ab-switch { position: relative; width: 104px; height: 40px; border-radius: 20px; border: none; background: #c9ced6; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.ab-switch.is-on { background: #2f9e6e; }
.ab-switch:disabled { cursor: default; opacity: .7; }
.ab-knob { position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.ab-switch.is-on .ab-knob { left: 68px; }
.ab-lbl { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; font-weight: 700; font-size: 13px; color: #fff; right: 14px; }
.ab-switch.is-on .ab-lbl { right: auto; left: 14px; }
.ab-bal { display: flex; gap: 22px; }
.ab-bal .ah-v { font-size: 20px; }
.ab-table td { vertical-align: middle; }
.ab-table tr.ab-on td { background: rgba(47,158,110,.07); }
.ab-table input[type=number] { width: 100px; text-align: right; }
.ab-table input, .ab-table select { font: inherit; font-size: 13px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--text); }
.ab-table .f-now { font: inherit; font-size: 12.5px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; background: none; color: var(--accent); cursor: pointer; white-space: nowrap; }
.ab-mini { position: relative; display: inline-block; width: 40px; height: 22px; }
.ab-mini input { opacity: 0; width: 0; height: 0; }
.ab-mini span { position: absolute; inset: 0; border-radius: 11px; background: #c9ced6; cursor: pointer; transition: background .2s; }
.ab-mini span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.ab-mini input:checked + span { background: #2f9e6e; }
.ab-mini input:checked + span::after { left: 21px; }
.ab-mini input:disabled + span { cursor: default; opacity: .7; }
.ab-actions { display: flex; gap: 8px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.ab-actions button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--text); cursor: pointer; }
.ab-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ab-h2 { font-size: 16px; margin: 18px 0 6px; }
.ab-log-wrap { max-height: 420px; overflow: auto; }
.ab-log tr.ab-bad td { background: rgba(209,69,59,.08); }
/* 10.11.2026: копирование артикула в «Метриках» и кнопка «Назад» на телефоне */
.an-table .an-gname { cursor: copy; }
.an-table .an-gname.is-copied { color: #2f9e6e; }
.an-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #1c1e21; color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 2000; }
.an-toast.is-on { opacity: .95; transform: translateX(-50%); }
.back-btn { display: none; font: inherit; font-size: 26px; line-height: 1; padding: 0 12px 2px 4px; border: none; background: none; color: var(--accent); cursor: pointer; }
@media (max-width: 760px) { .back-btn { display: inline-block; } }
@media (display-mode: standalone) { .back-btn { display: inline-block; } }
/* «Метрики → Форма 2» и факт STR (10.11.2026) */
.an-forms { margin: 0 0 8px; }
.an-table.an-f2 th.an-f2-h, .an-table.an-f2 th.an-f2-name { cursor: pointer; white-space: normal; min-width: 76px; vertical-align: bottom; }
.an-table.an-f2 tr.an-f2-tot td { font-weight: 700; border-top: 2px solid var(--border); background: var(--raise, #fafbfc); }
.an-table.an-f2 td.an-g { min-width: 140px; }
td.to-str { text-align: right; white-space: nowrap; }
/* автопополнение: защита от опечаток (10.11.2026) */
.ab-table input.f-sum.ab-red { border-color: #d1453b; background: rgba(209,69,59,.08); color: #d1453b; font-weight: 600; }
.ab-conf { font-size: 12px; text-align: right; margin-top: 3px; }
.ab-confirm { display: inline-flex; gap: 4px; align-items: center; color: #b45309; white-space: nowrap; cursor: pointer; }
.ab-err { color: #d1453b; }
.ab-notify { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; font-size: 14px; }
.ab-notify[hidden] { display: none; }
.ab-notify select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--text); max-width: 280px; }
.ab-notify button { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; background: none; color: var(--accent); cursor: pointer; }
/* «Поиск Ozon» (10.11.2026) */
.sq-table th[data-k] { cursor: pointer; }
.sq-table .sq-name { text-align: left; min-width: 200px; }
.sq-art { cursor: pointer; font-weight: 500; }
.sq-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.sq-qhead > td { padding: 0 0 8px 28px !important; background: var(--raise, #fafbfc); }
.sq-qt { width: 100%; border-collapse: collapse; font-size: 13px; }
.sq-qt th, .sq-qt td { padding: 4px 8px; border-bottom: 1px solid var(--border); }
.sq-qt th { color: var(--muted); font-weight: 500; cursor: pointer; text-align: left; }
.sq-qt th.an-num, .sq-qt td.an-num { text-align: right; }
.sq-qt tr.sq-sold td { background: rgba(47,158,110,.09); }
.sq-qt tr.sq-cl { cursor: pointer; }
.sq-qt tr.sq-in td:first-child { padding-left: 32px; color: var(--muted); }
.sq-qt tr.sq-in td { font-size: 12.5px; }
.sq-syn { margin: 0 0 10px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.sq-syn summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.sq-syn textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); margin: 6px 0; }
.sq-syn button { font: inherit; padding: 6px 12px; border-radius: 8px; border: none; background: var(--accent); color: #fff; cursor: pointer; }
.sq-qt td.sq-cpo { font-weight: 600; }
/* «Внешний трафик» (10.11.2026) */
.ex-table th.ex-d, .ex-table td.ex-d { min-width: 2.6rem; padding-left: .3rem; padding-right: .3rem; font-size: .85em; }
.ex-table tr.ex-sub td { background: var(--bg-soft, #f6f8fa); font-size: .9em; }
.ex-table tr.ex-sub td.sq-name { padding-left: 2.2rem; }
.ex-table tr.ex-foreign td.sq-name { color: var(--muted, #6b7280); }
/* «Внешка → Размещения / Блогеры / Медиаплан» (10.11.2026) */
.ext-tabs { margin: 0 0 1rem; }
.ext-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0 0 8px; }
.ext-tools > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ext-tools input, .ext-tools select { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.ext-tools button, .ext-actions button, .ext-ed, .ext-inl button { font: inherit; font-size: 14px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); cursor: pointer; }
.ext-tools button.primary, .ext-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ext-sum { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 1rem; }
.ext-sum > div { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: .55rem .9rem; min-width: 8.5rem; }
.ext-sum .ah-v { font-size: 1.35rem; font-weight: 600; }
.ext-sum .ah-k { color: var(--muted, #6b7280); font-size: .85em; }
.ext-sum .ext-best { font-size: .9em; display: flex; flex-direction: column; justify-content: center; gap: .2rem; }
.ext-form { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1rem; }
.ext-form h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.ext-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem .8rem; }
.ext-grid label { display: flex; flex-direction: column; gap: .2rem; font-size: .85em; color: var(--muted, #6b7280); }
.ext-grid input, .ext-grid select, .ext-grid textarea { font: inherit; font-size: 14px; color: var(--text); background: var(--bg, #fff); width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; }
.ext-grid .w2 { grid-column: span 2; } .ext-grid .w4 { grid-column: 1 / -1; }
.ext-inl { display: flex; gap: .3rem; } .ext-inl select { flex: 1; }
.ext-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .7rem; }
.ext-actions .ext-del { margin-left: auto; color: #c0392b; }
@media (max-width: 760px) { .ext-grid { grid-template-columns: 1fr 1fr; } .ext-grid .w2 { grid-column: 1 / -1; } }
.ext-dt td { vertical-align: top; }
.ext-dt tr.ext-deal { cursor: pointer; }
.ext-dt tr.ext-cancel td { color: var(--muted, #9ca3af); text-decoration: line-through; }
.ext-dt td.ext-cpo { font-weight: 600; }
.ext-dt td.ext-notes { max-width: 16rem; font-size: .85em; color: var(--muted, #6b7280); }
.ext-dt .ext-ed { padding: 2px 8px; }
.ext-st { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .85em; background: #eef2f7; white-space: nowrap; }
.ext-st-agreed { background: #fff3cd; } .ext-st-paid { background: #dbeafe; } .ext-st-out { background: #d1fae5; }
.ext-st-done { background: #2f9e6e; color: #fff; } .ext-st-cancel { background: #f3f4f6; color: #9ca3af; }
.ext-warn { color: #c0392b; font-size: .8em; margin-top: .15rem; }
.ah-v.ext-warn { font-size: 1.35rem; }
.ext-dt tr.ext-chart td { background: var(--bg-soft, #f6f8fa); }
.ext-bars { display: flex; gap: 3px; align-items: flex-end; margin: .5rem 0; overflow-x: auto; padding-bottom: .2rem; }
.ext-bar { display: flex; flex-direction: column; align-items: center; min-width: 2.1rem; font-size: .75em; }
.ext-bar i { display: block; width: 1.4rem; background: #2f9e6e; border-radius: 3px 3px 0 0; }
.ext-bar.is-before i { background: #b6c2cf; }
.ext-bar.is-start i { background: #e0a800; }
.ext-bar.is-start span { font-weight: 700; }
.ext-bar span { color: var(--muted, #6b7280); }
.ext-dt tr.pl-day td { background: #eef2f7; font-weight: 600; }
.ext-dt tr.pl-day.is-today td { background: #fff3cd; }
.ext-dt tr.ext-deal td:first-child { white-space: nowrap; }
/* Внешка v2 (25.11.2026): медиапланы, календарь, результаты, товары блогерам */
.ext-grid .ext-fld { display: flex; flex-direction: column; gap: .2rem; font-size: .85em; color: var(--muted, #6b7280); }
.ext-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .1rem; }
.ext-chip { display: inline-flex !important; flex-direction: row !important; align-items: center; cursor: pointer; }
.ext-chip input { position: absolute; opacity: 0; width: 0 !important; height: 0; }
.ext-chip span { padding: .2rem .6rem; border: 1px solid var(--border, #e5e7eb); border-radius: 999px; color: var(--text); font-size: 13px; background: var(--card, #fff); }
.ext-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.ext-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.ext-chkl { flex-direction: row !important; align-items: center; gap: .35rem !important; font-size: 14px !important; color: var(--text) !important; }
.ext-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-bottom: 1rem; }
.ext-cols h3, #tab-plans > #mp-view > h3 { font-size: 1.05rem; margin: .4rem 0 .5rem; }
@media (max-width: 1000px) { .ext-cols { grid-template-columns: 1fr; } }
.ext-items input { font: inherit; font-size: 14px; width: 100%; min-width: 5rem; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg, #fff); color: var(--text); }
.ext-items td.an-num input { text-align: right; }
.ext-dt tr.ext-tot td { font-weight: 600; border-top: 2px solid var(--border, #e5e7eb); }
.ext-cal { display: flex; flex-wrap: wrap; gap: .8rem; }
.ext-month { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: .5rem .6rem; }
.ext-mname { font-weight: 600; text-transform: capitalize; margin-bottom: .3rem; }
.ext-wd, .ext-days { display: grid; grid-template-columns: repeat(7, 2rem); gap: 2px; }
.ext-wd i { font-style: normal; font-size: .72em; color: var(--muted, #6b7280); text-align: center; }
.ext-day { position: relative; height: 2rem; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13px; padding: 0; }
.ext-day.out { color: var(--muted, #b0b7c0); opacity: .5; }
.ext-day.today { box-shadow: inset 0 0 0 1px #e0a800; }
.ext-day.has { background: #d1fae5; font-weight: 700; cursor: pointer; }
.ext-day.has:hover, .ext-day.is-on { background: #2f9e6e; color: #fff; }
.ext-day sup { position: absolute; top: 1px; right: 3px; font-size: .65em; }
.ext-dayl { margin-top: .6rem; background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: .5rem .8rem; }
.ext-dayl > div { margin-top: .3rem; }
.ext-dt th.ext-vl, .ext-dt td.ext-vl { border-left: 2px solid var(--muted, #9ca3af); }
.ext-nw { white-space: nowrap; }
.ext-dt tr.ext-res { cursor: pointer; }
.ext-dt tr.ext-res.is-on td { background: #eef2f7; }
.ext-res-card { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.ext-res-l { display: flex; flex-direction: column; gap: .35rem; }
.ext-res-l > div { display: flex; justify-content: space-between; gap: .6rem; border-bottom: 1px dashed var(--border, #e5e7eb); padding-bottom: .2rem; }
.ext-res-l span { color: var(--muted, #6b7280); }
.ext-res-l .ext-ed { align-self: flex-start; margin-top: .3rem; }
.ext-res-r { overflow-x: auto; }
.ext-rt th, .ext-rt td { text-align: center; }
.ext-rt td:first-child, .ext-rt th:first-child { text-align: left; }
.ext-up.pos { color: #2f9e6e; font-weight: 600; } .ext-up.neg { color: #c0392b; }
.ext-res-an { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .8rem; }
.ext-res-an h4 { margin: 0 0 .3rem; }
.ext-kv { border-collapse: collapse; width: 100%; background: var(--card, #fff); }
.ext-kv td { padding: .3rem .6rem; border-bottom: 1px solid var(--border, #e5e7eb); }
.ext-kv td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
@media (max-width: 900px) { .ext-res-card, .ext-res-an { grid-template-columns: 1fr; } }
.ext-track input, .ext-track select { font: inherit; font-size: 13px; padding: 3px 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg, #fff); color: var(--text); }
.ext-track td.an-c { text-align: center; }
.ext-dt tr.ext-open td { background: #fff3cd; }
.ext-soon { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; color: var(--muted, #6b7280); }
.ext-soon b { color: var(--text); }
.ext-soon button { font: inherit; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); }
#mp-list:empty { display: none; }
body.xmas-on .ext-dt tr.ext-open td, body.xmas-on .ext-dt tr.ext-res.is-on td { background: rgba(255, 255, 255, .1); }
/* «Анализ категорий Ozon» (11.11.2026) */
.oc-drop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border: 2px dashed var(--border); border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; }
.oc-drop.is-over { border-color: var(--accent); background: rgba(31, 111, 255, .05); }
.oc-drop button.primary, .sq-syn button.primary { background: var(--accent); border: 1px solid var(--accent); color: #fff; border-radius: 8px; padding: 7px 12px; font: inherit; cursor: pointer; }
.oc-filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin: 0 0 10px; }
.oc-f { display: flex; flex-direction: column; gap: 4px; }
.oc-f-wide { flex: 1 1 420px; }
.oc-l { font-size: 12px; color: var(--muted); }
.oc-f input[type=search] { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.oc-chk { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; padding-bottom: 8px; }
.oc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oc-chip { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); cursor: pointer; }
.oc-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.oc-chip small, .seg button small { opacity: .65; }
.oc-rep { margin: 22px 0 10px; }
.oc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.oc-head h2 { margin: 0; font-size: 20px; }
.oc-brand { color: var(--accent); }
.oc-del { margin-left: auto; font: inherit; border: 1px solid var(--border); background: var(--card); color: var(--muted); border-radius: 8px; padding: 2px 9px; cursor: pointer; }
.oc-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0; font-size: 14px; }
.oc-groups { font-size: 13px; gap: 4px 10px; }
.oc-g { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; }
.oc-wrap { max-height: 78vh; overflow: auto; }
.oc-table th { position: sticky; top: 0; z-index: 2; cursor: pointer; white-space: nowrap; font-size: 12px; }
.oc-table tr.oc-frow td { position: sticky; top: 33px; z-index: 2; background: var(--card); padding: 3px 4px; }
.oc-table tr.oc-frow input { width: 100%; min-width: 3.5rem; box-sizing: border-box; font: inherit; font-size: 12px; padding: 3px 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg, #fff); color: var(--text); }
.oc-table td { font-size: 13px; white-space: nowrap; }
.oc-table td.oc-name, .oc-table th.oc-name { position: sticky; left: 0; z-index: 1; background: var(--card); white-space: normal; min-width: 260px; max-width: 340px; }
.oc-table th.oc-name { z-index: 3; }
.oc-table td.oc-name a { color: var(--text); text-decoration: none; } .oc-table td.oc-name a:hover { text-decoration: underline; }
.oc-table .oc-n { color: var(--muted); font-size: 12px; }
.oc-table tr.oc-avg td { background: #eef2f7; color: var(--muted); font-style: italic; }
.oc-sx { white-space: normal !important; min-width: 190px; }
.oc-sx span { white-space: nowrap; }
.oc-sexb, .oc-tagb { display: inline-block; font-size: 11px; border-radius: 999px; padding: 0 7px; margin: 1px 3px 1px 0; background: #eef2f7; }
.oc-sexb { background: #e9d5ff; }
.oc-up { color: #1e8e3e; } .oc-dn { color: #c0392b; }
.oc-more { font: inherit; border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.oc-table tr.oc-grp { cursor: pointer; }
.oc-table tr.oc-size td { background: var(--bg-soft, #f6f8fa); font-size: 12px; }
.oc-table tr.oc-size td.oc-name { padding-left: 2rem; background: var(--bg-soft, #f6f8fa); }
.oc-table td.oc-calc { background: rgba(31, 111, 255, .04); }
.oc-pf { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.oc-tog { font: inherit; font-size: 13px; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 8px; padding: 2px 10px; cursor: pointer; margin-left: auto; }
.oc-tog + .oc-del { margin-left: 0; }
.oc-filters[hidden] { display: none; }
.oc-mgr { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
/* «Анализ конкурентов Ozon»: перестановка и вставка между (11.11.2026) */
.pair-move { position: absolute; top: 8px; right: 44px; display: flex; gap: 4px; }
.pair-move button { font: inherit; font-size: 13px; border: 1px solid var(--border, #ddd); background: var(--card, #fff); color: var(--text); border-radius: 6px; padding: 1px 8px; cursor: pointer; }
.pair-move button:disabled { opacity: .35; cursor: default; }
.pair-insert { display: block; width: 100%; margin: -14px 0 10px; font: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px dashed var(--border, #ddd); border-radius: 8px; padding: 4px; cursor: pointer; opacity: .55; }
.pair-insert:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }
.pair-insert-form { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px; margin: -10px 0 18px; display: grid; gap: 8px; }
.pair-insert-top { margin: 0 0 10px; }
.pair-insert-form button { width: auto; }
/* Снег (11.11.2026) */
.snow-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 4; }   /* под боковым меню (6) и шапкой (5–7), над содержимым */
.snow-btn { font: inherit; font-size: 16px; line-height: 1; border: 1px solid var(--border); background: var(--card, #fff); color: var(--muted); border-radius: 999px; padding: 4px 8px; cursor: pointer; }
.snow-btn.is-on { background: #dbeafe; color: #1f6fff; border-color: #93c5fd; }
/* Новогоднее оформление главной (11.11.2026) */
.xmas-root { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
/* фото — на весь фон страницы (11.11.2026), ёлка — справа от блоков и под ними; где кадра не хватает — тот же ночной цвет */
body.xmas-on { background: #070504; }
.xmas-root { background: #070504; }
.xmas-scene { position: absolute; }
.xmas-scene.is-cut { -webkit-mask: linear-gradient(90deg, transparent 0, #000 14%), linear-gradient(180deg, transparent 0, #000 10%); -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent 0, #000 14%) intersect, linear-gradient(180deg, transparent 0, #000 10%); }
.xmas-far { position: absolute; inset: 0; background-color: #050302; background-repeat: repeat; background-size: 480px auto; filter: blur(.6px) brightness(.95); }
.xmas-img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; }   /* 12.11.2026: без анимации filter — тормозила */
@keyframes xmasBreath { 0%, 100% { filter: brightness(.95) saturate(1.05); } 45% { filter: brightness(1.08) saturate(1.15); } 50% { filter: brightness(1.18) saturate(1.2); } 56% { filter: brightness(1.05) saturate(1.12); } }
/* текст прямо на фоне (заголовки вне карточек) — светлый, чтобы читался на ночном фото */
body.xmas-on:not(.page-deep) .content > h1, body.xmas-on:not(.page-deep) h1, body.xmas-on .home-sec-title, body.xmas-on .home-sec-at, body.xmas-on .side-nav-group { color: #fff7e6; text-shadow: 0 1px 6px rgba(0, 0, 0, .65); }
/* живой свет: тёплое мерцание по силуэту */
.xmas-shine { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .0; animation: xmasShine 9s ease-in-out infinite;
  background: radial-gradient(28% 34% at 50% 55%, rgba(255, 214, 120, .55), transparent 70%), radial-gradient(18% 20% at 46% 30%, rgba(255, 236, 170, .5), transparent 70%); }
@keyframes xmasShine { 0%, 100% { opacity: 0; } 48% { opacity: .15; } 52% { opacity: .65; } 58% { opacity: .2; } }
/* звезда иногда вспыхивает лучами */
.xmas-star { position: absolute; width: 0; height: 0; z-index: 2; }
.xmas-star::before { content: ""; position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 210, .95) 0, rgba(255, 220, 120, .55) 18%, rgba(255, 200, 80, 0) 62%); animation: xmasStar 6s ease-in-out infinite; }
.xmas-star b { position: absolute; left: -90px; top: -1px; width: 180px; height: 2px; background: linear-gradient(90deg, transparent, #fff8d8, transparent);
  animation: xmasRays 6s ease-in-out infinite; }
.xmas-star b::after { content: ""; position: absolute; inset: 0; background: inherit; transform: rotate(90deg); }
@keyframes xmasStar { 0%, 100% { transform: scale(.55); opacity: .5; } 40% { transform: scale(.7); opacity: .65; } 46% { transform: scale(1.25); opacity: 1; } 55% { transform: scale(.75); opacity: .7; } }
@keyframes xmasRays { 0%, 38%, 100% { opacity: 0; transform: rotate(0deg) scaleX(.3); } 46% { opacity: 1; transform: rotate(20deg) scaleX(1); } 56% { opacity: 0; transform: rotate(35deg) scaleX(.5); } }
/* блёстки на ветках */
.xmas-glint { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; opacity: 0; transform: scale(var(--s, 1)); animation: xmasGlint 8s ease-in-out infinite; z-index: 1;
  background: radial-gradient(circle, #fff 0, rgba(255, 240, 190, .9) 18%, transparent 55%),
              linear-gradient(90deg, transparent 44%, rgba(255, 250, 220, .9) 50%, transparent 56%),
              linear-gradient(0deg, transparent 44%, rgba(255, 250, 220, .9) 50%, transparent 56%); }
@keyframes xmasGlint { 0%, 86%, 100% { opacity: 0; transform: scale(calc(var(--s, 1) * .3)) rotate(0deg); } 91% { opacity: 1; transform: scale(calc(var(--s, 1) * 1.1)) rotate(25deg); } 95% { opacity: 0; transform: scale(calc(var(--s, 1) * .5)) rotate(45deg); } }
/* отсвет гирлянды на странице и блоках */
.xmas-light-wash { position: fixed; inset: 0; opacity: .5; animation: xmasWash 9s linear infinite;
  background: radial-gradient(38vw 60vh at calc(100% - 14vw) 62%, rgba(255, 196, 60, .16), transparent 70%),
              radial-gradient(28vw 40vh at calc(100% - 22vw) 40%, rgba(255, 60, 90, .10), transparent 70%),
              radial-gradient(30vw 45vh at calc(100% - 8vw) 80%, rgba(60, 150, 255, .10), transparent 70%); }
@keyframes xmasWash { 0%, 100% { opacity: .45; } 50% { opacity: .7; } }
.xmas-glow { box-shadow: 0 0 0 1px rgba(255, 196, 60, calc(.2 * var(--xg, .5))), 0 8px 30px rgba(255, 196, 60, calc(.32 * var(--xg, .5))); }   /* статично — анимация тени тормозила */
@keyframes xmasGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 196, 60, calc(.18 * var(--xg, .5))), 0 8px 38px rgba(255, 196, 60, calc(.48 * var(--xg, .5))); }
  25% { box-shadow: 0 0 0 1px rgba(255, 70, 90, calc(.16 * var(--xg, .5))), 0 8px 38px rgba(255, 70, 90, calc(.4 * var(--xg, .5))); }
  50% { box-shadow: 0 0 0 1px rgba(70, 160, 255, calc(.16 * var(--xg, .5))), 0 8px 38px rgba(70, 160, 255, calc(.4 * var(--xg, .5))); }
  75% { box-shadow: 0 0 0 1px rgba(80, 220, 130, calc(.16 * var(--xg, .5))), 0 8px 38px rgba(80, 220, 130, calc(.4 * var(--xg, .5))); } }
body.xmas-on main, body.xmas-on .content { position: relative; z-index: 1; }
@media (max-width: 760px) { .xmas-scene .xmas-glint, .xmas-scene .xmas-star { display: none; } }
@media (prefers-reduced-motion: reduce) { .xmas-img, .xmas-shine, .xmas-star::before, .xmas-star b, .xmas-glint, .xmas-light-wash, .xmas-glow { animation: none; } }
.snow-btn.is-heavy { background: #bfdbfe; color: #1d4ed8; border-color: #60a5fa; letter-spacing: -3px; padding-right: 10px; }
body.xmas-on .home-card .home-sec-title, body.xmas-on .home-card .home-sec-at { color: var(--muted); text-shadow: none; }
body.xmas-on .theme-btn { background: var(--card); }
/* Таймер до Нового года (11.11.2026) */
.ny-timer { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 2px; padding: 6px 14px; border-radius: 999px; font-size: 15px;
  background: linear-gradient(90deg, rgba(214, 40, 57, .12), rgba(255, 196, 60, .18)); border: 1px solid rgba(214, 40, 57, .3); color: var(--text); }
.ny-timer b { font-size: 18px; color: #d62839; }
.ny-clock { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .5px; }
body.xmas-on .ny-timer { background: rgba(10, 6, 3, .55); border-color: rgba(255, 210, 120, .45); color: #fff7e6; backdrop-filter: blur(4px); }
body.xmas-on .ny-timer b { color: #ffd23f; }
/* 11.11.2026: с ёлкой блоки почти непрозрачные — фото видно между ними, а цифры читаются */
body.xmas-on:not(.page-deep):not(.xmas-x) { --card: rgba(14, 12, 10, 0.94); --border: rgba(255, 220, 150, 0.16); }
body.xmas-on .home-card, body.xmas-on .summary-card, body.xmas-on .tile { background: var(--card); }   /* 12.11.2026: без backdrop-filter — тормозил со снегом */
.ny-timer[hidden] { display: none; }
body.xmas-on .home-eyes { display: none !important; }   /* «глаза» тёмной темы под ёлкой не нужны */
/* 11.11.2026: ёлка на всех страницах. Страницы с таблицами — содержимое на тёмной почти непрозрачной подложке
   (таблицы в тёмной теме), чтобы всё читалось; вокруг — фото с ёлкой */
body.xmas-on.page-deep main.content { position: relative; z-index: 1; background: rgba(8, 7, 6, .94); border-radius: 18px; margin: 24px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 220, 150, .18); }
body.xmas-on.page-deep main.content.content-wide { margin: 20px 28px; }
/* кнопка «Оформление» — без бегущей полосы */
.theme-btn::before, .theme-btn::after { display: none !important; animation: none !important; }
body.xmas-on .oc-table tr.oc-avg td, body.xmas-on .oc-table tr.oc-size td, body.xmas-on .ext-dt tr.ext-chart td { background: rgba(255, 255, 255, .06); }
body.xmas-on .oc-sexb, body.xmas-on .oc-tagb, body.xmas-on .ext-st { background: rgba(255, 255, 255, .12); color: var(--text, #f1f3f5); }
/* «Метрики»: разбор артикула (11.11.2026) — жёлтая точка и мини-страница */
.an-table td.an-g { position: sticky; }
.ai-dot { position: absolute; top: 9px; right: 6px; width: 11px; height: 11px; border-radius: 50%; background: #ffc53d; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255, 197, 61, .25); animation: aiPulse 2.4s ease-in-out infinite; z-index: 2; }
.ai-dot.is-hot { box-shadow: 0 0 0 2px #e03131, 0 0 0 5px rgba(224, 49, 49, .2); }
@keyframes aiPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.ai-pop { position: fixed; z-index: 1200; width: 440px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--card, #fff); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); padding: 14px 16px 12px; font-size: 13px; }
body.theme-eyes .ai-pop, body.theme-aurora .ai-pop, body.xmas-on .ai-pop { background: #15161a; }
.ai-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ai-head b { font-size: 17px; }
.ai-head span { color: var(--muted); font-size: 12px; }
.ai-x { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ai-k { background: var(--raise, #f6f7f9); border-radius: 9px; padding: 6px 8px; }
body.theme-eyes .ai-k, body.theme-aurora .ai-k, body.xmas-on .ai-k { background: rgba(255, 255, 255, .06); }
.ai-kt { color: var(--muted); font-size: 11px; }
.ai-kv { font-weight: 700; font-size: 15px; }
.ai-kd { font-size: 11px; } .ai-kd span { color: var(--muted); }
.ai-kd.up, .ai-mps .up { color: #2b8a3e; } .ai-kd.dn, .ai-mps .dn { color: #e03131; }
.ai-mps { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 2px; font-size: 12px; color: var(--muted); }
.ai-mps b { color: var(--text); } .ai-mps i { font-style: normal; }
.ai-sec { margin-top: 10px; }
.ai-st { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }
.ai-sec ul { margin: 0; padding-left: 18px; } .ai-sec li { margin: 2px 0; line-height: 1.35; }
.ai-risk .ai-st { color: #e8590c; } .ai-todo .ai-st { color: #1c7ed6; }
.ai-note { margin-top: 8px; color: var(--muted); font-style: italic; }
.ai-foot { margin-top: 10px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--border); padding-top: 6px; }
.ai-dot.is-calm { background: #69db7c; box-shadow: 0 0 0 3px rgba(105, 219, 124, .2); animation: none; }
.ai-ok { color: #2b8a3e; font-style: normal; }
/* Автопополнение РК ВБ: дни недели (12.11.2026) */
.ab-days-td { min-width: 120px; }
.ab-days { display: flex; gap: 2px; margin-top: 4px; }
.ab-day, .ab-dq { font: inherit; font-size: 11px; padding: 2px 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--muted); cursor: pointer; }
.ab-day.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ab-days-q { display: flex; gap: 4px; margin-top: 3px; } .ab-dq { font-size: 10px; padding: 1px 6px; }
.ab-days[hidden], .ab-days-q[hidden] { display: none; }
/* Новогодние забавы (12.11.2026): гирлянды, снежки, снеговики */
.xmas-garland { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 4; }
.xmas-ball { position: absolute; z-index: 5; border-radius: 50%; cursor: grab; user-select: none; --rot: 0deg;
  background: radial-gradient(circle at 35% 30%, #fff 0, #f4f8ff 40%, #d6e2f3 75%, #b7c8e0 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .25), inset -3px -4px 8px rgba(120, 150, 190, .35); }
.xmas-ball.is-drag { cursor: grabbing; z-index: 7; transform: rotate(var(--rot)); }
.xmas-ball::before, .xmas-ball::after { content: ""; position: absolute; pointer-events: none; }
/* голова: глаза, нос-морковка, улыбка */
.xmas-ball.sm-head::before { left: 0; top: 0; right: 0; bottom: 0; border-radius: 50%;
  background: radial-gradient(circle at 36% 40%, #222 0 5%, transparent 6%), radial-gradient(circle at 62% 40%, #222 0 5%, transparent 6%),
    radial-gradient(circle at 38% 68%, #333 0 2.5%, transparent 3.5%), radial-gradient(circle at 46% 73%, #333 0 2.5%, transparent 3.5%),
    radial-gradient(circle at 55% 73%, #333 0 2.5%, transparent 3.5%), radial-gradient(circle at 63% 68%, #333 0 2.5%, transparent 3.5%); }
.xmas-ball.sm-head::after { left: 48%; top: 48%; width: 40%; height: 14%; background: linear-gradient(90deg, #ff922b, #e8590c);
  clip-path: polygon(0 0, 100% 50%, 0 100%); }
/* шляпа-ведро — у снеговика из трёх комов */
.sm-hat-i { position: absolute; left: 20%; bottom: 80%; width: 60%; height: 50%; pointer-events: none;
  background: linear-gradient(180deg, #5c6b7a, #2f3a45); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); border-radius: 3px; }
.sm-hat-i::after { content: ""; position: absolute; left: -12%; right: -12%; bottom: -8%; height: 18%; background: #2f3a45; border-radius: 2px; }
/* туловище: пуговицы и руки-веточки */
.xmas-ball.sm-body::before { left: 46%; top: 22%; width: 8%; height: 60%;
  background: radial-gradient(circle, #222 0 45%, transparent 50%) center top / 100% 33% repeat-y; }
.xmas-ball.sm-body::after { left: -38%; top: 26%; width: 176%; height: 30%;
  background: linear-gradient(160deg, transparent 47%, #6b4423 47% 53%, transparent 53%) left / 30% 100% no-repeat,
              linear-gradient(20deg, transparent 47%, #6b4423 47% 53%, transparent 53%) right / 30% 100% no-repeat; }
.xmas-ball.sm-base::before { left: 46%; top: 30%; width: 8%; height: 40%;
  background: radial-gradient(circle, #222 0 45%, transparent 50%) center top / 100% 50% repeat-y; }
body.xmas-dragging, body.xmas-dragging * { user-select: none !important; }

/* «Аналитика → Сводка за месяц» (16.11.2026) */
.ms-man { margin: 18px 0 28px; }
.ms-man > h2 { margin: 0 0 10px; }
.ms-cat { margin: 0 0 18px; }
.ms-cat > h3 { margin: 0 0 8px; font-size: 15px; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(600px, 1fr)); gap: 14px; }
.ms-mp { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.ms-mp-t { font-weight: 600; margin: 0 0 6px; }
.ms-table td, .ms-table th { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.ms-up { color: #2e9d55; }
.ms-down { color: #d64545; }
.ms-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 6px; }
.ms-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.ms-box h3 { margin: 0 0 8px; font-size: 14px; }
.ms-note { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; }
.ms-note.is-err { outline: 2px solid #d64545; }
@media (max-width: 640px) { .ms-grid { grid-template-columns: 1fr; } }
.ms-groups { margin: 0 0 12px; }
.ms-groups summary { cursor: pointer; color: var(--muted, #888); }
.ms-groups > div { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 0; }
.ms-groups label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.ah-ring-mp { stroke-linecap: butt; cursor: help; transition: stroke-width .15s; }
.ah-ring-mp:hover { stroke-width: 16; }

/* ---------- Телефон (17.11.2026) ---------- */
.tb-narrow { display: none; }
.home-quick[hidden] { display: none; }
.home-quick { display: none; }
@media (max-width: 900px) {
  /* отступ под боковое меню (его на телефоне нет) — правило свёрнутого меню было сильнее */
  body.side-nav-collapsed.has-side-nav main.content, body.side-nav-collapsed.has-side-nav main.content.content-wide { margin-left: auto !important; }
  /* разделы — сразу под приветствием; плитки внизу больше не нужны */
  .home-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
  .hq-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px;
    background: var(--card, #fff); border: 1px solid var(--border); color: var(--text); text-decoration: none; text-align: center;
    font-size: 12px; line-height: 1.25; min-height: 76px; justify-content: center; -webkit-tap-highlight-color: transparent; }
  .hq-item:active { transform: scale(.97); }
  .hq-ic { font-size: 22px; line-height: 1; }
  .hq-t { overflow-wrap: anywhere; }
  body.has-home-quick .home-tiles-mobile { display: none; }
}
@media (max-width: 760px) {
  /* верхняя панель: в одну строку, без вылезания за экран */
  .topbar { gap: 8px; }
  .topbar .brand { font-size: 15px; line-height: 1.2; }
  .topbar-right { gap: 8px; font-size: 14px; flex-shrink: 0; }
  .tb-wide { display: none; }
  .tb-narrow { display: block; }
  /* вкладки аналитики — листаются вбок, а не растягивают страницу */
  .an-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .an-tabs::-webkit-scrollbar { display: none; }
  .an-tabs a { white-space: nowrap; flex-shrink: 0; padding: 8px 10px; }
  /* фильтры: на всю ширину, даты — в одну строку по половине */
  .an-filters { gap: 10px; }
  .an-filters > label { flex: 1 1 140px; min-width: 0; }
  .an-filters > label > select, .an-filters .ms, .an-filters .ms-btn { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
  .an-filters .an-dates { flex: 1 1 100%; flex-wrap: nowrap; }
  .an-filters .an-dates input { flex: 1 1 0; width: 0; min-width: 0; font-size: 14px; }
  .ms { display: block; }
  /* список с галочками — панелью снизу экрана, с кнопкой «Готово» */
  .ms-panel.ms-sheet { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; min-width: 0 !important;
    max-width: none; max-height: 70vh; border-radius: 16px 16px 0 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    z-index: 1001; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
  .ms-sheet .ms-opt { padding: 11px 8px; font-size: 16px; white-space: normal; }
  .ms-sheet .ms-search { font-size: 16px; }
  .ms-done { position: sticky; bottom: 0; display: block; width: 100%; margin-top: 8px; padding: 12px; font: inherit; font-size: 16px;
    font-weight: 600; border: none; border-radius: 10px; background: var(--accent, #2f6fed); color: #fff; }
  .ms-backdrop[hidden] { display: none; }
  .ms-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1000; }
}
@media (min-width: 761px) { .ms-done { display: none; } }
@media (max-width: 760px) {
  /* «Аналитика → Главная»: карточки и плитки не шире экрана */
  .ah-big { grid-template-columns: minmax(0, 1fr); }
  .ah-card, .ah-tile, .home-card { min-width: 0; }
  .ah-card .ah-ring { display: none; }
  .ah-card .ah-kv { padding-right: 0; gap: 10px 12px; }
  .ah-card .ah-v { font-size: 20px; overflow-wrap: anywhere; }
  .ah-card { padding: 12px 14px; }
  .ah-pbar { display: block; margin-top: 12px; }
  .ah-tile-v { flex-wrap: wrap; gap: 2px 6px; }
  .ah-tile-v > span:first-child { font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
  .ah-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status { overflow-wrap: anywhere; }
}
@media (max-width: 760px) {
  .sales-chart { height: 200px; touch-action: pan-y; }
  .back-btn { display: none !important; }   /* 17.11.2026: кнопку «назад» в шапке убрали */
}
.ah-pbar { display: none; }
.ah-pbar-h { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ah-pbar-h b { font-size: 15px; color: var(--text); }
.ah-pbar-t { display: flex; height: 10px; border-radius: 6px; background: var(--border); overflow: hidden; }
.ah-pbar-t i { display: block; height: 100%; background: #2f9e6e; }
.ah-pbar-t i.ah-warn { background: #e8a33d; } .ah-pbar-t i.ah-bad { background: #d1453b; }
.ah-pbar-t i + i { box-shadow: inset 2px 0 0 var(--card, #fff); }
.ah-pbar-lg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ah-pbar-lg b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.pf-mini-plan { font-size: 11px; color: var(--muted); font-weight: normal; }
@media (max-width: 760px) {
  .pf-mini { width: 100%; font-size: 12px; }
  .pf-mini th, .pf-mini td { padding: 6px 4px; }
  #pf-by-mp, #pf-by-man { overflow-x: auto; }
}
@media (max-width: 760px) {
  /* таблицы аналитики: узкий закреплённый первый столбец, плотнее — видно больше цифр */
  .pf-table { font-size: 12px; }
  .pf-table th, .pf-table td { padding: 6px 6px; }
  .pf-table .pf-name { min-width: 0; max-width: 112px; width: 112px; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .pf-table tr.pf-art td.pf-name { padding-left: 14px; }
  .table-wrap { max-height: 72vh; }
  .un-head .status { flex-basis: 100%; font-size: 12px; }
  .un-tax select { max-width: 100%; }
  /* таблица на весь экран (кнопка «⤢ На весь экран» над таблицей) */
  .tw-full-btn { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px; padding: 6px 10px; font: inherit; font-size: 13px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--card, #fff); color: var(--text); }
  .table-wrap.tw-full { position: fixed; inset: 0; z-index: 1500; max-height: none; background: var(--bg, #f5f6f8); padding: 52px 6px 6px; overflow: auto; }
  .tw-close { position: fixed; top: 8px; right: 8px; z-index: 1501; padding: 8px 14px; font: inherit; font-size: 15px; font-weight: 600;
    border: none; border-radius: 10px; background: var(--accent, #2f6fed); color: #fff; }
}
.tw-full-btn, .tw-close { display: none; }
@media (max-width: 760px) { .tw-full-btn { display: inline-flex; } .tw-close { display: block; } .tw-close[hidden] { display: none; } }
.tw-full-btn[hidden] { display: none !important; }
@media (max-width: 760px) {
  /* остальные страницы: ничего не шире экрана (17.11.2026) */
  .un-tax { flex-wrap: wrap; max-width: 100%; }
  .oc-f, .oc-f-wide { flex: 1 1 100%; min-width: 0; }
  .oc-f select, .oc-f input, .oc-f .ms, .oc-f .ms-btn { max-width: 100%; width: 100%; box-sizing: border-box; }
  .uc-wrap { grid-template-columns: minmax(0, 1fr); }
  .uc-res-wrap { position: static; min-width: 0; }
  #uc-form { min-width: 0; }
  .pr-badge { white-space: normal; }
  .wallet-field { flex-wrap: wrap; max-width: 100%; }
  .ff-upload .wallet-field input[type=file] { width: 100%; }
  .controls { flex-wrap: wrap; }
  input, select, textarea { max-width: 100%; }
  h1 { font-size: 26px; }
}
@media (max-width: 760px) {
  .uc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uc-f input, .uc-f select { width: 100%; min-width: 0; box-sizing: border-box; }
  .uc-grid-t { display: block; overflow-x: auto; }
  .uc-top { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .ah-card .ah-card-body { display: block; }
  .ah-card .ah-kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; }
  .ah-card .ah-pbar { display: block; }
  .pf-table .pf-name { min-width: 92px; overflow-wrap: break-word; word-break: normal; hyphens: auto; }
}
@media (max-width: 760px) { .ah-card .ah-card-body { padding-right: 0; min-height: 0; } }
@media (max-width: 760px) { .sales-chart-wrap .mp-dots { position: static; margin: 4px 0 6px; } }
@media (max-width: 760px) {
  /* «Метрики»: закреплённые «Артикул» и «Показатель» — узкие, «Итого» не закреплено справа (17.11.2026) */
  .an-table { font-size: 12px; }
  .an-table th, .an-table td { padding: 6px 6px; }
  .an-table .an-g { width: 76px; min-width: 76px; max-width: 76px; }
  .an-table .an-m { left: 76px; min-width: 104px; max-width: 120px; white-space: normal; line-height: 1.25; }
  .an-table .an-tot { position: static; }
}

/* 17.11.2026: «Допоставки» — раскрытый артикул: заказы по дням и расчёт */
.rs-table td.rs-click { cursor: pointer; }
.rs-table td.rs-click:hover { color: var(--accent, #2563eb); }
.rs-table tr.rs-detail > td { background: var(--bg-soft, #f7f8fa); padding: 8px 10px; text-align: left; }
.rs-dwrap { max-width: calc(100vw - 80px); overflow-x: auto; position: sticky; left: 0; }
.rs-dhint { font-size: 12px; color: var(--muted, #6b7280); margin-bottom: 6px; white-space: normal; }
.rs-dtable { font-size: 12px; width: auto; }
.rs-dtable th, .rs-dtable td { padding: 3px 6px; white-space: nowrap; }
.rs-dtable td.rs-dn { font-weight: 500; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.rs-dtable td.rs-df { color: var(--muted, #4b5563); }
.rs-dtable td.rs-miss { color: #c0392b; }
.rs-snap { font-size: 10px; color: var(--muted, #9ca3af); line-height: 1; }
.rs-ctl label .seg { display: inline-flex; vertical-align: middle; margin-left: 4px; }

/* 17.11.2026: «Аналитика → P&L (ОПиУ)» */
.pl-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0; }
.pl-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: stretch; }
/* 17.11.2026: детализация — высотой с отчёт слева, прокручивается внутри */
.pl-det { position: relative; min-height: 320px; }
.pl-rep .an-wrap { max-height: none; }
.pl-det .pl-dscroll { position: absolute; top: 52px; left: 16px; right: 16px; bottom: 14px; overflow: auto; margin: 0; }
.pl-dtable thead th { position: sticky; top: 0; z-index: 1; }
.pl-card { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.pl-card h3 { margin: 0 0 10px; font-size: 18px; font-weight: 500; }
.pl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pl-head h3 { margin: 0 auto 0 0; }
.pl-f { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 10px; margin: 6px 0; }
.pl-f-t { font-size: 14px; }
.pl-f-b { display: flex; justify-content: center; }
.pl-f-b i { font-style: normal; display: flex; align-items: center; justify-content: center; height: 40px; font-size: 13px; color: #fff; white-space: nowrap; overflow: visible; min-width: 2px; }
.pl-f0 { background: #3e6f99; } .pl-f1 { background: #5b9bd0; } .pl-f2 { background: #94c0e4; color: #1f2937 !important; } .pl-f3 { background: #c8def2; color: #1f2937 !important; }
.pl-f-b i.pl-fneg { background: #e7a3a3; color: #1f2937 !important; }
.pl-ch-t { display: flex; gap: 16px; font-size: 12px; color: var(--muted, #6b7280); margin-bottom: 4px; }
.pl-ch-t i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pl-svg { display: block; max-width: 100%; }
.pl-b1 { fill: #94c0e4; background: #94c0e4; } .pl-b2 { fill: #3e6f99; background: #3e6f99; }
.pl-ax { stroke: var(--border, #d1d5db); stroke-width: 1; }
.pl-lbl { font-size: 10px; fill: var(--muted, #6b7280); text-anchor: middle; }
.pl-ylbl { font-size: 10px; fill: var(--muted, #9ca3af); }
.pl-cfg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; font-size: 14px; }
.pl-cfg label { display: inline-flex; align-items: center; gap: 6px; }
.pl-cfg input { width: 56px; padding: 4px 6px; }
.pl-cfg-t { font-weight: 500; }
.pl-cfg-s { color: var(--muted, #6b7280); font-size: 12px; }
.pl-table td.pl-name, .pl-table th.pl-name { text-align: left; white-space: nowrap; min-width: 240px; }
.pl-table tr.pl-sum td { font-weight: 500; }
.pl-table tr.pl-sub td.pl-name { padding-left: 34px; }
.pl-table tr[data-g] { cursor: pointer; }
.pl-tw { display: inline-block; width: 18px; color: var(--muted, #6b7280); }
.pl-table td.pl-tot, .pl-table th.pl-tot { font-weight: 600; }
.pl-table tr.pl-marg td { border-top: 2px solid var(--border, #d1d5db); }
.pl-table tr.pl-net td { border-top: 2px solid var(--border, #d1d5db); font-weight: 700; }
.pl-table td.pl-neg { color: #c0392b; }
/* 18.11.2026: P&L — строки-проценты, сравнение периодов */
.pl-table tr.pl-pct td { font-size: 12px; color: var(--muted, #6b7280); }
.pl-table tr.pl-pct.pl-sum td { color: inherit; font-weight: 600; font-size: 13px; }
.pl-table td.pl-dcol, .pl-table th.pl-dcol { background: rgba(127, 127, 127, .07); font-size: 12px; }
.pl-table td.pl-up { color: #12804a; } .pl-table td.pl-dn { color: #c0392b; }
body:is(.theme-aurora, .theme-eyes) .pl-table td.pl-up { color: #5fd39a; } body:is(.theme-aurora, .theme-eyes) .pl-table td.pl-dn { color: #ff8a80; }
.pl-cmpbar { margin-top: -2px; }
.pl-cmpbar select { padding: 4px 6px; font: inherit; font-size: 13px; }
.pl-dtable { width: 100%; font-size: 13px; }
.pl-dtable tr.pl-dh td { font-weight: 600; padding-top: 10px; }
.pl-dtable td.pl-di { padding-left: 18px; }
.pl-dq { color: var(--muted, #9ca3af); font-size: 11px; }
@media (max-width: 900px) {
  .pl-top, .pl-main { grid-template-columns: 1fr; }
  .pl-det { min-height: 0; }
  .pl-det .pl-dscroll { position: static; max-height: 70vh; }
  .pl-f { grid-template-columns: 110px 1fr; }
  .pl-table td.pl-name, .pl-table th.pl-name { min-width: 170px; white-space: normal; }
}

/* 17.11.2026: боковое меню на невысоком экране — прокручивается колёсиком/пальцем, но без полосы прокрутки */
.side-nav { scrollbar-width: none; -ms-overflow-style: none; }
.side-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* 17.11.2026: «Остатки и поставки → Регионы» */
:root { --rg-b1: rgba(91, 155, 208, .35); --rg-b2: rgba(56, 196, 170, .35); }
.rg-ctl { align-items: center; }
.rg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; margin-top: 8px; }
.rg-grid .pl-card { padding: 10px 12px; }
.rg-scroll { max-height: 440px; overflow: auto; }
.rg-table { width: 100%; font-size: 13px; }
.rg-table th { cursor: pointer; white-space: nowrap; vertical-align: bottom; line-height: 1.2; }
.rg-table th:first-child { white-space: normal; }
.rg-table td { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.rg-table td:first-child { white-space: normal; min-width: 120px; }
.rg-table tr.rg-row { cursor: pointer; }
.rg-table tr.rg-row:hover td { background: rgba(37, 99, 235, .05); }
.rg-table tr.is-sel td { background: rgba(37, 99, 235, .12) !important; font-weight: 600; }
.rg-table tr.rg-child td:first-child { padding-left: 32px; color: var(--muted, #4b5563); }
.rg-tw, .rg-tw0 { display: inline-block; width: 18px; color: var(--muted, #6b7280); cursor: pointer; }
.rg-table tfoot td { position: sticky; bottom: 0; background: var(--card, #fff); }
body:is(.theme-aurora, .theme-eyes) .rg-table tfoot td { background: var(--raise); }   /* 18.11.2026: в тёмных темах --card полупрозрачный */
.rg-p1 { fill: none; stroke: #5b9bd0; stroke-width: 2; }
.rg-p2 { fill: none; stroke: #6d5bd0; stroke-width: 2; }
.rg-c2 { fill: #6d5bd0; } .rg-c1 { fill: #5b9bd0; }
.rg-hit { fill: transparent; }
.rg-hit:hover { fill: rgba(91, 155, 208, .25); }
.pl-ch-t i.rg-l1 { background: #5b9bd0; } .pl-ch-t i.rg-l2 { background: #6d5bd0; }
.link-btn { background: none; border: 0; color: var(--accent, #2563eb); cursor: pointer; padding: 0 4px; font: inherit; }
@media (max-width: 900px) { .rg-grid { grid-template-columns: 1fr; } }

/* 17.11.2026: «Оборачиваемость» — ещё не приехало (в ячейке «Не найдено») */
#to-table .to-inb { display: block; margin: 3px 0 0 auto; background: none; border: 0; padding: 0; font: inherit; font-size: 11px;
  color: var(--accent, #2563eb); cursor: pointer; white-space: nowrap; }
#to-table .to-inb:hover { text-decoration: underline; }
#to-table .to-inb-in { width: 70px; margin-top: 3px; padding: 2px 4px; font-size: 12px; text-align: right; }

/* 19.11.2026: «Сводка за месяц» — ручная замена проблемных SKU */
.ms-bad-x { width: 28px; text-align: right; }
.ms-bad-rm { background: none; border: none; color: var(--muted, #6b7280); cursor: pointer; font-size: 13px; padding: 0 4px; }
.ms-bad-rm:hover { color: #c0392b; }
.ms-bad-ctl { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ms-bad-ctl select { max-width: 100%; padding: 4px 6px; font: inherit; font-size: 13px; }
.ms-man-tag { font-size: 11px; color: var(--muted, #6b7280); border: 1px solid var(--border, #e5e7eb); border-radius: 6px; padding: 0 5px; }

/* 20.11.2026: «Автопополнение РК ВБ» — особые дни и проверка бюджета */
.ab-table tr.ab-ext > td { background: rgba(127, 127, 127, .05); }
.ab-ext-in { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 4px 8px; font-size: 13px; }
.ab-ext-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ab-ext-row input[type=number] { width: 90px; }
.ab-ext-row .ab-days { margin: 0; }
.ab-day2 { font: inherit; font-size: 11px; padding: 2px 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--muted); cursor: pointer; }
.ab-day2.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ab-ext-hint { font-size: 12px; margin: 0; }
.ab-table .f-ext { font-size: 12px; text-align: left; white-space: normal; max-width: 200px; }

/* 20.11.2026: «Реклама → РК детализация» — артикул → РК → дни */
.ad-view { margin-right: 6px; }
.ad-rk-art td { font-weight: 600; }
.ad-rk-camp td.ad-name { padding-left: 24px; }
.ad-rk-camp .ad-sub { margin-left: 14px; }
.ad-rk-spr td, .ad-rk-day td { font-size: 13px; }
.ad-rk-box > td { padding: 4px 0 10px 24px; }
.ad-rk-scroll { width: 0; min-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.ad-rk-in { margin: 0; }
.ad-rk-in td.ad-name, .ad-rk-in th.ad-name { min-width: 150px; }
.ad-rk-in .ad-rk-g th { text-align: left; font-weight: 600; border-left: 2px solid var(--border); }
.ad-rk-in td.ad-name { background: var(--card); }
.ad-rk-in .ad-rk-per td { font-weight: 600; background: linear-gradient(rgba(127,127,127,.14), rgba(127,127,127,.14)), var(--card); }
.ad-rk-in .ad-rk-hd td { font-size: 12px; color: var(--muted); background: linear-gradient(rgba(47,111,237,.1), rgba(47,111,237,.1)), var(--card); }
.ad-rk-in .ad-rk-day td { font-weight: 500; }
.ad-rk-in .ad-rk-sub td { font-size: 12px; color: var(--muted); }
.ad-rk-in .ad-rk-sub td.ad-name { padding-left: 30px; }
.ad-rk-tag { margin-left: 6px; font-size: 10px; padding: 0 5px; border-radius: 6px; background: rgba(47,111,237,.15); color: var(--accent); }
.ad-rk-tag.as { background: rgba(232,89,12,.15); color: #e8590c; }
.ad-rk-spr td.ad-name { color: var(--muted); }
.ad-rk-sp { width: 90px; height: 22px; display: inline-block; vertical-align: middle; }
.ad-rk-sp rect { fill: var(--accent); opacity: .5; }
.ad-rk-sup { font-size: 10px; color: var(--muted); margin-left: 2px; }
.ad-rk-tot td { font-weight: 600; border-top: 2px solid var(--border); }
/* 23.11.2026: у сокращений (CPM, ДРРп, CPS…) — подсказка при наведении: что это и как считается */
.ad-rk th[title], .ad-rk-in th[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.ad-rk-in td[title], .ad-rk td[title] { cursor: help; }
.ad-rk-in .ad-rk-pl td { font-size: 12px; color: var(--muted); }
.ad-rk-in .ad-rk-pl td.ad-name { padding-left: 30px; }
.ad-rk-in .ad-rk-pl td.ad-name b { color: var(--text); margin-left: 4px; }
/* 23.11.2026: ↻ на вкладках «Аналитики» */
.an-tabs-ref { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.an-tabs-st { font-size: 12px; color: var(--muted); max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 23.11.2026: в переключателе видов «Рекламы» — и ссылки (Поисковые запросы — отдельная страница) */
.seg a { padding: 5px 10px; color: var(--muted); font-size: 13px; text-decoration: none; cursor: pointer; }
.seg a.is-on { background: var(--accent); color: #fff; }
body:is(.theme-aurora, .theme-eyes) .seg a.is-on { color: var(--accent-ink); }
/* 23.11.2026: «Реклама → Поиск» */
.ad-sq .sq-ck { width: 26px; text-align: center; }
.ad-sq th.sq-sort { cursor: pointer; }
.ad-sq th.is-sort { color: var(--accent); }
.ad-sq .ad-rk-g th { border-left: 2px solid var(--border); }
.ad-sq tr.sq-q td { font-size: 13px; }
.ad-sq tr.sq-q td.ad-name { padding-left: 44px; }
.ad-sq tr.sq-q.is-minus td { opacity: .55; }
.ad-sq tr.sq-tools td { padding: 6px 8px 6px 44px; background: rgba(47,111,237,.05); }
.sq-btn { font-size: 12px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.sq-btn:disabled { opacity: .5; cursor: default; }
.sq-msg { margin-left: 10px; }
.sq-minus { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sq-mq { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(232,89,12,.12); }
.sq-x { border: none; background: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0 0 0 4px; }
/* 23.11.2026: «Бэкап» */
.bk-card { max-width: 720px; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.bk-row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.bk-row input[type=text] { font-size: 14px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.bk-hint { margin-top: -6px; font-size: 12px; }
.bk-chk { font-size: 14px; }
.bk-h { margin-top: 24px; font-size: 18px; }
.bk-tbl td, .bk-tbl th { font-size: 13px; text-align: left; }
.bk-help { margin-top: 18px; max-width: 900px; }
.bk-help code { font-size: 12px; }
.bk-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bk-btns button { font-size: 14px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.bk-btns button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.bk-row input[type=number] { font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.bk-chat { display: flex; gap: 8px; align-items: center; }
.bk-chat select { font-size: 14px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); min-width: 280px; }
.bk-small { font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
/* 23.11.2026: ВЭД → Поиск ДТ */
.dt-card { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; max-width: 900px; }
.dt-f { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.dt-f input, .dt-row input { font-size: 15px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: ui-monospace, Menlo, monospace; }
.dt-card button, .dt-row button { font-size: 14px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.dt-card button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
#dt-res { margin-top: 16px; max-width: 900px; }
.dt-ok { font-weight: 600; color: #2f9e6e; }
.dt-bad { color: #d9480f; }
.dt-list { margin: 8px 0; padding-left: 20px; }
.dt-list li { margin: 4px 0; font-size: 15px; }
.dt-set { margin-top: 28px; max-width: 900px; }
.dt-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.dt-row input { flex: 1; min-width: 300px; font-family: inherit; font-size: 14px; }
.dt-list { list-style: none; padding-left: 0; }
.dt-hit { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.dt-no { font-size: 16px; }
.dt-no b { font-family: ui-monospace, Menlo, monospace; }
.dt-cp { border: 1px solid var(--border); background: none; color: var(--muted); border-radius: 6px; padding: 0 6px; cursor: pointer; font-size: 13px; }
.dt-cp:hover { color: var(--accent); border-color: var(--accent); }
.dt-bulk { margin-top: 30px; max-width: 1200px; }
.dt-bulk h2 { font-size: 18px; margin: 0 0 4px; }
.dt-bulk textarea { width: 100%; max-width: 900px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.dt-row button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dt-tbl td { font-size: 13px; text-align: left; vertical-align: top; }
.dt-tbl td.dt-code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.dt-tbl .dt-nob { font-family: ui-monospace, Menlo, monospace; font-weight: 600; }
.dt-tbl tr.dt-miss td { color: #d9480f; }
/* 23.11.2026: Колесо фортуны (внутрянка) */
.ft-card { max-width: 980px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.ft-card h2 { font-size: 17px; margin: 0 0 8px; }
.ft-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.ft-row select, .ft-tbl input, .ft-tbl select, .ft-card textarea { font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.ft-card textarea { width: 100%; }
.ft-tbl input.ft-n { width: 200px; } .ft-tbl input.ft-u { width: 240px; }
.ft-row button, .ft-tbl button, .ft-gift button { font-size: 14px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.ft-row button.primary, .ft-gift button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ft-row button:disabled { opacity: .5; cursor: default; }
.ft-gifts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.ft-gift { flex: 1; min-width: 220px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.ft-gift.is-on { border-color: #2f9e6e; box-shadow: 0 0 0 2px rgba(47,158,110,.25); }
/* 23.11.2026: Колесо фортуны — колесо */
.fw-top { display: flex; gap: 16px; }
.fw { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.fw-side { flex: 1; min-width: 280px; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.fw-side h1 { margin: 0; }
.fw-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.fw-f select { font-size: 16px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.fw-spin { font-size: 18px; font-weight: 700; padding: 14px; border-radius: 12px; border: none; background: linear-gradient(135deg, #c92a2a, #e8a317); color: #fff; cursor: pointer; }
.fw-spin:disabled { opacity: .45; cursor: default; }
.fw-res { display: flex; flex-direction: column; gap: 10px; }
.fw-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.fw-card b { font-size: 17px; }
.fw-card.is-on { border-color: #2b8a3e; box-shadow: 0 0 0 3px rgba(43,138,62,.25); }
.fw-card.is-off { opacity: .5; }
.fw-choose { align-self: flex-start; font-size: 14px; padding: 7px 14px; border-radius: 8px; border: none; background: #2b8a3e; color: #fff; cursor: pointer; }
.fw-won { font-weight: 700; color: #2b8a3e; }
.fw-wheel-wrap { position: relative; width: min(560px, 92vw); aspect-ratio: 1; }
.fw-wheel { width: 100%; height: 100%; filter: drop-shadow(0 8px 24px rgba(0,0,0,.18)); }
#fw-rot { transform-origin: 0 0; }
.fw-lbl { fill: #fff; font-size: 13px; font-weight: 600; }
.fw-c { font-size: 22px; }
.fw-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 2;
  border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid #c92a2a; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.ft-ph { white-space: nowrap; }
.ft-ph img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 6px; }
.ft-up { font-size: 12px; color: var(--accent); cursor: pointer; }
.ft-up.is-off { color: var(--muted); cursor: default; }
/* 23.11.2026: колесо — по центру, карточки с миниатюрой, фото поверх экрана */
.fw { justify-content: center; }
.fw-top { justify-content: center; }
.fw-hint { font-weight: 600; font-size: 15px; }
.fw-card { flex-direction: row; align-items: center; justify-content: space-between; }
.fw-card-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fw-card b a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.fw-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex-shrink: 0; cursor: zoom-in; }
.fw-ov { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; animation: fw-in .25s ease; }
.fw-ov-box { background: var(--card); color: var(--text); border-radius: 18px; padding: 22px; max-width: min(560px, 92vw); text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; animation: fw-pop .35s ease; }
.fw-ov-box img { max-width: 100%; max-height: 60vh; border-radius: 12px; object-fit: contain; }
.fw-ov-t { font-size: 22px; font-weight: 700; }
.fw-ov-n { font-size: 20px; font-weight: 600; }
.fw-ov-gift { font-size: 120px; }
.fw-ov-box button { font-size: 15px; padding: 8px 20px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
@keyframes fw-in { from { opacity: 0; } }
@keyframes fw-pop { from { transform: scale(.85); opacity: 0; } }
/* 23.11.2026: колесо — ссылки слева сверху (только админам), колесо по центру страницы */
.fw-top { justify-content: flex-start !important; }
.fw { min-height: calc(100vh - 170px); align-items: center; justify-content: center; }
/* 23.11.2026: колесо фортуны — фон-карусель с мигающими огнями (как ёлка на главной) */
body.fw-page { background: #0a0604; }
body.fw-page .xmas-root, body.fw-page .xmas-garland { display: none; }   /* ёлка главной здесь не нужна */
.fw-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fw-bg-img { position: absolute; inset: 0; background: #0a0604 center / cover no-repeat; }
.fw-bg-dim { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 30%, rgba(0,0,0,.45) 100%), rgba(0,0,0,.18); }
.fw-bg-shine { position: absolute; inset: 0; mix-blend-mode: screen; opacity: 0; animation: xmasShine 8s ease-in-out infinite;
  background: radial-gradient(40% 30% at 50% 28%, rgba(255, 214, 120, .55), transparent 70%), radial-gradient(30% 22% at 50% 52%, rgba(255, 190, 90, .45), transparent 70%); }
.fw-glint { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; opacity: 0; transform: scale(var(--s, 1)); animation: xmasGlint 8s ease-in-out infinite; z-index: 1;
  background: radial-gradient(circle, #fff 0, rgba(255, 240, 190, .9) 18%, transparent 55%),
              linear-gradient(90deg, transparent 44%, rgba(255, 250, 220, .9) 50%, transparent 56%),
              linear-gradient(0deg, transparent 44%, rgba(255, 250, 220, .9) 50%, transparent 56%); }
body.fw-page main, body.fw-page .content { position: relative; z-index: 1; }
body.fw-page .fw-side h1, body.fw-page .fw-f, body.fw-page .fw-hint, body.fw-page #fw-st, body.fw-page .fw-top a { color: #fff7e6; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
body.fw-page .fw-card { background: rgba(255, 255, 255, .92); color: #1a1a1a; }
body.fw-page .fw-card .status { color: #666; }
@media (max-width: 760px) { .fw-glint { display: none; } }
/* панель слева — тёмное стекло поверх фона, чтобы всё читалось */
body.fw-page .fw-side { background: rgba(12, 7, 4, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(255, 214, 120, .35); }
body.fw-page .fw-f select { background: #fff; color: #1a1a1a; border-color: rgba(255,255,255,.6); }
body.fw-page .fw-spin:disabled { opacity: .7; filter: saturate(.6); }
body.fw-page .fw-top { gap: 8px; }
body.fw-page .fw-top a { background: rgba(12, 7, 4, .62); padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 214, 120, .35); text-decoration: none; }
/* 23.11.2026: окно подарка — праздничный стиль, салют и конфетти */
.fw-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2; }
.fw-ov-box { position: relative; z-index: 1; gap: 8px; padding: 26px 30px 22px; width: min(560px, 92vw);
  background: radial-gradient(120% 80% at 50% 0%, #fff8e6 0, #ffffff 55%); border: 2px solid #e8b34a; box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 6px rgba(232,179,74,.25); }
.fw-ov-t { font-size: 15px; font-weight: 800; letter-spacing: .32em; text-transform: uppercase; color: #b8860b; }
.fw-ov-n { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.15; margin-bottom: 6px;
  background: linear-gradient(180deg, #e03131 0%, #c92a2a 45%, #a61e4d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fw-ov-n a { color: inherit; text-decoration: none; background: inherit; -webkit-background-clip: text; background-clip: text; }
.fw-ov-img { width: 100%; display: flex; align-items: center; justify-content: center; }
.fw-ov-img img { width: min(380px, 70vw); height: min(380px, 50vh); object-fit: contain; margin: 0 auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.22)); }
body.fw-page .fw-ov-box .fw-ov-n, body.fw-page .fw-ov-box .fw-ov-t { text-shadow: none; }
.fw-set { align-self: flex-start; font-size: 13px; color: #ffe8a3 !important; text-decoration: none; opacity: .85; }
.fw-set:hover { opacity: 1; text-decoration: underline; }
/* ссылки и колесо — над фоном (фон — position: fixed, без этого он перекрывал «Главная / Настройки») */
body.fw-page .fw-top, body.fw-page .fw { position: relative; z-index: 1; }
/* 23.11.2026: колесо — крупное по центру, кнопка под ним, результаты — ниже рядом */
.fw { flex-direction: column; gap: 18px; flex-wrap: nowrap; }
.fw-wheel-wrap { width: min(720px, 92vw, calc(100vh - 260px)); min-width: 300px; }
.fw-spin { width: min(420px, 90vw); font-size: 24px; padding: 18px 24px; border-radius: 16px; letter-spacing: .04em;
  box-shadow: 0 10px 30px rgba(201, 42, 42, .45), inset 0 -3px 0 rgba(0,0,0,.15); text-transform: uppercase; }
.fw-spin:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.06); }
.fw-st { color: #fff7e6; text-shadow: 0 1px 6px rgba(0,0,0,.8); font-size: 15px; text-align: center; }
.fw-res { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px; width: min(860px, 94vw); }
.fw-res .fw-hint { width: 100%; text-align: center; font-size: 18px; }
.fw-res .fw-card { flex: 1 1 320px; max-width: 420px; }
/* 23.11.2026: выбор из двух — окном */
.fw-ch-box { width: min(820px, 94vw); }
.fw-ch { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; width: 100%; }
.fw-ch-card { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid #f0d9a0; background: #fffdf6; }
.fw-ch-card img { width: 100%; height: 230px; object-fit: contain; }
.fw-ch-card .fw-ov-gift { font-size: 100px; }
.fw-ch-n { font-size: 19px; font-weight: 800; color: #a61e4d; text-align: center; }
.fw-ch-n a { color: inherit; text-decoration: none; }
.fw-ch-go { font-size: 16px; font-weight: 700; padding: 10px 20px; border-radius: 12px; border: none; background: linear-gradient(135deg, #2b8a3e, #40c057); color: #fff; cursor: pointer; }
.fw-ch-later { font-size: 14px; padding: 7px 16px; border-radius: 10px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.fw-ov-box.fw-ch-box { width: min(820px, 94vw); max-width: min(820px, 94vw); }
.fw-ov-box .fw-ch-go { font-size: 16px; font-weight: 700; padding: 10px 22px; border-radius: 12px; border: none; background: linear-gradient(135deg, #2b8a3e, #40c057); color: #fff; box-shadow: 0 6px 16px rgba(43,138,62,.35); }
.fw-wheel-wrap { width: min(700px, 92vw, calc(100vh - 300px)); }
/* 23.11.2026: «Настройки» — у правого края экрана; условия при первом входе */
.fw-set-btn { position: fixed; top: 70px; right: 20px; z-index: 5; font-size: 14px; color: #fff7e6; text-decoration: none; background: rgba(12, 7, 4, .62);
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 214, 120, .35); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.fw-set-btn:hover { background: rgba(12, 7, 4, .8); }
.fw-terms { width: min(520px, 92vw); max-width: min(520px, 92vw); text-align: left; align-items: stretch; }
.fw-terms .fw-ov-t { text-align: center; }
.fw-terms ul { margin: 8px 0 6px; padding-left: 22px; font-size: 17px; line-height: 1.6; color: #2b1d0e; }
.fw-terms .fw-ch-go { align-self: center; }

/* Поиск ДТ: свёрнутые списки (24.11.2026) */
.dt-more{margin-top:6px}.dt-more summary{cursor:pointer}.dt-more div{max-height:240px;overflow:auto;font-size:12px;padding:4px 0 0 14px}

/* кольцо площадок: доля поверх всего в карточке (24.11.2026) */
.ah-card .ah-ring { z-index: 2; pointer-events: auto; }
.ah-ring-t, .ah-ring-s { pointer-events: none; }

/* Условия МП (24.11.2026) */
.tm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .tm-two { grid-template-columns: 1fr; } }
.tm-tbl td .status { font-size: 11px; margin: 0; }
.tm-up { color: #d1453b; font-weight: 600; } .tm-down { color: #2f9e6e; font-weight: 600; }
.pr-tip { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.pr-rng { color: var(--muted); font-size: 12px; }

/* 24.11.2026: План/Факт — таблица по ширине содержимого, без пустот между столбцами; карточка % маржи на Главной — уже */
#pf-table { width: 80%; margin: 0 auto; }
@media (max-width: 1500px) { #pf-table { width: 100%; } }
@media (min-width: 1751px) {
  .ah-big.ah-pct { grid-template-columns: 1fr 1fr .85fr 1fr; }
}

/* Анализ категорий Ozon: заголовок категории над её таблицами (25.11.2026) */
.oc-cat-h { margin: 26px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--border); font-size: 20px; }
.oc-cat-h .status { font-size: 13px; font-weight: 400; }

/* Плашка «сайт обновился» (25.11.2026) */
.app-upd { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999; background: var(--card, #fff); color: var(--text, #111); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 14px; display: flex; gap: 12px; align-items: center; }
.app-upd button { padding: 6px 12px; }
.oc-table tr.oc-tot td { font-style: normal; color: var(--text); }
/* Внешка (26.11.2026): шаги формы медиаплана, статус из списка, детализация суммы, бюджет по месяцам */
.ext-sec { display: flex; flex-direction: column; gap: .1rem; margin: .9rem 0 .45rem; padding-top: .6rem; border-top: 1px solid var(--border, #e5e7eb); }
.ext-form h3 + .ext-sec { margin-top: 0; padding-top: 0; border-top: 0; }
.ext-sec b { font-size: .95rem; color: var(--text); }
.ext-sec span { font-size: .82em; color: var(--muted, #6b7280); }
select.ext-st-sel { font: inherit; font-size: .85em; border: 1px solid transparent; padding: .1rem .3rem; cursor: pointer; color: inherit; appearance: auto; }
select.ext-st-sel:hover, select.ext-st-sel:focus { border-color: var(--border, #cbd5e1); }
select.ext-st-sel option { background: #fff; color: #111827; }
.ext-tip { position: relative; cursor: help; border-bottom: 1px dotted currentColor; }
.ext-tip:hover::after, .ext-tip:focus::after { content: attr(data-tip); position: absolute; right: 0; bottom: 100%; z-index: 30; margin-bottom: 4px; white-space: pre;
  background: #111827; color: #fff; padding: .45rem .65rem; border-radius: 8px; font-size: 12px; font-weight: 400; text-align: left; line-height: 1.45;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.ext-dt td.ext-over { color: #c0392b; font-weight: 600; }
.ext-dt .ext-ed.ext-del { color: #c0392b; }
body.ext-busy .ext-form button[type=submit] { opacity: .6; cursor: progress; }
.ext-items tr.ext-bad input[name=i_art] { border-color: #c0392b; }
.ext-items .ext-art-w:empty { display: none; }
