/* ==========================================================================
   4BREWERS — дизайн-система кабинета. 3/3: компоненты.
   Подключается после tokens.css и base.css; стили страницы (shop.css и др.) — после него.

   Общие правила витрины v10 перенесены сюда без изменений внешнего вида: шапка — сплошная жёлтая полоса,
   жёлтый у одного главного действия, остальные кнопки чёрные/серые; тёмная тема — те же токены.
   Новое для страниц кабинета — в том же языке: поля форм, блоки, таблицы, статусы заказа, шаги, заметки.
   Живые образцы всех компонентов — design/index.php.

   Содержание:
    1. Шапка            .hdr …           6. Поверхности   .box .phead .eyebrow .note .empty
    2. Меню             .drawer …        7. Данные        .tbl .list .kv .status .steps .total .badge .copy
    3. Кнопки           .btn .iconbtn    8. Шторки        .sheet …
    4. Чипсы, сегменты  .chip .seg       9. Тост          .toast
       разделы         .subnav
    5. Формы            .field .input    10. Подвал       .foot
                        .select .check   11. Утилиты
                        .switch .choice  12. Адаптив
                        .suggest .savebar
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Шапка: 52 px (60 px от 720) — знак, вкладки витрины (телефон), разделы (от 960),
   компания, тема (от 720), заказ, меню (до 960). Сплошная фирменная полоса в обеих темах.
   -------------------------------------------------------------------------- */
.hdr { position: relative; z-index: 30; background: var(--brand); color: var(--hdr-ink); transition: background-color .3s; }
.hdr__in { position: relative; display: flex; align-items: center; gap: 8px; height: var(--hdr-h); }
.hdr__logo { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; text-decoration: none; position: relative; }
.hdr__mark { display: block; height: 24px; width: auto; }
.hdr__word { display: none; font: 800 17px/1 var(--f-body); letter-spacing: .02em; color: var(--hdr-ink); }
.hdr__demo {
  font: 800 8.5px/1 var(--f-body);
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 5px 3px;
  border: 1.5px solid var(--hdr-ink);
  color: var(--hdr-ink);
  border-radius: 5px;
  transform: rotate(-4deg);
}
.hdr__nav { display: none; }
.hdr__spacer { flex: 1 1 0; min-width: 0; }
.hdr__who { display: none; max-width: 220px; }
.hdr__company { color: var(--hdr-ink); }
.hdr__dept { color: var(--hdr-muted); }
.hdr .iconbtn { background: var(--hdr-btn); color: var(--hdr-ink); }
.hdr .iconbtn:hover { background: var(--hdr-btn-2); }
.hdr__theme { position: relative; }
.hdr__theme-ico { display: none; }
.hdr__theme-ico svg { width: 19px; height: 19px; transition: transform .35s var(--ease); }
.hdr__theme:active .hdr__theme-ico svg { transform: rotate(40deg) scale(.9); }
html:not([data-theme-mode]) .hdr__theme-ico--auto, html[data-theme-mode="auto"] .hdr__theme-ico--auto { display: block; }
html[data-theme-mode="light"] .hdr__theme-ico--light { display: block; }
html[data-theme-mode="dark"] .hdr__theme-ico--dark { display: block; }
/* кнопка «Заказ»: всегда доступна, с числом упаковок; на витрине открывает шторку, на других страницах ведёт в неё */
.hdr__order { position: relative; }
.hdr__order svg { width: 20px; height: 20px; }
.hdr__order-n {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--hdr-ink); color: var(--brand);
  font: 800 10.5px/18px var(--f-body); text-align: center;
  box-shadow: 0 0 0 2px var(--brand);
}
.hdr__order.has-items { background: var(--fg); color: var(--bg); }
.hdr .hdr__order.has-items, .hdr .hdr__order.has-items:hover { background: #ffffff; color: var(--hdr-ink); }

/* --------------------------------------------------------------------------
   2. Меню: выдвижная панель справа — разделы, тема, компания, выход
   -------------------------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__veil { position: absolute; inset: 0; background: var(--veil); opacity: 0; transition: opacity .3s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(340px, 86vw);
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
  transform: translateX(100%);
  transition: transform .38s var(--ease);
  overflow-y: auto;
}
.drawer.is-in .drawer__veil { opacity: 1; }
.drawer.is-in .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__w { width: 27px; height: 36px; }
:root[data-theme="dark"] .drawer__w, :root[data-theme="dark"] .foot__w { filter: invert(1); }
.drawer__who { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--fg-2); }
.drawer__who b { color: var(--fg); font-size: 15px; }
.drawer__hi { color: var(--brand-text); font-weight: 600; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 600;
  text-decoration: none;
}
.drawer__nav a svg { width: 18px; height: 18px; color: var(--fg-3); }
.drawer__nav a.is-current { color: var(--fg); font-weight: 800; }
.drawer__btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 4px;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit;
  font: 600 16px var(--f-body); text-align: left;
}
.drawer__btn svg { width: 18px; height: 18px; color: var(--fg-3); }
.drawer__note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--fg-2); padding: 12px 14px; border-radius: 12px; background: var(--bg-3); }
.drawer__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--fg-2); }
.drawer__foot a { text-decoration-color: var(--brand-line); text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   3. Кнопки. Основная — чёрная (в тёмной теме — светлая); жёлтая (--brand) — только у главного действия экрана
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 0; border-radius: 12px;
  background: var(--fg); color: var(--bg);
  font: 700 14px var(--f-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .15s var(--ease);
}
.btn:hover { background: color-mix(in srgb, var(--fg) 84%, var(--bg)); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn--ghost { background: var(--bg-3); color: var(--fg); }
.btn--ghost:hover { background: var(--bg-4); }
.btn--brand { background: var(--brand); color: var(--brand-ink); }
.btn--brand:hover { background: var(--brand-2); }
/* второстепенное действие рядом с главным: прозрачная, с рамкой */
.btn--line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--line:hover { background: var(--bg-3); }
/* разрушающее действие («Удалить», «Отменить заказ»): спокойное, красным только при наведении */
.btn--danger { background: var(--bg-3); color: var(--fg); }
.btn--danger:hover { background: var(--sale-soft); color: var(--sale); }
.btn--ico { width: 44px; padding: 0; flex: 0 0 auto; }
.btn--s { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; gap: 6px; }
.btn--s svg { width: 16px; height: 16px; }
.btn--s.btn--ico { width: 36px; padding: 0; }
.btn--big { height: 52px; font-size: 15px; }
.btn--big svg { width: 20px; height: 20px; }
.btn--block { display: flex; width: 100%; }
/* ждёт ответа сервера: кольцо вместо реакции на нажатия */
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: 0 0 auto; }
/* ряд кнопок формы: главная справа на десктопе, во всю ширину на телефоне */
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acts--end { justify-content: flex-end; }

.iconbtn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 11px;
  background: var(--bg-3); color: var(--fg);
  flex: 0 0 auto;
  text-decoration: none;
  transition: background .2s;
}
.iconbtn svg { width: 21px; height: 21px; }
.iconbtn:hover { background: var(--bg-4); }

/* ссылка-действие в тексте: подчёркивание в цвет бренда */
.link { color: inherit; text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link:hover { text-decoration-color: currentColor; }
.link--muted { color: var(--fg-2); }

/* --------------------------------------------------------------------------
   4. Чипсы (отборы, дни недели, быстрые варианты) и сегмент-контрол
   -------------------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-2); color: var(--fg-2);
  font: 600 12.5px/1 var(--f-body);
  white-space: nowrap;
  flex: 0 0 auto;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.chip::before { content: ""; position: absolute; inset: -6px 0; }
.chip:hover { background: var(--bg-3); }
.chip__n { font-style: normal; font-size: 10.5px; opacity: .6; }
.chip__n:empty { display: none; }
.chip.is-on, .chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip.is-on .chip__n, .chip[aria-pressed="true"] .chip__n { opacity: .7; }
.chip.is-zero { opacity: .45; }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.chip--static { cursor: default; height: 26px; padding: 0 9px; font-size: 11.5px; }
.chip--static:hover { background: var(--bg-2); }
.chip--x { padding-right: 8px; background: var(--bg-3); border-color: var(--line-2); color: var(--fg); }
.chip--x svg { width: 14px; height: 14px; color: var(--fg-2); }
.chip--x .chip__sort { color: var(--fg-2); }
.chip--x:hover { background: var(--bg-4); border-color: var(--fg); }
.chip--x:hover svg { color: var(--fg); }
.chip--opt { height: 34px; }

/* разделы страницы: чипсы-ссылки; на телефоне — лентой с прокруткой */
.subnav { display: flex; gap: 6px; margin: 0 -12px 14px; padding: 2px 12px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }

/* сегмент-контрол: 2–5 взаимоисключающих вариантов на серой подложке, выбранный — белой плашкой */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg-3); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg__btn {
  flex: 0 0 auto;
  height: 34px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--fg-2);
  font: 600 13px/1 var(--f-body); white-space: nowrap;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.seg__btn:hover { color: var(--fg); }
.seg__btn[aria-pressed="true"], .seg__btn[aria-selected="true"], .seg__btn[aria-current="page"], .seg__btn.is-on { background: var(--bg-2); color: var(--fg); box-shadow: var(--shadow-s); }
.seg__btn svg { width: 16px; height: 16px; }
.seg--block { display: flex; }
.seg--block .seg__btn { flex: 1 1 0; }

/* --------------------------------------------------------------------------
   5. Формы. Поле: подпись сверху, подсказка и ошибка снизу. Шрифт полей 16 px — iOS не приближает страницу
   -------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { font: 600 12.5px/1.25 var(--f-body); color: var(--fg-2); }
.field__label i { font-style: normal; color: var(--sale); }
.field__hint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--fg-3); }
.field__error { margin: 0; font-size: 12px; line-height: 1.4; color: var(--sale); font-weight: 600; }
.field__error:empty { display: none; }
.input {
  width: 100%; min-width: 0;
  height: 44px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--bg-2); color: var(--fg);
  font: 500 16px/1.3 var(--f-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .3s;
}
.input::placeholder { color: var(--fg-3); font-weight: 400; }
.input:hover { border-color: color-mix(in srgb, var(--line-2) 50%, var(--fg-3)); }
.input:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.input:disabled, .input[readonly] { background: var(--bg-3); color: var(--fg-2); border-color: var(--line); }
.input[readonly]:focus { box-shadow: none; border-color: var(--line-2); }
textarea.input { height: auto; min-height: 112px; padding: 11px 14px; line-height: 1.45; resize: vertical; }
.field.is-invalid .input, .input[aria-invalid="true"] { border-color: var(--sale); box-shadow: 0 0 0 3px var(--sale-soft); }
.input--num { font-variant-numeric: tabular-nums; }
/* список: своя стрелка (цвет из темы), нативный выпадающий список */
.select { position: relative; display: block; min-width: 0; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--fg-3); border-bottom: 2px solid var(--fg-3);
  transform: rotate(45deg); pointer-events: none;
}
.select .input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; text-overflow: ellipsis; }
/* поле с кнопкой или единицей справа («ИНН [Проверить]», «₽») */
.inputgroup { display: flex; gap: 8px; align-items: stretch; }
.inputgroup .input { flex: 1 1 auto; }
.inputgroup .btn { height: 44px; flex: 0 0 auto; }

/* подсказки адреса (B4B.suggest): поле обёрнуто в .suggest-host, список — под полем */
.suggest-host { position: relative; display: block; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-direction: column; max-height: 290px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); box-shadow: var(--shadow); }
.suggest__item { padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--fg); font: 500 14px/1.3 var(--f-body); text-align: left; }
.suggest__item:hover, .suggest__item.is-on { background: var(--bg-3); }

/* сохранение раздела формы: кнопка и строка состояния */
.savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.savebar__msg { font-size: 12.5px; color: var(--fg-3); }
.savebar__msg.is-ok { color: var(--ok); }
.savebar__msg.is-err { color: var(--sale); }

/* флажок и радио: настоящий input (клавиатура, формы), поверх — квадрат/круг в цветах темы */
.check {
  position: relative;
  display: inline-flex; align-items: flex-start; gap: 10px;
  min-height: 24px;
  font: 500 14px/1.35 var(--f-body); color: var(--fg);
  cursor: pointer; user-select: none;
}
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.check__box {
  flex: 0 0 auto;
  width: 20px; height: 20px; margin-top: -1px;
  border-radius: 6px; border: 1.5px solid var(--fg-3);
  display: grid; place-items: center;
  color: var(--bg);
  transition: background .2s, border-color .2s;
}
.check__box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s var(--ease); }
.check input:checked + .check__box { background: var(--fg); border-color: var(--fg); }
.check input:checked + .check__box svg { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { outline: 2px solid var(--focus); outline-offset: 2px; }
.check input:disabled + .check__box { opacity: .5; }
.check--radio .check__box { border-radius: 50%; }
.check--radio .check__box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s var(--ease); }
.check--radio input:checked + .check__box::after { opacity: 1; transform: none; }
.check small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--fg-3); font-weight: 400; }

/* переключатель «вкл/выкл»: действие применяется сразу (уведомления, «адрес отличается от ЕГАИС») */
.switch {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 28px;
  font: 500 14px/1.35 var(--f-body); color: var(--fg);
  cursor: pointer; user-select: none;
}
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch__t { min-width: 0; }
.switch__t small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--fg-3); font-weight: 400; }
.switch__sw { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--bg-4); flex: 0 0 auto; transition: background .2s; }
.switch__sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked ~ .switch__sw { background: var(--fg); }
.switch input:checked ~ .switch__sw::after { transform: translateX(16px); }
:root[data-theme="dark"] .switch input:checked ~ .switch__sw::after { background: var(--bg); }
.switch input:focus-visible ~ .switch__sw { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch input:disabled ~ .switch__sw { opacity: .5; }
.switch:has(input:disabled) { cursor: not-allowed; }

/* карточка выбора: способ доставки, оплаты, адрес. Выбранная — тёмной рамкой, как фасовка на витрине */
.choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.choice {
  position: relative;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.choice:hover { background: color-mix(in srgb, var(--bg-2) 70%, var(--bg-3)); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__mark { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--fg-3); display: grid; place-items: center; transition: border-color .2s, background .2s; }
.choice__mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s var(--ease); }
.choice__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.choice__title { font: 700 14.5px/1.25 var(--f-body); }
.choice__text { font-size: 12.5px; line-height: 1.4; color: var(--fg-2); }
.choice__aside { flex: 0 0 auto; font: 700 13.5px/1.25 var(--f-body); white-space: nowrap; }
.choice:has(input:checked) { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.choice:has(input:checked) .choice__mark { background: var(--fg); border-color: var(--fg); }
.choice:has(input:checked) .choice__mark::after { opacity: 1; transform: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   6. Поверхности: блок раздела, заголовок страницы, подпись раздела, заметка, пустое состояние
   -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.box {
  min-width: 0;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
}
.box--flat { background: var(--bg-3); border-color: transparent; box-shadow: none; }
.box__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.box__head:last-child { margin-bottom: 0; }
.box__title { margin: 0; font: 700 17px/1.25 var(--f-body); letter-spacing: -.01em; }
.box__sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--fg-3); }
.box__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* заголовок страницы: «назад», крупное название шрифтом Alumni, подпись, действия справа */
.phead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin: 8px 0 14px; }
.phead__main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.phead__back { display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; margin-left: -3px; font: 600 13px/1 var(--f-body); color: var(--fg-2); text-decoration: none; }
.phead__back svg { width: 16px; height: 16px; }
.phead__back:hover { color: var(--fg); }
.phead__title { margin: 0; font: 700 40px/.9 var(--f-display); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.phead__sub { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--fg-2); }
.phead__acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* подпись раздела: мелкие прописные и линия до края */
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; font: 700 11px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.eyebrow::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* заметка: справка, предупреждение, успех. Иконка слева, действие справа */
.note {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0; padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-3);
  font-size: 13px; line-height: 1.45; color: var(--fg-2);
}
.note > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--fg-2); }
.note p { margin: 0; }
.note b { color: var(--fg); }
.note__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.note__act { flex: 0 0 auto; align-self: center; }
.note--brand { background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--fg); }
.note--brand > svg { color: var(--brand-text); }
.note--warn { background: var(--sale-soft); border: 1px solid var(--sale); color: var(--fg); }
.note--warn > svg { color: var(--sale); }
.note--ok { background: var(--ok-soft); color: var(--fg); }
.note--ok > svg { color: var(--ok); }
.note--info { background: var(--info-soft); color: var(--fg); }
.note--info > svg { color: var(--info); }

.empty { text-align: center; padding: 48px 16px 56px; color: var(--fg-2); }
.empty__art { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; color: var(--brand-text); }
.empty__art svg { width: 26px; height: 26px; }
.empty h2 { margin: 0 0 4px; font: 700 32px/1 var(--f-display); text-transform: uppercase; color: var(--fg); letter-spacing: .02em; }
.empty p { margin: 0 0 18px; font-size: 14px; }

/* загрузка: кольцо */
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--fg); animation: spin .8s linear infinite; vertical-align: middle; }

/* --------------------------------------------------------------------------
   7. Данные
   -------------------------------------------------------------------------- */
/* таблица: заголовки мелкими прописными, числа справа и моноширинными цифрами.
   .tbl--stack на телефоне превращает строки в карточки: подпись колонки берётся из data-label ячейки */
.tbl-wrap { min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--shadow-card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.35; }
.tbl th {
  padding: 11px 12px 9px;
  text-align: left; vertical-align: bottom;
  font: 700 11px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--bg-2) 70%, var(--bg-3)); }
.tbl tfoot td { padding: 12px; border-top: 1px solid var(--line-2); font-weight: 800; }
.tbl .num, .tbl th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl__name { font-weight: 700; }
.tbl__sub { display: block; margin-top: 2px; font-size: 12px; color: var(--fg-3); font-weight: 400; }
.tbl a { text-decoration-color: var(--brand-line); text-underline-offset: 2px; }
@media (max-width: 719px) {
  .tbl--stack thead { display: none; }
  .tbl--stack, .tbl--stack tbody, .tbl--stack tr, .tbl--stack td { display: block; }
  .tbl--stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tbl--stack tbody tr:last-child { border-bottom: 0; }
  .tbl--stack td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .tbl--stack td::before { content: attr(data-label); flex: 0 0 auto; color: var(--fg-3); font-size: 12.5px; text-align: left; }
  .tbl--stack td:not([data-label])::before { content: none; }
  .tbl--stack td.tbl__lead { display: block; padding-bottom: 6px; text-align: left; }
  .tbl--stack tfoot { display: block; }
  .tbl--stack tfoot tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px; border-top: 1px solid var(--line-2); }
  .tbl--stack tfoot td { display: block; padding: 0; border: 0; }
  .tbl--stack td > span { min-width: 0; }
}

/* список строк-ссылок: заказы, документы, контакты. Слева главное, справа сумма/статус */
.list { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--shadow-card); overflow: hidden; }
.list__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 4px 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: background .2s;
}
.list__row:last-child { border-bottom: 0; }
a.list__row:hover, button.list__row:hover, .list__row:has(.list__link:hover) { background: color-mix(in srgb, var(--bg-2) 70%, var(--bg-3)); }
/* строка со своими кнопками (например, «Счёт»): ссылка — только заголовок, растянутый на всю строку,
   кнопки поверх неё (.list__act) — вложенные ссылки в <a> недопустимы */
.list__row { position: relative; }
.list__link { color: inherit; text-decoration: none; }
.list__link::after { content: ""; position: absolute; inset: 0; }
.list__link:focus-visible { outline: none; }
.list__row:has(.list__link:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.list__act { position: relative; z-index: 1; }
button.list__row { width: 100%; border-left: 0; border-right: 0; border-top: 0; background: transparent; text-align: left; font: inherit; }
.list__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.list__title { font: 700 15px/1.25 var(--f-body); overflow-wrap: anywhere; }
.list__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12.5px; color: var(--fg-3); }
.list__side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.list__sum { font: 800 16px/1 var(--f-body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.list__chev { width: 16px; height: 16px; color: var(--fg-3); }

/* «ключ — значение»: реквизиты, детали заказа */
.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { margin: 0; flex: 0 1 auto; color: var(--fg-3); font-size: 13px; }
.kv dd { margin: 0; flex: 0 1 auto; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.kv--col > div, .kv > .kv__wide { flex-direction: column; align-items: stretch; gap: 3px; }
.kv--col dd, .kv > .kv__wide dd { text-align: left; }

/* статус заказа: точка и слово. Резерв — жёлтый, сборка — синий, отгружен — зелёный, отменён — красный */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  background: var(--bg-3); color: var(--fg-2);
  font: 700 11.5px/1 var(--f-body);
  white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.status--reserve { background: var(--brand-soft); color: var(--brand-text); }
.status--work { background: var(--info-soft); color: var(--info); }
.status--done { background: var(--ok-soft); color: var(--ok); }
.status--cancel { background: var(--sale-soft); color: var(--sale); }

/* шаги (путь заказа): полосы как у лестницы скидок — пройденные чёрные, текущая жёлтая */
.steps { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps__i { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.steps__i i { display: block; height: 8px; border-radius: 4px; background: var(--lad-track); }
.steps__i b { font: 700 12.5px/1.2 var(--f-body); color: var(--fg-3); }
.steps__i small { font-size: 11.5px; color: var(--fg-3); }
.steps__i.is-done i { background: var(--fg); }
.steps__i.is-done b { color: var(--fg); }
.steps__i.is-now i { background: var(--brand); }
.steps__i.is-now b { color: var(--fg); font-weight: 800; }

/* итог: подпись прописными слева, крупная сумма шрифтом Alumni справа */
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.total small { display: block; margin-top: 4px; font: 500 11px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--fg-3); }
.total b { font: 700 36px/1 var(--f-display); color: var(--fg); letter-spacing: .01em; white-space: nowrap; }

/* бейджи: «Новинка», скидка, «Промо», «Резерв» */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 6px 3px;
  border-radius: 5px;
  font: 800 9px/1 var(--f-body);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--badge-fg);
  background: var(--badge-bg);
  white-space: nowrap;
}
.badge--new { background: #ffffff; color: #1a1714; box-shadow: inset 0 0 0 1.5px #1a1714; }
.badge--sale { background: var(--sale); color: #fff; font-size: 10px; letter-spacing: .03em; }
.badge--promo { background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-line); }
.badge--soft { background: var(--bg-3); color: var(--fg-2); }

/* поле «скопировать»: ссылка на документ, реквизиты */
.copy { display: flex; min-width: 0; max-width: 420px; }
.copy__in { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 10px; background: var(--bg-3); color: var(--fg-2); font: 500 12.5px var(--f-body); outline: none; }
.copy__btn { flex: 0 0 auto; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 0 10px 10px 0; background: var(--bg-2); color: var(--fg); font: 700 12.5px var(--f-body); }
.copy__btn:hover { background: var(--bg-3); }
.copy__btn svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   8. Шторки: на телефоне выезжают снизу, от 720 px — модальное окно по центру (<dialog>, B4B.openDialog)
   -------------------------------------------------------------------------- */
.sheet {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  color: var(--fg);
  overflow: visible;
  transition: background-color .3s;
}
.sheet::backdrop { background: transparent; }
.sheet.is-in { background: var(--veil); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - 20px);
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-radius: var(--r-l) var(--r-l) 0 0;
  box-shadow: var(--shadow);
  transform: translateY(100%);
  transition: transform .42s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.is-in .sheet__panel { transform: none; }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 6px; flex: 0 0 auto; }
.sheet__close { position: absolute; top: 18px; right: 12px; z-index: 3; background: var(--scrim-btn); color: var(--scrim-btn-fg); }
.sheet__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 18px; min-height: 0; }
/* содержимое простой шторки (формы, подтверждения): колонка с заголовком */
.sheet__body { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.sheet__h { margin: 0; padding-right: 52px; font: 700 32px/.92 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.sheet__lead { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
/* липкий низ шторки: кнопки действия */
.sheet__foot {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.sheet__foot .btn { flex: 1 1 auto; }

/* --------------------------------------------------------------------------
   9. Тост: короткое сообщение внизу, иногда с кнопкой «Вернуть»
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 100;
  transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--pop-bg); color: var(--pop-fg);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease);
}
.toast.is-in { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast__btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--pop-fg) 14%, transparent); color: var(--pop-fg); font: 700 12.5px var(--f-body); white-space: nowrap; }
.toast__btn svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   10. Подвал
   -------------------------------------------------------------------------- */
.foot { display: flex; align-items: center; gap: 12px; padding-block: 18px 22px; font-size: 12px; color: var(--fg-3); border-top: 1px solid var(--line); }
.foot__w { width: 18px; height: 24px; opacity: .6; }
.foot span { flex: 1 1 auto; }
.foot a { color: var(--fg-2); text-decoration-color: var(--brand-line); text-underline-offset: 2px; }

/* «Сообщить о проблеме»: форма в шторке, есть на каждой странице */
.fb { display: flex; flex-direction: column; gap: 12px; }
.fb__title { margin: 0; padding-right: 52px; font: 700 30px/.95 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.fb__lead { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
.fb__text {
  width: 100%; min-height: 128px; resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--bg-2); color: var(--fg);
  font: 400 15px/1.45 var(--f-body);
}
.fb__text:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.fb__send { align-self: flex-start; }

/* --------------------------------------------------------------------------
   11. Утилиты
   -------------------------------------------------------------------------- */
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.ok-text { color: var(--ok); }
.sale-text { color: var(--sale); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

/* --------------------------------------------------------------------------
   12. Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 359px) {
  .hdr__demo { display: none; }
}
@media (max-width: 719px) {
  .hdr__theme { display: none; } /* на телефоне тема — в меню */
  .acts--end .btn { flex: 1 1 auto; }
}
@media (min-width: 560px) {
  .hdr__word { display: inline; }
  .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .subnav { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; }
  .hdr__in { height: 60px; gap: 12px; }
  .hdr__mark { height: 28px; }
  .hdr__theme { order: 10; }
  .hdr__burger { order: 11; }
  .box { padding: 18px 20px; }
  .phead { margin: 12px 0 18px; }
  .phead__title { font-size: 52px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* модалка вместо шторки */
  .sheet__panel {
    left: 50%; top: 50%; right: auto; bottom: auto;
    width: min(560px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    border-radius: var(--r-l);
    transform: translate(-50%, -50%) scale(.96);
    opacity: 0;
    transition: transform .35s var(--ease), opacity .3s;
    padding-bottom: 0;
  }
  .sheet.is-in .sheet__panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grip { display: none; }
  .sheet__close { top: 14px; right: 14px; }
  .sheet__scroll { padding: 22px 24px 26px; }
  .sheet__body { padding-top: 0; }
  .sheet__h { font-size: 40px; }
  .sheet__foot { padding: 12px 24px 14px; border-radius: 0 0 var(--r-l) var(--r-l); }
  .sheet__foot .btn { flex: 0 0 auto; }
  .sheet--wide .sheet__panel { width: min(760px, calc(100vw - 48px)); }
  .sheet--fb .sheet__panel { width: min(520px, calc(100vw - 48px)); }
  .sheet--confirm .sheet__panel { width: min(440px, calc(100vw - 48px)); }
  .sheet--confirm .sheet__h { font-size: 32px; }
}
@media (min-width: 960px) {
  .hdr__in { gap: 16px; }
  .hdr__nav { display: flex; gap: 2px; margin-left: 4px; }
  .hdr__nav a {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px; font-weight: 600;
    color: var(--hdr-ink);
    text-decoration: none;
    transition: color .2s, background .2s;
  }
  .hdr__nav a:hover { color: var(--hdr-ink); background: var(--hdr-btn); }
  .hdr__nav a.is-current { background: var(--hdr-ink); color: var(--brand); }
  /* внешние ссылки (промоматериалы) — только на широких экранах, ниже их показывает бургер */
  .hdr__nav a.hdr__nav--wide { display: none; }
  .hdr__who { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; min-width: 0; line-height: 1.15; text-align: right; }
  .hdr__company { font-weight: 600; font-size: 12.5px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hdr__dept { font-size: 11px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hdr__spacer { display: block; }
  .empty { padding: 90px 16px; }
}
/* компания в шапке: рядом навигация (и на витрине — чип скидки), до 1200 / 1440 px меню переносилось бы */
@media (min-width: 960px) and (max-width: 1199px) { .hdr__who { display: none; } }
@media (min-width: 960px) and (max-width: 1439px) { .hdr--busy .hdr__who { display: none; } }

/* от 1280 px в панель помещается и внешняя ссылка — тогда бургер не нужен; ниже он возвращается
   и показывает её в меню (панель с шестью названиями встала бы в две строки) */
@media (min-width: 1280px) {
  .hdr__nav a.hdr__nav--wide { display: block; }
  .hdr__burger { display: none; }
}
/* до 1440 px названия стоят плотнее: на витрине рядом ещё чип скидки, а ниже 1280 — и бургер */
@media (min-width: 960px) and (max-width: 1439px) {
  .hdr__nav { gap: 0; }
  .hdr__nav a { padding: 9px 8px; font-size: 12.5px; }
}
