/* OfisKonditera — дизайн-система «Мята» (по макету №4, затемнённая редакция)
   d5 (15.09): палитра настраивается ползунком оттенка --ui-hue (настройки
   кондитера). S/L каждого токена ЗАФИКСИРОВАНЫ — контраст текста/кнопок не
   меняется при любом оттенке, элементы не становятся невидимыми.
   Дефолт 140 = исходная «мята» (bg h127, primary h150, text h144 — offsets). */
:root {
  --ui-hue: 140;
  /* фон затемнён на ~20% — меньше слепит; карточки светлее фона, чтобы выделялись */
  --mint-bg: hsl(calc(var(--ui-hue) - 13), 31%, 85%);
  --mint-bg-dark: hsl(calc(var(--ui-hue) - 10), 24%, 76%); /* hover по элементам на базе mint-bg — затемнение */
  --mint-surface: #ffffff;
  --mint-surface-2: #ffffff;
  --mint-primary: hsl(calc(var(--ui-hue) + 10), 40%, 45%);
  --mint-primary-dark: hsl(calc(var(--ui-hue) + 9), 46%, 31%);
  --mint-text: hsl(calc(var(--ui-hue) + 4), 33%, 18%);
  --mint-muted: hsl(calc(var(--ui-hue) + 7), 13%, 35%); /* П5 (21.09, панель): 37→35% — WCAG AA 4.5:1 на mint-bg (было 4.34) */
  --mint-border: hsl(var(--ui-hue), 27%, 83%);
  --alert-pink-bg: #fdedef;
  --alert-pink-border: #f3b6c0;
  --alert-pink-text: #a53c54;
  --success-bg: hsl(calc(var(--ui-hue) - 6), 36%, 91%);
  /* Статусы заказов — токены (21.09, «единый шоколадный стиль»): темы переопределяют
     их у себя, базовая палитра = прежние пастельные цвета мяты. Новый — мятный,
     Подтверждён — небесный, В работе — лавандовый, Готов — персиковый. */
  --st-new-bg: #d9ecdf;      --st-new-fg: #256545;
  --st-confirmed-bg: #d7e8f5; --st-confirmed-fg: #2a5d84;
  --st-inwork-bg: #e3dcf2;   --st-inwork-fg: #5c4a8a;
  --st-ready-bg: #fbe3cd;    --st-ready-fg: #91571a;
  --st-cancel-bg: #e4e7e5;   --st-cancel-fg: #6b7772;
  /* активные чипы выбора статуса: фон насыщеннее бейджа, рамка ещё темнее */
  --st-new-active-bg: #b9d9c4;      --st-new-active-bd: #7fb394;      --st-new-active-fg: #1d4f36;
  --st-confirmed-active-bg: #b8d4ea; --st-confirmed-active-bd: #7fadcf; --st-confirmed-active-fg: #234e70;
  --st-inwork-active-bg: #cbbde6;   --st-inwork-active-bd: #9d87cc;   --st-inwork-active-fg: #4a3a73;
  --st-ready-active-bg: #f2cda8;    --st-ready-active-bd: #d8a268;    --st-ready-active-fg: #77460f;
  --radius: 16px;
  --radius-sm: 12px;
  /* тени усилены — лучше разделяют слои на тёмном фоне */
  --shadow: 0 6px 22px rgba(23, 48, 33, 0.16);
  --transition: 180ms cubic-bezier(.4, 0, .2, 1);
  /* ui-polish (17.09, гайд AI Studio п.1/4): шрифтовая пара вместо системного Segoe UI.
     Playfair Display — «кондитерская витрина» (заголовки, названия тортов, цены-акценты),
     DM Sans — чистый SaaS-текст интерфейса. Оба — локальные woff2 (static/fonts). */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Нежные кондитерские SVG-иконки ---------- */
.icn {
  display: inline-block; width: 1em; height: 1em;
  vertical-align: -0.15em; flex-shrink: 0;
  color: #7fa08c; /* базовый контур — мягкий шалфей */
}
/* Пастельная радуга: свой оттенок у каждого ярлыка меню и вкладок */
.drawer-item[data-screen="today"] .icn,    .tab[data-screen="today"] .icn,    .fab-menu-item[data-action="product"] .icn { color: #e58ba4; }
.drawer-item[data-screen="orders"] .icn,   .tab[data-screen="orders"] .icn,   .fab-menu-item[data-action="order"] .icn   { color: #e09a7c; }
.drawer-item[data-screen="store"] .icn,    .tab[data-screen="store"] .icn     { color: #5fb892; }
.drawer-item[data-screen="calendar"] .icn, .tab[data-screen="calendar"] .icn  { color: #9a8ed6; }
.drawer-item[data-screen="clients"] .icn,  .fab-menu-item[data-action="client"] .icn { color: #e8a86a; }
.drawer-item[data-screen="calc"] .icn      { color: #58b0b0; }
.drawer-item[data-screen="production"] .icn{ color: #7fa4d6; }
.drawer-item[data-screen="shopping"] .icn  { color: #d6ab5a; }
.drawer-item[data-screen="finance"] .icn   { color: #d98fb2; }
.drawer-item[data-screen="past"] .icn      { color: #b48ac4; }
.drawer-item[data-screen="help"] .icn      { color: #6fb47f; }
.drawer-item[data-screen="settings"] .icn  { color: #cf8898; }
.drawer-item[href="/admin"] .icn           { color: #a188c9; }
/* Админка: свой оттенок у каждой вкладки (активная — белая на зелёном, как прежде) */
.admin-tab[data-tab="dashboard"] .icn     { color: #d6ab5a; }
.admin-tab[data-tab="registrations"] .icn { color: #e58ba4; }
.admin-tab[data-tab="users"] .icn         { color: #e8a86a; }
.admin-tab[data-tab="platform"] .icn      { color: #58b0b0; }
.admin-tab[data-tab="payments"] .icn      { color: #7fa4d6; }
.admin-tab[data-tab="health"] .icn        { color: #e08a9e; }
.admin-tab[data-tab="backups"] .icn       { color: #5fb892; }
.admin-tab[data-tab="settings"] .icn      { color: #b48ac4; }
.admin-tab.active .icn { color: #fff; }

/* ============ СТИЛЬ «КОНФЕТКА» (18.09, выбор пользователя) ============
   Каждая иконка — на своей пастельной КВАДРАТНОЙ плитке (скругление как у
   пастель-варианта коллажа), цвета насыщеннее базовых. Плитка = фон у svg:
   padding через content-box превращает иконку в плитку нужного размера. */
.drawer-item .icn, .fab-menu-item .icn {
  box-sizing: content-box; padding: 6px; border-radius: 11px;
  background: var(--chip, var(--success-bg));
  box-shadow: inset 0 -2px 0 rgba(23,48,33,.05);
  filter: saturate(1.25);
}
.tab-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--chip, var(--success-bg));
  box-shadow: inset 0 -2.5px 0 rgba(23,48,33,.06);
  transition: background var(--transition), transform var(--transition);
}
/* Н3 (19.09): подъём иконки при наведении — только для устройств с мышью.
   На тач-экранах :hover прилипает к элементу под пальцем при листании
   влево-вправо — соседние значки «дёргались» (фидбек пользователя) */
@media (hover: hover) {
  .tab:hover .tab-icon { transform: translateY(-1px); filter: brightness(.97); }
}
.tab-icon .icn { filter: saturate(1.3); }
.tab-icon .icn, .tab .icn { width: 26px; height: 26px; }

/* Свои оттенки плиток: нижняя панель + drawer + fab-меню (один цвет на раздел) */
.drawer-item[data-screen="today"] .icn, .tab[data-screen="today"] .tab-icon { background: #f9d4de; }
.drawer-item[data-screen="orders"] .icn, .tab[data-screen="orders"] .tab-icon, .fab-menu-item[data-action="order"] .icn { background: #ffe0d0; }
.drawer-item[data-screen="store"] .icn, .tab[data-screen="store"] .tab-icon { background: #cdeed9; }
.drawer-item[data-screen="calendar"] .icn, .tab[data-screen="calendar"] .tab-icon { background: #e2dcf7; }
.drawer-item[data-screen="clients"] .icn, .fab-menu-item[data-action="client"] .icn { background: #ffe9cf; }
.drawer-item[data-screen="calc"] .icn { background: #d7eef0; }
.drawer-item[data-screen="production"] .icn { background: #dfe9fa; }
.drawer-item[data-screen="shopping"] .icn { background: #fdf3c8; }
.drawer-item[data-screen="finance"] .icn { background: #f9dfe9; }
.drawer-item[data-screen="past"] .icn { background: #ece2f7; }
.drawer-item[data-screen="help"] .icn { background: #dcf0dc; }
.drawer-item[data-screen="settings"] .icn { background: #f6dee4; }
.drawer-item[data-screen="subscription"] .icn { background: #fdf0d4; }
.drawer-item[href="/admin"] .icn { background: #e6dff5; }
.fab-menu-item[data-action="product"] .icn { background: #f9d4de; }

/* Карточки «Сегодня»: у каждой секции свой оттенок плитки-иконки */
#requests-block .card-icon { background: #f9d4de; }
#deliveries-block .card-icon { background: #dfe9fa; }
#overdue-block .card-icon { background: #fbd7d7; }
#prep-block .card-icon { background: #fdf3c8; }
#debts-block .card-icon { background: #f9dfe9; }
#alerts-block .card-icon { background: #fbd7d7; }
.card-icon .icn, .pay-icon .icn { filter: saturate(1.25); }
/* ============ /КОНФЕТКА ============ */

/* FAB-плюс остаётся белым */
.fab .icn { color: #fff; width: 26px; height: 26px; }
.drawer-item .icn { width: 22px; height: 22px; }
/* размеры иконок конфетки задаёт блок выше; .icn внутри .tab-icon — 26px */
.fab-menu-icon .icn, .fab-menu-item .icn { width: 22px; height: 22px; }
.card-icon { font-size: 0; }
.card-icon .icn { width: 22px; height: 22px; }
.pay-icon { font-size: 0; }
.pay-icon .icn { width: 26px; height: 26px; }
.capacity-icon { font-size: 0; }
.capacity-icon .icn { width: 30px; height: 30px; }
.form-group-title .icn { width: 18px; height: 18px; vertical-align: -0.25em; }
.pick-btn .icn, .btn .icn { width: 16px; height: 16px; vertical-align: -0.25em; }
.admin-tab .icn { width: 18px; height: 18px; vertical-align: -0.3em; margin-right: 2px; }
h2 .icn { width: 19px; height: 19px; vertical-align: -0.25em; margin-right: 2px; }
.store-logo { font-size: 0; }
.store-logo .icn { width: 56px; height: 56px; }
.login-logo { font-size: 0; }
.login-logo .icn { width: 54px; height: 54px; }
.logo-placeholder { font-size: 0; display: inline-flex; }
.logo-placeholder .icn { width: 36px; height: 36px; }
.product-img { font-size: 0; }
.product-img .icn { width: 52px; height: 52px; }
.pick-thumb-empty .icn { width: 22px; height: 22px; }
.catalog-thumb-empty .icn { width: 28px; height: 28px; }
.pw-toggle { line-height: 0; }
.pw-toggle .icn { width: 18px; height: 18px; }
.task-group-head .icn { width: 16px; height: 16px; vertical-align: -0.2em; }
.product-attr .icn, .picker-title .icn { width: 15px; height: 15px; vertical-align: -0.2em; }
.toast .icn, .hint .icn { width: 15px; height: 15px; vertical-align: -0.2em; }
.chip .icn { width: 16px; height: 16px; vertical-align: -0.28em; }
.calc-row .icn { width: 15px; height: 15px; vertical-align: -0.22em; color: var(--mint-primary-dark); }
.pick-group-title .icn { width: 14px; height: 14px; vertical-align: -0.22em; }
.sub-active-line .icn, .sub-expired-line .icn, .sub-paused-line .icn { width: 17px; height: 17px; vertical-align: -0.25em; }
.status-sheet-item .icn, .status-chip .icn { width: 15px; height: 15px; vertical-align: -0.22em; }
.status-sheet-item.active .icn, .status-chip.active .icn { color: #fff; }
.cal-busy { display: inline-flex; }
.cal-busy .icn { width: 12px; height: 12px; color: var(--alert-pink-text); }
.chip-x .icn { width: 10px; height: 10px; color: #fff; }
.photo-remove .icn { width: 11px; height: 11px; color: #fff; }
.task-remove .icn { color: var(--alert-pink-text); }
/* мягкие точки статусов склада */
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  vertical-align: -0.05em; flex-shrink: 0;
}
.dot-red { background: #e58394; box-shadow: 0 0 0 3px rgba(229, 131, 148, .28); }
.dot-yellow { background: #e6c069; box-shadow: 0 0 0 3px rgba(230, 192, 105, .3); }
.dot-green { background: #8fc7a2; box-shadow: 0 0 0 3px rgba(143, 199, 162, .3); }

body {
  font-family: var(--font-body);
  background: var(--mint-bg);
  color: var(--mint-text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Кнопки с состояниями нажатия/загрузки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: none; border-radius: var(--radius-sm);
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  user-select: none;
}
.btn:active { filter: brightness(.94); transform: scale(.97); } /* Г2 (29.09, frontend-craft): press-отдача на compositor-свойстве */
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--mint-primary); color: #fff; box-shadow: 0 4px 14px rgba(64, 147, 105, .4); }
.btn-primary:hover { background: var(--mint-primary-dark); }
.btn-primary.loading { pointer-events: none; opacity: .8; }
.btn-primary.loading::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-ghost {
  background: var(--mint-surface); color: var(--mint-text);
  border: 1.5px solid var(--mint-border); box-shadow: 0 2px 8px rgba(23, 48, 33, 0.12);
}
.btn-ghost:hover { background: var(--success-bg); border-color: var(--mint-primary); color: var(--mint-primary-dark); }
.btn-ghost .icn { color: var(--mint-primary-dark); }
.btn-primary .icn, .btn-danger .icn { color: inherit; }
.btn-block { width: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Формы ---------- */
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1.5px solid var(--mint-border); border-radius: var(--radius-sm);
  font-size: 15px; background: var(--mint-surface); color: var(--mint-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--mint-primary);
  box-shadow: 0 0 0 3px rgba(64, 147, 105, .25);
}
input:disabled, textarea:disabled, select:disabled {
  opacity: .55; background: var(--mint-bg, #f2f7f4); cursor: not-allowed;
}
/* Н2 (19.09): placeholder должен читаться как ПРИМЕР, а не как введённое
   значение — заметно светлее текста полей (было почти неотличимо на пастели) */
::placeholder { color: var(--mint-muted); opacity: .55; }
/* Н2 (19.09): подсветка невалидных полей после попытки сохранить —
   красная рамка + мягкое свечение; ошибка уходит, как только поле заполнено */
.field-error input, .field-error textarea, .field-error select,
input.field-error, textarea.field-error, select.field-error {
  border-color: #d9606a;
}
.field-error input:focus, .field-error textarea:focus, .field-error select:focus,
input.field-error:focus, textarea.field-error:focus, select.field-error:focus {
  box-shadow: 0 0 0 3px rgba(217, 96, 106, .22); border-color: #d9606a;
}
.field-error-msg {
  display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600;
  color: #c0434e;
}
.field-error-msg:empty { display: none; }
/* Н2 (19.09): пустое поле даты/времени браузер рисует маской «дд.мм.гггг»
   цветом обычного текста — выглядит как заполненное значение. Пока поле
   пустое (и обязательное), рисуем его как placeholder: приглушённо. */
input[type=date]:required:invalid, input[type=time]:required:invalid {
  color: var(--mint-muted); opacity: .7;
}
input[type=date]:required:valid, input[type=time]:required:valid {
  color: var(--mint-text); opacity: 1;
}

/* ---------- Вход ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--mint-surface);
  border: 1px solid var(--mint-border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 32px; text-align: center;
}
.login-logo { font-size: 48px; margin-bottom: 8px; }
.login-card h1 { font-family: var(--font-display); font-weight: 700; font-size: 27px; margin-bottom: 4px; letter-spacing: .01em; }
.login-sub { color: var(--mint-muted); font-size: 14px; margin-bottom: 28px; }
.login-error { color: var(--alert-pink-text); font-size: 14px; margin-top: 14px; min-height: 20px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; width: 100%; box-sizing: border-box; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px;
  line-height: 1; opacity: .75;
}
.pw-toggle:hover { opacity: 1; }
.login-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0;
  color: var(--mint-muted); font-size: 13px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--mint-border);
}
.register-title { font-size: 17px; margin-bottom: 14px; }
#register-form label { text-align: left; }
.register-ok { color: var(--mint-text); }

/* ---------- Кабинет ---------- */
.app-page { padding-bottom: 130px; }
/* Баннер имперсонации (виден только админу в режиме поддержки):
   липкая полоса поверх шапки — невозможно забыть, что работаешь в чужом кабинете */
.imp-banner {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; font-size: 13px; line-height: 1.35;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  color: #fff; box-shadow: 0 2px 10px rgba(124, 58, 237, .35);
}
.imp-banner .icn { width: 18px; height: 18px; fill: none; stroke: currentColor; flex-shrink: 0; }
.imp-banner strong { font-weight: 700; }
.imp-banner-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.imp-banner-actions .btn { white-space: nowrap; }
.imp-banner-actions .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.imp-banner-actions .btn-ghost:hover { background: rgba(255,255,255,.14); }
.imp-banner-actions .btn-primary { background: #fff; color: #7c3aed; }
.imp-banner-actions .btn-primary:hover { background: #f3e8ff; }
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 20px 12px; max-width: 720px; margin: 0 auto;
}
.app-header h1 { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: .01em; }
.app-header p { color: var(--mint-muted); font-size: 14px; }
.app-main { max-width: 720px; margin: 0 auto; padding: 8px 16px; display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--mint-surface); border-radius: var(--radius);
  border: 1px solid var(--mint-border);
  box-shadow: var(--shadow); padding: 18px;
}
.card h2 { font-size: 15px; margin-bottom: 12px; color: var(--mint-text); }
/* описание-подсказка прямо под заголовком карточки: отделяем отступом от
   следующего блока (иначе текст слипается со списком/кнопкой — аудит отступов) */
.card > .sub:not(:last-child) { display: block; margin-bottom: 10px; }
.card-alert { background: var(--alert-pink-bg); border: 1.5px solid var(--alert-pink-border); }
/* пустой блок «Сегодня»: не растягиваем карточку на 100px ради одной строки
   «ничего нет» — заголовок и пустое состояние в одну линию.
   П8 (19.09): padding ТОТ ЖЕ, что у обычной .card (18px) — иначе значки пустых
   и непустых карточек в одной колонке стояли вразнобой (не по сетке).
   Компактность достигается правилами ниже (head в линию, list без gap). */
.card.is-empty { padding: 18px; }
.card.is-empty .card-head { margin-bottom: 0; display: inline-flex; }
.card.is-empty .list { gap: 4px; margin-top: 0; }
.card.is-empty .list:has(> p.sub:only-child) { display: inline; }
.card.is-empty .list > p.sub:only-child { display: inline; margin-left: 8px; }
.card.is-empty .list > p.sub:only-child::before { content: "— "; color: var(--mint-muted); }
.card-alert h2 { color: var(--alert-pink-text); }
.card-success { background: var(--success-bg); border: 1.5px solid var(--mint-primary); text-align: center; margin: 16px auto; max-width: 720px; }

.list { display: flex; flex-direction: column; gap: 10px; }
/* Н3 (19.09): плавное затемнение при листании дат «Приготовить сегодня» —
   высота блока сохраняется, соседние карточки не дёргаются */
.list.is-loading { opacity: .45; transition: opacity .18s ease; pointer-events: none; }
.list:not(.is-loading) { transition: opacity .18s ease; }
/* М4 (20.09): плавная подгрузка при переключении разделов — существующий
   контент затемняется (высота сохраняется, ничего не «дёргается»),
   скелетон только при первой загрузке пустого контейнера.
   Класс is-loading снимает общий MutationObserver (softLoad в app.js). */
.is-loading { transition: opacity .18s ease; }
#screen-today .is-loading, #all-orders-list.is-loading, #clients-list.is-loading,
#catalog-list.is-loading, #ingredients-list.is-loading, #recipes-list.is-loading,
#packsets-list.is-loading, #production-list.is-loading, #shopping-list.is-loading,
#past-list.is-loading, #help-steps.is-loading, #finance-top.is-loading,
#order-page-fields.is-loading {
  opacity: .45; pointer-events: none;
}
/* голые контейнеры списков (рендерятся из JS без класса .list) — те же зазоры:
   иначе карточки «слипаются в едино» (жалоба: калькулятор, торт из прошлого, закупки) */
#recipes-list, #past-list, #production-list, #finance-top, #finance-expenses,
#shopping-list, #cal-day-detail, #packsets-list { display: flex; flex-direction: column; gap: 10px; }
#ingredients-list { display: flex; flex-direction: column; gap: 4px; }
/* e1 (15.09): строки склада внутри групп-спойлеров слипались (gap родителя
   #ingredients-list не проникает в .stock-group-body) — зелёные фоны наезжали
   друг на друга. Задаём промежутки явно + тонкая граница каждой строки. */
.stock-group-body { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 0 4px; }
.stock-group-body .list-item { border: 1px solid var(--mint-border); }
/* пустые состояния и подсказки внутри — без лишнего gap-растяжения */
#recipes-list > p.sub, #past-list > p.sub, #production-list > p.sub,
#finance-top > p.sub, #finance-expenses > p.sub { margin: 2px 0; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--mint-bg); transition: background var(--transition);
}
.list-item:hover { background: var(--mint-bg-dark); }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .title {
  font-weight: 600; font-size: 15px;
  /* длинные названия («Клубничный зефир в шоколаде…») не обрезаем точками —
     переносим на 2 строки; третья и дальше — многоточие */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-clamp: 2; overflow: hidden; overflow-wrap: break-word;
}
.list-item .sub { color: var(--mint-muted); font-size: 13px; }

/* Чекбокс задачи — плавный */
.task-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--mint-primary);
  background: transparent; cursor: pointer; flex-shrink: 0; position: relative;
  transition: background var(--transition);
}
.task-check.done { background: var(--mint-primary); }
.task-check.done::after {
  content: ''; position: absolute; inset: 0;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7 16.8l6.2 6.2L25 10.8' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7 16.8l6.2 6.2L25 10.8' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px 16px no-repeat;
}
.list-item.done .title { text-decoration: line-through; color: var(--mint-muted); }

.badge {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--success-bg); color: var(--mint-primary-dark); white-space: nowrap;
}
.badge.warn { background: #f5d9a8; color: #8f5700; }
.badge.pink { background: var(--alert-pink-bg); color: var(--alert-pink-text); }

.payments-total { font-size: 17px; }

/* ---------- Таб-бар с центральной ➕ ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 72px;
  background: var(--mint-surface); border-top: 1px solid var(--mint-border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px calc(env(safe-area-inset-bottom, 0px)); z-index: 50;
  box-shadow: 0 -4px 20px rgba(23, 48, 33, .14);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--mint-muted); font-size: 12px; font-weight: 600;
  /* Н1 (19.09): вертикальный padding уменьшен + line-height фиксирован, чтобы
     таб (~62px) гарантированно вписывался в бар 72px — выделение активной
     вкладки больше не вылезает за верхний/нижний край */
  padding: 5px 8px; line-height: 1.15; border-radius: 12px;
  transition: color var(--transition), background var(--transition);
  width: 72px;
}
.tab-icon { font-size: 20px; line-height: 1; }
.tab-active, .tab:hover { color: var(--mint-primary-dark); }
.tab:hover { background: var(--mint-surface-2); }
.tab-active { background: var(--success-bg); }
.tab-active:hover { background: color-mix(in srgb, var(--success-bg) 92%, var(--mint-text)); } /* Г9 (29.09): hover затемняет ЛЮБУЮ тему токеном, был хардкод #b3dbbf */
.fab {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--mint-primary); color: #fff; font-size: 26px; font-weight: 600;
  cursor: pointer; box-shadow: 0 8px 22px rgba(64, 147, 105, .5);
  margin-top: -30px; transition: transform var(--transition), background var(--transition);
}
.fab:hover { background: var(--mint-primary-dark); }
.fab:active { filter: brightness(.94); }

/* ---------- Витрина ---------- */
.store-page { padding-bottom: 40px; }
.store-header { text-align: center; padding: 36px 20px 20px; }
.store-logo { font-size: 52px; margin-bottom: 6px; }
.store-header h1 { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: .01em; }
.store-sub { color: var(--mint-muted); font-size: 14px; margin-top: 6px; letter-spacing: .02em; }
/* ui-polish (17.09): hero-баннер — широкая карточка с фото в стиле каталога.
   Скругление/тень как у карточек (--radius/--shadow), отступы контейнера как у store-nav,
   чтобы баннер жил в той же сетке 860px. Картинка декоративная (aria-hidden). */
.store-hero {
  max-width: 860px; margin: 4px auto 18px; padding: 0 16px;
}
.store-hero img {
  display: block; width: 100%; height: auto; max-height: 260px;
  object-fit: cover; object-position: center 62%;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (max-width: 640px) {
  .store-hero { margin: 0 auto 14px; }
  .store-hero img { max-height: 170px; border-radius: 14px; }
}
/* плавный скролл — только витрине (якоря категорий); в кабинете он
   анимировал обрезку скролла при смене вкладки и давал «дёрганье» */
html:has(body.store-page) { scroll-behavior: smooth; }
/* Скроллбар всегда оставляет место под себя: на коротких экранах без этого
   он исчезает, ширина страницы прыгает и вкладки «дёргаются» */
html { scrollbar-gutter: stable; overflow-y: scroll; }
.store-section { scroll-margin-top: 16px; }
.store-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 8px;
  max-width: 860px; margin: 0 auto; scrollbar-width: none;
}
.store-chips::-webkit-scrollbar { display: none; }

/* ---------- Единый индикатор горизонтальной прокрутки ----------
   Тонкий заметный ползунок под списками, которые можно сдвинуть
   (чипы категорий витрины, фильтр заказов, таблицы).
   Нативный скроллбар прятался при прокрутке (overlay) и лип к кнопкам —
   вместо него кастомная дорожка .h-scroll-track (вставляется JS после
   элемента): всегда видна, с отступом 6px снизу от контента. */
.h-scroll-ind {
  scrollbar-width: none; /* нативный прячем — рисуем свой индикатор */
}
.h-scroll-ind::-webkit-scrollbar { display: none; height: 0; }
.h-scroll-track {
  height: 4px; margin: 6px 2px 0; border-radius: 999px;
  background: rgba(31, 61, 43, .13); position: relative; overflow: hidden;
}
.h-scroll-track.hidden { display: none; }
.h-scroll-thumb {
  position: absolute; top: 0; bottom: 0; left: 0; min-width: 26px;
  border-radius: 999px; background: rgba(31, 61, 43, .5);
}
/* мягкое затухание краёв полосы: видно, что список продолжается дальше.
   d3 (15.09): затухание ДВУХСТОРОННЕЕ по факту скролла — когда пользователь
   прокрутил вправо, «размытие» появляется и слева (фидбек Дарьи: затухание
   было только у правого края, рядом с корзиной). Классы ставит initChipScrollHint. */
.h-fade-right {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.h-fade-right.scrolled-end {
  -webkit-mask-image: none; mask-image: none;
}
/* прокрутили от начала — затухаем слева, справа край ещё не достигнут */
.h-fade-right.scrolled-mid {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
/* доскроллили до конца — затухание только слева */
.h-fade-right.scrolled-end.scrolled-mid {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px);
  mask-image: linear-gradient(90deg, transparent, #000 28px);
}
.chip {
  flex-shrink: 0; padding: 9px 16px; border-radius: 999px; background: var(--mint-surface);
  color: var(--mint-text); text-decoration: none; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--mint-border); transition: background var(--transition), color var(--transition), border-color var(--transition); /* Г4 (29.09): не all */
}
.chip:hover { background: var(--mint-primary); color: #fff; border-color: var(--mint-primary); }
.store-main { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.store-section { margin-bottom: 28px; }
.store-section h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin-bottom: 14px; letter-spacing: .01em; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.product-card {
  background: var(--mint-surface); border-radius: var(--radius);
  border: 1px solid var(--mint-border); box-shadow: var(--shadow);
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
}
/* Н3 (19.09): подъём карточки при наведении — только для мыши (см. .tab:hover);
   на тач-устройствах прилипший hover дёргал карточки при листании */
@media (hover: hover) {
  .product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(23, 48, 33, .22); }
}
.product-img {
  height: 120px; border-radius: var(--radius-sm); background: var(--mint-bg);
  display: flex; align-items: center; justify-content: center; font-size: 48px;
}
.product-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: .01em; }
.product-card p { font-size: 13px; color: var(--mint-muted); }
/* компактная карточка: фото/иконка + название + цена + «Подробнее» + «Заказать».
   Полное описание — в поп-апе (карточки стали заметно короче по высоте) */
/* ЕДИНЫЙ ВИД КАРТОЧЕК (фидбек Даши: кнопки «Подробнее» ездили вверх-вниз):
   1. фото одной высоты (иначе у карточек с фото/заглушкой разная высота блока);
   2. название ровно в 2 строки (1-строчное растягивалось бы «прыжком» кнопки);
   3. кнопки всегда прижаты к низу карточки — у .card-foot margin-top:auto. */
/* c6-фикс (14.09): фикс. высота 140px при ширине ~230px давала «широкое» фото 16:10 —
   торты обрезались. Перешли на aspect-ratio 4:3: пропорции ровнее, высота по-прежнему
   единая у всех карточек (ширина одинаковая) — кнопки не «ездят». */
.product-card .product-photo, .product-card .product-img { aspect-ratio: 4 / 3; height: auto; }
.product-card h3 {
  /* ui-fix (17.09): height вместо min-height — название ВСЕГДА ровно 2 строки,
     поэтому цены/кнопки соседних карточек не «ездят» из-за 1-строчных названий */
  height: 2.6em; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.details-btn { align-self: flex-start; font-size: 12px; padding: 6px 12px; }
.details-btn .icn { width: 14px; height: 14px; }
/* Р15 (22.09): на 320px карточка товара узкая (137px) — кнопка «Подробнее»
   (124px) вылезала из .card-foot (111px). Растягиваем на всю ширину и
   уплотняем padding: контент + обе кнопки симметричны. */
@media (max-width: 400px) {
  .card-foot .details-btn { align-self: stretch; width: 100%; justify-content: center; padding: 6px 8px; }
}
/* поп-ап «Подробнее» */
.det-attr { display: flex; align-items: center; gap: 7px; font-size: 14px; margin: 7px 0; color: var(--mint-text); }
.det-attr .icn { width: 17px; height: 17px; flex-shrink: 0; }
.det-desc { font-size: 13.5px; line-height: 1.5; color: var(--mint-muted); margin: 10px 0; }
.det-price { font-family: var(--font-display); font-weight: 700; color: var(--mint-primary-dark); font-size: 19px; margin: 10px 0 4px; }
/* кнопка/степпер — блок .card-foot сам прижат к низу карточки */
.product-buy { margin-top: 0; }
/* цена — акцент карточки: display-шрифт, чуть крупнее (гайд: иерархия типографики) */
.product-price { font-family: var(--font-display); font-weight: 700; color: var(--mint-primary-dark); font-size: 18px !important; letter-spacing: .01em; }

/* ---------- Диалог заявки ---------- */
dialog {
  border: 1px solid var(--mint-border); border-radius: var(--radius); padding: 20px 20px 24px;
  box-shadow: 0 16px 48px rgba(20, 42, 28, .35); max-width: 480px; width: calc(100% - 24px);
  background: var(--mint-surface); color: var(--mint-text);
  margin: auto; /* явное центрирование (иначе слетает при переопределении ширины) */
  /* КРИТИЧНО (c5, 14.09): НЕ задавать position:relative — UA-стиль dialog:modal
     position:fixed; его переопределение уводит модалку из вьюпорта в поток
     документа (баг «модалка видна только вверху страницы»). fixed — тоже
     containing block для .dialog-close, крестик позиционируется корректно. */
}
/* крестик закрытия — заметный, сверху справа у любого диалога.
   c8-фикс (14.09): position:absolute «уезжал» при прокрутке длинной модалки.
   float+sticky конфликтовали (элемент выпадал вниз). Решение: чистый sticky
   top:0 + margin-left:auto (вправо) + отрицательный margin-bottom (компенсирует
   высоту, чтобы h3/контент не съезжали вниз). Работает в скроллирующем dialog. */
.dialog-close {
  position: sticky; top: 0; float: none; z-index: 3;
  margin: -8px -8px -28px auto;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--mint-surface-2, rgba(23, 48, 33, 0.14));
  border: 1px solid var(--mint-border);
  cursor: pointer; color: var(--mint-text);
  transition: background .15s, transform .1s;
}
.dialog-close:hover { background: rgba(23, 48, 33, 0.27); }
.dialog-close:active { filter: brightness(.94); }
.dialog-close .icn { width: 18px; height: 18px; }
dialog h3 { padding-right: 40px; }
/* ошибка телефона на витрине */
.phone-error { color: #c0392b !important; font-weight: 600; }
/* компактные отступы внутри всплывающих форм — больше помещается на мобильном */
dialog label { margin-bottom: 10px; }
dialog .form-group-title { margin: 12px 0 6px; }
dialog .field-row { gap: 8px; }
dialog::backdrop { background: rgba(23, 48, 33, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); } /* Г11 (29.09, frontend-craft): мягкое размытие подложки — диалог «отделён» от страницы */
dialog h3 { margin-bottom: 12px; font-size: 18px; }
/* появление диалога — плавное */
dialog[open] { animation: dialogIn .22s cubic-bezier(.4, 0, .2, 1); }
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
/* кнопка «Закрыть» прижата к левому краю панели действий (c8, 14.09) */
.dialog-action-left { margin-right: auto; }
dialog .dialog-actions {
  position: sticky; bottom: -24px; /* компенсируем нижний паддинг диалога */
  background: var(--mint-surface);
  padding-top: 12px; padding-bottom: 10px; margin: 8px -20px -24px;
  padding-left: 20px; padding-right: 20px;
  border-top: 1px solid var(--mint-border);
}

/* ---------- Тосты ---------- */
/* Р17 (23.09): flex в одну строку — раньше текст «Статус: X» и кнопка «Отменить»
   переносились на 2 строки внутри пилюли 999px (195×69) — «несуразно». Теперь
   компактный прямоугольник со скруглениями: текст + кнопка в строку, длинный
   текст аккуратно переносится внутри своей flex-ячейки. */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  max-width: min(calc(100vw - 24px), 440px);
  background: var(--mint-primary-dark); color: #fff; padding: 10px 16px; border-radius: 16px;
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; z-index: 100;
  transition: opacity 180ms cubic-bezier(0, 0, .2, 1), transform 180ms cubic-bezier(0, 0, .2, 1); /* вход (ease-out) */
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; transition: opacity 180ms cubic-bezier(0, 0, .2, 1), transform 180ms cubic-bezier(0, 0, .2, 1); } /* Г3: вход явно 180ms ease-out */
.toast:not(.show) { transition-duration: 126ms; transition-timing-function: cubic-bezier(.4, 0, 1, 1); } /* Г3 (29.09, frontend-craft/sonner): выход = вход×0.7, ease-in */ /* П1: кликабельность кнопки «Отменить» */
.toast.toast-error { background: var(--alert-pink-text); }
/* П1 (21.09, панель): тост с действием «Отменить» */
.toast-action {
  margin-left: 2px; padding: 6px 12px; border-radius: 999px; flex-shrink: 0; /* Р17: кнопка не сжимается — строка не ломается */
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .45);
  color: inherit; font: inherit; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.toast-action:hover { background: rgba(255, 255, 255, .3); }
.toast-action:active { transform: scale(.96); }
/* Ф1a (26.09, UI-ревью): на ≤480px тост и бургер-FAB висели в одном поясе
   (bottom:92px) — на 320px тост наезжал на бургер (overlap 5px, замер DOM).
   Поднимаем тост над бургером: 92 + 52 (высота FAB) + 8 = 152px.
   Без pointer:coarse — burger-fab виден и на узком десктопе (аудит 320px). */
@media (max-width: 480px) {
  .toast { bottom: 152px; }
}

/* ---------- Скелетоны загрузки ---------- */
.skeleton {
  height: 56px; border-radius: var(--radius-sm);
  background: #dfe9e1; position: relative; overflow: hidden; /* Г1 (29.09, frontend-craft): блик — compositor-слой ::after (translateX), а не background-position (paint каждый кадр) */
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  transform: translateX(-100%); animation: shimmerSlide 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } } /* legacy, оставлен на случай прямых ссылок */
@keyframes shimmerSlide { to { transform: translateX(100%); } }

@media (max-width: 480px) {
  .app-header h1 { font-size: 19px; }
  /* minmax(0,1fr): без нуля минимум трека = min-content карточки,
     и грид вылезал за правый край на узких экранах */
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* d4 (15.09): мобильная карточка витрины — название СВЕРХУ целиком (без
     обрезки «лимон черни…»), фото ниже, кнопки прижаты к низу.
     Фидбек Дарьи: line-clamp некрасиво резал названия. */
  .product-card { padding: 12px; gap: 6px; }
  .product-card h3 {
    order: -1;
    /* ui-fix (17.09): название сверху — ФИКСИРОВАННОЙ высоты в 2 строки,
       иначе у карточек с коротким названием фото «прыгает» выше соседей
       (фидбек Виталия: «название картинки то выше то ниже»). overflow hidden +
       clamp — длинные названия не вылезут поверх фото */
    height: 2.6em; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 15px;
  }
  /* фото и заглушка ОДНОЙ высоты — иначе кнопки соседних карточек «едут».
     c6 (14.09): на мобиле квадрат — фото тортов не «срезаются» по бокам */
  .product-card .product-photo, .product-card .product-img { aspect-ratio: 1 / 1; height: auto; }
  /* календарь: навигация месяца на свою строку, «Занять дату» — на всю ширину,
     иначе кнопки вылезали за правый край (396px при 390px экрана) */
  .cal-nav { flex-wrap: wrap; row-gap: 8px; }
  .cal-nav #cal-busy-btn { flex: 1 0 100%; justify-content: center; }
  .cal-nav strong { min-width: 0; flex: 1; }
  .cal-nav #cal-prev, .cal-nav #cal-next { flex-shrink: 0; }
  .cal-grid { gap: 4px; }
  .cal-cell { min-height: 42px; }
  /* мобильный — основной режим: тап-зоны не меньше 40px (норма Apple HIG / Material) */
  .btn-sm { padding: 10px 16px; min-height: 40px; }
  .stepper-btn { width: 40px; height: 40px; font-size: 18px; }
  .task-remove { padding: 10px; margin: -10px; font-size: 17px; }
  .cart-step { width: 40px; height: 40px; font-size: 19px; }
  .card-stepper .cart-step { width: 38px; height: 38px; }
  .status-chip { padding: 7px 13px; } /* 21.09: компактнее; тап-зону ≥44px держит @media (pointer:coarse) */
  /* бейдж статуса кликабелен — даём ему полноценную тап-зону */
  .badge-clickable { padding: 8px 12px; min-height: 34px; }
}

/* Админка */
.linklike { background:none; border:none; color:var(--mint-primary-dark); text-decoration:underline; cursor:pointer; font:inherit; padding:0; }
/* QA B2 (17.09): мелкие текстовые ссылки-кнопки — увеличиваем тап-зону до ~40px,
   отрицательный margin сохраняет визуальную геометрию строки */
.sub a, .linklike { display:inline-block; padding:11px 3px; margin:-11px -3px; }
/* QA spacing (17.09): дорожка h-scroll между фильтром статусов и списком заказов
   съедала отступ — возвращаем воздух */
.h-scroll-track + .list { margin-top:10px; }
.row { display:flex; gap:8px; align-items:center; }
.row input { flex:1; }
/* ссылка витрины в настройках: читаемый вид даже при длинном адресе */
#store-link { font-size: 12.5px; padding: 9px 10px; }
.hint { margin-top:8px; font-size:0.9rem; color:var(--mint-primary-dark); }
.hint.error { color:#c0392b; }
/* Р16 (23.09): !important — системный фикс. Правила вроде .order-edit-bar{display:flex}
   и @media(pointer:coarse) .btn-sm{display:inline-flex} шли ПОСЛЕ .hidden и
   перебивали его: скрытые элементы (панель правки витрины, кнопка «Отмена»,
   баннер «нет сети») становились видимыми. Ниже уже накопилось 8 костылей
   .X.hidden{display:none} — с !important они избыточны, но безвредны. */
.hidden { display:none !important; }
.users-table { width:100%; min-width: 900px; border-collapse:collapse; margin-top:8px; }
.users-table th, .users-table td { text-align:left; padding:8px 6px; border-bottom:1px solid var(--mint-border); }
.users-table input { width:100%; min-width:120px; }
.users-table .input-sm { min-width:0; }
.sub-months-input { width:64px !important; min-width:64px !important; }
.td-actions { white-space: nowrap; }
.td-actions .btn { margin: 2px; }

/* ---------- П9 (19.09): карточки пользователей в админке ----------
   Просторные карточки вместо тесной таблицы: аватар+имя, широкие поля
   почты/пароля, зона подписки, отдельная «опасная зона» удаления. */
.users-cards { display:flex; flex-direction:column; gap:14px; margin-top:12px; }
.user-card {
  border:1.5px solid var(--mint-border); border-radius:var(--radius);
  background:var(--mint-surface-2); padding:16px 18px;
  display:flex; flex-direction:column; gap:14px;
}
.user-card-admin { background:var(--mint-surface); }
.uc-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.uc-avatar {
  width:44px; height:44px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:var(--mint-primary); color:#fff; font-weight:700; font-size:19px;
}
.uc-ident { min-width:0; flex:1; }
.uc-name { font-weight:700; font-size:16px; line-height:1.25; }
.uc-login { font-size:13px; color:var(--mint-muted); }
.uc-head-right { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.uc-fields {
  display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  gap:14px 20px; align-items:start;
}
.uc-field { margin-bottom:0; }
.uc-field input { min-width:0; width:100%; }
.uc-field-save { display:flex; align-items:flex-end; padding-bottom:2px; }
.uc-sub {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding-top:12px; border-top:1px dashed var(--mint-border);
}
.uc-sub-title { font-weight:700; font-size:13px; color:var(--mint-muted); text-transform:uppercase; letter-spacing:.04em; }
.uc-sub-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.uc-danger { display:flex; justify-content:flex-end; }
@media (max-width: 620px) {
  .uc-fields { grid-template-columns:1fr; }
  .uc-field-save .btn { width:100%; }
}

/* ---------- Новые компоненты (полный проход) ---------- */
.screen.hidden { display: none; }
.screen { display: flex; flex-direction: column; gap: 14px; animation: screenIn .22s cubic-bezier(.4,0,.2,1) both; }
/* плавное появление экрана при переключении вкладок */
@keyframes screenIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* П3 (19.09): подавление анимаций при «тихом» ре-рендере списков —
   интерфейс не дёргается, скролл остаётся на месте */
html.no-anim *, html.no-anim *::before, html.no-anim *::after {
  animation: none !important; transition: none !important;
}
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-danger { background: var(--mint-surface); color: var(--alert-pink-text); border: 1.5px solid var(--alert-pink-border); }
.btn-danger:hover { background: var(--alert-pink-bg); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 0; }
.sub { color: var(--mint-muted); font-size: 13px; }
.sub a { color: var(--mint-primary-dark); }
/* Ф1b (26.09, UI-ревью): пустое состояние «Остатков к получению нет» в блоке
   Оплаты прилипало к строке «Получить остаток» (gap=0px по spacing_audit).
   Корень: .list без правил — display:inline, вертикальные margin не работают.
   Отступ у самого контейнера (аудит меряет pay-row → #debts-list), только для
   пустого состояния — :has() поддерживается целевыми браузерами (Chromium 105+). */
#debts-list:has(> .sub:only-child) { display: block; margin-top: 10px; }
#debts-list > .sub:only-child { margin: 0 2px; }

/* Кнопки-вкладки (сброс button) */
.tabbar .tab { background: none; border: none; cursor: pointer; font-family: inherit; transition: background var(--transition), transform 90ms ease-out; }
.tabbar .tab:active { transform: scale(.94); } /* Г10 (29.09, frontend-craft): press-отдача вкладок */
/* specificity: эти правила должны перебивать сброс выше (hover затемняет, активная вкладка видна) */
.tabbar .tab:hover { background: var(--mint-surface-2); }
.tabbar .tab.tab-active { background: var(--success-bg); }
.tabbar .tab.tab-active:hover { background: color-mix(in srgb, var(--success-bg) 92%, var(--mint-text)); } /* Г9 */

/* Бейджи статусов — контрастные и кликабельные */
.badge-clickable { cursor: pointer; border: none; font-family: inherit; }
.badge-warn { background: #f7e1bf; color: #8a5100; }
.badge-done { background: var(--success-bg); color: var(--mint-primary-dark); }
/* отменённый заказ — нейтральный: цвет из токена --st-cancel-* ниже */
.badge-overdue { background: #f0b3b3; color: #8f2d2d; cursor: default; }
/* каждому статусу заказа — свой нежный цвет в стиле приложения:
   Новый — мятный, Подтверждён — небесный, В работе — лавандовый,
   Готов — персиковый, Выдан — зелёный, Отменён — серый */
/* 21.09: цвета статусов — из токенов :root, темы переопределяют их у себя */
.badge-new { background: var(--st-new-bg); color: var(--st-new-fg); }
.badge-confirmed { background: var(--st-confirmed-bg); color: var(--st-confirmed-fg); }
.badge-inwork { background: var(--st-inwork-bg); color: var(--st-inwork-fg); }
.badge-ready { background: var(--st-ready-bg); color: var(--st-ready-fg); }
.badge-cancelled { background: var(--st-cancel-bg); color: var(--st-cancel-fg); }
.warn-line { color: #8f5700; }
/* активные чипы/пункты выбора статуса — фон своего цвета, рамка темнее */
.status-chip.st-new.active { background: var(--st-new-active-bg); border-color: var(--st-new-active-bd); color: var(--st-new-active-fg); }
.status-chip.st-confirmed.active { background: var(--st-confirmed-active-bg); border-color: var(--st-confirmed-active-bd); color: var(--st-confirmed-active-fg); }
.status-chip.st-in_work.active { background: var(--st-inwork-active-bg); border-color: var(--st-inwork-active-bd); color: var(--st-inwork-active-fg); }
.status-chip.st-ready.active { background: var(--st-ready-active-bg); border-color: var(--st-ready-active-bd); color: var(--st-ready-active-fg); }
.status-sheet-item.st-new.active { background: var(--st-new-active-bg); border-color: var(--st-new-active-bd); color: var(--st-new-active-fg); }
.status-sheet-item.st-confirmed.active { background: var(--st-confirmed-active-bg); border-color: var(--st-confirmed-active-bd); color: var(--st-confirmed-active-fg); }
.status-sheet-item.st-in_work.active { background: var(--st-inwork-active-bg); border-color: var(--st-inwork-active-bd); color: var(--st-inwork-active-fg); }
.status-sheet-item.st-ready.active { background: var(--st-ready-active-bg); border-color: var(--st-ready-active-bd); color: var(--st-ready-active-fg); }

/* Автодополнение клиента в форме заказа */
.client-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
  background: var(--mint-surface); border: 1px solid var(--mint-border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 42, 28, .22); overflow: hidden auto;
  max-height: 240px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--mint-primary) transparent; }
.client-suggest::-webkit-scrollbar { width: 8px; }
.client-suggest::-webkit-scrollbar-thumb { background: var(--mint-primary); border-radius: 4px; }
.client-suggest::-webkit-scrollbar-track { background: transparent; }
.client-suggest.hidden { display: none; }
.client-suggest-item { display: block; width: 100%; text-align: left; padding: 10px 14px;
  border: none; background: none; cursor: pointer; font-size: 15px; color: var(--mint-text); }
.client-suggest-item:hover, .client-suggest-item:active { background: var(--mint-surface-2); }
.client-suggest-item .sub { color: var(--mint-muted); font-size: 12px; margin-left: 6px; }
#client-hint { font-size: 12.5px; color: #6d6049; background: #f0dfc4; border-radius: 10px;
  padding: 8px 10px; margin: -4px 0 8px; }
#client-hint.hidden { display: none; }

/* Заявки: действия */
.req-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* Клиенты: действия (заказ + история) */
/* действия клиента — компактный горизонтальный ряд (аудит: столбик из 4 кнопок
   съедал 40% ширины и вытягивал карточку до 179px) */
.client-actions { display: flex; flex-direction: row; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
/* иконочная кнопка: квадратная тап-зона без текста (иконка уже всё говорит) */
.btn.icon-only { padding: 8px; min-width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.btn.icon-only .icn { width: 17px; height: 17px; }
.alert-item { background: var(--mint-surface); }
.alert-item .title { color: var(--alert-pink-text); }
.muted-item { opacity: .55; }

/* ---------- Меню центральной кнопки ＋ ---------- */
.fab-backdrop {
  position: fixed; inset: 0; background: rgba(23, 48, 33, 0.6);
  z-index: 60; transition: opacity var(--transition);
}
.fab-backdrop.hidden { display: none; }
.fab-menu {
  position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%);
  background: var(--mint-surface); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(23, 48, 33, 0.42); z-index: 70;
  display: flex; flex-direction: column; min-width: 260px; overflow: hidden;
  animation: fabmenu-in 160ms cubic-bezier(.4, 0, .2, 1);
}
.fab-menu.hidden { display: none; }
@keyframes fabmenu-in { from { opacity: 0; transform: translateX(-50%) translateY(12px); } }
.fab-menu-item {
  display: flex; align-items: center; gap: 12px; padding: 15px 20px;
  background: none; border: none; font-family: inherit; font-size: 15px; font-weight: 600;
  color: var(--mint-text); cursor: pointer; transition: background var(--transition);
  text-align: left;
}
.fab-menu-item:hover { background: var(--mint-bg); }
.fab-menu-item:active { background: var(--success-bg); }
.fab-menu-icon { font-size: 20px; }
.fab.open { transform: rotate(45deg); background: var(--mint-primary-dark); }

/* ---------- Календарь ---------- */
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav strong { min-width: 140px; text-align: center; font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
/* плавное перелистывание месяца: сетка «въезжает» со стороны направления */
@keyframes calSlideIn {
  from {
    opacity: 0;
    transform: translateX(calc(var(--cal-slide-dir, 1) * 42px));
  }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cal-grid { animation: none !important; }
}
.cal-weekdays {
  display: contents;
}
.cal-weekdays span {
  font-size: 11px; font-weight: 700; color: var(--mint-muted);
  text-align: center; padding: 4px 0; text-transform: uppercase;
}
.cal-cell {
  position: relative; min-height: 48px; border-radius: 10px; background: var(--mint-bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition), box-shadow var(--transition);
  border: 1.5px solid transparent;
}
.cal-cell:hover { background: var(--mint-bg-dark); }
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.empty:hover { background: transparent; }
.cal-cell.has-orders { background: var(--success-bg); border-color: var(--mint-primary); font-weight: 700; }
/* e6 (15.09): фон дня — по статусам заказов этого дня. Невыполненные = жёлтый,
   все выданы = зелёный, все отменены = серый. Цвета — из палитры статусных
   бейджей, чтобы календарь читался согласованно со списком заказов. */
.cal-cell.cal-pending { background: var(--st-ready-bg); border-color: var(--st-ready-fg); }
.cal-cell.cal-done { background: var(--success-bg); border-color: var(--mint-primary); }
.cal-cell.cal-cancelled { background: var(--st-cancel-bg); border-color: var(--st-cancel-fg); }
/* цветные состояния календаря при наведении — тоже чуть темнее, а не светлее */
.cal-cell.has-orders:hover, .cal-cell.busy:hover, .cal-cell.selected:hover,
.cal-cell.cal-pending:hover, .cal-cell.cal-done:hover, .cal-cell.cal-cancelled:hover { filter: brightness(.95); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--mint-primary); }
.cal-daynum { font-size: 14px; }
.cal-count {
  position: absolute; top: 4px; right: 6px; font-size: 10px; font-weight: 700;
  background: var(--mint-primary); color: #fff; border-radius: 999px;
  min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
/* e6: счётчик заказов — в цвете «главного» статуса дня (связь со статусами).
   Фон/текст — как у соответствующего статусного бейджа в списке заказов. */
.cal-count.cal-st-new { background: var(--st-new-bg); color: var(--st-new-fg); }
.cal-count.cal-st-confirmed { background: var(--st-confirmed-bg); color: var(--st-confirmed-fg); }
.cal-count.cal-st-in_work { background: var(--st-inwork-bg); color: var(--st-inwork-fg); }
.cal-count.cal-st-ready { background: var(--st-ready-bg); color: var(--st-ready-fg); }
.cal-count.cal-st-delivered { background: var(--mint-primary); color: #fff; }
.cal-count.cal-st-cancelled { background: var(--st-cancel-bg); color: var(--st-cancel-fg); }
.cal-detail { margin-top: 14px; }
.cal-detail h3 { font-size: 15px; margin-bottom: 10px; }
/* e6 (15.09): легенда цветов календаря — компактная строка под подсказкой */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 10px;
  font-size: 12px; color: var(--mint-muted); font-weight: 600;
}
.cal-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend-swatch {
  width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, .08);
}
.cal-lg-pending { background: var(--st-ready-bg); }
.cal-lg-done { background: var(--success-bg); }
.cal-lg-cancelled { background: var(--st-cancel-bg); }
.cal-lg-busy { background: var(--alert-pink-bg); }

.header-actions { display:flex; gap:8px; }

/* ---------- Референс-доводка: фон-текстура, шапка, иконки карточек, настройки ---------- */
body {
  background-color: var(--mint-bg);
  background-image: url('/static/img/bg-mint-texture.png');
  background-attachment: fixed;
  background-size: cover;
  background-position: center top;
}

/* Шапка: аватар с логотипом */
.avatar-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--mint-border); background: var(--mint-surface);
  cursor: pointer; overflow: visible; padding: 0;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 3px 10px rgba(23, 48, 33, 0.17);
}
.avatar-btn:hover { background: var(--mint-surface-2); box-shadow: 0 5px 16px rgba(23, 48, 33, 0.31); }
.avatar-btn:active { filter: brightness(.94); }
.avatar-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-weight: 700; font-size: 18px;
  color: var(--mint-primary-dark);
}
.avatar-dot {
  position: absolute; top: 0; right: 0; width: 10px; height: 10px;
  background: #d93a3f; border: 2px solid var(--mint-surface); border-radius: 50%;
}

/* Заголовки карточек с иконкой в кружке — как в референсе */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin-bottom: 0; font-size: 15px; }
.card-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--success-bg); display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.card-alert .card-icon, .alert-icon { background: var(--mint-surface); }
.card-alert h2 { color: var(--alert-pink-text); }

/* ---------- Корзина витрины ---------- */
/* Навигация: чипы категорий + корзина в общем контейнере с карточками
   (те же 860px + паддинги), чтобы ничего не прижималось к краю экрана */
.store-nav {
  display: flex; align-items: center; gap: 10px;
  max-width: 860px; margin: 0 auto; padding: 0 16px;
}
.store-nav .store-chips {
  flex: 1; min-width: 0; margin: 0; padding: 8px 0 14px;
}
.cart-btn {
  position: relative; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--mint-primary); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: background var(--transition);
}
.cart-btn:hover { background: var(--mint-primary-dark); }
.cart-btn .icn { width: 24px; height: 24px; color: #fff; }
/* Р15 (22.09): плавающая корзина — фиксирована внизу справа, видна при любой
   прокрутке (паттерн маркетплейсов). На мобильном — выше зоны большого пальца,
   но не мешает нижнему контенту. */
.cart-fab {
  position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 60; width: 54px; height: 54px; border-radius: 50%;
  box-shadow: 0 6px 20px rgba(23,48,33,.35);
}
.cart-fab .icn { width: 26px; height: 26px; }
.cart-fab .cart-count { top: -4px; right: -4px; }
/* «дыхание» при добавлении позиции — внимание к корзине, не перекрывая экран */
@keyframes cartPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  70% { transform: scale(.96); }
  100% { transform: scale(1); }
}
.cart-fab.cart-pop { animation: cartPop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes badgePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.cart-count.badge-pop { animation: badgePop .4s ease-out; }
/* мини-тост «Добавлено в корзину» — снизу по центру, не перекрывает FAB */
.cart-hint-toast {
  position: fixed; left: 50%; transform: translate(-50%, 16px); bottom: 92px;
  z-index: 130; display: flex; align-items: center; gap: 7px;
  background: var(--mint-text); color: #fff; padding: 10px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: 82vw;
}
.cart-hint-toast .icn { width: 15px; height: 15px; flex-shrink: 0; }
.cart-hint-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Р15 (22.09): чипы канала связи в форме заявки */
.contact-channel-block { margin-top: 4px; }
.channel-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.channel-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--mint-border); background: var(--mint-surface);
  color: var(--mint-text); font-size: 13px; font-weight: 600;
  transition: background var(--transition), border-color var(--transition);
}
.channel-chip .icn { width: 16px; height: 16px; }
.channel-chip:hover { border-color: var(--mint-primary); }
.channel-chip.selected {
  background: var(--mint-primary); border-color: var(--mint-primary); color: #fff;
}
/* снаряд анимации «в корзину» — летящий кружок с иконкой */
.cart-fly {
  position: fixed; z-index: 300; pointer-events: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--mint-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(23,48,33,.4);
}
.cart-fly .icn { width: 20px; height: 20px; color: #fff; }
/* владелец в режиме правки порядка: FAB «Порядок витрины» слева — корзина справа, не конфликтуют */
body.order-editing .cart-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 999px; background: var(--alert-pink-border); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.cart-count.hidden { display: none; }
/* Р15 (22.09): история картинок — компактная кнопка ↺ + поповер с миниатюрами */
.img-history-btn { flex-shrink: 0; }
.img-history-btn .icn { width: 17px; height: 17px; }
.img-history-pop {
  position: fixed; z-index: 400;
  background: var(--mint-surface); border: 1px solid var(--mint-border);
  border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(23,48,33,.28);
  padding: 10px 12px; max-width: min(88vw, 300px);
}
.img-history-title { font-size: 12px; font-weight: 700; color: var(--mint-muted); margin: 0 0 8px; }
.img-history-thumbs { display: flex; gap: 8px; }
.img-history-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--mint-bg); border: 1.5px solid var(--mint-border);
  border-radius: 10px; padding: 5px; cursor: pointer; transition: border-color var(--transition);
}
.img-history-thumb:hover { border-color: var(--mint-primary); }
.img-history-thumb img { width: 76px; height: 48px; object-fit: cover; border-radius: 7px; background: #fff; }
.img-history-thumb span { font-size: 11px; color: var(--mint-muted); }
/* заголовок раздела: тонкие линии сверху и снизу, не доходят до краёв (~20px).
   Тёмные (почти чёрные) — светлые терялись на мятном фоне (фидбек Дарьи) */
.store-section h2 {
  display: flex; align-items: center; gap: 12px; text-align: center;
  margin: 22px 20px 16px;
}
.store-section h2::before, .store-section h2::after {
  content: ""; flex: 1; height: 1px; background: rgba(20, 32, 24, .85);
}
.store-section h2 span { white-space: normal; overflow-wrap: anywhere; min-width: 0; text-align: center; } /* Д15: длинные названия категорий не уезжают за экран */
/* эмодзи категории вместо SVG-иконки (18.09): свой значок у пользовательских категорий */
.cat-h-emoji { font-size: 22px; line-height: 1; }
/* П1 (19.09): загруженный значок категории — квадрат с мягким скруглением */
.cat-h-icon {
  width: 30px; height: 30px; object-fit: cover; border-radius: 9px;
  vertical-align: -8px; flex-shrink: 0;
  border: 1.5px solid rgba(0, 0, 0, .08); background: var(--mint-surface);
}
.cat-chip-icon {
  width: 20px; height: 20px; object-fit: cover; border-radius: 6px;
  vertical-align: -5px; flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, .08); background: var(--mint-surface);
}
.store-chips .chip { white-space: nowrap; }
/* одна кнопка «Заказать» с иконкой корзины; после добавления — степпер − N + */
.product-buy { display: flex; gap: 8px; align-items: stretch; }
.product-buy .btn-primary { flex: 1; }
.product-buy .buy-btn .icn { width: 17px; height: 17px; }
.product-buy .buy-btn.hidden { display: none; }
.card-stepper {
  display: flex; align-items: center; gap: 6px; flex: 1;
  justify-content: center; border: 1.5px solid var(--mint-border);
  border-radius: var(--radius-sm); background: var(--mint-surface); padding: 0 8px;
  /* Г13 (29.09, фикс по скрину Даши/Виталия): после добавления в корзину
     «Заказать» меняется на степпер; степпер был 48–52px против 41px у кнопки —
     карточка вытягивалась, соседние «ездят чуть выше/ниже». Теперь у кнопки
     и степпера ОДНА высота токеном --buy-h (44px на тач — тап-зона HIG). */
  height: var(--buy-h, 41px);
}
.product-buy { --buy-h: 41px; }
@media (pointer: coarse) { .product-buy { --buy-h: 44px; } }
.product-buy .buy-btn { height: var(--buy-h); padding-top: 0; padding-bottom: 0; }
.card-stepper.hidden { display: none; }
.card-stepper .cart-qty { min-width: 26px; text-align: center; font-weight: 700; font-size: 15px; }
/* форма корзины: позиции и контакты скроллятся ЕДИНОЙ областью (без вложенных
   мини-скроллов), голова и подвал фиксированы */
.cart-form { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.cart-contacts { padding: 4px 18px 14px; border-top: 1px dashed var(--mint-border); }
.cart-contacts-title {
  font-size: 15px; font-weight: 700; margin: 12px 0 2px;
  display: flex; align-items: center; gap: 6px;
}
.cart-contacts-title .icn { width: 17px; height: 17px; color: var(--mint-primary-dark); }
.cart-contacts-hint { font-size: 12px; color: var(--mint-muted); margin-bottom: 10px; }
/* параметры товара в диалоге: количество */
.param-qty-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 0 4px; gap: 10px;
}
.param-qty-row .picker-title { margin-bottom: 0; }
.param-standard { font-size: 13px; color: var(--mint-muted); }
.param-standard.hidden { display: none; }
.cart-backdrop {
  position: fixed; inset: 0; background: rgba(23, 48, 33, .45); z-index: 120;
  animation: fadeIn .18s ease-out;
}
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 121;
  background: var(--mint-surface); box-shadow: -8px 0 30px rgba(23, 48, 33, .25);
  display: flex; flex-direction: column; animation: slideInRight .22s ease-out;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--mint-border);
}
/* display:flex у drawer/backdrop перебивает общий .hidden (правило ниже по файлу,
   та же специфичность) — прячем явно, иначе «скрытая» корзина ловит клики */
.cart-drawer.hidden, .cart-backdrop.hidden { display: none; }
.cart-head h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
/* без собственного flex/overflow: внутри единого скролла формы */
.cart-items { flex: 0 0 auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 10px; }
.cart-empty { color: var(--mint-muted); font-size: 14px; text-align: center; margin-top: 30px; }
.cart-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--mint-bg); border-radius: var(--radius-sm); padding: 10px 12px;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; overflow-wrap: break-word; }
.cart-item-attr { font-size: 12px; color: var(--mint-muted); }
.cart-item-price { font-size: 13px; color: var(--mint-primary-dark); font-weight: 600; margin-top: 2px; }
.cart-stepper { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* ± выразительные: залитая зелёная кнопка, белый жирный символ (фидбек Даши —
   «плюс/минус должны быть заметнее»). Единый стиль для всех степперов. */
.cart-step {
  width: 34px; height: 34px; border-radius: 10px; border: none;
  background: var(--mint-primary); color: #fff; font-size: 20px; font-weight: 900;
  cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;
  /* c10 (14.09) + d2 (15.09): текстовые −/+ толще — обводка глифа, единая
     «плотность» с SVG-степперами (там stroke-width 4.2 по viewBox 32) */
  -webkit-text-stroke: 1.1px currentColor; text-stroke: 1.1px currentColor;
  transition: background var(--transition), transform var(--transition);
}
.cart-step:hover { background: var(--mint-primary-dark); }
.cart-step:active { transform: scale(.94); background: var(--mint-primary-dark); }
.cart-step:disabled { background: var(--mint-border); color: var(--mint-muted); cursor: default; transform: none; }
.cart-qty { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-remove {
  width: 30px; height: 30px; border: none; background: none; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.cart-remove .icn { width: 16px; height: 16px; color: var(--alert-pink-text); }
.cart-remove:hover { background: var(--alert-pink-bg); }
.cart-foot { padding: 14px 18px 18px; border-top: 1px solid var(--mint-border); }
.cart-total { font-weight: 700; font-size: 15px; margin-bottom: 10px; color: var(--mint-text); }
.cart-hint { font-size: 12px; color: var(--mint-muted); margin-top: 8px; }
.cart-summary {
  background: var(--mint-bg); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px;
}
.cart-summary-title { font-weight: 700; margin-bottom: 4px; }
.cart-summary ul { margin-left: 18px; }
.cart-summary li { margin: 2px 0; }

/* Состав заявки-корзины в модалке кондитера */
.request-items {
  background: var(--mint-bg); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px;
}
.request-items .field-title { margin-top: 0; }
.request-item-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--mint-border);
}
.request-item-row:last-of-type { border-bottom: none; }
.request-item-main { flex: 1 1 0; min-width: 0; font-size: 14px; }
.request-item-price { flex: 0 0 auto; font-weight: 700; color: var(--mint-primary-dark); white-space: nowrap; font-size: 13px; }

/* Карточка оплат */
.pay-row { display: flex; align-items: center; gap: 12px; }
/* 18.09: иконка-плитка заголовка «Оплаты» и плитка «Получить остаток» стояли
   вплотную (в т.ч. vgap=0 в компактном is-empty) — добавляем явный зазор */
.card-head + .pay-row { margin-top: 6px; }
.card.is-empty .card-head + .pay-row { margin-top: 12px; }
/* сводка «Получить остаток» не должна слипаться со списком долгов ниже */
.pay-row + .list { margin-top: 12px; }
.pay-icon {
  width: 42px; height: 42px; border-radius: 12px; background: #f9dfe9; /* конфетка (18.09) */
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
  box-shadow: inset 0 -2.5px 0 rgba(23,48,33,.06);
}
.pay-meta { flex: 1; display: flex; flex-direction: column; }
.pay-label { font-size: 12px; color: var(--mint-muted); }
.pay-meta strong { font-size: 17px; color: var(--mint-text); }
.pay-arrow {
  width: 34px; height: 34px; border-radius: 50%; background: var(--success-bg);
  color: var(--mint-primary-dark); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Бейджи ещё контрастнее */
.badge-warn { background: #f7e1bf; color: #7a4a00; }
.badge-done { background: var(--success-bg); color: #1d5c38; }
.badge { border: none; }

/* Настройки: логотип */
.logo-upload { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.logo-preview {
  width: 84px; height: 84px; border-radius: 20px; background: var(--mint-bg);
  border: 2px dashed var(--mint-border); display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-placeholder { font-size: 34px; }
.logo-actions { flex: 1; min-width: 200px; }
.logo-actions .sub { margin-top: 8px; }
/* 18.09: загрузка hero-баннера витрины — превью в горизонтальном формате hero */
.banner-upload { margin: 18px 0; }
.banner-preview {
  width: 100%; aspect-ratio: 860 / 260; max-height: 180px; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--mint-bg);
  border: 2px dashed var(--mint-border);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.banner-preview img { width: 100%; height: 100%; object-fit: cover; }
.banner-placeholder { color: var(--muted); font-size: 14px; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.banner-actions + .sub { margin-top: 8px; }

/* Логотип на витрине */
.store-logo-img {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--mint-surface); box-shadow: 0 6px 20px rgba(23, 48, 33, 0.26);
}

/* Розовый алерт-баннер ближе к референсу */
.card-alert { background: #f4bfae; border-color: #dd9c8a; }
.card-alert h2 { color: #7d3325; }
.alert-item { background: rgba(255, 255, 255, .6); }
.alert-item .title { color: #7d3325; }
.alert-item .sub { color: #95523f; }

/* Экранные заголовки */
.header-left { display: flex; align-items: center; gap: 12px; }

/* ---------- Редактор витрины ---------- */
.catalog-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--radius-sm); background: var(--mint-bg);
  margin-bottom: 10px; transition: background var(--transition);
}
.catalog-item:hover { background: var(--mint-bg-dark); }
.catalog-thumb {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
}
.catalog-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: var(--mint-surface); border: 1.5px dashed var(--mint-border);
}
.catalog-item .meta { flex: 1; min-width: 0; }
/* длинные названия позиций («Куличи праздничные (4 шт × 200 ₽)») — в 2 строки,
   не обрезаем точками в одну (Б1 ревью) */
.catalog-item .meta .title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-clamp: 2; overflow: hidden; overflow-wrap: break-word; white-space: normal;
}
.catalog-actions {
  display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; margin-left: auto;
  align-items: center;
}
/* Категории витрины (18.09): строки как у каталога, кнопки в ряд */
.cat-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--mint-bg);
  margin-bottom: 8px; transition: background var(--transition);
}
.cat-item:hover { background: var(--mint-bg-dark); }
.cat-item .meta { flex: 1; min-width: 0; }
.cat-item .cat-name { font-weight: 700; }
.cat-emoji {
  width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 22px; border-radius: 11px;
  background: var(--mint-surface); border: 1.5px solid var(--mint-border);
}
.cat-item .catalog-actions { flex-direction: row; }
.cat-edit {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 12px; margin-bottom: 8px;
  border-radius: var(--radius-sm); background: var(--mint-bg);
  border: 1.5px dashed var(--mint-border);
}
.cat-edit .cat-name-input { flex: 2; min-width: 120px; }
.cat-edit .cat-emoji-input { flex: 0 0 64px; text-align: center; font-size: 18px; }
/* точка видимости позиции: зелёная — видна клиентам, серая — скрыта.
   Заменила длинный текст «✓ видна клиентам / 🚫 скрыта», из-за которого
   карточки позиции разрастались вширь и ввысь */
.vis-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid rgba(23, 48, 33, .35);
}
.vis-dot.vis-on { background: var(--mint-primary); border-color: var(--mint-primary-dark); }
.vis-dot.vis-off { background: transparent; border-color: rgba(23, 48, 33, .4); }

/* Широкий диалог редактирования */
.modal-wide { max-width: 600px; width: calc(100% - 16px); max-height: 92vh; overflow-y: auto; }

/* Сворачиваемые секции (калькулятор и склад) */
.collapsible [data-collapse-toggle] { cursor: pointer; }
.collapsible [data-collapse-toggle] .card-head h2::after {
  content: ''; display: inline-block; width: 13px; height: 13px; margin-left: 6px;
  vertical-align: -0.1em; background-color: var(--mint-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6.5 12.5L16 22l9.5-9.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6.5 12.5L16 22l9.5-9.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform var(--transition);
}
.collapsible.collapsed [data-collapse-toggle] .card-head h2::after { transform: rotate(-90deg); }
.collapsible .collapse-body { display: block; animation: screenIn .2s cubic-bezier(.4,0,.2,1); }
.collapsible.collapsed .collapse-body { display: none; }
/* на узких экранах диалоги почти во всю ширину, отступы компактнее */
@media (max-width: 480px) {
  dialog { width: calc(100% - 16px); padding: 16px 16px 20px; }
  dialog .dialog-actions { margin: 8px -16px -20px; padding-left: 16px; padding-right: 16px; bottom: -20px; }
}
/* П2 (21.09, панель): bottom-sheet — на мобильном все диалоги прижаты к низу,
   drag-handle сверху, slide-up анимация, safe-area. Тач-скролл внутри не ломается. */
@media (max-width: 480px) and (pointer: coarse) {
  dialog {
    margin: auto 0 0 0; width: 100%; max-width: 100%;
    border-radius: 20px 20px 0 0; border-bottom: none;
    max-height: 88vh; overflow-y: auto;
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  dialog::before {
    content: ''; display: block; width: 40px; height: 4px; border-radius: 2px;
    background: var(--mint-border); margin: 0 auto 12px;
  }
  dialog[open] { animation: sheetUp .28s cubic-bezier(.2, 0, 0, 1); }
  dialog .dialog-close { margin-top: -4px; }
}
@keyframes sheetUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: none; }
}
.field-title { font-size: 14px; font-weight: 700; margin: 12px 0 8px; }

/* Фото в редакторе позиции */
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.photo-thumb {
  position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: visible;
}
.photo-thumb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
  border: 1.5px solid var(--mint-border);
}
.photo-remove {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--alert-pink-text); color: #fff;
  border: none; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}

/* Полоса фото заказа (карточка/форма заказа) */
.order-photos-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.order-photo-thumb { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.order-photo-thumb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
  border: 1.5px solid var(--mint-border); display: block;
}
.photo-x {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--alert-pink-text); color: #fff;
  border: 1.5px solid #fff; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(23, 48, 33, 0.42);
}
.photo-x .icn { width: 11px; height: 11px; color: #fff; }
.photo-kind {
  position: absolute; bottom: 3px; left: 3px; font-style: normal;
  font-size: 10px; font-weight: 700; color: #fff; background: rgba(23, 48, 33, 0.6);
  border-radius: 6px; padding: 1px 5px;
}

/* Фото товара на витрине */
.product-photo {
  width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm);
}
.product-attr { font-size: 13px; color: var(--mint-text) !important; }

.order-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }

/* ---------- Бургер-меню (боковая панель разделов) ---------- */
.burger-btn {
  width: 40px; height: 40px; border-radius: 12px; border: none;
  background: var(--mint-surface); cursor: pointer; padding: 10px 9px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 3px 10px rgba(23, 48, 33, 0.17);
  transition: box-shadow var(--transition), transform var(--transition);
}
.burger-btn:hover { background: var(--mint-surface-2); box-shadow: 0 5px 16px rgba(23, 48, 33, 0.31); }
.burger-btn:active { filter: brightness(.94); }
.burger-btn span { display: block; height: 2.5px; border-radius: 2px; background: var(--mint-text); }
/* ---------- Бургер: плавающая кнопка (всегда видна при прокрутке) ---------- */
.burger-fab {
  position: fixed; right: 18px; bottom: 92px; z-index: 75;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: var(--mint-surface); cursor: pointer; padding: 15px 13px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 8px 22px rgba(23, 48, 33, 0.37);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: box-shadow var(--transition), background var(--transition);
}
.burger-fab { align-items: center; justify-content: center; padding: 12px; color: var(--mint-text); }
.burger-fab .burger-menu-icon { display: block; width: 26px; height: 26px; flex: 0 0 26px; pointer-events: none; }
.burger-fab:hover { background: var(--mint-surface-2); box-shadow: 0 10px 26px rgba(23, 48, 33, 0.51); }
.burger-fab:active { background: var(--success-bg); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(23, 48, 33, 0.6); z-index: 80; }
.drawer-backdrop.hidden { display: none; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw;
  background: var(--mint-surface); z-index: 90; padding: 20px 12px;
  box-shadow: 8px 0 40px rgba(23, 48, 33, 0.34); overflow-y: auto;
  animation: drawer-in 200ms cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column; gap: 4px;
}
.drawer.hidden { display: none; }
@keyframes drawer-in { from { transform: translateX(-100%); } }
.drawer-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  background: none; border: none; border-radius: 12px; font-family: inherit;
  font-size: 15px; font-weight: 600; color: var(--mint-text); cursor: pointer;
  transition: background var(--transition); text-align: left;
}
.drawer-item:hover { background: var(--mint-bg); }
.drawer-item:active { background: var(--success-bg); }
.drawer-item span { font-size: 19px; width: 24px; text-align: center; }
.drawer-divider { height: 1px; background: var(--mint-border); margin: 8px 6px; }

/* ---------- Склад: статусы ---------- */
.stock-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.stock-chip { font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px; }

/* Группы-спойлеры склада */
.stock-group { margin-bottom: 8px; }
.stock-group-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px 12px; border: 1.5px solid var(--mint-border); border-radius: var(--radius-sm);
  background: var(--mint-surface); cursor: pointer; font-family: inherit; font-size: 14px;
  font-weight: 700; color: var(--mint-text); text-align: left;
}
.stock-group-head:hover { background: var(--mint-surface-2); border-color: var(--mint-primary); }
.stock-group-chevron { color: var(--mint-primary-dark); display: inline-flex; width: 14px; flex-shrink: 0; transition: transform var(--transition); }
.stock-group-chevron .icn { width: 14px; height: 14px; color: inherit; }
.stock-group-chevron.closed { transform: rotate(-90deg); }
.stock-group-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-group-count { color: var(--mint-muted); font-weight: 600; font-size: 12.5px; flex-shrink: 0; }
.stock-group-body { padding: 6px 0 0 4px; }
.stock-group-body.hidden { display: none; }
.chip-red { background: #f0b3b3; color: #8f2d2d; }
.chip-yellow { background: #f2e2a8; color: #7d6200; }
.chip-green { background: var(--success-bg); color: var(--mint-primary-dark); }
.stock-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.stock-red { background: #f6d4d4 !important; }
.stock-red .stock-dot { background: #d93a3f; }
.stock-yellow .stock-dot { background: #d9a12a; }
.stock-green .stock-dot { background: var(--mint-primary); }

/* ---------- Калькулятор: расчёт ---------- */
.recipe-cost-box {
  background: var(--mint-bg); border-radius: var(--radius-sm); padding: 14px 16px; margin: 10px 0 14px;
}
.calc-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.calc-row strong { font-size: 15px; }

/* ---------- План приготовления ---------- */
.prep-step { padding: 8px 0; border-bottom: 1px solid var(--mint-border); }
.prep-step:last-child { border-bottom: none; }
.prep-step .title { font-weight: 600; font-size: 14px; }
.prep-step .sub { font-size: 13px; color: var(--mint-muted); margin-top: 2px; }
.prep-short { color: var(--alert-pink-text); font-weight: 600; }
/* продукты шага — построчно (было «пластом» через точку) */
.prep-items {
  list-style: none; margin: 6px 0 2px; padding: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.prep-items li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 5px 10px; background: var(--mint-surface-2); border-radius: 8px;
  font-size: 13px;
}
.prep-item-name { color: var(--mint-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.prep-item-qty { font-weight: 700; color: var(--mint-primary-dark); flex-shrink: 0; }

/* «Приготовить сегодня»: навигация по дню готовки */
.prep-datebar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 4px 0 10px;
}
.prep-date-label { flex: 1; min-width: 120px; display: flex; flex-direction: column; }
.prep-date-label strong { font-size: 15px; color: var(--mint-text); }
.prep-date-label .sub { font-size: 12px; color: var(--mint-muted); }
.prep-date-nav {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; padding: 0;
}
.prep-date-input {
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--mint-border);
  background: var(--mint-surface-2); color: var(--mint-text); font-size: 13px;
}
/* блоки заказов в плане: заказ-заголовок + его чек-лист */
.prep-order-block {
  border: 1px solid var(--mint-border); border-radius: 14px;
  background: var(--mint-surface-2); margin-bottom: 10px; overflow: hidden;
}
.prep-order-block .prep-order-head { border-radius: 0; }
.prep-order-head.done .title { color: var(--mint-muted); }
/* дата и время выдачи — в скобках, мягче основного названия */
.prep-due {
  font-weight: 500; font-size: 13px; color: var(--mint-primary-dark);
  white-space: nowrap;
}
/* строка чек-листа (этап рецепта / задача) */
.prep-check-item { padding: 9px 12px; border-top: 1px solid var(--mint-border); }
.prep-check-item.done .title {
  color: var(--mint-muted); text-decoration: line-through;
}
.prep-check-item .task-remove { margin-left: auto; }

/* ---------- Подписка ---------- */
.sub-status { padding: 4px 0 8px; }
.sub-active-line { font-weight: 700; font-size: 16px; color: var(--mint-text); }
.sub-paused-line { font-weight: 700; font-size: 16px; color: var(--alert-pink-text); }
.sub-expired-line { font-weight: 700; font-size: 16px; color: var(--alert-pink-text); }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.plan-card {
  background: var(--mint-bg); border-radius: var(--radius-sm); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 6px; text-align: center; position: relative;
  border: 1px solid var(--mint-border);
}
.plan-card.plan-yearly { border-color: var(--mint-text); }
.plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--mint-text); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.plan-title { font-size: 14px; color: var(--mint-muted); font-weight: 600; }
.plan-price { font-size: 24px; font-weight: 800; color: var(--mint-text); }
.plan-card .sub { font-size: 12px; margin-bottom: 6px; }

/* ---------- Финансы ---------- */
.finance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fin-card {
  background: var(--mint-bg); border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.fin-label { font-size: 12px; color: var(--mint-muted); font-weight: 600; }
.fin-card strong { font-size: 18px; }
.fin-profit { background: var(--success-bg); }
.fin-goal { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }

/* Загрузка дня на «Сегодня» */
.capacity-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--mint-surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 14px;
}
.capacity-icon { font-size: 26px; line-height: 1; }
.capacity-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
/* степпер количества мест прямо на карточке — тот же выразительный стиль ± */
.capacity-stepper { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.capacity-stepper .stepper-btn {
  width: 34px; height: 34px; border-radius: 10px; border: none;
  background: var(--mint-primary); color: #fff; font-size: 19px; font-weight: 800; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.capacity-stepper .stepper-btn:hover { background: var(--mint-primary-dark); }
.capacity-stepper .stepper-btn:active { transform: scale(.94); background: var(--mint-primary-dark); }
.capacity-limit { min-width: 26px; text-align: center; font-weight: 800; font-size: 15px; }
/* кнопка «Убрать» у выполненной задачи.
   padding+отрицательный margin — кликабельная зона ~36px без изменения вёрстки
   (аудит 14.09: на десктопе была 19×21px — промах по крестику задевал соседей) */
.task-remove { flex-shrink: 0; color: var(--mint-muted); font-size: 15px;
  padding: 8px; margin: -8px; border-radius: var(--radius-sm); }
.task-remove:hover { color: var(--alert-pink-text); }
/* Н5 (20.09): крестик удаления в группе кнопок (клиенты, расходы) — полноценная
   квадратная кнопка, а не голый символ. Отрицательный margin у .task-remove
   съедал flex-gap и наезжал на соседнюю кнопку (слипался с «карандашом»);
   в паре с .icon-only гасим его — расстояние задаёт gap контейнера. */
.btn.icon-only.task-remove { margin: 0; }
.photo-remove:hover { filter: brightness(.9); }
.capacity-meta strong { font-size: 15px; color: var(--mint-text); }
.capacity-meta .sub { font-size: 13px; color: var(--mint-muted); }
.capacity-card.full { background: var(--alert-pink-bg); border: 1.5px solid var(--alert-pink-border); }
.capacity-card.full .capacity-meta strong { color: var(--alert-pink-text); }

/* ---------- Календарь: занятые даты ---------- */
/* Т24 (21.09): цвета календаря — из токенов темы (были хардкод-пастели:
   под шоколадной темой выделение даты оставалось зелёным). Правила
   .selected — в КОНЦЕ файла: heatmap cal-load-* идёт ниже по каскаду и
   иначе перебивает фон выбранной даты. */
.cal-cell.busy { background: var(--alert-pink-bg); border-color: var(--alert-pink-border); }
.cal-busy { position: absolute; bottom: 3px; right: 5px; font-size: 10px; color: var(--alert-pink-text); font-weight: 700; }

/* ---------- Торт из прошлого ---------- */
.past-search { margin-bottom: 12px; }

/* ---------- Заказы: фильтр по статусу ---------- */
.status-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-chip { padding: 7px 14px; font-size: 13px; }
.filter-count {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: rgba(23, 48, 33, .12);
  font-size: 11px; font-weight: 700; text-align: center;
}
.filter-chip.active .filter-count { background: rgba(255, 255, 255, .3); }
/* c3-фикс (14.09): активные фильтр-чипы были ОДНОГО зелёного цвета — не отличить,
   какая группа выбрана. Своя семантика цвета для каждой группы (в тон бейджам
   статусов: активные=зелёный, выданные=тёмно-зелёный «готово», отменённые=розовый). */
/* d1 (15.09): фидбек Дарьи — выбранный фильтр заказов ВСЕГДА одним зелёным,
   как «Активные». Разноцветные активные чипы (fc-delivered тёмный, fc-cancelled
   розовый, fc-all синий) отменены. Цветами различаются только СТАТУСНЫЕ чипы
   на странице заказа (st-*), а фильтры — единый зелёный. */
.filter-chip.active,
.filter-chip.fc-active.active,
.filter-chip.fc-delivered.active,
.filter-chip.fc-cancelled.active,
.filter-chip.fc-all.active { background: var(--mint-primary); border-color: var(--mint-primary); color: #fff; }

/* ---------- Финансы: переключатель месяца ---------- */
.month-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.month-nav strong { font-size: 16px; min-width: 160px; text-align: center; }
.month-nav-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--mint-border);
  background: var(--mint-surface); color: var(--mint-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition); touch-action: manipulation;
}
.month-nav-btn:hover { background: var(--mint-surface-2); }
.month-nav-btn:active { filter: brightness(.94); }
.month-nav-btn:disabled { opacity: .4; cursor: default; }
.month-nav-btn .icn { width: 16px; height: 16px; }
/* цель месяца — инлайн-редактор */
.goal-edit { display: flex; gap: 6px; align-items: center; margin-top: 8px; width: 100%; }
.goal-input {
  flex: 1; min-width: 0; padding: 8px 10px; border: 1.5px solid var(--mint-border);
  border-radius: 10px; font-size: 14px; font-family: inherit; background: var(--mint-surface);
  color: var(--mint-text);
}
.goal-input:focus { outline: none; border-color: var(--mint-primary); }

/* ---------- Витрина: подсказка занятой даты ---------- */
.busy-hint { color: var(--alert-pink-text); font-size: 13px; font-weight: 600; margin: -6px 0 12px; }

/* ---------- Выбор изделия из списка ---------- */
.field-with-pick { display: flex; gap: 8px; align-items: stretch; }
.field-with-pick input { flex: 1; }
.pick-btn { white-space: nowrap; flex-shrink: 0; }
.pick-search { margin-bottom: 10px; }
.pick-list { max-height: 45vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.pick-item { cursor: pointer; }

/* ---------- Карточка заказа отдельной страницей ---------- */
.order-page-card { padding: 20px; }
.order-page-title { font-size: 20px; margin: 6px 0 4px; }
.order-page-actions { display: flex; gap: 8px; }
.order-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 14px; }
.order-field { background: var(--mint-bg); border-radius: var(--radius-sm); padding: 10px 14px; }
.order-field .of-label { font-size: 12px; color: var(--mint-muted); font-weight: 600; }
.order-field .of-value { font-size: 15px; font-weight: 600; margin-top: 2px; word-break: break-word; }
/* QA Г1 (17.09): телефон в карточке заказа — tel-ссылка + кнопка WhatsApp в строку */
.of-value-phone { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Р18 (24.09): «Макс» — мессенджер без веб-ссылок, показываем значение значком+title */
.client-contact-max {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--mint-border); color: var(--mint-muted); cursor: default;
}
.client-contact-max .icn { width: 17px; height: 17px; }
.of-value-phone a[href^="tel"] { color: var(--mint-primary-dark); text-decoration: underline; padding: 8px 0; margin: -8px 0; }
.order-field.of-wide { grid-column: 1 / -1; }
/* ряд «Цена / Предоплата / Остаток» живёт внутри грида .order-fields —
   без grid-column сжимался бы в одну колонку и карточки переносились */
.order-money-row {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 4px;
}
.order-money-card {
  background: var(--mint-bg); border-radius: var(--radius-sm);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.order-money-card strong { font-size: 17px; }
.order-money-card .fin-label { line-height: 1.25; }
.order-money-card.card-profit { background: var(--success-bg); }
/* 18.09: явный CTA закрытия оплаты в карточке заказа */
.order-pay-cta { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.order-pay-cta .btn { width: 100%; padding: 15px 18px; font-size: 16px; font-weight: 700; }
.order-pay-cta .btn .icn { width: 20px; height: 20px; vertical-align: -0.3em; margin-right: 6px; }
.order-pay-cta .sub { margin: 0; }
.order-pay-cta.paid {
  flex-direction: row; align-items: center; gap: 10px;
  background: var(--success-bg); color: var(--mint-primary-dark);
  border-radius: var(--radius-sm); padding: 14px 16px; font-weight: 700; font-size: 15px;
}
.order-pay-cta.paid .icn { width: 22px; height: 22px; flex-shrink: 0; }
@media (max-width: 380px) { .order-money-row { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .order-fields { grid-template-columns: 1fr; } }

/* «Просроченные»: явные действия вместо голого бейджа */
.overdue-actions { display: flex; gap: 6px; flex-shrink: 0; }
.overdue-actions .btn { white-space: nowrap; }
/* долг с просроченной выдачей — розовая полоса слева */
.debt-row.debt-overdue { border-left: 3px solid var(--alert-pink-border); }
.debt-row .badge-overdue { font-size: 11px; padding: 1px 7px; }

/* «Всё необходимое есть?» — баннер наличия по рецепту. Построчно, не сплошным текстом. */
.availability-banner {
  grid-column: 1 / -1; border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--mint-border);
}
.availability-banner.ok { background: var(--success-bg); border-color: #a6d6b4; }
.availability-banner.warn { background: var(--alert-pink-bg); border-color: var(--alert-pink-border); }
.availability-banner .av-head {
  font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px;
}
.availability-banner.ok .av-head { color: #245c38; }
.availability-banner.warn .av-head { color: var(--alert-pink-text); }
.availability-banner .av-head .icn { width: 18px; height: 18px; flex-shrink: 0; }
.av-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.av-item {
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(255, 255, 255, .55); border-radius: 10px; padding: 8px 12px;
}
.av-item .av-name { font-weight: 600; font-size: 14px; color: var(--mint-text); display: flex; align-items: center; gap: 7px; }
.av-item .av-nums { font-size: 13px; color: var(--mint-muted); padding-left: 17px; }
.av-item .av-nums b { color: var(--alert-pink-text); font-weight: 700; }
.av-pack { font-size: 13px; color: var(--mint-muted); display: flex; align-items: center; gap: 6px; }
.av-pack .icn { width: 15px; height: 15px; }

/* диалог «Остаток не получен» — сумма крупно, пути понятные */
.deliver-rest-sum {
  font-size: 15px; margin: 10px 0 4px;
  background: var(--alert-pink-bg); border: 1px solid var(--alert-pink-border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.deliver-rest-sum strong { font-size: 20px; color: var(--alert-pink-text); }
#form-deliver-rest .sub { margin-top: 8px; line-height: 1.45; }

/* Выбор статуса: чипы-кнопки, активный подсвечен */
.status-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.status-chip {
  border: 1.5px solid var(--mint-border); background: var(--mint-surface);
  color: var(--mint-muted); border-radius: 999px; padding: 6px 13px; /* 21.09: компактнее — были «несуразно большие» 8/16 */
  font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition); /* Г4 */
}
.status-chip:hover { background: var(--mint-surface-2); border-color: var(--mint-primary); color: var(--mint-primary-dark); }
.status-chip:active { transform: scale(.96); transition-duration: 90ms; } /* Г12: своя press-отдача вместо квадратной нативной подсветки */
.status-chip.active { background: var(--mint-primary); border-color: var(--mint-primary); color: #fff; }
.status-chip.active.done { background: var(--mint-primary-dark); border-color: var(--mint-primary-dark); }

/* Плавающие элементы управления не должны перекрываться таб-баром */
.burger-fab { bottom: 96px; }

/* Скрытый заголовок шапки без подзаголовка — выравнивание */
.app-header .header-titles { display: flex; align-items: center; min-height: 46px; }

/* ---------- Нижняя панель выбора статуса ---------- */
.status-sheet { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.status-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(23, 48, 33, 0.6);
  opacity: 0; transition: opacity var(--transition);
}
.status-sheet-panel {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: 100%; max-width: 480px; background: var(--mint-surface);
  border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 40px rgba(23, 48, 33, 0.42);
  transition: transform 220ms cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column; gap: 8px;
}
.status-sheet.open { pointer-events: auto; }
.status-sheet.open .status-sheet-backdrop { opacity: 1; }
.status-sheet.open .status-sheet-panel { transform: translate(-50%, 0); }
.status-sheet-title { font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 4px; }
/* Р17 (23.09): пункты во всю ширину ровными строками (раньше ширина плясала
   под длину текста 67–143px и прижималась влево — «неадекватно») */
.status-sheet-list { display: flex; flex-direction: column; gap: 8px; }
.status-sheet-item {
  display: flex; align-items: center; justify-content: center; width: 100%; padding: 13px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--mint-border);
  background: var(--mint-surface); font-family: inherit; font-size: 15px; font-weight: 600;
  color: var(--mint-text); cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition); /* Г4 */
}
.status-sheet-item:hover { background: var(--mint-surface-2); border-color: var(--mint-primary); }
.status-sheet-item.active { background: var(--mint-primary); border-color: var(--mint-primary); color: #fff; }
.status-sheet-item.active.done { background: var(--mint-primary-dark); border-color: var(--mint-primary-dark); }
/* «Отменён» — отдельный акцент: красноватый пункт, чтобы не спутать с рабочими статусами */
.status-sheet-item.cancel { color: var(--alert-pink-text); border-color: var(--alert-pink-border); }
.status-sheet-item.cancel:hover { background: var(--alert-pink-bg); border-color: var(--alert-pink-border); }
.status-sheet-item.active.cancel { background: var(--alert-pink-border); border-color: var(--alert-pink-border); color: #fff; }
.status-chip.cancel.active { background: var(--alert-pink-border); border-color: var(--alert-pink-border); color: #fff; }

/* Клик по строке заказа */
.order-row { cursor: pointer; }

/* ---------- Админка ---------- */
.admin-page { padding-bottom: 60px; }
.admin-page .store-main { max-width: 1280px; }
.admin-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  padding: 0 16px; margin-bottom: 16px;
}
.admin-tab {
  background: var(--mint-surface); border: 1px solid var(--mint-border);
  color: var(--mint-muted); border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition); /* Г4 */
}
.admin-tab:hover { background: var(--mint-surface-2); color: var(--mint-primary-dark); }
.admin-tab.active { background: var(--mint-primary); border-color: var(--mint-primary); color: #fff; }
.tab-badge {
  display: inline-block; min-width: 18px; background: var(--alert-pink-text); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 5px; margin-left: 4px;
}
.admin-section { max-width: 1180px; margin: 0 auto; width: 100%; }
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
/* горизонтальная прокрутка таблиц — с тонким индикатором (видно, что можно сдвинуть) */
.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 61, 43, .35) transparent;
}
.table-wrap::-webkit-scrollbar { height: 4px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(31, 61, 43, .35); border-radius: 999px; }
.td-actions { white-space: nowrap; }
.input-sm { max-width: 130px; padding: 6px 8px; font-size: 13px; }
.reg-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--mint-border);
}
.reg-row:last-child { border-bottom: none; }
.reg-actions { display: flex; gap: 6px; flex-shrink: 0; }
.switch-row {
  display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer;
  font-size: 14px; text-align: left;
}
.switch-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--mint-primary); }
/* П9 (19.09): воздух в формах админки — подписи под чекбоксами не «прилипают»,
   блоки провайдеров разделены, подсказки читаемы */
.admin-section .card > .sub { margin-top: 6px; }
.admin-section .switch-row + .sub { margin-top: 2px; }
.provider-fields { margin-top: 12px; }
.provider-fields label { margin-bottom: 12px; }
.provider-fields textarea { resize: vertical; min-height: 52px; }
.admin-section .card h2 { margin-bottom: 10px; }
/* темы оформления (18.09): radio-список, активная тема подсвечена */
.switch-row input[type=radio] { width: 18px; height: 18px; accent-color: var(--mint-primary); }
.theme-row.theme-active span { font-weight: 600; color: var(--mint-primary-dark); }
/* группы разделов в панели управления (админка) */
.sections-group { margin-bottom: 14px; }
.sections-group-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--mint-muted); margin: 10px 0 4px;
}
.switch-row .section-hint {
  display: block; font-size: 12px; font-weight: 400; color: var(--mint-muted);
  margin-top: 1px;
}
.provider-fields { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--mint-border); }
.provider-fields code {
  background: var(--mint-bg); padding: 2px 6px; border-radius: 6px; font-size: 12px;
  word-break: break-all;
}
/* доменная настройка */
.domain-steps { margin: 8px 0 4px 20px; display: flex; flex-direction: column; gap: 6px; }
.domain-steps code { background: var(--mint-bg); padding: 1px 5px; border-radius: 5px; }
#active-url { background: var(--mint-bg); padding: 2px 8px; border-radius: 6px; word-break: break-all; }

/* ---------- Автотесты ---------- */
.health-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
#health-summary { font-weight: 700; }
.health-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.health-dot.ok { background: #2f9e5f; }
.health-dot.fail { background: var(--alert-pink-text); }
.health-row { cursor: pointer; }
.health-fail-row { background: #f4ccd3; }
.health-logs { display: flex; flex-wrap: wrap; gap: 6px; }
.log-view {
  background: #10241a; color: #d7f2e3; padding: 14px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 1.5; max-height: 420px; overflow: auto;
  white-space: pre-wrap; word-break: break-word; margin-top: 10px;
}

/* ---------- Форма заказа: группировка и поля в ряд ---------- */
.form-group-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--mint-muted); margin: 16px 0 8px; padding-bottom: 5px;
  border-bottom: 1px dashed var(--mint-border);
}
.field-row { display: flex; gap: 10px; }
.field-half { flex: 1; min-width: 0; }

/* ---------- Чипы начинок/декора ---------- */
.chips-input {
  border: 1.5px solid var(--mint-border); border-radius: var(--radius-sm);
  padding: 6px 8px; background: var(--mint-surface);
}
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chips-list:empty { margin-bottom: 0; }
.chip-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--mint-primary); color: #fff; border-radius: 999px;
  padding: 3px 6px 3px 10px; font-size: 13px; font-weight: 600;
}
.chip-x {
  background: rgba(255,255,255,.25); border: none; color: #fff; width: 18px; height: 18px;
  border-radius: 50%; font-size: 13px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-family: inherit; padding: 0;
}
.chip-x:hover { background: rgba(0, 0, 0, .22); }
.chip-add {
  border: none; background: transparent; outline: none; width: 100%;
  font-family: inherit; font-size: 14px; color: var(--mint-text); padding: 4px 2px;
}

/* ---------- Пикер изделий: группы и мини-фото ---------- */
.pick-group-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--mint-muted); margin: 14px 0 6px;
}
.pick-thumb {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  margin-right: 10px; background: var(--mint-surface);
}
.pick-thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* ---------- Задачи на сегодня: группировка по заказам ---------- */
.task-group-head {
  font-size: 13px; font-weight: 700; color: var(--mint-primary-dark);
  background: var(--mint-surface); border-radius: 8px; padding: 7px 10px;
  margin: 10px 0 4px; cursor: pointer;
}
.task-group-head:first-child { margin-top: 0; }
.task-group-head .sub { font-weight: 500; }

/* ---------- Оплаты: строки долгов ---------- */
.debt-row { cursor: pointer; }
.debt-rest { color: var(--mint-primary-dark); font-size: 15px; white-space: nowrap; }

/* ---------- Черновики ---------- */
.draft-row { cursor: pointer; }

/* ---------- Модалка заявки: действия ---------- */
#modal-request .dialog-actions { flex-wrap: wrap; }

/* ---------- План: единицы ---------- */
.prep-units { color: var(--mint-muted); font-size: 12px; }

/* ---------- Степпер веса (−/+500 г) ---------- */
/* обёртка подписи без label-форвардинга hover (аудит 14.09): выглядит как label */
.field-caption { display: block; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.field-caption > label { display: block; font-size: inherit; font-weight: inherit; margin-bottom: 0; cursor: default; }
dialog .field-caption { margin-bottom: 10px; }
.weight-stepper { display: flex; align-items: stretch; gap: 4px; }
.weight-stepper input { flex: 1; min-width: 0; text-align: center; padding-left: 4px; padding-right: 4px; }
/* базовый ± — залитой зелёный, как .cart-step (единый выразительный стиль) */
.stepper-btn {
  width: 36px; flex-shrink: 0; border-radius: var(--radius-sm);
  border: none; background: var(--mint-primary);
  color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
  transition: background var(--transition), transform var(--transition); font-family: inherit; /* Г4 */
}
.stepper-btn:hover { background: var(--mint-primary-dark); }
.stepper-btn:active { transform: scale(.94); }
.stepper-btn .icn { color: inherit; width: 15px; height: 15px; }

/* ---------- Кроп фото витрины (c7, 14.09) ---------- */
.crop-stage {
  position: relative; overflow: hidden; touch-action: none;
  width: 100%; max-height: 55vh; background: var(--mint-bg);
  border-radius: var(--radius-sm); border: 1px solid var(--mint-border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.crop-stage img { max-width: 100%; max-height: 55vh; display: block; user-select: none; -webkit-user-drag: none; }
.crop-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 86%; aspect-ratio: 4 / 3;
  border: 2px solid #fff; border-radius: 8px;
  box-shadow: 0 0 0 100vmax rgba(20, 34, 25, .55);
  cursor: move; pointer-events: auto;
}
.crop-frame .crop-grid { position: absolute; inset: 0; }
.crop-frame .crop-grid::before, .crop-frame .crop-grid::after {
  content: ''; position: absolute; background: rgba(255, 255, 255, .45);
}
.crop-frame .crop-grid::before { left: 33.3%; right: 33.3%; top: 0; bottom: 0;
  border-left: 1px solid rgba(255,255,255,.45); border-right: 1px solid rgba(255,255,255,.45); background: none; }
.crop-frame .crop-grid::after { top: 33.3%; bottom: 33.3%; left: 0; right: 0;
  border-top: 1px solid rgba(255,255,255,.45); border-bottom: 1px solid rgba(255,255,255,.45); background: none; }
#crop-zoom { width: 100%; accent-color: var(--mint-primary); }
/* мобильный: рамка квадратная — как карточка витрины на узком экране */
@media (max-width: 480px) { .crop-frame { aspect-ratio: 1 / 1; } }
/* 18.09: кроп баннера витрины — рамка горизонтальная как hero (860/260),
   квадратный мобильный режим НЕ применяется */
.crop-stage.crop-banner-mode .crop-frame { aspect-ratio: 860 / 260; width: 92%; }
@media (max-width: 480px) { .crop-stage.crop-banner-mode .crop-frame { aspect-ratio: 860 / 260; } }
/* П1 (19.09): кроп значка категории — квадратная рамка на любом экране,
   не во всю ширину (значок маленький) */
.crop-stage.crop-square-mode .crop-frame { aspect-ratio: 1 / 1; width: min(55%, 320px); }
@media (max-width: 480px) { .crop-stage.crop-square-mode .crop-frame { width: 65%; } }
/* мини-значок категории в кабинете (плитка .cat-emoji с картинкой внутри) */
.cat-emoji .cat-icon-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block;
}

/* ---------- Выпадающий список чипов (начинки/декор) ---------- */
.chips-input { position: relative; }
.chip-hint {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  background: var(--mint-surface); border: 1.5px solid var(--mint-border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-height: 210px; overflow-y: auto; padding: 4px;
  /* 28.09: ползунок всегда виден, скролл не уходит на страницу под списком */
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--mint-primary) transparent;
}
.chip-hint::-webkit-scrollbar { width: 8px; }
.chip-hint::-webkit-scrollbar-thumb { background: var(--mint-primary); border-radius: 4px; }
.chip-hint::-webkit-scrollbar-track { background: transparent; }
.chip-hint-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 9px 12px; font-size: 14px; font-family: inherit; color: var(--mint-text);
  border-radius: 8px; cursor: pointer;
}
.chip-hint-item:hover, .chip-hint-item:active { background: var(--mint-surface-2); color: var(--mint-primary-dark); }

/* ---------- Витрина: заголовки разделов по центру ---------- */
.store-section h2 { text-align: center; }

/* ---------- Конструктор на витрине ---------- */
#constructor-block { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 12px; }
.picker-title { font-size: 13px; font-weight: 700; color: var(--mint-text); margin-bottom: 8px; }
.picker-options { display: flex; flex-wrap: wrap; gap: 8px; }
.picker-chip {
  cursor: pointer; user-select: none;
}
.picker-chip input { display: none; }
.picker-chip span {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--mint-border); background: var(--mint-surface);
  font-size: 14px; font-weight: 600; color: var(--mint-text);
  transition: background var(--transition), color var(--transition), border-color var(--transition); /* Г4 */
}
.picker-chip:hover span { background: var(--mint-surface-2); border-color: var(--mint-primary); }
.picker-chip input:checked + span {
  background: var(--mint-primary); color: #fff; border-color: var(--mint-primary);
}
/* 28.09: явная галочка у выбранного варианта (фидбек: «скролл добавлял начинки») */
.picker-chip input:checked + span::before {
  content: '✓'; margin-right: 6px; font-weight: 700;
}
.picker-chip span { display: inline-flex; align-items: center; }
.field-hint { display: block; font-size: 12px; color: var(--mint-muted); margin-top: 4px; line-height: 1.4; }

/* ---------- Раздел «Помощь» ---------- */
.help-search {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--mint-border);
  border-radius: 12px; font-size: 15px; font-family: inherit; background: var(--mint-surface);
  color: var(--mint-text); margin-top: 10px;
}
.help-search:focus { outline: none; border-color: var(--mint-primary); }
.help-progress { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--mint-muted); }
.help-step {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px;
  border-bottom: 1px solid rgba(23, 48, 33, .1); cursor: pointer;
}
.help-step:last-child { border-bottom: none; }
.help-step input[type="checkbox"] {
  width: 22px; height: 22px; min-width: 22px; margin-top: 2px; accent-color: #6fb47f; cursor: pointer;
}
.help-step-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.help-step-title { font-weight: 700; font-size: 15px; color: var(--mint-text); }
.help-step-done .help-step-title { text-decoration: line-through; color: var(--mint-muted); }
.help-all-done { border: 1.5px solid #8fc7a2; background: linear-gradient(180deg, #e7f3ea, #f2f7f3); }
/* «Быстрый старт пройден»: карточка сворачивается в строку с галочкой.
   Клик по заголовку раскрывает список обратно (посмотреть шаги). */
#help-start-card.collapsed #help-steps { display: none; }
#help-start-card .help-progress { font-size: 13px; color: var(--mint-muted); font-weight: 600; }
#help-start-card.help-all-done .help-progress { color: var(--mint-primary-dark); }
#help-start-card.collapsed .card-head { margin-bottom: 0; cursor: pointer; }
#help-start-card.collapsed .card-head h2::after {
  content: ''; display: inline-block; width: 13px; height: 13px; margin-left: 6px;
  vertical-align: -0.1em; background-color: var(--mint-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6.5 12.5L16 22l9.5-9.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6.5 12.5L16 22l9.5-9.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transform: rotate(-90deg);
}
.faq-item { border-bottom: 1px solid rgba(23, 48, 33, .1); }
.faq-item summary:hover { background: rgba(23, 48, 33, .05); }
.help-step:hover { background: rgba(23, 48, 33, .04); }
.badge-clickable:hover { filter: brightness(.94); }
.health-row:hover { background: var(--mint-surface-2); }
.health-fail-row:hover { filter: brightness(.97); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  display: flex; align-items: center; gap: 10px; padding: 14px 4px;
  font-weight: 600; font-size: 15px; color: var(--mint-text); cursor: pointer;
  list-style: none; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icn { width: 22px; height: 22px; min-width: 22px; }
.faq-chevron { margin-left: auto; width: 18px !important; height: 18px !important; min-width: 18px !important; color: var(--mint-muted); transition: transform 0.2s; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-body { padding: 0 4px 14px 36px; font-size: 14px; line-height: 1.55; color: var(--mint-text); }
.faq-body p { margin: 0 0 8px; }
.faq-body p:last-child { margin-bottom: 0; }
.help-details { color: var(--mint-muted); }
.help-section-item summary .icn:first-child { color: #6fb47f; }

/* ---------- Админка: группы автотестов, гигиена, управление разделами ---------- */
.health-group { border: 1px solid var(--mint-border); border-radius: 12px; margin-bottom: 10px; background: var(--mint-surface); }
.health-group summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  font-weight: 700; font-size: 15px; color: var(--mint-text); cursor: pointer;
  list-style: none; user-select: none; border-radius: 12px;
  transition: background var(--transition);
}
.health-group summary:hover { background: var(--mint-surface-2); }
.health-group summary::-webkit-details-marker { display: none; }
.health-group summary::before {
  content: ''; width: 0; height: 0; border-left: 7px solid var(--mint-muted);
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform 0.2s; flex-shrink: 0;
}
.health-group[open] summary::before { transform: rotate(90deg); }
.health-group-fail { border-color: #e8b4b4; }
.health-group-title { flex: 1; min-width: 0; }
.health-run-cat { margin-left: auto; }
.health-group .table-wrap { padding: 0 10px 10px; }
.sections-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }

/* ---------- Excel-подобный редактор состава рецепта ----------
   Десктоп: grid-таблица (ингредиент | кол-во | ед | цена | сумма | ✕).
   Мобильный: те же строки, но «кол-во» крупнее (тап-зона), цена/ед скрывается
   в подстроку — таблица 5+ колонок на 390px не работает (NN/g Mobile Tables). */
.recipe-sheet { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
/* строка, помеченная к удалению (ещё не сохранено) */
.rs-row.rs-dying { opacity: .45; }
.rs-row.rs-dying .rs-name { text-decoration: line-through; }
/* блок «Добавить ингредиент» в расчёте: явно подписан и отделён */
.recipe-add-row {
  border-top: 1px dashed var(--mint-border); margin-top: 10px; padding-top: 10px;
}
.recipe-add-title { margin-bottom: 6px; }
/* подписанные поля: «Ингредиент» и «Количество, <ед>» — непонятное «круглое
   поле» получило подпись и единицу измерения выбранного ингредиента */
.recipe-add-fields { display: flex; flex-direction: column; gap: 8px; }
.ra-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ra-label { font-size: 12px; font-weight: 600; color: var(--mint-muted); }
.ra-qty-wrap { display: flex; gap: 8px; align-items: stretch; }
.ra-qty-wrap input { flex: 1; min-width: 0; text-align: center; }
.ra-add-btn { flex-shrink: 0; white-space: nowrap; }
@media (min-width: 560px) {
  .recipe-add-fields { flex-direction: row; align-items: flex-end; }
  .ra-field { flex: 1.4; }
  .ra-field-qty { flex: 1; }
}
#recipe-dirty-hint { margin: 8px 0 0; color: #b26a00; font-size: 12.5px; }
.rs-row {
  display: grid; align-items: center; gap: 8px;
  grid-template-columns: minmax(0, 2.2fr) 84px 34px 90px 84px 38px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  background: var(--mint-bg); border: 1px solid transparent;
}
.rs-row:hover { border-color: var(--mint-border); }
/* e3 (15.09): Excel-подобный вид — белые «ячейки» с сеткой, заголовок-«шапка
   листа», цена и сумма строго справа (как числа в Excel), ИТОГО — жирная
   строка с двойной линией сверху. Компактно: padding уменьшен. */
.recipe-sheet { border: 1px solid var(--mint-border); border-radius: var(--radius-sm); overflow: hidden; gap: 0; }
.recipe-sheet .rs-row {
  background: var(--mint-surface); border-radius: 0;
  border: none; border-bottom: 1px solid var(--mint-border);
  padding: 4px 8px;
}
.recipe-sheet .rs-row:hover { background: var(--mint-surface-2); }
.recipe-sheet .rs-row:last-child { border-bottom: none; }
.rs-head { background: var(--mint-bg) !important; padding: 6px 8px !important; }
.rs-head span { font-size: 11.5px; font-weight: 700; color: var(--mint-muted); text-transform: uppercase; letter-spacing: .02em; }
.rs-name { font-size: 13.5px; font-weight: 600; color: var(--mint-text); white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.rs-sub .rs-name { font-style: italic; }
.rs-qty-input {
  width: 100%; padding: 5px 8px; border: 1.5px solid var(--mint-border);
  border-radius: 8px; background: var(--mint-surface); color: var(--mint-text);
  font-size: 14px; font-weight: 700; text-align: right;
}
.rs-qty-input:focus { outline: none; border-color: var(--mint-primary); box-shadow: 0 0 0 3px rgba(70, 162, 116, .15); }
.rs-unit { font-size: 12.5px; color: var(--mint-muted); text-align: left; }
.rs-price { font-size: 12.5px; color: var(--mint-muted); text-align: right; }
.rs-sum { font-size: 13px; font-weight: 700; color: var(--mint-text); text-align: right; }
.rs-del { display: flex; justify-content: center; }
.rs-del .icon-only { min-width: 30px; min-height: 30px; }
/* ИТОГО — как в Excel: жирный, двойная линия сверху, tint-фон */
.rs-total {
  background: var(--mint-bg) !important;
  border-top: 2.5px double var(--mint-primary) !important;
}
.rs-total .rs-name { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.rs-total .rs-sum { font-size: 14.5px; font-weight: 800; color: var(--mint-primary-dark); }
@media (max-width: 640px) {
  .rs-row { grid-template-columns: minmax(0, 1.6fr) 76px 58px 40px; padding: 7px 9px; }
  .rs-del .icon-only { min-width: 40px; min-height: 40px; }
  .rs-unit { display: none; }          /* единица переезжает в сумму/подсказку */
  .rs-price { display: none; }         /* цена/ед — вторична на мобильном */
  .rs-head .rs-price, .rs-head .rs-unit { display: none; }
  .rs-sum { text-align: right; }
  .rs-qty-input { padding: 9px 8px; font-size: 15px; }  /* тап-зона ≥36px */
}

/* ---------- Юзабилити: мобильные тапы и клавиатурный фокус ---------- */
/* тап без задержки 300 мс и без «съедания» первого нажатия (scale убран) */
.btn, .tab, .drawer-item, .fab-menu-item, .dialog-close, .picker-chip,
.badge-clickable, .faq-item summary, .help-step, .stepper-btn,
.admin-tab, .health-log-btn, .hygiene-log-btn, .health-run-cat, .task-remove,
.cal-cell, .list-item, .catalog-item, .section-head, .faq-item, .fin-card,
.stock-group, .order-card, .request-card, .client-card, .drawer-scrim {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* видимый фокус при навигации с клавиатуры (мышью — не мешаем) */
:focus-visible {
  outline: 2.5px solid var(--mint-primary);
  outline-offset: 2px;
}
dialog :focus-visible { outline-color: var(--mint-primary-dark); }

/* ---------- Мобильный — основной режим: финальные тап-зоны ----------
   В конце файла, чтобы перебить базовые правила выше по каскаду
   (.capacity-stepper .stepper-btn и др. имели 2 класса и стояли ниже
   мобильного блока — кнопки оставались 30px). */
@media (max-width: 480px) {
  .capacity-stepper .stepper-btn { width: 40px; height: 40px; font-size: 18px; }
}

/* ---------- ДЕСКТОПНАЯ РАСКЛАДКА (аудит 09/2026: 46% экрана пустовало) ----------
   Один адаптивный код, расширенная раскладка ≥1100px: колонка шире (960px),
   «Сегодня» — две колонки (операционное слева, планирование/закупки справа). */
@media (min-width: 1100px) {
  .app-header { max-width: 960px; }
  .app-main { max-width: 960px; gap: 16px; }
  #screen-today {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 16px; align-items: start;
  }
  /* ID-селектор выше перебивает .hidden — «Сегодня» оставался видимым
     при переключении разделов. Правило той же силы скрывает его. */
  #screen-today.hidden { display: none; }
  /* загрузка дня — во всю ширину сверху */
  #screen-today #capacity-card { grid-column: 1 / -1; }
  /* порядок DOM сохраняется: заявки | выдачи, просроченные | приготовить, оплаты | купить */
  #screen-today .card { margin-bottom: 0; }
  #screen-today #capacity-card .capacity-card { margin-bottom: 0; }
  /* табличные экраны используют ширину: списки в две колонки при длинных списках */
  #screen-calc .collapse-body { max-width: 100%; }
  /* витрина-редактор: действия позиции — в строку (место есть) */
  .catalog-actions { flex-direction: row; align-items: center; }
  /* карточки заказов/клиентов: строки плотнее по высоте — экран вмещает больше */
  .list-item { padding: 10px 14px; }
}

/* ---------- ПЛОТНОСТЬ МОБИЛЬНОГО UI (аудит 09/2026) ----------
   Блок намеренно В КОНЦЕ файла: базовые правила .card-head (623), .order-actions (906),
   .capacity-card (1078), .status-filter (1113) идут ПОСЛЕ первого @media(480px) и при
   равной специфичности перебивали бы мобильные overrides (урок каскада из M-раунда). */
@media (max-width: 480px) {
  .app-main { padding: 6px 10px; gap: 10px; }
  .card { padding: 12px 14px; }
  .card h2 { font-size: 14.5px; margin-bottom: 8px; }
  .card-head { margin-bottom: 8px; gap: 8px; }
  .card-head .card-icon .icn, .card-head .card-icon svg { width: 18px; height: 18px; }
  .list { gap: 8px; }
  .list-item { padding: 9px 10px; gap: 10px; }
  .capacity-card { padding: 8px 12px; margin-bottom: 10px; gap: 10px; }
  .capacity-icon { font-size: 20px; }
  .capacity-icon .icn { width: 22px; height: 22px; }
  .capacity-meta strong { font-size: 13.5px; }
  .capacity-meta .sub { font-size: 12px; }
  .capacity-stepper .stepper-btn { width: 36px; height: 36px; }
  .capacity-limit { font-size: 14px; }
  /* пустые карточки: иконка заголовка компактнее */
  .card.is-empty .card-icon .icn { width: 18px; height: 18px; }
  .card.is-empty .card-head h2 { font-size: 13.5px; }
  /* фильтры заказов — одна горизонтальная скролл-строка (было 2 ряда) */
  .status-filter { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-bottom: 8px; }
  .status-filter .status-chip { flex-shrink: 0; }
  /* карточка заказа: двухколоночные строки — в одну колонку.
     На узком экране поля «съезжали» (подпись одного поля оказывалась
     над чужим полем); вертикально каждое поле занимает свою строку */
  .field-row { flex-direction: column; }
  dialog .field-row { gap: 0; } /* перебивает базовый gap:8px (выше по каскаду) */
  .field-half { width: 100%; }
  /* строки заказов/заявок: действия в одну линию, без «лесенки» */
  .order-actions { flex-direction: row; align-items: center; gap: 6px; }
  .req-actions { flex-direction: row; align-items: center; gap: 6px; }
  /* пустые карточки «Сегодня» — в одну строку, минимум высоты */
  .card.is-empty { padding: 7px 12px; }
  .card.is-empty .card-head { margin-bottom: 0; display: inline-flex; vertical-align: middle; }
  .card.is-empty .list { display: inline; gap: 0; }
  .card.is-empty .list > p.sub { display: inline; margin: 0 0 0 6px; font-size: 12.5px; }
  /* витрина-редактор: позиции плотнее (thumb 48px, кнопки в строку) */
  .catalog-item { padding: 9px 10px; gap: 10px; margin-bottom: 8px; }
  .catalog-thumb, .catalog-thumb-empty { width: 48px; height: 48px; font-size: 22px; }
  .catalog-thumb-empty .icn { width: 24px; height: 24px; }
  .catalog-actions { flex-direction: row; align-items: center; gap: 5px; }
  .catalog-actions .btn-sm { padding: 8px 10px; min-height: 36px; font-size: 12.5px; }
}

/* ---------- М-РАУНД (20.09): мобильная компоновка строк ----------
   Фидбек пользователя: на телефоне название/цена позиции витрины и заказа
   сжимаются «в один столбик слева» (flex meta 50px против кнопок 200px),
   всё слипается. Решение: на узком экране — grid в две зоны:
   контент сверху (фото + текст), действия снизу на всю ширину. */
@media (max-width: 480px) {
  /* М1: позиция витрины — фото слева, название, цена строкой ниже, кнопки внизу */
  .catalog-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas: "thumb meta" "actions actions";
    column-gap: 12px; row-gap: 9px; align-items: center;
  }
  .catalog-item .catalog-thumb, .catalog-item .catalog-thumb-empty { grid-area: thumb; width: 56px; height: 56px; }
  .catalog-item .meta { grid-area: meta; }
  .catalog-item .catalog-actions {
    grid-area: actions; margin-left: 0; width: 100%;
    display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 6px;
  }
  .catalog-item .catalog-actions .btn-sm { width: 100%; justify-content: center; padding: 9px 8px; }
  /* М2: строки заказов/заявок/долгов — текст сверху, кнопки и статусы ниже */
  .order-row, .list-item[data-request], .debt-row, .client-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "meta" "actions";
    row-gap: 8px; align-items: center;
  }
  .order-row > .meta, .list-item[data-request] > .meta, .debt-row > .meta, .client-row > .meta { grid-area: meta; }
  .order-row > .order-actions, .list-item[data-request] > .req-actions { grid-area: actions; justify-content: flex-start; flex-wrap: wrap; }
  /* Р15 (22.09): клиенты — те же грабли, что были у витрины со списком заявок:
     6 кнопок справа сжимали имя/телефон в узкий столбик, иконки «уезжали».
     Текст занимает верхнюю строку целиком, кнопки — нижнюю, кнопка «Заказ»
     растягивается, иконки равного размера и прижаты вправо. */
  .client-row > .client-actions {
    grid-area: actions; margin-left: 0; width: 100%;
    display: flex; flex-wrap: nowrap; gap: 6px; align-items: center;
  }
  /* flex вместо grid: кнопок звонка/WhatsApp может не быть (нет телефона) —
     auto-placement grid'а сдвинул бы «Заказ» в чужую колонку */
  .client-row .client-actions [data-client-neworder] {
    order: -1; flex: 1 0 100%; justify-content: center; min-width: 0;
  }
  .client-row .client-actions [data-client-neworder] .icn { flex-shrink: 0; }
  /* иконки равного размера (40px) в одну линию под «Заказом»: 5×40 + 4×6 = 224 ≤ 252 */
  .client-row .client-actions .icon-only { width: 40px; height: 40px; justify-content: center; flex-shrink: 0; }
  /* 320px: «Заказ» занимает строку целиком, иконки — вторую (без переноса на 3 строки) */
  .client-row > .client-actions { flex-wrap: wrap; row-gap: 6px; }
  /* долг: сумма слева, «Получено» справа — на нижней линии */
  .debt-row { grid-template-areas: "meta meta" "rest btn"; grid-template-columns: minmax(0, 1fr) auto; }
  .debt-row > .meta { grid-area: meta; }
  .debt-row > .debt-rest { grid-area: rest; justify-self: start; align-self: center; }
  .debt-row > .btn { grid-area: btn; justify-self: end; }
  /* бейдж статуса в строке заказа — на нижней линии вместе с «карандашом» */
  .order-row > .badge { grid-area: actions; justify-self: start; }
  /* строка «Сегодня» (без order-actions) — бейдж тоже вниз */
  #orders-list .order-row, #overdue-list .order-row { grid-template-areas: "meta" "actions"; }
  /* М3: длинный текст цены не вылезает за карточку витрины */
  .product-price { overflow-wrap: anywhere; word-break: normal; hyphens: none; }
  .catalog-item .meta .sub { overflow-wrap: anywhere; }
}

/* ---------- d5 (15.09): Настройка палитры — ползунок + живой пример ----------
   Пример (.palette-preview) рендерит карточку в ЛОКАЛЬНОМ оттенке --ph, который
   JS задаёт при движении ползунка. S/L токенов те же, что в :root — пример точно
   показывает будущий вид интерфейса. Контраст текста/кнопок при любом hue
   сохраняется (яркость зафиксирована), элементы не «сливаются» и не исчезают. */
/* QA spacing (17.09): снизу 16px — кнопка «Сохранить настройки» не липнет к палитре */
.palette-box { margin: 14px 0 16px; }
.palette-box label { display: block; }
/* e4 (15.09): заголовок ползунка + кнопка «По умолчанию» в одну строку */
.palette-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.palette-head label { flex: 1; min-width: 0; }
.palette-head .btn { flex-shrink: 0; }
.palette-box input[type="range"] {
  width: 100%; margin-top: 8px; -webkit-appearance: none; appearance: none;
  height: 12px; border-radius: 999px; cursor: pointer; border: none;
  /* радуга оттенков — видно, куда двигаешь */
  background: linear-gradient(90deg,
    hsl(0,40%,45%), hsl(30,40%,45%), hsl(60,40%,45%), hsl(90,40%,45%),
    hsl(120,40%,45%), hsl(150,40%,45%), hsl(180,40%,45%), hsl(210,40%,45%),
    hsl(240,40%,45%), hsl(270,40%,45%), hsl(300,40%,45%), hsl(330,40%,45%), hsl(360,40%,45%));
}
.palette-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; border: 3px solid rgba(31,61,43,.7);
  box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer;
}
.palette-box input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 3px solid rgba(31,61,43,.7); box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer;
}
.palette-preview {
  margin-top: 12px; padding: 14px; border-radius: var(--radius);
  /* локальный оттенок примера — те же S/L, что в :root */
  --ph: var(--ui-hue, 140);
  background: hsl(calc(var(--ph) - 13), 31%, 85%);
  border: 1px solid hsl(var(--ph), 27%, 78%);
}
/* Т21 (21.09): под активной темой ползунок «Цвета интерфейса» отключён —
   палитру задаёт тема; показываем это состоянием disabled + подписью */
#set-ui-hue:disabled { opacity: .45; cursor: not-allowed; }
#palette-reset-btn:disabled { opacity: .45; cursor: not-allowed; }
#palette-theme-note { font-size: 12.5px; margin: 6px 0 2px; }
.palette-preview .pp-card {
  background: #fff; border-radius: var(--radius-sm); padding: 14px;
  box-shadow: 0 4px 14px hsla(var(--ph), 30%, 25%, .16);
  display: flex; flex-direction: column; gap: 8px;
}
.palette-preview .pp-title { font-weight: 700; color: hsl(calc(var(--ph) + 4), 33%, 18%); font-size: 15px; }
.palette-preview .pp-sub { color: hsl(calc(var(--ph) + 7), 13%, 37%); font-size: 13px; }
.palette-preview .pp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.palette-preview .pp-btn {
  border: none; border-radius: 10px; padding: 8px 16px; font-size: 13px;
  font-weight: 700; cursor: default; font-family: inherit;
}
.palette-preview .pp-btn-primary { background: hsl(calc(var(--ph) + 10), 40%, 45%); color: #fff; }
.palette-preview .pp-btn-ghost {
  background: #fff; color: hsl(calc(var(--ph) + 4), 33%, 22%);
  border: 1.5px solid hsl(var(--ph), 27%, 78%);
}
.palette-preview .pp-chip {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: hsl(calc(var(--ph) - 6), 36%, 91%); color: hsl(calc(var(--ph) + 9), 46%, 28%);
  border: 1px solid hsl(var(--ph), 27%, 78%);
}
.palette-preview .pp-stepper {
  display: inline-flex; align-items: center; gap: 4px;
}
.palette-preview .pp-stepper b {
  width: 28px; height: 28px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 17px; font-weight: 900;
  background: hsl(calc(var(--ph) + 10), 40%, 45%); color: #fff;
  -webkit-text-stroke: .6px currentColor;
}
.palette-preview .pp-stepper i {
  min-width: 22px; text-align: center; font-style: normal; font-weight: 700;
  color: hsl(calc(var(--ph) + 4), 33%, 18%); font-size: 14px;
}

/* ============================================================
   Режим правки порядка витрины (18.09) — drag-n-drop для кондитера
   ============================================================ */
.order-edit-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--mint-surface); color: var(--mint-text);
  border: 1px solid var(--mint-border); border-radius: 999px;
  padding: 10px 16px; font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: var(--shadow);
}
.order-edit-fab .icn { width: 18px; height: 18px; }
.order-edit-fab:hover { border-color: var(--mint-primary); }
.order-edit-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 95;
  display: flex; align-items: center; gap: 10px;
  background: var(--mint-surface); border: 1px solid var(--mint-border);
  border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(23,48,33,.22);
  max-width: min(94vw, 560px); flex-wrap: wrap; justify-content: center;
}
.order-edit-bar.hidden { display: none; }
.order-edit-text { font-size: 12.5px; color: var(--mint-muted); }
.order-toast {
  position: fixed; left: 50%; transform: translate(-50%, 12px); bottom: 84px; z-index: 99;
  background: var(--mint-text); color: #fff; padding: 10px 16px; border-radius: 12px;
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .22s cubic-bezier(0, 0, .2, 1), transform .22s cubic-bezier(0, 0, .2, 1); /* Г4/Г3 (29.09): явные свойства, ease-out вход */
  max-width: 86vw; text-align: center;
}
.order-toast:not(.show) { transition-duration: .154s; transition-timing-function: cubic-bezier(.4, 0, 1, 1); } /* Г3: выход быстрее входа (×0.7), ease-in */
.order-toast.show { opacity: 1; transform: translate(-50%, 0); }
.order-toast.bad { background: #b3402f; }

/* в режиме правки */
body.order-editing .order-edit-fab { display: none; }
body.order-editing .store-section {
  outline: 2px dashed var(--mint-border); outline-offset: 6px; border-radius: var(--radius);
}
body.order-editing .product-card { cursor: default; }
body.order-editing .product-card:hover { transform: none; }
body.drag-active { cursor: grabbing !important; user-select: none; }
.grip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; cursor: grab; touch-action: none;
  color: var(--mint-muted); background: var(--mint-bg);
  border: 1px solid var(--mint-border); flex-shrink: 0;
}
.grip:active { cursor: grabbing; }
.grip .icn { width: 16px; height: 16px; }
.grip-section { margin-left: 10px; vertical-align: middle; }
.grip-card { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(255,255,255,.92); }
.product-card { position: relative; }
/* Т23 (21.09): iOS-паттерн перетаскивания.
   Плавающий клон (.drag-ghost) следует за пальцем; оригинал остаётся
   в потоке как placeholder (пунктир, затемнение); соседи расступаются
   (FLIP в JS); у краёв экрана — автоскролл; при отпускании ghost
   «садится» на место placeholder'а (.settling). */
body.order-editing .product-card,
body.order-editing .store-section h2 {
  touch-action: none;   /* drag побеждает скролл страницы; скролл — автоскроллом у краёв */
}
body.order-editing img {
  -webkit-user-drag: none;   /* гасим нативный HTML5-drag картинок (pointercancel) */
  user-select: none;
}
body.order-editing .product-card { cursor: grab; }
/* placeholder — оригинал на время drag */
.product-card.dragging {
  opacity: .3;
  outline: 2px dashed var(--mint-primary); outline-offset: -2px;
  border-radius: var(--radius);
  transform: none;
  box-shadow: none;
  transition: opacity .15s ease;
}
.store-section.dragging {
  opacity: .45; outline: 2px dashed var(--mint-primary); outline-offset: 6px;
  border-radius: var(--radius);
  transform: none; box-shadow: none;
  transition: opacity .15s ease;
}
/* ghost — плавающий клон под пальцем */
.drag-ghost {
  position: fixed; left: 0; top: 0; margin: 0; z-index: 999;
  pointer-events: none;
  will-change: transform;
  transform-origin: center center;
  border-radius: var(--radius);
  transition: transform .09s ease-out, box-shadow .15s ease, opacity .15s ease;
  opacity: 0;
}
.drag-ghost.lifted {
  opacity: 1;
  box-shadow: 0 16px 36px rgba(23, 48, 33, .35);
}
.drag-ghost.settling {
  transition: transform .18s cubic-bezier(.2,0,.2,1), opacity .18s ease .04s, box-shadow .18s ease;
  opacity: 0;
  box-shadow: 0 2px 8px rgba(23, 48, 33, .12);
}
.drag-ghost.product-card { background: var(--mint-surface, #fff); }
/* Т24: drag в админской витрине — те же классы ghost/placeholder, другие элементы */
.drag-ghost.catalog-item { background: var(--mint-bg); box-shadow: none; }
.catalog-item.dragging {
  opacity: .3;
  outline: 2px dashed var(--mint-primary); outline-offset: -2px;
  transition: opacity .15s ease;
}
.admin-store-section.dragging {
  opacity: .45; outline: 2px dashed var(--mint-primary); outline-offset: 4px;
  border-radius: var(--radius);
  transform: none; box-shadow: none;
  transition: opacity .15s ease;
}
.drag-ghost.admin-store-section { background: var(--mint-surface); }
body.drag-active { cursor: grabbing !important; }
body.drag-active .catalog-item, body.drag-active .admin-store-section { touch-action: none; }
.grip-card-admin, .grip-section-admin {
  display: none; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; cursor: grab;
  touch-action: none; flex-shrink: 0;
  color: var(--mint-muted); background: var(--mint-surface);
  border: 1px solid var(--mint-border);
}
/* Р15 (22.09): рукоятки видны только в режиме «Изменить порядок» —
   карточки вне режима не расширяются */
body.admin-reordering .grip-card-admin, body.admin-reordering .grip-section-admin {
  display: inline-flex;
}
/* в режиме правки порядок — мягкая подсветка карточек, как на клиентской витрине */
body.admin-reordering .catalog-item { outline: 1px dashed var(--mint-border); outline-offset: -1px; }
body.admin-reordering .admin-store-h { outline: 1px dashed var(--mint-border); border-radius: var(--radius-sm); }
/* Р16 (23.09): в режиме перестановки тащим за всю карточку/заголовок —
   touch-action:none, иначе вертикальный жест уходит браузеру (скролл) и
   pointercancel убивает drag («не реагирует абсолютно»). Как body.order-editing. */
body.admin-reordering .catalog-item,
body.admin-reordering .admin-store-h {
  touch-action: none;
}
body.admin-reordering .catalog-item img,
body.admin-reordering .admin-store-h img {
  -webkit-user-drag: none;   /* нативный HTML5-drag картинок → pointercancel */
  user-select: none;
}
body.admin-reordering .catalog-item { cursor: grab; }
.section-head-btns { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.grip-card-admin:active, .grip-section-admin:active { cursor: grabbing; }
.grip-card-admin .icn, .grip-section-admin .icn { width: 16px; height: 16px; }
/* разделы админской витрины — как у клиента, но в карточном стиле админки */
.admin-store-section { margin-bottom: 18px; }
.admin-store-h {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  margin: 0 0 10px; color: var(--mint-text);
}
.admin-store-h .cat-h-emoji { font-size: 17px; }
.admin-store-h .cat-h-icon { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }
.admin-store-count {
  font-family: var(--font-body); font-weight: 400; font-size: 12px;
  color: var(--mint-muted);
}
.admin-store-h .grip-section-admin { margin-left: auto; }
.admin-store-empty { font-size: 12.5px; color: var(--mint-muted); margin: 4px 0 4px 2px; }
.drag-ghost-section {
  background: var(--mint-bg); border: 1px solid var(--mint-border);
  padding: 6px 10px; box-shadow: 0 12px 28px rgba(23, 48, 33, .28);
}
.drag-ghost-section h2 { margin: 0; }
.store-section-empty { display: none; }
body.order-editing .store-section-empty { display: block; }
.store-empty-hint { font-size: 12.5px; color: var(--mint-muted); margin-bottom: 10px; }

/* П3 (21.09, панель): тап-зоны ≥44px на тач-экранах (Apple HIG) */
@media (pointer: coarse) {
  .btn-sm, .chip, .filter-chip, .status-chip, .chip-x, .photo-x, .photo-remove,
  .stepper-btn, .dialog-close, .tab { min-height: 44px; min-width: 44px; }
  .chip-x, .photo-x, .photo-remove { min-width: 32px; min-height: 32px; }
  /* Р16 (23.09): :not(.hidden) — это правило шло ПОСЛЕ .hidden{display:none}
     и на тач-устройствах перебивало его: любая скрытая кнопка (.hidden)
     становилась видимой (напр. «Отмена» в шапке админ-витрины вне режима). */
  .btn-sm:not(.hidden) { display: inline-flex; align-items: center; justify-content: center; }
}

/* П4 (21.09, панель): prefers-reduced-motion — не «выключить всё» (ломает
   фокус/контекст), а оставить только opacity-переходы (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-property: opacity !important;
    transition-duration: 120ms !important;
    scroll-behavior: auto !important;
  }
  dialog[open] { animation: rmFade .01ms; }
}
@keyframes rmFade { from { opacity: .99; } to { opacity: 1; } }

/* ---------- B1 (21.09, панель п.6): палитра команд Cmd/Ctrl+K ----------
   Все цвета — токены темы: единый стиль (шоколад/мята/…) без хардкода hex. */
#cmdk {
  width: min(560px, calc(100vw - 32px)); max-width: 560px;
  margin: 14vh auto auto; padding: 0; border: 1px solid var(--mint-border);
  border-radius: var(--radius); background: var(--mint-surface);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3); overflow: hidden;
}
#cmdk::backdrop { background: rgba(20, 16, 12, .45); backdrop-filter: blur(2px); }
#cmdk-input {
  width: 100%; border: none; outline: none; background: transparent;
  padding: 16px 18px 12px; font: 600 15px/1.3 var(--font-body);
  color: var(--mint-text); border-bottom: 1px solid var(--mint-border);
}
#cmdk-input::placeholder { color: var(--mint-muted); font-weight: 500; }
#cmdk-list { max-height: min(46vh, 380px); overflow-y: auto; padding: 6px; }
.cmdk-group {
  padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mint-muted);
}
.cmdk-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--mint-text);
}
.cmdk-item.cmdk-selected { background: var(--mint-surface-2); box-shadow: inset 0 0 0 1.5px var(--mint-primary); }
.cmdk-icon { flex: 0 0 auto; color: var(--mint-primary); display: flex; }
.cmdk-icon .icn { width: 17px; height: 17px; }
.cmdk-label { font-size: 14px; font-weight: 600; min-width: 0; }
.cmdk-sub { display: block; font-size: 12px; font-weight: 500; color: var(--mint-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-empty { padding: 22px; text-align: center; color: var(--mint-muted); font-size: 14px; }
.cmdk-hint {
  padding: 8px 14px; border-top: 1px solid var(--mint-border);
  font-size: 11.5px; color: var(--mint-muted); text-align: center;
}
.cmdk-hint kbd {
  font-family: inherit; font-size: 10.5px; padding: 1px 5px; margin: 0 1px;
  border: 1px solid var(--mint-border); border-radius: 5px; background: var(--mint-surface-2);
}
/* мобильные: палитра как bottom-sheet — тот же паттерн, что у прочих dialog ≤480px */
@media (max-width: 480px) {
  #cmdk { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); }
  #cmdk-list { max-height: 52vh; }
}

/* ---------- B5 (21.09, панель п.3): sticky «Следующий статус →» ----------
   Прилипает к верху вьюпорта при прокрутке карточки заказа; цвета — токены темы. */
.next-status {
  position: sticky; top: 8px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 0 4px; padding: 10px 14px;
  background: var(--mint-surface); border: 1.5px solid var(--mint-primary);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.next-status.hidden { display: none; }
.next-status-text { font-size: 13px; color: var(--mint-muted); }
.next-status-text strong { color: var(--mint-text); font-weight: 700; }
.next-status .btn { white-space: nowrap; }
.next-status .btn .icn { width: 14px; height: 14px; vertical-align: -2px; }
/* Р15 (22.09): на узком экране текст+кнопка не влезают в строку — кнопка
   «прилипала» к левому краю. Правило ПОСЛЕ базовых .next-status (каскад):
   кнопка центрируется отдельной строкой под текстом. */
@media (max-width: 480px) {
  .next-status { flex-direction: column; gap: 8px; align-items: stretch; }
  .next-status-text { text-align: center; }
  .next-status .btn { width: 100%; justify-content: center; }
}

/* ---------- B4 (21.09, панель п.2): лента «Сегодня» по срочности ---------- */
.today-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.due-time { font-weight: 700; color: var(--mint-primary); font-variant-numeric: tabular-nums; }

/* ===== C10 (22.09, панель п.10): календарь — heatmap загрузки дня ===== */
:root {
  /* уровни загрузки: средний / высокий / под завязку — тёплая шкала */
  --heat-mid: #f7e1bf;  --heat-mid-bd: #d8b26a;
  --heat-hi: #f2cda8;   --heat-hi-bd: #d8a268;
  --heat-full: #e8b4ab; --heat-full-bd: #c0675a;
}
.cal-cell.cal-load-mid  { background: var(--heat-mid);  border-color: var(--heat-mid-bd); }
.cal-cell.cal-load-hi   { background: var(--heat-hi);   border-color: var(--heat-hi-bd); }
.cal-cell.cal-load-full { background: var(--heat-full); border-color: var(--heat-full-bd); font-weight: 700; }
/* индикатор загрузки — тонкая полоска внизу ячейки, ширина = % ёмкости */
.cal-heat {
  position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px;
  border-radius: 2px; background: var(--mint-bg-dark); overflow: hidden;
}
.cal-heat::after {
  content: ''; position: absolute; inset: 0; width: var(--heat-w, 0%);
  background: var(--mint-primary); border-radius: 2px;
}
.cal-load-full .cal-heat::after { background: #a03a2c; }
/* загрузка дня в деталях: «2/3», при переполнении — красный */
.cal-detail-load { font-size: 12px; font-weight: 700; color: var(--mint-muted); margin-left: 6px; }
.cal-detail-load.full { color: #a03a2c; }
.cal-move-btn { flex-shrink: 0; }
@media (max-width: 480px) {
  .cal-heat { left: 4px; right: 4px; bottom: 3px; }
}

/* ===== C11 (22.09, панель п.11): свайпы строк списка заказов ===== */
.swipe-list .order-row { touch-action: pan-y; will-change: transform; }
.order-row.swipe-right-hint { background: var(--st-ready-bg); }
.order-row.swipe-left-hint  { background: var(--st-confirmed-bg); }
.swipe-hint {
  font-size: 11.5px; opacity: .75; margin: 2px 0 6px;
}

/* ===== C12 (22.09, панель п.12): итог расчёта — прибыль крупно + масштаб ×N ===== */
.calc-hero {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; padding: 8px 4px 10px; margin-bottom: 4px;
  border-bottom: 1px dashed var(--mint-bg-dark);
}
.calc-hero-label { font-size: 13px; color: var(--mint-muted); font-weight: 600; }
.calc-hero-value { font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.calc-hero-margin { font-size: 15px; font-weight: 600; opacity: .85; }
.scale-tag {
  font-size: 11px; font-weight: 700; color: var(--mint-primary-dark);
  background: var(--mint-bg-dark); border-radius: 8px; padding: 1px 6px;
  margin-left: 4px; vertical-align: 1px;
}
.recipe-scale-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 8px;
}
.recipe-scale-row .sub { margin: 0; }
.recipe-scale-chips { display: flex; gap: 4px; }
.recipe-scale-chips .status-chip { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }

/* ===== C13 (22.09, панель п.13): LTV-бейдж клиента ===== */
.client-ltv {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--mint-primary-dark); background: var(--mint-bg-dark);
  border-radius: 9px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px;
  white-space: nowrap;
}
.client-actions a.icon-only { text-decoration: none; }

/* ===== C14 (22.09, панель п.14): спарклайн выручки + долги клиентов ===== */
.fin-spark { margin-top: 10px; }
.fin-spark.hidden { display: none; }
.fin-spark-svg {
  display: block; width: 100%; height: 34px;
  border-radius: 6px; background: var(--bg-soft, rgba(0,0,0,.03));
}
.fin-spark-bar { fill: var(--mint-primary, #6a3e25); opacity: .75; }
.fin-spark-bar:hover { opacity: 1; }
.fin-spark-caption {
  display: block; margin-top: 3px; font-size: 11px; color: var(--text-muted);
}
.debtor-row .debtor-rest { color: var(--st-inwork-fg, #a05a2c); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .fin-spark-bar { transition: none; }
}

/* ===== C14: прогресс-кольцо цели месяца ===== */
.fin-goal { position: relative; }
.goal-ring { position: absolute; top: 8px; right: 8px; line-height: 0; color: var(--text-primary); }
.goal-ring svg { display: block; }

/* ===== C15 (22.09, панель п.15): группировка сводки по магазинам ===== */
.prep-shop-group {
  margin: 10px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted);
}
.prep-shop-group:first-child { margin-top: 0; }

/* ===== D17 (22.09, панель п.17): paywall-after-value ===== */
/* счётчик триала в хедере */
.trial-chip {
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-secondary);
  font-size: 11px; font-weight: 600; padding: 5px 10px;
  white-space: nowrap; cursor: pointer;
}
.trial-chip[data-trial-phase="grace"] {
  border-color: var(--alert-pink-border); color: var(--alert-pink-text);
  background: var(--alert-pink-bg);
}
/* строки статуса на экране подписки */
.sub-trial-line { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-primary); }
.sub-grace-line { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--alert-pink-text); }

/* ===== D18 (22.09, панель п.18): журнал админа + live-превью тем ===== */
.audit-list .admin-table { width: 100%; }
.audit-details { max-width: 320px; word-break: break-word; font-size: 12px; color: var(--text-secondary); }
.theme-row { align-items: center; gap: 8px; }
.theme-row .theme-preview-btn { margin-left: auto; flex-shrink: 0; }
.theme-preview-actions { margin-top: 8px; display: flex; justify-content: flex-end; }

/* ===== D19 (22.09, панель п.19): offline/PWA ===== */
.offline-badge {
  align-self: center; font-size: 11px; font-weight: 600; white-space: nowrap;
  padding: 4px 9px; border-radius: 999px;
  background: var(--st-ready-bg); color: var(--st-ready-fg);
}
.offline-badge.offline-active {
  background: var(--alert-pink-bg); color: var(--alert-pink-text);
}
.offline-snap {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius-s);
  background: var(--alert-pink-bg); color: var(--alert-pink-text);
  font-size: 12px; font-weight: 600;
}
/* Р15 (22.09): display:flex перебивал .hidden (та же специфичность, правило
   ниже) — баннер «Нет сети» был виден ВСЕГДА, даже при живой сети.
   Явное скрытие, как у .cart-drawer.hidden. */
.offline-snap.hidden { display: none; }
.offline-snap .icn { width: 15px; height: 15px; flex-shrink: 0; }

/* ===== D22 (22.09, панель п.22): шаблоны заказов ===== */
.tpl-bar { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.tpl-bar.hidden { display: none; }
.tpl-select {
  flex: 1; min-width: 0; padding: 7px 10px; border-radius: var(--radius-s);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-primary); font-size: 13px;
}
#order-tpl-delete .icn { width: 15px; height: 15px; }

/* Т24 (21.09): выделение выбранной даты — в конце файла, чтобы перебить
   heatmap cal-load-* (он выше по каскаду). Цвет следует активной теме:
   color-mix от --mint-primary даёт тёплый какао в шоколадной, мятный в
   базовой, приглушённый синий в ночной. Фолбэк для браузеров без color-mix. */
.cal-cell.selected,
.cal-cell.selected.cal-load-mid,
.cal-cell.selected.cal-load-hi,
.cal-cell.selected.cal-load-full {
  background: var(--mint-bg-dark);
  border-color: var(--mint-primary);
  border-width: 2px;
}
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .cal-cell.selected,
  .cal-cell.selected.cal-load-mid,
  .cal-cell.selected.cal-load-hi,
  .cal-cell.selected.cal-load-full {
    background: color-mix(in srgb, var(--mint-primary) 52%, var(--mint-surface));
  }
}
.cal-cell.selected .cal-daynum { color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.cal-cell.selected .cal-heat { background: rgba(255,255,255,.35); }
.cal-cell.selected .cal-heat::after { background: #fff; }
.cal-cell.selected .cal-count { box-shadow: 0 0 0 1.5px var(--mint-surface); }
.cal-cell.selected.busy { border-color: var(--alert-pink-text); }
.cal-cell.selected .cal-busy .icn { color: #fff; }

/* ---------- ВОЛНА F (26.09, UI-ревью): микровзаимодействия ----------
   Блок намеренно В КОНЦЕ файла (урок каскада M-раунда). Все цвета — токены темы.
   prefers-reduced-motion уважается глобальным блоком П4 (animation-duration .01ms). */

/* Ф2: тактильная отдача строк списков при тапе (без scale — он ест первый тап) */
.list-item:active { filter: brightness(.96); }

/* Ф3: каскадное появление карточек списка после загрузки (короткое, ≤8 строк,
   чтобы частые ререндеры pollPulse не «мигали»: суммарно <400мс) */
@keyframes listItemIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
.list > .list-item { animation: listItemIn .18s cubic-bezier(.4,0,.2,1) both; }
.list > .list-item:nth-child(2) { animation-delay: 25ms; }
.list > .list-item:nth-child(3) { animation-delay: 50ms; }
.list > .list-item:nth-child(4) { animation-delay: 75ms; }
.list > .list-item:nth-child(5) { animation-delay: 100ms; }
.list > .list-item:nth-child(6) { animation-delay: 125ms; }
.list > .list-item:nth-child(7) { animation-delay: 150ms; }
.list > .list-item:nth-child(n+8) { animation-delay: 175ms; }

/* Ф4: волна подсветки при активации статус-чипа (класс .active вешается
   classList.toggle на существующем узле — анимация стартует ровно в момент
   смены статуса, при повторном рендере без смены не перезапускается) */
@keyframes chipWave {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint-primary) 55%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
.status-chip.active { animation: chipWave .45s ease-out; }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .status-chip.active { animation: none; }
}

/* ---------- Ф6 (26.09, запрос пользователя): таймлайн статусов ----------
   Текущий статус — в центре (десктоп) / верхней строкой (мобильный),
   слева — переходы назад, справа — вперёд, «Отменён» за разделителем.
   Чипы не пересоздаются (Р18) — перелёт FLIP-ом из app.js. */
.status-chips {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.status-chips::-webkit-scrollbar { display: none; }
.status-chips .sc-group { display: flex; align-items: center; gap: 6px; min-width: 0; }
.status-chips .sc-back, .status-chips .sc-fwd { flex: 1; }
.status-chips .sc-back { justify-content: flex-end; flex-wrap: nowrap; }
.status-chips .sc-fwd { justify-content: flex-start; }
.status-chips .sc-cur { flex: 0 0 auto; }
.status-chips .sc-div { width: 1.5px; align-self: stretch; min-height: 28px; background: var(--mint-border); flex: 0 0 auto; }
.status-chips .sc-cancel { flex: 0 0 auto; }
.status-chips .hidden { display: none; }
/* текущий — крупнее и заметнее соседей */
.status-chip.current { font-size: 14px; padding: 9px 18px; box-shadow: 0 3px 10px rgba(23, 48, 33, 0.22); }
/* соседи-переходы чуть тише текущего */
.status-chips .to-back .status-chip, .status-chips .sc-back .status-chip,
.status-chips .sc-fwd .status-chip { opacity: .92; }
/* стрелки-подсказки направления */
.status-chips .sc-back .status-chip::before { content: '‹ '; opacity: .55; }
.status-chips .sc-fwd .status-chip::after { content: ' ›'; opacity: .55; }
@media (max-width: 480px) {
  /* мобильный: весь таймлайн — одна горизонтальная лента со скроллом;
     текущий чип центрируется JS-ом (arrangeStatusChips → scroll), слева
     остаются переходы назад, справа вперёд. Перенос строк отключён —
     иначе группы «назад/вперёд» перемешиваются (дефект со скрина Ф6). */
  .status-chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  }
  .status-chips::-webkit-scrollbar { display: none; }
  .status-chips .sc-back, .status-chips .sc-fwd { flex: 0 0 auto; }
  .status-chips .sc-back { flex-wrap: nowrap; }
}
@media (pointer: coarse) {
  .status-chips .sc-div { min-height: 44px; }
}


/* ================= ВОЛНА Г (29.09, frontend-craft) ================= */
/* Г12 (29.09, фикс по отзыву): нативная подсветка тапа (-webkit-tap-highlight) на
   Android/Chrome рисуется КВАДРАТОМ по габаритам элемента и не следует border-radius —
   «квадратная рамка» на статус-чипах при нажатии. Убираем глобально: press-отдача у нас
   своя (:active scale/brightness, chipWave). Доступность не страдает — клавиатурный
   фокус остаётся через :focus-visible (см. выше). */
html { -webkit-tap-highlight-color: transparent; }
/* после тапа некоторые браузеры (Firefox) вешают :focus с UA-рамкой — гасим её,
   но :focus-visible (клавиатура) сохраняем */
:focus:not(:focus-visible) { outline: none; }
/* Г6: touch-action — убирает 300ms задержку двойного тапа на мобильных */
a, button, .btn, .chip, .list-item, .status-chip, .picker-chip, .stepper-btn,
.tab, .drawer-item, .fab, .burger-btn, .toast-action, .catalog-item { touch-action: manipulation; }
/* Г8: скролл внутри диалога не «цепляет» страницу под ним */
dialog { overscroll-behavior: contain; }
/* Г5: денежные/числовые колонки — tabular-nums, цифры не прыгают при обновлении */
.rs-sum, .rs-total .rs-sum, .product-price, .cart-total, .cart-item-price,
.det-price, .plan-price, .stock-summary, .deliver-rest-sum, .price { font-variant-numeric: tabular-nums; }
/* Г2b: press-отдача должна читаться мгновенно — на :active сокращаем transition до 90ms
   (scale на .list-item не добавляем: съедает первый тап — урок Ф2) */
.btn:active, .fab:active, .dialog-close:active, .avatar-btn:active,
.burger-btn:active, .month-nav-btn:active { transition-duration: 90ms; }
/* Г12b (29.09): у всех тап-элементов своя press-отдача — нативная квадратная
   подсветка тапа снята глобально (см. Г12), тактильность не теряем.
   Мелкие чипы — scale(.96); крупные строки/ячейки — без transform (урок Ф2:
   transform на списке съедает первый тап), только фон/brightness. */
.chip:active, .filter-chip:active, .picker-chip:active { transform: scale(.96); transition-duration: 90ms; }
.status-sheet-item:active, .cal-cell:active, .faq-item:active,
.section-head:active, .drawer-item:active { filter: brightness(.97); transition-duration: 90ms; }

/* ============ Д15 (29.09, фидбек Виталия): читаемость текста ============
   Проблема: длинные названия/комментарии (особенно слова без пробелов) уезжали
   за границы карточек и экрана — текст невозможно прочитать. Системный фикс:
   1) всё текстовое содержимое main/dialog переносится по словам (break-word —
      наследуется, НЕ влияет на расчёт ширины таблиц/колонок);
   2) текстовые элементы внутри flex/grid сжимаются (min-width:0 — лечит классический
      min-width:auto, из-за которого flex-потомок отказывается сжиматься) и рвут
      сверхдлинные слова в любом месте (anywhere);
   3) td/th — только break-word (anywhere схлопнул бы min-content колонок);
   4) элементы с white-space:nowrap (чипы категорий, кнопки-пилюли) не затронуты —
      там nowrap намеренный, а их строки горизонтально скроллятся. */
main, dialog, .store-main { overflow-wrap: break-word; }
main :is(h1, h2, h3, h4, h5, p, label, span, small, figcaption, summary, legend, blockquote),
dialog :is(h1, h2, h3, h4, h5, p, label, span, small, figcaption, summary, legend, blockquote) {
  min-width: 0;
  overflow-wrap: anywhere;
}
td, th { overflow-wrap: break-word; }
/* текстовые контейнеры, которые сами являются flex-потомками */
.meta, .sub, .of-value, .faq-body, .help-step-body, .field-caption, .collapse-body,
.cal-detail, .audit-details, .cat-name, .prep-date-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* заголовки карточек: h2 сжимается, действия справа не выдавливают текст */
.card-head h2, .section-head h2, .card-head .sub { min-width: 0; flex-shrink: 1; }
/* кнопки с длинным текстом: перенос вместо выезда (короткие не затронуты — nowrap выше по specificity) */
.btn, .dialog-actions .btn { overflow-wrap: break-word; }

/* UIUX audit: compact, themed controls; no palette replacement. */
.catalog-search{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}
.catalog-search input{flex:1 1 180px;min-width:0}.catalog-search .sub{flex-basis:100%}
.load-error{padding:12px;border:1px solid var(--mint-border);border-radius:12px;background:var(--mint-surface);margin-bottom:10px}
.load-error p{margin:0 0 8px}.finance-explanation{margin:10px 0}.finance-explanation summary{cursor:pointer;font-weight:600;padding:8px 0}
.purchase-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.purchase-control input{width:110px;min-width:0}.purchase-control label{font-size:.85rem}
.order-keyboard-controls{display:none;gap:6px;align-items:center;flex-wrap:wrap;margin:8px 0}
.admin-reordering .order-keyboard-controls,.order-editing .order-keyboard-controls{display:flex}
.order-keyboard-controls select{min-width:90px;max-width:180px}.order-keyboard-controls button{min-height:40px}
button.cal-cell{font:inherit;color:inherit;text-align:inherit;min-width:0;cursor:pointer}.collapse-control{flex-shrink:0}
.exit-choice-dialog{max-width:440px}.exit-choice-dialog .dialog-actions{flex-wrap:wrap}
@media(max-width:600px){
 .shopping-auto-row{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.purchase-control{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .purchase-control label{grid-column:1/-1}.purchase-control input{width:100%}.purchase-control button{min-height:42px;white-space:normal}
 .catalog-search input{font-size:16px}.exit-choice-dialog .dialog-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}
 #modal-offline-queue .list-item{flex-wrap:wrap}#modal-offline-queue .client-actions{flex-wrap:wrap}
}

/* Accessible heading control stays in the title, not on a detached row. */
.has-collapse-control .card-head h2::after{display:none!important}
.collapse-control-title{appearance:none;border:0;background:transparent;color:inherit;font:inherit;text-align:left;padding:0;display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.collapse-control-title .icn{width:14px;height:14px;flex:none}
.collapsed .collapse-control-title .icn{transform:rotate(-90deg)}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/*25.10: summary title/count must never compete with three action labels.
  This row lives inside a desktop dashboard column as well as a phone card. */
.prep-summary-row { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; }
.prep-summary-row > .meta { width: 100%; }
.prep-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.prep-summary-actions > .btn { flex: 1 1 110px; min-width: 0; min-height: 40px; white-space: normal; }

/*25.10: in single-column layouts the menu gets a reserved bottom-bar slot,
  never a floating hit-target on top of payment/form actions. Same existing button. */
@media (max-width: 1099px) {
  .tabbar { padding-right: calc(68px + env(safe-area-inset-right, 0px)); }
  .tabbar .tab { flex: 1 1 0; width: auto; min-width: 0; padding-left: 2px; padding-right: 2px; font-size: 11px; }
  .tabbar .fab { flex: 0 0 52px; width: 52px; height: 52px; }
  .burger-fab { right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(9px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 54px; border-radius: 12px; padding: 4px; gap: 2px; background: transparent; box-shadow: none; }
  .burger-fab::after { content: 'Меню'; font-size: 11px; font-weight: 600; line-height: 1.15; }
  .burger-fab:hover { background: var(--mint-surface-2); box-shadow: none; }
}

/* Extremely narrow phones retain a readable menu instead of squeezing six labels.
   Calendar remains available in the same drawer; only this shortcut is omitted. */
@media (max-width: 359px) {
  .tabbar .tab[data-screen="calendar"] { display: none; }
}

/*25.10: a real opaque header, not an X floating over recipe/delete controls. */
dialog { --dialog-inset: 20px; scroll-padding-top: 100px; scroll-padding-bottom: 90px; }
.dialog-header { position: sticky; top: calc(-1 * var(--dialog-inset)); z-index: 5; display: flex; align-items: center; gap: 12px; margin: calc(-1 * var(--dialog-inset)) calc(-1 * var(--dialog-inset)) 12px; padding: 12px var(--dialog-inset); background: var(--mint-surface); border-bottom: 1px solid var(--mint-border); }
.dialog-header > h3 { flex: 1 1 0; min-width: 0; padding: 0; margin: 0; }
dialog .dialog-header > .dialog-close { position: static; flex: 0 0 36px; margin: 0 0 0 auto; }
@media (max-width: 480px) { dialog { --dialog-inset: 16px; } }


/* Recipe helper actions are content, not a second competing sticky footer. */
.recipe-ingredient-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.recipe-ingredient-actions > .btn { flex: 1 1 180px; min-width: 0; white-space: normal; }
#modal-recipe-detail { max-width: 840px; }
@media (max-width: 640px) {
  #modal-recipe-detail .rs-row { grid-template-columns: minmax(0, 1fr) 26px 68px 40px; gap: 6px; }
  #modal-recipe-detail .rs-row:not(.rs-head) .rs-name { grid-column: 1 / -1; }
  #modal-recipe-detail .rs-head .rs-name { display: none; }
  #modal-recipe-detail .rs-qty { grid-column: 1; }
  #modal-recipe-detail .rs-unit { display: block; grid-column: 2; }
  #modal-recipe-detail .rs-sum { grid-column: 3; }
  #modal-recipe-detail .rs-del { grid-column: 4; }
}

/*25.10 follow-up: queue metadata and actions never compete for a narrow column. */
#offline-queue-list .list-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
#offline-queue-list .meta { width: 100%; min-width: 0; }
#offline-queue-list .client-actions { margin-left: 0; justify-content: flex-start; gap: 8px; }
#offline-queue-list .client-actions .btn { white-space: normal; }
/* Picker names identify variants: never clamp them. */
.det-attr { align-items: baseline; }
.det-attr b { white-space: nowrap; flex: none; }
.det-attr > span { min-width: 0; overflow-wrap: anywhere; }
.calc-hero-label { white-space: nowrap; flex: none; }
.calc-hero-value { min-width: 0; overflow-wrap: anywhere; }
.calc-hero { gap: 12px; }
#prep-modal-ingredients .calc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; }
#prep-modal-ingredients .calc-row > span { min-width: 0; overflow-wrap: anywhere; }
#prep-modal-ingredients .calc-row > strong { min-width: 0; max-width: 140px; text-align: right; }

#pick-list .pick-item .meta .title { display: block; -webkit-line-clamp: unset; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@media (max-width: 640px) {
 #pick-list .pick-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
 #pick-list .pick-item > button { grid-column: 1 / -1; width: 100%; }
}



/* Audit data remains whole: readable cells inside the existing horizontal scroller. */
.audit-list .admin-table { min-width: 880px; border-collapse: collapse; text-align: left; }
.audit-list .admin-table th, .audit-list .admin-table td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid var(--mint-border); }
.audit-list .admin-table th, .audit-list .admin-table td:nth-child(1), .audit-list .admin-table td:nth-child(5) { white-space: nowrap; }
.audit-list .audit-details { min-width: 180px; }

/* Short packaging label stays intact; long value wraps independently. */
#prep-modal-info .prep-pack-label { flex: 0 0 auto; white-space: nowrap; }
#prep-modal-info .prep-pack-label + strong { min-width: 0; overflow-wrap: anywhere; }

/* Calendar handles horizontal paging; native vertical scrolling and pinch stay available. */
#screen-calendar [data-calendar-swipe] { touch-action: pan-y pinch-zoom; }
