/* ═════════════════════════════════════════════════════════════════════════
   TAUpack — единая дизайн-система (светлая, в духе Apple HIG).
   Подключается ПОСЛЕДНИМ стилем на всех страницах: задаёт токены и
   приводит к одному виду общие компоненты (кнопки, поля, таблицы,
   модалки, меню, бейджи, спиннеры, иконки). Страничные css дальше
   пользуются теми же переменными.

   Всё визуальное — внутри @media screen: печатные формы (этикетки, листы
   подбора, счёт) печатаются ровно как раньше.
   Логику не трогаем: только внешний вид, ни одного id/класса не убрано.
   ═════════════════════════════════════════════════════════════════════════ */

:root {
  /* шрифт — системный стек: SF на Apple, Inter/Segoe UI на Windows */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* поверхности */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafc;
  --fill: rgba(118, 118, 128, .10);        /* мягкая серая заливка (secondary, чипы) */
  --fill-hover: rgba(118, 118, 128, .16);
  --fill-press: rgba(118, 118, 128, .22);

  /* текст */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #8e8e93;
  --ink-4: #aeaeb2;

  /* линии */
  --line: rgba(0, 0, 0, .08);
  --line-soft: rgba(0, 0, 0, .055);
  --line-strong: rgba(0, 0, 0, .13);

  /* фирменный цвет: градиент фиолетовый → синий */
  --brand-1: #7c3aed;
  --brand-2: #5b4bf0;
  --brand-3: #2563eb;
  --grad: linear-gradient(120deg, #7c3aed 0%, #5b4bf0 50%, #2563eb 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 58, 237, .10), rgba(37, 99, 235, .10));

  /* акцент (активные состояния, ссылки, фокус) — фирменный индиго */
  --accent: #5b4bf0;
  --accent-hover: #4c3be0;
  --accent-soft: rgba(91, 75, 240, .10);
  --accent-soft-2: rgba(91, 75, 240, .16);
  --focus-ring: 0 0 0 4px rgba(91, 75, 240, .22);

  /* площадки */
  --wb: #7c3aed;
  --wb-soft: rgba(124, 58, 237, .10);
  --ozon: #0a66ff;
  --ozon-soft: rgba(10, 102, 255, .10);

  /* смысловые статусы — светлый фон + насыщенный текст */
  --green: #1a7f45;   --green-soft: #e7f6ec;
  --red: #c7362b;     --red-soft: #fdecea;   --red-solid: #e5484d;
  --orange: #b45309;  --orange-soft: #fff3e0;
  --yellow: #8a6500;  --yellow-soft: #fff7d6;
  --blue: #0a5ad4;    --blue-soft: #e8f0ff;
  --gray: #57575c;    --gray-soft: #f0f0f3;

  /* скругления */
  --r-xs: 6px;
  --r-sm: 8px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* тени — очень деликатные */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-card: 0 1px 2px rgba(0, 0, 0, .03), 0 0 0 1px rgba(0, 0, 0, .04);
  --sh-raise: 0 2px 8px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .04);
  --sh-pop: 0 12px 32px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .05), 0 0 0 1px rgba(0, 0, 0, .05);
  --sh-modal: 0 24px 64px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .04);
  --sh-brand: 0 4px 14px rgba(91, 75, 240, .26);

  /* отступы 4 · 8 · 12 · 16 · 20 · 24 · 32 · 40 · 48 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;

  /* высота контролов */
  --h-control: 40px;
  --h-control-sm: 32px;

  /* движение */
  --ease: cubic-bezier(.25, .8, .25, 1);
  --t-fast: .14s;
  --t: .2s;
}

/* скрытое остаётся скрытым, даже если у элемента display в классе */
[hidden] { display: none !important; }

@keyframes uiSpin { to { transform: rotate(1turn); } }
@keyframes uiFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes uiPop { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes uiDrop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

@media screen {

/* ── База ──────────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font-family: inherit; }
::selection { background: rgba(91, 75, 240, .18); }
b, strong { font-weight: 650; }
h1, h2, h3, h4 { letter-spacing: -.012em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* тонкие системные скроллбары */
* { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .18); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(0, 0, 0, .3); }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--ink-2); }
code, .mono, kbd { font-family: var(--mono); }
td, .num, .tnum { font-variant-numeric: tabular-nums; }

/* ── Кнопки ────────────────────────────────────────────────────────────────
   primary  .btn            — фирменный градиент, главное действие
   secondary .btn-outline / .btn-ghost / .pg-btn — белая «системная» кнопка
   tertiary .btn-plain      — без фона, только hover
   danger   .btn-danger / .danger-btn
   .is-busy — спиннер загрузки (ставит ui.js на время запроса)            */
.btn, .btn-outline, .btn-ghost, .btn-plain, .btn-danger, .pg-btn, .pg-back, .back {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--h-control); padding: 0 16px; box-sizing: border-box;
  border-radius: var(--r); border: 1px solid transparent;
  font: 600 14px/1.2 var(--font); letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              filter var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), transform .1s var(--ease);
}
.btn:active:not(:disabled), .btn-outline:active:not(:disabled), .btn-ghost:active:not(:disabled),
.btn-plain:active:not(:disabled), .btn-danger:active:not(:disabled), .pg-btn:active:not(:disabled),
.pg-back:active, .back:active { transform: scale(.98); }

/* primary — в приложении сплошной фиолетовый (цвет WB); фирменный
   градиент — у .btn-grad (лендинг, вход, регистрация) */
.btn:not(.btn-ghost), .pg-btn.pg-btn-primary {
  background: var(--wb); color: #fff; border-color: transparent;
  box-shadow: 0 1px 2px rgba(60, 20, 140, .2), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn:not(.btn-ghost):hover, .pg-btn.pg-btn-primary:hover {
  background: #6d2fe0; color: #fff; filter: none;
  box-shadow: 0 4px 14px rgba(124, 58, 237, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn.btn-grad { background: var(--grad); }
.btn.btn-grad:hover { background: var(--grad); filter: brightness(1.07) saturate(1.04); box-shadow: 0 4px 14px rgba(91, 75, 240, .28), inset 0 1px 0 rgba(255, 255, 255, .14); }

/* secondary */
.btn-outline, .btn-ghost, .pg-btn {
  background: var(--surface); color: var(--ink); border-color: var(--line-strong);
  box-shadow: var(--sh-1);
}
.btn-outline:hover, .btn-ghost:hover, .pg-btn:hover {
  background: #f7f7f9; color: var(--ink); border-color: rgba(0, 0, 0, .17); box-shadow: var(--sh-1);
}

/* tertiary */
.btn-plain { background: transparent; color: var(--ink); }
.btn-plain:hover { background: var(--fill); }

/* danger — только для необратимых действий */
.btn-danger, html body .btn.btn-danger, html body .btn.danger { background: var(--red-solid); color: #fff; border-color: transparent; box-shadow: var(--sh-1); }
.btn-danger:hover, html body .btn.btn-danger:hover, html body .btn.danger:hover { background: #d63c41; color: #fff; filter: none; box-shadow: 0 4px 14px rgba(229, 72, 77, .28); }
html body .btn-outline.danger-text, html body .btn-outline.btn-danger-text { color: var(--red); }
html body .btn-outline.danger-text:hover { background: var(--red-soft); border-color: rgba(199, 54, 43, .25); }

/* disabled */
.btn:disabled, .btn[disabled], .btn-outline:disabled, .btn-ghost:disabled, .btn-plain:disabled,
.btn-danger:disabled, .pg-btn:disabled, .pg-btn[disabled],
.btn:not(.btn-ghost):disabled, .btn:not(.btn-ghost)[disabled] {
  opacity: .42; cursor: not-allowed; filter: none; box-shadow: none; transform: none;
}
.btn-outline[aria-disabled="true"], .btn[aria-disabled="true"] { opacity: .42; pointer-events: none; }
/* занятая кнопка (идёт запрос) — не бледнеет, а показывает спиннер */
.is-busy:disabled, .is-busy[disabled] { opacity: .8 !important; }

/* иконка внутри кнопки — ровно по центру */
.btn .i, .btn-outline .i, .btn-ghost .i, .pg-btn .i, .btn-plain .i { width: 17px; height: 17px; vertical-align: 0; }
.btn-outline .i, .btn-ghost .i, .pg-btn .i, .btn-plain .i { color: var(--ink-2); }
.btn-outline:hover .i, .btn-ghost:hover .i, .pg-btn:hover .i { color: var(--ink); }

/* квадратная кнопка-иконка (⋮, ↻, ✕) */
.btn-icon { width: var(--h-control); padding: 0 !important; gap: 0; }
.btn-icon .i { width: 18px; height: 18px; }
.btn:not(.btn-ghost) .i, .pg-btn.pg-btn-primary .i, .btn-danger .i { color: #fff; }

/* .btn + модификатор без фона: «Вход» в шапке, текстовая ссылка-действие */
.btn.btn-plain, .btn.btn-link { background: transparent; box-shadow: none; filter: none; border-color: transparent; }
.btn.btn-plain { color: var(--ink); }
.btn.btn-plain:hover { background: var(--fill); color: var(--ink); box-shadow: none; filter: none; }
.btn.btn-link { color: var(--accent); padding-left: 8px; padding-right: 8px; gap: 2px; }
.btn.btn-link:hover { background: transparent; color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; box-shadow: none; filter: none; }
.btn.btn-plain .i, .btn.btn-link .i { color: currentColor; }

/* размер S */
.btn-sm { min-height: var(--h-control-sm); padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }

/* загрузка */
.is-busy { position: relative; cursor: progress !important; }
.is-busy::after {
  content: ""; display: inline-block; flex: 0 0 auto; width: 14px; height: 14px; margin-left: 2px;
  border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: .85;
  animation: uiSpin .7s linear infinite; vertical-align: -2px;
}

/* кнопка-иконка во время запроса: вместо иконки — только спиннер */
.is-busy:has(> .i:only-child) > .i { display: none; }
.is-busy:has(> .i:only-child)::after { margin-left: 0; }

/* мелкие служебные кнопки (⋮ шаблона, «копировать» и т.п.) */
.mini, .btn-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 28px; padding: 0 9px; box-sizing: border-box;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); font: 500 12.5px/1.2 var(--font); cursor: pointer;
  box-shadow: var(--sh-1);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.mini:hover, .btn-mini:hover { background: #f7f7f9; color: var(--ink); border-color: rgba(0, 0, 0, .17); }
.mini:disabled, .btn-mini:disabled { opacity: .45; cursor: default; }
input.btn-mini { cursor: text; font-weight: 500; color: var(--ink); }

/* «Назад» — лёгкая кнопка с шевроном */
.pg-back, .back {
  min-height: 36px; padding: 0 14px 0 10px; gap: 4px;
  background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--sh-1);
  font-size: 14px; font-weight: 500;
}
.pg-back:hover, .back:hover { background: #f7f7f9; color: var(--ink); border-color: rgba(0, 0, 0, .17); }

/* ── Поля ввода ──────────────────────────────────────────────────────────
   Базовый вид через :where() (нулевая специфичность) — страничные классы
   с особым видом (сканер, количество) не ломаются. */
:where(input:not([type]), input[type="text"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"], input[type="number"],
       input[type="date"], input[type="month"], input[type="time"], input[type="datetime-local"],
       select, textarea) {
  font: 400 14px/1.35 var(--font); color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  min-height: var(--h-control); padding: 0 12px; box-sizing: border-box;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast);
}
:where(textarea) { padding: 10px 12px; min-height: 88px; line-height: 1.45; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]):hover,
select:hover, textarea:hover { border-color: rgba(0, 0, 0, .2); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]):focus,
select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--focus-ring);
}
::placeholder { color: var(--ink-4); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background-color: #f5f5f7; color: var(--ink-3); cursor: not-allowed; }
input[type="number"] { font-variant-numeric: tabular-nums; }

/* select — аккуратный шеврон вместо системной стрелки */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 16px 16px !important;
  padding-right: 34px !important;
  cursor: pointer; text-overflow: ellipsis;
}
select option { color: var(--ink); }

/* поле даты — иконка календаря справа (сам календарь рисует ui.js) */
input[type="date"], input[type="month"] { position: relative; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: .6; cursor: pointer; width: 16px; height: 16px; padding: 2px; margin-left: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center/16px no-repeat;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
input[type="date"]::-webkit-datetime-edit { padding: 0; }
input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
html.ui-dp-fine input[type="date"]::-webkit-calendar-picker-indicator { pointer-events: none; }

/* чекбоксы / радио — системный вид в фирменном цвете */
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); cursor: pointer; }
:where(input[type="checkbox"], input[type="radio"]) { width: 16px; height: 16px; }
body.mp-ozon input[type="checkbox"], body.mp-ozon input[type="radio"] { accent-color: var(--ozon); }

input[type="file"] { font-size: 13px; color: var(--ink-2); }
input[type="file"]::file-selector-button {
  font: 600 13px var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 7px 12px; margin-right: 10px;
  cursor: pointer; transition: background-color var(--t-fast);
}
input[type="file"]::file-selector-button:hover { background: #f7f7f9; }

/* ── Таблицы ───────────────────────────────────────────────────────────────
   минимум линий, лёгкие горизонтальные разделители, заголовок — мелкий
   вторичный текст; строки с воздухом; hover. */
th {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  letter-spacing: .01em; background-color: var(--surface);
  border-bottom: 1px solid var(--line) !important;
}
td { border-bottom-color: var(--line-soft) !important; }
tbody tr:last-child > td { border-bottom-color: transparent !important; }
tbody tr { transition: background-color .12s; }
tbody tr:hover > td { background-image: linear-gradient(rgba(0, 0, 0, .018), rgba(0, 0, 0, .018)); }
th.num, td.num, th.r, td.r { text-align: right; }

/* ── Модальные окна ─────────────────────────────────────────────────────── */
.modal-bg { background: rgba(20, 20, 24, .32) !important; -webkit-backdrop-filter: blur(6px) saturate(1.1); backdrop-filter: blur(6px) saturate(1.1); }
.modal-bg.open { animation: uiFade var(--t) var(--ease); }
.modal-bg.open > .modal, .modal-bg.open > div > .modal { animation: uiPop .22s var(--ease); }
.modal {
  border-radius: var(--r-xl) !important; padding: 24px !important;
  box-shadow: var(--sh-modal) !important; border: none; box-sizing: border-box;
  max-width: calc(100vw - 32px);
}
.modal h3 { font-size: 18px; font-weight: 650; letter-spacing: -.015em; color: var(--ink); margin-bottom: 12px; }
.modal label.muted, .modal > label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; display: block; margin: 12px 0 6px; }
.modal .row { gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal select, .modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { border-radius: var(--r); min-height: var(--h-control); }

/* ── Меню / выпадающие списки (как системные меню macOS) ─────────────────── */
.acct-menu, .dd-menu, .kebab-menu, .oz-pick-cols-pop {
  background: rgba(255, 255, 255, .96) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  border: none !important; border-radius: var(--r-md) !important;
  box-shadow: var(--sh-pop) !important; padding: 6px !important;
}
.acct-menu.open, .dd-menu.open, .kebab-menu.open { animation: uiDrop .16s var(--ease); transform-origin: top right; }
.acct-menu a, .acct-menu button, .dd-menu a, .dd-menu button, .kebab-menu button {
  border-radius: 7px !important; font-size: 14px; color: var(--ink);
  padding: 9px 12px; transition: background-color .1s;
}
.acct-menu a:hover, .acct-menu button:hover, .dd-menu a:hover, .dd-menu button:hover, .kebab-menu button:hover {
  background: var(--accent-soft) !important; color: var(--ink);
}
.dd-menu .danger, .kebab-menu button.danger, .acct-menu .acct-logout { color: var(--red) !important; }
.acct-menu form { border-top-color: var(--line-soft) !important; }

/* ── Сегментированный контрол (День | Неделя | Месяц) ──────────────────── */
.seg-ctl {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px;
  background: rgba(118, 118, 128, .12); position: relative;
}
.seg-ctl > button, .seg-ctl > a {
  appearance: none; border: 0; background: transparent; color: var(--ink);
  font: 500 13.5px/1 var(--font); padding: 8px 16px; border-radius: 8px; cursor: pointer;
  min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease), color var(--t);
}
.seg-ctl > button:hover:not(.active), .seg-ctl > a:hover:not(.active) { color: var(--ink); background: rgba(255, 255, 255, .5); }
.seg-ctl > .active { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 .5px rgba(0, 0, 0, .04); }

/* ── Бейджи статусов: светлый фон + насыщенный текст ──────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap; background: var(--gray-soft); color: var(--gray); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.violet { background: var(--accent-soft); color: var(--accent); }
.badge::before { content: none; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Плашки-сообщения (note) ───────────────────────────────────────────── */
.note { padding: 12px 16px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.5; margin-bottom: 12px; border: 0; }
.note.warn { background: var(--orange-soft); color: #7a4a00; }
.note.err { background: var(--red-soft); color: #8a2419; }
.note.ok { background: var(--green-soft); color: #14532d; }
.note.info { background: var(--accent-soft); color: #3b2fb0; }
.note a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ── Карточка ──────────────────────────────────────────────────────────── */
.card-ui { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: 20px 24px; }

/* ── Tooltip (data-tip) ─────────────────────────────────────────────────── */
[data-ui-tip] { position: relative; }
[data-ui-tip]:hover::after {
  content: attr(data-ui-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 260px; padding: 7px 10px; border-radius: 8px;
  background: rgba(29, 29, 31, .92); color: #fff; font: 500 12px/1.4 var(--font); white-space: normal;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18); z-index: 80; pointer-events: none; animation: uiFade .14s;
}

/* ── Загрузка ──────────────────────────────────────────────────────────── */
/* большой спиннер на месте контента (дубль стилей из feedback.js — для
   страниц, где он не подключён) */
.wb-loading, .wb-loading-inline {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 48px 16px; min-height: 160px; box-sizing: border-box;
  color: var(--ink-2) !important; font: 500 14px/1.4 var(--font) !important; text-align: center;
}
.wb-loading::before, .wb-loading-inline::before {
  content: ""; width: 34px !important; height: 34px !important; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(91, 75, 240, 0) 0deg, #7c3aed 200deg, #2563eb 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 3.5px), #000 0) !important;
  mask: radial-gradient(farthest-side, #0000 calc(100% - 3.5px), #000 0) !important;
  animation: uiSpin .8s linear infinite !important;
}
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 15px; border-radius: var(--r-md); }

/* маленький спиннер в строке — «Загружаю…», «Проверяю…» */
.ld { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.ld::before {
  content: ""; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(91, 75, 240, .22); border-top-color: var(--accent);
  animation: uiSpin .7s linear infinite;
}
td.ld, td > .ld { display: table-cell; }
td.ld::before { display: inline-block; vertical-align: -2px; margin-right: 8px; }
option.ld::before { content: none; }
@media (prefers-reduced-motion: reduce) {
  .ld::before, .is-busy::after, .wb-loading::before, .wb-loading-inline::before { animation-duration: 2.4s !important; }
  .modal-bg.open, .modal-bg.open > .modal, .acct-menu.open, .dd-menu.open, .kebab-menu.open { animation: none !important; }
}

/* ── Календарь (ui.js) ─────────────────────────────────────────────────── */
.ui-dp {
  position: absolute; z-index: 10050; width: 284px; box-sizing: border-box; padding: 12px;
  background: rgba(255, 255, 255, .98); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-radius: var(--r-lg); box-shadow: var(--sh-pop); font-family: var(--font); color: var(--ink);
  animation: uiDrop .16s var(--ease); user-select: none;
}
.ui-dp-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px; }
.ui-dp-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; text-transform: capitalize; }
.ui-dp-nav { display: flex; gap: 2px; }
.ui-dp-nav button {
  width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--accent);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color .12s;
}
.ui-dp-nav button:hover { background: var(--fill); }
.ui-dp-nav .i { width: 18px; height: 18px; }
.ui-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ui-dp-wd { font-size: 11px; font-weight: 600; color: var(--ink-3); text-align: center; padding: 4px 0 6px; text-transform: uppercase; }
.ui-dp-day {
  height: 34px; border: 0; background: transparent; border-radius: 50%; font: 500 14px var(--font); color: var(--ink);
  cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color .1s, color .1s;
  width: 34px; justify-self: center; padding: 0;
}
.ui-dp-day:hover:not(:disabled) { background: var(--fill); }
.ui-dp-day.out { color: var(--ink-4); }
.ui-dp-day.today { color: var(--accent); font-weight: 700; }
.ui-dp-day.sel { background: var(--accent); color: #fff; font-weight: 650; }
.ui-dp-day.sel:hover { background: var(--accent-hover); }
.ui-dp-day:disabled { color: var(--ink-4); opacity: .45; cursor: default; }
.ui-dp-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.ui-dp-foot button { border: 0; background: transparent; color: var(--accent); font: 500 13.5px var(--font); padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.ui-dp-foot button:hover { background: var(--accent-soft); }

/* ── Иконки-заменители эмодзи в старых классах (моно, как SF Symbols) ── */
.ico-print, .ico-xlsx, .ico-box {
  display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex: 0 0 auto; pointer-events: none;
  background-image: none !important; background-color: currentColor !important;
  -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat;
}
.ico-xlsx { color: #1d7a45; }
.btn:not(.btn-ghost) .ico-xlsx, .btn:not(.btn-ghost) .ico-print, .btn:not(.btn-ghost) .ico-box { color: #fff; }

} /* /@media screen */

/* ── Иконки (сгенерировано; линия 1.8, стиль SF Symbols) ── */
.i { display:inline-block; width:1.15em; height:1.15em; flex:0 0 auto; vertical-align:-0.2em; pointer-events:none;
  background-color:currentColor; -webkit-mask:var(--i) center/contain no-repeat; mask:var(--i) center/contain no-repeat; }
.i-refresh { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.34-5.66'/%3E%3Cpath d='M20 4v5h-5'/%3E%3C/svg%3E"); }
.i-list { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2.5'/%3E%3Cpath d='M9 3.5h6v2H9zM9 10h6M9 14h6M9 18h3'/%3E%3C/svg%3E"); }
.i-box { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 7.5 12 3 3.5 7.5v9L12 21l8.5-4.5z'/%3E%3Cpath d='M3.5 7.5 12 12l8.5-4.5M12 12v9'/%3E%3C/svg%3E"); }
.i-store { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5V20h15v-9.5'/%3E%3Cpath d='M3 10.5 5 4h14l2 6.5a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0z'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E"); }
.i-sliders { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h9M17 7h3M4 17h3M11 17h9'/%3E%3Ccircle cx='15' cy='7' r='2'/%3E%3Ccircle cx='9' cy='17' r='2'/%3E%3C/svg%3E"); }
.i-close { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }
.i-chevron-down { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.i-chevron-left { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5-7 7 7 7'/%3E%3C/svg%3E"); }
.i-chevron-right { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E"); }
.i-scan { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8V6.5A2.5 2.5 0 0 1 6.5 4H8M16 4h1.5A2.5 2.5 0 0 1 20 6.5V8M20 16v1.5a2.5 2.5 0 0 1-2.5 2.5H16M8 20H6.5A2.5 2.5 0 0 1 4 17.5V16M8 9v6M11 9v6M13.5 9v6M16 9v6'/%3E%3C/svg%3E"); }
.i-plus { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.i-more { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5.5h.01M12 12h.01M12 18.5h.01' stroke-width='3.4'/%3E%3C/svg%3E"); }
.i-more-h { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12h.01M12 12h.01M18.5 12h.01' stroke-width='3.4'/%3E%3C/svg%3E"); }
.i-print { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8.5V4h10v4.5'/%3E%3Crect x='3' y='8.5' width='18' height='8.5' rx='2.5'/%3E%3Cpath d='M7 14h10v6H7z'/%3E%3Cpath d='M17 11.5h.01' stroke-width='2.6'/%3E%3C/svg%3E"); }
.i-sheet { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3.5' width='16' height='17' rx='2.5'/%3E%3Cpath d='M4 9h16M4 14.5h16M10 3.5v17'/%3E%3C/svg%3E"); }
.i-truck { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5h11.5v9.5H2.5zM14 10h4.2l3.3 3.5V16H14'/%3E%3Ccircle cx='6.5' cy='17.5' r='2'/%3E%3Ccircle cx='17.5' cy='17.5' r='2'/%3E%3C/svg%3E"); }
.i-download { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10.5l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.i-upload { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V5M7 9.5l5-5 5 5M5 20h14'/%3E%3C/svg%3E"); }
.i-trash { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9.5 7V4h5v3'/%3E%3C/svg%3E"); }
.i-edit { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9a2.83 2.83 0 0 0-4-4L4 16z'/%3E%3Cpath d='m13.5 6.5 4 4'/%3E%3C/svg%3E"); }
.i-search { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.3-4.3'/%3E%3C/svg%3E"); }
.i-calendar { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.i-link { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1'/%3E%3C/svg%3E"); }
.i-user { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); }
.i-check { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.i-alert { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.6 17.6A2 2 0 0 0 4.3 20.6h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4M12 17h.01'/%3E%3C/svg%3E"); }
.i-info { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.8h.01'/%3E%3C/svg%3E"); }
.i-building { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M6 21V7l6-4 6 4v14M10 9h.01M14 9h.01M10 13h.01M14 13h.01M10 17h4'/%3E%3C/svg%3E"); }
.i-save { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3.5h11l3.5 3.5v13.5H5z'/%3E%3Cpath d='M8.5 3.5v5h6v-5M8 20.5v-6.5h8v6.5'/%3E%3C/svg%3E"); }
.i-external { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E"); }
.i-logout { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3M16 16l4-4-4-4M20 12H9'/%3E%3C/svg%3E"); }
.i-settings { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M4.2 7.5l2.6 1.5M17.2 15l2.6 1.5M4.2 16.5 6.8 15M17.2 9l2.6-1.5'/%3E%3C/svg%3E"); }
.i-question { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .8-1 1.5v.4M12 17h.01'/%3E%3C/svg%3E"); }
.i-doc { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5h8l4 4v13H6z'/%3E%3Cpath d='M14 3.5v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.i-barcode { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6v12M7 6v12M10.5 6v12M13 6v12M16.5 6v12M20 6v12'/%3E%3C/svg%3E"); }
.i-tag { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 12.5V4.5a1 1 0 0 1 1-1h8l8 8-9 9z'/%3E%3Cpath d='M8 8h.01' stroke-width='2.6'/%3E%3C/svg%3E"); }
.i-arrow-left { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.i-arrow-right { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.i-undo { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E"); }
.i-mail { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='m3.5 6.5 8.5 6.5 8.5-6.5'/%3E%3C/svg%3E"); }
.i-wrench { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0 5 5l-.3.3L11 20a2.1 2.1 0 0 1-3-3l8.4-8.4.3-.3a4 4 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.i-grid { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6.5' height='6.5' rx='1.5'/%3E%3Crect x='13.5' y='4' width='6.5' height='6.5' rx='1.5'/%3E%3Crect x='4' y='13.5' width='6.5' height='6.5' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='6.5' height='6.5' rx='1.5'/%3E%3C/svg%3E"); }
.i-copy { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.5' y='8.5' width='11.5' height='11.5' rx='2.5'/%3E%3Cpath d='M15.5 8.5V6.5A2.5 2.5 0 0 0 13 4H6.5A2.5 2.5 0 0 0 4 6.5V13a2.5 2.5 0 0 0 2.5 2.5h2'/%3E%3C/svg%3E"); }
.i-coffee { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h13v5a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5z'/%3E%3Cpath d='M17 10h1.5a2.5 2.5 0 0 1 0 5H17M8 3.5v2.5M12 3.5v2.5'/%3E%3C/svg%3E"); }
.ico-print { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8.5V4h10v4.5'/%3E%3Crect x='3' y='8.5' width='18' height='8.5' rx='2.5'/%3E%3Cpath d='M7 14h10v6H7z'/%3E%3Cpath d='M17 11.5h.01' stroke-width='2.6'/%3E%3C/svg%3E"); }
.ico-xlsx { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3.5' width='16' height='17' rx='2.5'/%3E%3Cpath d='M4 9h16M4 14.5h16M10 3.5v17'/%3E%3C/svg%3E"); }
.ico-box { --i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 7.5 12 3 3.5 7.5v9L12 21l8.5-4.5z'/%3E%3Cpath d='M3.5 7.5 12 12l8.5-4.5M12 12v9'/%3E%3C/svg%3E"); }

/* «Наверх» (to-top.js) — тёмная «таблетка» внизу по центру, как панели
   выбора; над плашками выбора/cookie её поднимает сам to-top.js */
.to-top {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px 0 13px;
  border: none; border-radius: var(--r-pill); cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600;
  background: rgba(29, 29, 31, .86); color: #fff;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  transition: background-color var(--t-fast), bottom .18s var(--ease);
  animation: toTopIn .2s var(--ease);
}
.to-top:hover { background: rgba(29, 29, 31, .96); }
.to-top:active { transform: translateX(-50%) scale(.96); }
.to-top[hidden] { display: none; }
@keyframes toTopIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
@media print { .to-top { display: none !important; } }
