/* DRMKN — общий стиль (тёмная премиальная тема) */
:root {
  --bg: #0f1117;
  --bg2: #161a23;
  --card: #1c212e;
  --card2: #232a3a;
  --line: #2a3245;
  --text: #eef1f7;
  --muted: #8b93a7;
  --accent: #3fa4ff;
  --accent2: #2d7fd6;
  --green: #34c07c;
  --red: #f2555a;
  --amber: #f5b13d;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior: none;
}

body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% -50px, rgba(63,164,255,.14), transparent 70%),
    radial-gradient(500px 300px at -60px 100%, rgba(52,192,124,.07), transparent 70%);
  z-index: 0;
}

#app { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; min-height: 100%; }

/* SVG-иконки (минимализм, stroke) */
.si { width: 1em; height: 1em; flex-shrink: 0; display: inline-block; vertical-align: -0.12em; }
.si-s { font-size: 16px; }
.si-m { font-size: 20px; }
.si-l { font-size: 24px; }
.si-xl { font-size: 42px; }
.iwrap { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.iwrap.tile {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(63,164,255,.10); color: var(--accent);
}
.iwrap.tile.green { background: rgba(52,192,124,.10); color: var(--green); }
.iwrap.tile.amber { background: rgba(245,177,61,.10); color: var(--amber); }
.iwrap.tile.red { background: rgba(242,85,90,.10); color: var(--red); }
.iwrap.tile.muted { background: rgba(148,163,184,.10); color: var(--muted); }

/* Навигация */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; max-width: 640px; margin: 0 auto;
  background: rgba(22,26,35,.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 11px; font-family: inherit; padding: 6px 2px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: color .18s, background .18s;
  position: relative;
}
.tabbar button .ico { font-size: 20px; line-height: 1; display: flex; }
.tabbar button .ico .si { font-size: 20px; }
.tabbar button.active { color: var(--accent); }
.tabbar button.active .ico {
  background: rgba(63,164,255,.12); border-radius: 9px; padding: 3px 6px;
}
.tabbar .badge {
  position: absolute; top: 2px; right: calc(50% - 24px);
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* Верхние сегменты: Обзор / Заказы / Финансы */
.segbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  max-width: 640px; margin: 0 auto;
  display: flex; gap: 4px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: rgba(22,26,35,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.segb {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(148,163,184,.07);
  border: 1px solid transparent;
  color: var(--muted);
  font: 600 13px/1 inherit; font-family: inherit;
  padding: 10px 6px; border-radius: 12px;
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s;
}
.segb .ico { display: flex; line-height: 1; }
.segb .ico .si { font-size: 17px; }
.segb:active { transform: scale(.97); }
.segb.on {
  color: #fff;
  background: linear-gradient(135deg, rgba(63,164,255,.28), rgba(63,164,255,.12));
  border-color: rgba(63,164,255,.45);
  box-shadow: 0 2px 12px rgba(63,164,255,.25);
}

/* Общие блоки */
.page { padding: 16px 16px 96px; animation: fadein .22s ease; }
/* админка: контент ниже герхнего сегмент-бара */
.admin-body .page { padding-top: calc(74px + env(safe-area-inset-top)); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: -.02em; }
h2 { font-size: 16px; font-weight: 700; margin: 18px 0 10px; letter-spacing: -.01em; }
.sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}

/* Карточка администратора го гкладке «Клиенты» */
.card.client-admin {
  border-color: rgba(242, 85, 90, .55);
  background: linear-gradient(135deg, rgba(242, 85, 90, .07), var(--card) 55%);
  box-shadow: 0 0 0 1px rgba(242, 85, 90, .22), var(--shadow);
}
.adm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  vertical-align: 2px; margin-left: 6px;
  padding: 2.5px 8px; border-radius: 6px;
  background: rgba(242, 85, 90, .14);
  border: 1px solid rgba(242, 85, 90, .40);
  color: #ff8a8d;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
}
.adm-badge .si { font-size: 11px; }
.ban-badge {
  display: inline-flex; align-items: center; gap: 4px;
  vertical-align: 2px; margin-left: 6px;
  padding: 2.5px 8px; border-radius: 6px;
  background: rgba(148, 163, 184, .12);
  border: 1px solid rgba(148, 163, 184, .40);
  color: var(--muted);
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
}
.ban-badge .si { font-size: 11px; }
.key-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700; font-size: 14px; letter-spacing: .5px;
  background: rgba(148, 163, 184, .10);
  border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px;
  display: inline-block;
}
.card.client-banned {
  border-color: rgba(148, 163, 184, .35);
  background: linear-gradient(135deg, rgba(148, 163, 184, .06), var(--card) 55%);
}
.row { display: flex; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.big { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.green { color: var(--green); } .red { color: var(--red); } .amber { color: var(--amber); } .accent { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: none; border-radius: 14px;
  font: 600 15px/1 inherit; font-family: inherit;
  padding: 14px 20px; cursor: pointer; width: 100%;
  transition: transform .12s, background .18s, opacity .18s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost.danger {
  color: #ff8a8d;
  border-color: rgba(242, 85, 90, .45);
  background: rgba(242, 85, 90, .10);
}
.btn.ghost.danger:active { background: rgba(242, 85, 90, .22); }
.btn.danger { background: var(--red); }
.btn.success { background: var(--green); }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; width: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* Товар: карточка с цветовой полосой бренда и цветными пилюлями вкусов */
.product {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px;
  position: relative;
}
/* блок бренда: вертикальная структура (шапка → секции → сетка) */
.product.brand-block { flex-direction: column; align-items: stretch; gap: 0; }
.product.out { opacity: .5; }
/* цветная полоса слега — цгет бренда (по назганию) */
.product::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--fc, #3fa4ff);
  opacity: .85;
}
.p-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: var(--fc, #3fa4ff);
  box-shadow: 0 0 10px rgba(var(--fcr, 63,164,255), .45);
}
.p-photo {
  width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0;
  object-fit: cover;
}
.p-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.p-head .p-photo { width: 44px; height: 44px; border-radius: 9px; }
.p-info { flex: 1; min-width: 0; }
.p-name { font-weight: 800; font-size: 16px; letter-spacing: .2px; }
.p-desc { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-price { font-weight: 800; font-size: 16px; }
.p-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.p-chip {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 7px;
  font-size: 11.5px; font-weight: 700; line-height: 1.4;
  white-space: nowrap;
}
.p-chip.price {
  background: rgba(63, 164, 255, .13);
  color: #7ec2ff;
}
.p-chip.stock.in {
  background: rgba(52, 192, 124, .13);
  color: #4ecf93;
}
.p-chip.stock.low {
  background: rgba(245, 177, 61, .14);
  color: var(--amber);
}
.p-chip.stock.out {
  background: rgba(242, 85, 90, .13);
  color: var(--red);
}
.p-chip.stock.wh {
  background: rgba(245, 177, 61, .12);
  color: var(--amber);
  border: 1px dashed rgba(245, 177, 61, .35);
}

/* Вкусы: цветные пилюли (цвет = вкус) + мини-степлер */
.flavors { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.flavors-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;
}
/* Равномерные пилюльки: ВСЕ карточки одной высоты — рассчитана под
   двухстрочное имя. «Love 777» и «Dragonfruit Banana Cherry» — одинаково. */
.flavors-grid .fcard { min-height: 56px; }
/* сетки недоступных — мягко приглушены (карточки и так различаются) */
.flavors-grid.wh { opacity: .8; }
.flavors-grid.out { opacity: .6; }

/* Карточка вкуса в сетке 2×N: индикатор-точка слева, имя, остаток справа */
.fcard {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; padding: 10px 12px; border-radius: 12px;
  background: rgba(var(--fcr, 148,163,184), .09);
  border: 1px solid rgba(var(--fcr, 148,163,184), .28);
  color: var(--text); font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: left;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.fcard:active { transform: scale(.98); }
.fcard.sel {
  background: rgba(var(--fcr, 148,163,184), .2);
  border-color: rgba(var(--fcr, 148,163,184), .6);
  box-shadow: 0 0 12px rgba(var(--fcr, 148,163,184), .18);
}
.fcard-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: var(--fc, #94a3b8);
  box-shadow: 0 0 8px rgba(var(--fcr, 148,163,184), .6);
}
.fcard-name {
  flex: 1; min-width: 0;
  /* Длинные названия: до двух строк с «…» на второй. Одна строка с
     ellipsis срезала половину имени — «Blueberry Ice Extra…» и т.п. */
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; overflow-wrap: break-word;
  font-size: 12.5px; line-height: 1.32; letter-spacing: .1px;
}
/* Совсем длинные имена («Dragonfruit Banana Cherry»): шрифт поменьше,
   чтобы уместить больше символов в те же две строки */
.fcard-name.longname { font-size: 11px; letter-spacing: 0; line-height: 1.28; }
/* Ещё длиннее — включаем сжатие букв: браузер подожрёт пробелы и
   чуть сожмет глифы, влезает заметно больше */
.fcard-name.longname.xl { font-size: 10.5px; letter-spacing: -.2px; word-spacing: -1px; }
.fcard-qty {
  flex-shrink: 0; font-size: 11px; font-weight: 800; color: #4ecf93;
  font-variant-numeric: tabular-nums;
  align-self: center;
}
.fcard-qty.gone { font-size: 10px; letter-spacing: .4px; color: var(--muted); }
/* «Нет с собой»: как было раньше — пунктирная рамка, приглушено (склад есть) */
.fcard.wh {
  background: rgba(148,163,184,.06);
  border: 1px dashed rgba(245,177,61,.4);
  color: var(--muted);
}
.fcard.wh .fcard-dot { opacity: .5; box-shadow: none; }
.fcard.wh .fcard-qty.gone { color: var(--amber); }
/* «Нет в наличии»: тусклая серая, как было раньше */
.fcard.none {
  background: rgba(148,163,184,.05);
  border: 1px solid rgba(148,163,184,.2);
  color: var(--muted);
}
.fcard.none .fcard-dot { background: #94a3b8; opacity: .4; box-shadow: none; }
.fcard.none .fcard-qty.gone { color: var(--muted); }
/* Степпер внутри карточки: [− n +] на всю ширину */
.fcard-steps { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fcard-steps .f-num { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.flavor {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 12px;
  background: rgba(var(--fcr, 148,163,184), .10);
  border: 1px solid rgba(var(--fcr, 148,163,184), .30);
  color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .2s, border-color .2s, transform .12s, color .2s, box-shadow .2s;
  position: relative;
}
/* цветная точка вкуса гнутри пилюли */
.flavor::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--fc, #94a3b8); flex-shrink: 0;
  box-shadow: 0 0 8px rgba(var(--fcr, 148,163,184), .6);
}
.flavor:disabled { opacity: .3; cursor: default; }
/* Нет г наличии: пилюля Улухо серая, ягная подпись «НЕТ» */
.flavor.out {
  opacity: .55;
  background: rgba(148,163,184,.08);
  border-color: rgba(148,163,184,.35);
  color: var(--muted);
  cursor: pointer;
}
.flavor.out::before { background: #94a3b8; box-shadow: none; opacity: .5; }
/* Нет с собой, но есть на складе: янтарная пунктирная + подпись */
.flavor.wh {
  opacity: .75;
  border-style: dashed;
  border-color: rgba(245,177,61,.55);
  cursor: pointer;
}
.flavor.wh::before { opacity: .6; }
/* Подпись статуса прямо г пилюле — читается без тапа */
.f-state {
  font-size: 8.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  border-radius: 5px; padding: 2px 5px; margin-left: 3px;
  line-height: 1; white-space: nowrap;
}
.f-state.wh {
  color: var(--amber);
  background: rgba(245,177,61,.16);
  text-shadow: 0 0 5px rgba(245,177,61,.5);
}
.f-state.out {
  color: #8b97a8;
  background: rgba(148,163,184,.15);
}

/* Кнопка-подсказка «?» — в потоке шапки бренда, левее стрелки.
   Раньше висела absolute в углу карточки и наезжала на кнопку-стрелку. */
.g-qa {
  flex-shrink: 0; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(102,126,234,.1);
  border: 1px solid rgba(102,126,234,.28);
  color: #9fb4ff;
  font-family: inherit; font-size: 13px; font-weight: 800;
  cursor: pointer; z-index: 2;
  transition: background .15s, transform .12s;
}
.g-qa:active { transform: scale(.9); background: rgba(102,126,234,.25); }

/* Легенда статусов (модалка): пример пилюли + объяснение */
.legend-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.legend-row:last-of-type { border-bottom: none; }
.legend-row .flavor.demo { pointer-events: none; flex-shrink: 0; }
.legend-txt { flex: 1; min-width: 0; }
.legend-txt .small { line-height: 1.45; margin-top: 2px; }

/* Экран выбора языка (пергый вход) */
.lang-pick {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 320px; margin: 0 auto;
}
.lang-opt {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  cursor: pointer; font-family: inherit; color: var(--text);
  transition: border-color .15s, background .15s, transform .12s;
}
.lang-opt:hover { border-color: rgba(63,164,255,.5); background: rgba(63,164,255,.06); }
.lang-opt:active { transform: scale(.98); }
.lang-flag { font-size: 30px; line-height: 1; flex-shrink: 0; }
.lang-txt { text-align: left; display: flex; flex-direction: column; }
.lang-txt b { font-size: 16px; font-weight: 800; }
.lang-txt i { font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Переключатель языка г профиле */
.lang-seg { display: inline-flex; gap: 6px; }
.lang-seg button {
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 10px;
  transition: border-color .15s, color .15s, background .15s;
}
.lang-seg button.active {
  color: #fff; border-color: rgba(63,164,255,.55);
  background: rgba(63,164,255,.18);
}
.flavor:active { transform: scale(.94); }
.flavor.sel {
  background: rgba(var(--fcr, 63,164,255), .20);
  border-color: rgba(var(--fcr, 63,164,255), .65);
  color: #fff;
  box-shadow: 0 2px 14px rgba(var(--fcr, 63,164,255), .25);
  padding: 3px 4px; /* степперу нужен простор */
}
/* Степпер гнутри гыбранной пилюли: [ − 2 + ] */
.f-step {
  font-style: normal; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  font-size: 16px; font-weight: 800; line-height: 1;
  color: #fff; background: rgba(var(--fcr, 63,164,255), .30);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.f-step:active { transform: scale(.88); background: rgba(var(--fcr, 63,164,255), .55); }
.f-step.max { opacity: .35; }
.f-num {
  min-width: 22px; text-align: center;
  font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 0 2px;
}
.f-name { /* имя гнутри пилюли (тап → панель) */
  pointer-events: auto;
}

/* Панель количестга вкуса (гнутри общей bottom-sheet модалки) */
.sheet { padding: 6px 4px 4px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sheet-head .flavor.demo { pointer-events: none; flex-shrink: 0; }
.sheet-meta { flex: 1; min-width: 0; }
.sheet-stepper {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 6px 0 8px;
}
.st-btn {
  width: 52px; height: 52px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 26px; font-weight: 800;
  color: #fff; background: rgba(63,164,255,.16);
  border: 1px solid rgba(63,164,255,.45);
  cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s;
}
.st-btn:active { transform: scale(.92); background: rgba(63,164,255,.35); }
.st-btn:disabled { opacity: .3; cursor: default; transform: none; }
.st-num {
  min-width: 64px; text-align: center;
  font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.f-total {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  flex-shrink: 0; min-width: 44px; height: 34px; padding: 0 10px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(63,164,255,.22), rgba(63,164,255,.10));
  border: 1px solid rgba(63,164,255,.40);
  color: #7ec2ff; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums;
}
.f-total .si { font-size: 14px; }
.f-stepper { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.f-stepper button {
  width: 34px; height: 34px; border-radius: 11px;
  border: 1px solid rgba(63,164,255,.25); background: rgba(63,164,255,.08);
  color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .12s, opacity .15s;
}
.f-stepper button:active { transform: scale(.92); }
.f-stepper button:disabled { opacity: .25; }
.f-stepper button:last-child { background: rgba(63,164,255,.16); border-color: rgba(63,164,255,.35); }
.tier-badge {
  display: inline-block; margin-top: 5px; padding: 2px 8px;
  font-size: 11px; font-weight: 600; border-radius: 7px;
  background: rgba(88, 101, 242, .12); color: #aab3ff;
  white-space: nowrap;
}

/* Блок оптовых цен — современный аккордеон */
.tier-card {
  position: relative;
  border-radius: 16px; overflow: hidden;
  margin-bottom: 14px;
  background: linear-gradient(145deg, rgba(63,164,255,.07), rgba(22,26,35,.9) 42%);
  border: 1px solid rgba(63,164,255,.16);
  box-shadow: 0 8px 24px -12px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.04);
}
.tier-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 14px;
  background: none; border: none; font-family: inherit; color: var(--text);
  cursor: pointer; text-align: left;
  transition: background .18s;
}
.tier-toggle:active { background: rgba(63,164,255,.08); }
.tier-label {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 14.5px; flex: 1; min-width: 0;
  letter-spacing: -.01em;
}
.tier-label .si { color: var(--accent); }
.tier-teaser {
  font-size: 12px; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #4ecf93;
  background: linear-gradient(135deg, rgba(52,192,124,.22), rgba(52,192,124,.10));
  border: 1px solid rgba(52,192,124,.28);
  padding: 4px 10px; border-radius: 9px;
}
.tier-chevron {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  color: var(--muted);
  background: rgba(148,163,184,.10);
  transition: transform .38s cubic-bezier(.34,1.45,.4,1), background .25s, color .25s;
}
.tier-card.open .tier-chevron {
  transform: rotate(180deg);
  color: var(--accent);
  background: rgba(63,164,255,.14);
}
/* Тихий намёк «здесь можно нажать»: шегрон дышит, пока блок закрыт */
.tier-card:not(.open) .tier-chevron { animation: chevron-breathe 2.6s ease-in-out infinite; }
@keyframes chevron-breathe {
  0%, 100% { opacity: .55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(2px); }
}

.tier-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .34s cubic-bezier(.25,1,.3,1), opacity .26s ease;
}
.tier-card.open .tier-body { grid-template-rows: 1fr; opacity: 1; }
.tier-body-inner {
  overflow: hidden;
  padding: 0 14px;
}
.tier-card.open .tier-body-inner { padding-bottom: 13px; }

/* Строки тарифа */
.tier-rows { display: flex; flex-direction: column; gap: 7px; }
.tier-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 12px;
  background: rgba(148,163,184,.05);
  border: 1px solid rgba(148,163,184,.10);
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.tier-row.best {
  background: linear-gradient(135deg, rgba(52,192,124,.12), rgba(52,192,124,.04));
  border-color: rgba(52,192,124,.30);
}
.tier-row.on {
  border-color: rgba(63,164,255,.60);
  background: linear-gradient(135deg, rgba(63,164,255,.14), rgba(63,164,255,.05));
  box-shadow: 0 0 0 1px rgba(63,164,255,.20), 0 4px 14px -6px rgba(63,164,255,.35);
}
.tier-row.on .tier-val { color: #7ec2ff; }
.tier-qty {
  font-weight: 700; font-size: 13.5px; min-width: 64px;
  font-variant-numeric: tabular-nums;
}
.tier-arrow { color: var(--muted); font-size: 12px; opacity: .7; }
.tier-val { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tier-val em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--muted); }
.tier-tag {
  margin-left: auto; padding: 3.5px 9px; border-radius: 7px;
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  background: linear-gradient(135deg, rgba(52,192,124,.30), rgba(52,192,124,.14));
  border: 1px solid rgba(52,192,124,.30);
  color: #4ecf93;
}
.tier-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 11px; color: var(--muted); font-size: 11.5px; text-align: center;
}
.tier-note .si { color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  .tier-body { transition: none; }
  .tier-chevron { transition: none; animation: none; }
}

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text); font-size: 18px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.stepper button:disabled { opacity: .35; }
.stepper .qty { min-width: 22px; text-align: center; font-weight: 700; }

/* Чипы статусов */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
}
.chip.new { background: rgba(63,164,255,.15); color: var(--accent); }
.chip.accepted { background: rgba(52,192,124,.15); color: var(--green); }
.chip.in_progress { background: rgba(245,177,61,.15); color: var(--amber); }
.chip.done { background: rgba(139,147,167,.18); color: var(--muted); }
.chip.cancelled { background: rgba(242,85,90,.15); color: var(--red); }
/* Предзаказ: янтарный пунктир — ждёт открытия магазина */
.chip.preorder {
  background: rgba(245,177,61,.12); color: var(--amber);
  border: 1px dashed rgba(245,177,61,.5);
}
/* Продажа вне бота: зелёный мягкий маркер */
.chip.offline { background: rgba(52,192,124,.15); color: var(--green); font-weight: 600; }

/* Формы */
label.f { display: block; margin-bottom: 12px; }
label.f span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; background: var(--bg2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  font: 400 15px inherit; font-family: inherit; padding: 12px 14px;
  outline: none; transition: border .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=time] { -webkit-appearance: none; appearance: none; }

/* Тост */
#toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #2a3245; color: var(--text); padding: 12px 20px; border-radius: 14px;
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 100; max-width: 90%;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: rgba(242,85,90,.2); border-color: rgba(242,85,90,.5); }
/* Тост с кнопкой действия (undo корзины) */
#toast.act {
  display: flex; align-items: center; gap: 12px;
  pointer-events: auto; padding: 10px 10px 10px 18px;
}
.toast-act {
  flex-shrink: 0; background: rgba(63,164,255,.18); color: #9fd4ff;
  border: 1px solid rgba(63,164,255,.4); border-radius: 9px;
  padding: 6px 12px; font: 700 12.5px inherit; font-family: inherit;
  cursor: pointer; white-space: nowrap;
}
.toast-act:active { transform: scale(.95); background: rgba(63,164,255,.3); }

/* Прогресс-бар */
.progress {
  height: 10px; border-radius: 5px; background: var(--bg2);
  border: 1px solid var(--line); overflow: hidden;
}
.progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), #6fc3ff);
  border-radius: 5px; transition: width .5s ease;
}
.progress.full i { background: linear-gradient(90deg, var(--green), #7ce3ae); }

/* ---------- Страница «Бонусы»: премиальный dark-UI ---------- */
.bonus-page h1 { font-size: 24px; margin-bottom: 2px; }
.bonus-head { margin-bottom: 18px; }

/* Баннеры «банки к выдаче» и «Совет»: компактные горизонтальные строки */
.bonus-rewards, .bonus-tip {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px; margin-bottom: 14px;
}
.bonus-rewards {
  background: rgba(52,192,124,.07);
  border: 1px solid rgba(52,192,124,.28);
  box-shadow: 0 4px 18px rgba(52,192,124,.08);
}
.bonus-rewards .iwrap { width: 38px; height: 38px; border-radius: 12px; }
.bonus-rewards .iwrap .si { font-size: 20px; }
.br-title { font-weight: 800; font-size: 14px; }
.bonus-rewards .small { line-height: 1.4; margin-top: 2px; }

/* ГЛАВНАЯ карточка прогресса: слева цифры, справа подарок со свечением */
.bonus-hero {
  display: flex; align-items: stretch; gap: 14px;
  padding: 20px 18px; border-radius: 22px;
  background: linear-gradient(145deg, rgba(63,164,255,.08), rgba(22,26,35,.65) 55%), var(--card);
  border: 1px solid rgba(63,164,255,.22);
  box-shadow:
    0 8px 28px rgba(2,8,23,.45),
    0 0 24px rgba(63,164,255,.10);
  margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.bonus-hero.full {
  background: linear-gradient(145deg, rgba(52,192,124,.09), rgba(22,26,35,.65) 55%), var(--card);
  border-color: rgba(52,192,124,.3);
  box-shadow: 0 8px 28px rgba(2,8,23,.45), 0 0 24px rgba(52,192,124,.12);
}
.bh-left { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.bh-label { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.bh-score { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 4px; }
.bh-score b { font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -.03em;
  background: linear-gradient(135deg, #eef1f7, #9fd4ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bonus-hero.full .bh-score b {
  background: linear-gradient(135deg, #eef1f7, #7ce3ae);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bh-score span { color: var(--muted); font-size: 15px; font-weight: 700; }
.bh-hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.bh-hint.ok { color: var(--green); font-weight: 700; }
/* прогресс-бар с сегментной шкалой */
.bh-bar {
  height: 12px; border-radius: 6px; margin-top: 14px;
  background: rgba(15,17,23,.9); border: 1px solid rgba(63,164,255,.18);
  overflow: hidden; position: relative;
}
.bh-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #6fc3ff);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(63,164,255,.55);
  transition: width .8s cubic-bezier(.25, .8, .3, 1);
}
.bonus-hero.full .bh-bar i {
  background: linear-gradient(90deg, var(--green), #7ce3ae);
  box-shadow: 0 0 12px rgba(52,192,124,.55);
}
/* точечная шкала под баром: деления цикла */
.bh-scale { display: flex; gap: 4px; margin-top: 8px; }
.bh-scale span {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(148,163,184,.18);
  transition: background .4s ease;
}
.bh-scale span.on { background: rgba(63,164,255,.7); box-shadow: 0 0 6px rgba(63,164,255,.35); }
.bonus-hero.full .bh-scale span.on { background: rgba(52,192,124,.75); box-shadow: 0 0 6px rgba(52,192,124,.4); }

/* контейнер подарка справа: мягкое свечение */
.bh-gift {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 86px; border-radius: 18px; position: relative;
  background: rgba(63,164,255,.07);
  border: 1px solid rgba(63,164,255,.16);
}
.bonus-hero.full .bh-gift { background: rgba(52,192,124,.07); border-color: rgba(52,192,124,.2); }
.bh-gift .iwrap .si { font-size: 34px; color: #9fd4ff; }
.bonus-hero.full .bh-gift .iwrap .si { color: #7ce3ae; }
.bh-glow {
  position: absolute; inset: -18px;
  background: radial-gradient(circle at 50% 50%, rgba(63,164,255,.22), transparent 70%);
  animation: bh-pulse 3.2s ease-in-out infinite;
}
.bonus-hero.full .bh-glow { background: radial-gradient(circle at 50% 50%, rgba(52,192,124,.22), transparent 70%); }
@keyframes bh-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bh-glow { animation: none; } }

/* «Как это работает»: компактные строки в одной карточке */
.hw-card { padding: 4px 14px; }
.hw-step { display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.hw-num {
  flex-shrink: 0; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 11px; font-weight: 800;
  color: #7ec2ff; background: rgba(63,164,255,.12);
  border: 1px solid rgba(63,164,255,.22);
}
.hw-ico { width: 36px; height: 36px; border-radius: 11px; }
.hw-ico .si { font-size: 18px; }
.hw-txt { flex: 1; min-width: 0; }
.hw-title { font-weight: 700; font-size: 13.5px; color: var(--text); }
.hw-desc { color: var(--muted); font-size: 11.5px; margin-top: 2px; line-height: 1.4; }
.hw-arrow { color: var(--muted); opacity: .4; display: flex; flex: none; }
.hw-arrow .si { font-size: 15px; }
.hw-div { height: 1px; background: var(--line); margin: 0 2px; }

/* «Ваши бонусы»: три значения в ряд */
.stats-card {
  display: flex; align-items: stretch; gap: 0; padding: 14px 10px;
}
.stx { flex: 1; min-width: 0; text-align: center; }
.stx-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stx-v.small { font-size: 16px; padding-top: 4px; }
.stx-v.green { color: var(--green); }
.stx-l { color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.stx-sep { width: 1px; background: var(--line); margin: 4px 0; }

/* «Совет»: синее свечение, отличие от основных карточек */
.bonus-tip {
  background: linear-gradient(135deg, rgba(63,164,255,.08), rgba(22,26,35,.5));
  border: 1px solid rgba(63,164,255,.2);
  box-shadow: 0 0 18px rgba(63,164,255,.06);
  margin-top: 4px;
}
.bonus-tip .iwrap { width: 34px; height: 34px; border-radius: 11px; }
.bonus-tip .iwrap .si { font-size: 17px; }
.bt-txt { flex: 1; min-width: 0; }
.bt-title { font-weight: 700; font-size: 12.5px; color: #9fd4ff; }
.bt-desc { color: var(--muted); font-size: 11.5px; line-height: 1.45; margin-top: 2px; }

/* Активный таб «Бонусы» в навигации: pill со свечением */
.tabbar button.active {
  background: rgba(63,164,255,.1);
  box-shadow: 0 0 12px rgba(63,164,255,.15) inset;
}
.tabbar button.active .ico { box-shadow: none; background: none; padding: 3px 0; }

/* ---------- Страница «Профиль»: премиальный dark-UI ---------- */
.profile-page h1 { font-size: 24px; margin-bottom: 2px; }

/* Карточка пользователя: аватар со свечением + данные */
.pf-user {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 16px; border-radius: 22px;
  background: linear-gradient(145deg, rgba(63,164,255,.08), rgba(22,26,35,.65) 55%), var(--card);
  border: 1px solid rgba(63,164,255,.2);
  box-shadow: 0 8px 28px rgba(2,8,23,.45), 0 0 22px rgba(63,164,255,.07);
  margin-bottom: 18px;
}
.pf-ava {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(63,164,255,.1); border: 1px solid rgba(63,164,255,.25);
  position: relative;
}
.pf-ava .iwrap .si { font-size: 30px; color: #9fd4ff; }
.pf-ava-glow {
  position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(63,164,255,.2), transparent 70%);
}
.pf-id-block { flex: 1; min-width: 0; }
.pf-name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.pf-username { color: #9fd4ff; font-size: 13px; font-weight: 600; margin-top: 1px; }
.pf-status {
  display: inline-block; margin-top: 6px;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); background: rgba(148,163,184,.1);
  padding: 3px 9px; border-radius: 20px;
}
.pf-copy {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 4px 0 0; color: var(--muted);
  transition: color .15s;
}
.pf-copy:hover { color: #7ec2ff; }
.pf-copy .si { font-size: 13px; opacity: .7; }

/* Статистика 2×2 в одной карточке */
.pf-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  padding: 8px 0;
}
.pcell {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; min-width: 0;
}
.pcell:nth-child(odd) { border-right: 1px solid var(--line); }
.pcell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.pcell-ico { color: rgba(139,147,167,.75); }
.pcell-ico .si { font-size: 14px; }
.pcell-v { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.pcell-v.green { color: var(--green); }
.pcell-l { color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* Бонусный прогресс (компактнее страницы «Бонусы») */
.pf-bonus { padding: 14px; }
.pf-b-score { font-size: 16px; }
.pf-b-score i { font-style: normal; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.pf-b-bar {
  height: 9px; border-radius: 5px; overflow: hidden;
  background: rgba(15,17,23,.9); border: 1px solid rgba(63,164,255,.16);
}
.pf-b-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), #6fc3ff);
  box-shadow: 0 0 10px rgba(63,164,255,.5);
  border-radius: 5px; transition: width .6s cubic-bezier(.25, .8, .3, 1);
}
.pf-bonus.full .pf-b-bar i {
  background: linear-gradient(90deg, var(--green), #7ce3ae);
  box-shadow: 0 0 10px rgba(52,192,124,.5);
}
.pf-bonus.full { border-color: rgba(52,192,124,.32); }

/* Настройка «Язык»: строка с шевроном */
.pf-settings-h { margin-top: 22px; }
.pf-setting { padding: 13px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.pf-setting:active { background: rgba(63,164,255,.05); }
.pf-setting .iwrap { width: 34px; height: 34px; border-radius: 11px; }
.pf-setting .iwrap .si { font-size: 17px; }
.pf-set-lbl { flex: 1; min-width: 0; font-weight: 700; font-size: 13.5px; }
.pf-set-val { color: #9fd4ff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pf-set-chev { color: var(--muted); opacity: .5; display: flex; }

/* Панель выбора языка (модалка-шит) */
.lang-sheet { max-width: 340px; }
.lang-sheet-title { font-weight: 800; font-size: 16px; margin: 2px 0 14px; }
.lang-sheet .lang-pick { max-width: none; }
.lang-check { margin-left: auto; color: var(--accent); display: flex; }
.lang-check .si { font-size: 18px; }

/* Админ-блок: отдельная административная функция */
.pf-admin {
  display: flex; align-items: center; gap: 12px;
  margin-top: 22px; padding: 14px 14px 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(102,126,234,.09), rgba(22,26,35,.5));
  border: 1px solid rgba(102,126,234,.24);
  box-shadow: 0 0 20px rgba(102,126,234,.06);
}
.pf-adm-info { flex: 1; min-width: 0; }
.pf-adm-t { font-weight: 800; font-size: 13.5px; color: #9fb4ff; display: flex; align-items: center; gap: 6px; }
.pf-adm-t .si { font-size: 15px; }
.pf-adm-d { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
/* Админ-блок: отдельная административная функция.
   Внимание: базовый .btn — width:100%, тут обязательно сбрасываем,
   иначе кнопка растягивается на весь блок и выдавливает текст. */
.pf-adm-btn {
  flex-shrink: 0; margin: 0; font-size: 12.5px; padding: 10px 16px;
  border-radius: 12px; white-space: nowrap;
  width: auto; min-width: 0;
}
/* Узкий экран: текст и кнопка не помещаются в ряд — аккуратно в столбик */
@media (max-width: 380px) {
  .pf-admin { flex-direction: column; align-items: stretch; text-align: left; }
  .pf-adm-btn { width: 100%; }
}

/* Список */
.list { display: flex; flex-direction: column; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* Заголовок */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-top: 12px; }
.topbar h1 { margin: 0; font-size: 20px; flex: 1; }
.back {
  width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Модалка */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; width: 100%; max-width: 640px;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 85vh; overflow-y: auto;
  animation: slideup .25s ease;
}
@keyframes slideup { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* Пикер категорий г модалке товара (админка) */
.cat-picker {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.cat-opt {
  flex: 1; min-width: 100px;
  border: 1px solid var(--line); background: var(--bg2);
  border-radius: 12px; padding: 10px 8px;
  cursor: pointer; transition: .18s;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.cat-opt:hover { border-color: rgba(102,126,234,.4); color: var(--text); }
.cat-opt.sel {
  border-color: rgba(102,126,234,.65);
  background: rgba(102,126,234,.14);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}
.cat-opt .cat-name { white-space: nowrap; }

/* Неоновый чип категории г каталоге клиента (рядом с названием бренда) */
.cat-neon {
  --ccr: 102,126,234;
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--cc);
  background: rgba(var(--ccr), .10);
  border: 1px solid rgba(var(--ccr), .45);
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 8px;
  vertical-align: 2px;
  position: relative;
  white-space: nowrap;
  animation: neon-breathe 3s ease-in-out infinite;
}
@keyframes neon-breathe {
  0%, 100% {
    box-shadow: 0 0 4px rgba(var(--ccr), .25), inset 0 0 3px rgba(var(--ccr), .1);
    text-shadow: 0 0 4px rgba(var(--ccr), .4);
  }
  50% {
    box-shadow: 0 0 10px rgba(var(--ccr), .55), inset 0 0 6px rgba(var(--ccr), .2);
    text-shadow: 0 0 8px rgba(var(--ccr), .75);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cat-neon { animation: none; box-shadow: 0 0 6px rgba(var(--ccr), .4); }
}

/* Плагная смена категории: список мягко растгоряется и поягляется */
.list.cat-swapping { opacity: 0; transform: translateY(6px); }
.list { transition: opacity .18s ease, transform .18s ease; }

/* Корзина-«таблетка»: компактная неоновая кнопка справа внизу.
   НЕ на всю ширину — не перекрыгает вкусы внизу списка. */
.cart-fab-wrap {
  position: fixed;
  right: 16px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex; justify-content: flex-end;
  pointer-events: none; /* сам грапер не логит тапы мимо кнопки */
}
.cart-fab {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(102,126,234,.55);
  background: linear-gradient(135deg, rgba(102,126,234,.22), rgba(52,192,124,.14));
  backdrop-filter: blur(8px);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font: 700 13.5px/1 inherit; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,.45), 0 0 12px rgba(102,126,234,.35);
  animation: fab-glow 2.6s ease-in-out infinite;
  transition: transform .15s;
  max-width: calc(100vw - 32px);
}
.cart-fab:active { transform: scale(.94); }
.cart-fab .cf-ico { display: inline-flex; }
.cart-fab .cf-ico svg, .cart-fab .cf-ico .si { filter: drop-shadow(0 0 5px rgba(102,126,234,.7)); }
.cart-fab .cf-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.cart-fab .cf-qty { font-size: 13.5px; font-weight: 800; }
.cart-fab .cf-sum { font-size: 11px; font-weight: 700; color: #9fb4ff; text-shadow: 0 0 6px rgba(102,126,234,.6); }
.cart-fab .cf-hint {
  font-size: 10px; font-weight: 800; color: var(--amber);
  text-shadow: 0 0 6px rgba(245,177,61,.6);
  border-left: 1px solid rgba(245,177,61,.4);
  padding-left: 10px; margin-left: 2px;
  white-space: nowrap;
}
/* мягкий «пружинный» отклик при добавлении товара */
.cart-fab.bump { animation: fab-bump .32s cubic-bezier(.3,1.6,.5,1); }
@keyframes fab-glow {
  0%, 100% { box-shadow: 0 4px 18px rgba(0,0,0,.45), 0 0 8px rgba(102,126,234,.25); }
  50% { box-shadow: 0 4px 18px rgba(0,0,0,.45), 0 0 18px rgba(102,126,234,.55); }
}
@keyframes fab-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.09); }
  100% { transform: scale(1); }
}
/* запас прокрутки, чтобы последний вкус не прятался под таблеткой */
.page.has-cart .list { padding-bottom: 72px; }
@media (prefers-reduced-motion: reduce) {
  .cart-fab { animation: none; }
  .cart-fab.bump { animation: none; }
}

/* Сегменты */
.seg {
  display: flex; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 3px; gap: 3px; overflow-x: auto;
}
.seg button {
  flex: 1; border: none; background: none; color: var(--muted);
  font: 600 12.5px inherit; font-family: inherit; padding: 8px 12px;
  border-radius: 9px; cursor: pointer; white-space: nowrap; transition: .15s;
}
.seg button.active { background: var(--card2); color: var(--text); }
/* Липкая панель категорий: прилипает к верху при прокрутке,
   сверху мягкий градиент-затемнение, чтобы контент «подъезжал» под неё */
.seg.seg-sticky {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.55);
}
.seg .seg-n {
  display: inline-block; margin-left: 3px; padding: 0 5px; min-width: 16px;
  border-radius: 8px; font-size: 10.5px; font-weight: 800; line-height: 15px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
}
.seg button.active .seg-n { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Поиск по вкусам */
.search-wrap { position: relative; margin: 14px 0; }
.search-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; display: flex;
}
.flavor-search {
  width: 100%; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; color: var(--text);
  font: 600 14px inherit; font-family: inherit;
  padding: 11px 40px 11px 40px; outline: none; transition: border .15s, box-shadow .15s;
}
.flavor-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.flavor-search::placeholder { color: var(--muted); font-weight: 500; }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 8px; border: none;
  background: var(--bg2); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.search-clear:active { transform: translateY(-50%) scale(.92); }
/* Счётчик найденного при поиске */
.search-count {
  color: var(--muted); font-size: 11.5px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase;
  margin: 2px 2px 10px;
}

/* Блок бренда: премиальная строка-кнопка + секции наличия */
.g-head {
  display: flex; align-items: center; gap: 12px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 2px 0; text-align: left; font-family: inherit; color: var(--text);
  border-radius: 14px;
}
/* тактильный отклик */
.g-head:active { transform: scale(.985); opacity: .85; }
/* монограмма-аватар бренда: цветной градиентный круг с буквой */
.g-ava {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--fc), rgba(var(--fcr), .45));
  border: 1px solid rgba(var(--fcr), .35);
  box-shadow: 0 4px 14px rgba(var(--fcr), .22);
  letter-spacing: 0;
}
/* середина: имя + подстрока статуса */
.g-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.g-name {
  font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.g-sub {
  color: var(--muted); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.g-sub .si { font-size: 12px; color: #4ecf93; }
.brand-block.closed .g-sub .si { color: var(--muted); opacity: .8; }
/* кнопка-шаг: круглая, с явным affordance «нажми» */
.g-go {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.14);
  transition: transform .25s ease, background .2s, color .2s, border-color .2s;
}
.g-go .si { font-size: 17px; }
.g-go.open {
  transform: rotate(180deg);
  color: #9fd4ff;
  background: rgba(63,164,255,.1);
  border-color: rgba(63,164,255,.25);
}
/* свёрнутый бренд: чуть компактнее */
.product.brand-block.closed .g-ava { width: 42px; height: 42px; font-size: 17px; }

/* Секции наличия внутри бренда */
.g-sec-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  margin: 12px 0 0;
}
.g-sec-label.in { color: #4ecf93; }
.g-sec-label.in::after {
  content: ''; flex: 1; height: 1px; margin-left: 8px;
  background: linear-gradient(90deg, rgba(52,192,124,.4), transparent);
}
.g-sec-label.wh { color: var(--amber); }
.g-sec-label.wh::after {
  content: ''; flex: 1; height: 1px; margin-left: 8px;
  background: linear-gradient(90deg, rgba(245,177,61,.4), transparent);
}
.g-sec-label.out { color: var(--red); }
.g-sec-label.out::after {
  content: ''; flex: 1; height: 1px; margin-left: 8px;
  background: linear-gradient(90deg, rgba(242,85,90,.4), transparent);
}
.g-none {
  margin-top: 10px; color: var(--muted); font-size: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(148,163,184,.06);
}

/* «Показать ещё N вкусов ↓» / «Свернуть ↑» */
.g-more {
  display: block; width: 100%; margin-top: 8px;
  background: rgba(63,164,255,.08); border: 1px solid rgba(63,164,255,.25);
  color: #7ec2ff; font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.g-more:active { background: rgba(63,164,255,.16); }
.g-more.fewer { opacity: .75; }

/* свёрнутый бренд: компактная строка */
.product.fgroup.brand-block.closed { padding: 12px 14px; }

/* Пустое состояние */
.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
}
.empty .ico { font-size: 42px; margin-bottom: 10px; }
.empty .ico .si { font-size: 42px; color: var(--muted); opacity: .7; }

/* Грид дашборда */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px;
}
.stat .lbl { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat .val { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

/* Таблицы-списки (админ) */
.tl { display: flex; flex-direction: column; }
.tl .ti {
  display: flex; align-items: center; gap: 10px; padding: 12px 4px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.tl .ti:last-child { border-bottom: none; }
.tl .grow { flex: 1; min-width: 0; }

/* Баннер: дым — мягкие клубы, гсплыгающие и тающие */
.banner {
  background: linear-gradient(120deg, #1e3a5f, #173042);
  border: 1px solid #2a4a6e; border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; position: relative; overflow: hidden;
}
.banner .banner-smoke { position: absolute; inset: 0; pointer-events: none; }
.banner .banner-smoke i {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(167,232,255,.16), rgba(167,232,255,.05) 55%, transparent 72%);
  filter: blur(6px);
  animation: smoke-rise 7s linear infinite;
  will-change: transform, opacity;
}
.banner .banner-smoke i:nth-child(1) { width: 72px; height: 52px; right: 8px;  bottom: -12px; animation-delay: 0s; }
.banner .banner-smoke i:nth-child(2) { width: 54px; height: 40px; right: 44px; bottom: -18px; animation-delay: 1.4s; }
.banner .banner-smoke i:nth-child(3) { width: 88px; height: 60px; right: -14px; bottom: -6px;  animation-delay: 2.8s; }
.banner .banner-smoke i:nth-child(4) { width: 46px; height: 34px; right: 76px; bottom: -22px; animation-delay: 4.2s; }
.banner .banner-smoke i:nth-child(5) { width: 64px; height: 44px; right: 24px; bottom: -26px; animation-delay: 5.6s; }
@keyframes smoke-rise {
  0%   { transform: translateY(14px) scale(.7); opacity: 0; }
  18%  { opacity: 1; }
  62%  { opacity: .75; }
  100% { transform: translateY(-84px) scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .banner .banner-smoke i { animation: none; opacity: .5; }
}
.banner h3 { font-size: 17px; margin-bottom: 4px; position: relative; display: flex; align-items: center; gap: 10px; }
.banner p { font-size: 13px; color: #a9c4e2; position: relative; }
/* Индикатор статуса магазина: пульс-точка + подпись */
.shop-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
  flex-shrink: 0;
}
.shop-status i {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
}
.shop-status.open {
  background: rgba(52,192,124,.16); color: #6fe3a8;
  border: 1px solid rgba(52,192,124,.35);
}
.shop-status.open i {
  background: #34c07c;
  animation: shop-pulse 2s ease-in-out infinite;
}
/* ореол гокруУ активной точки — сам пульсирует */
.shop-status.open i::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  background: rgba(52,192,124,.35);
  animation: shop-halo 2s ease-in-out infinite;
}
.shop-status.closed {
  background: rgba(148,163,184,.14); color: #b6c2d4;
  border: 1px solid rgba(148,163,184,.3);
}
.shop-status.closed i {
  background: #94a3b8;
  animation: shop-idle 3s ease-in-out infinite;
}
.shop-status.closed i::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: rgba(148,163,184,.22);
  animation: shop-idle-halo 3s ease-in-out infinite;
}
.shop-status i { position: relative; }
/* мктиген: точка дышит — масштаб + сгечение */
@keyframes shop-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 3px rgba(52,192,124,.55); }
  50% { transform: scale(1.3); box-shadow: 0 0 11px rgba(52,192,124,1); }
}
@keyframes shop-halo {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.8); opacity: 0; }
}
/* Не активен: тихое сонное затухание — медленнее и спокойнее */
@keyframes shop-idle {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 2px rgba(148,163,184,.5); }
  50% { transform: scale(.82); opacity: .55; box-shadow: 0 0 6px rgba(148,163,184,.9); }
}
@keyframes shop-idle-halo {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.45); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-status.open i, .shop-status.closed i,
  .shop-status.open i::after, .shop-status.closed i::after { animation: none; }
}
/* Тумблер (админка): «временно закрыт» */
.toggle {
  width: 52px; height: 30px; border-radius: 999px; padding: 3px;
  background: rgba(148,163,184,.25); border: 1px solid rgba(148,163,184,.3);
  cursor: pointer; flex-shrink: 0; position: relative;
  transition: background .25s, border-color .25s;
}
.toggle span {
  display: block; width: 22px; height: 22px; border-radius: 50%;
  background: #8b97a8; transition: transform .25s cubic-bezier(.4,0,.2,1), background .25s;
}
.toggle.on {
  background: rgba(52,192,124,.3); border-color: rgba(52,192,124,.5);
}
.toggle.on span {
  transform: translateX(22px);
  background: #34c07c;
  box-shadow: 0 0 10px rgba(52,192,124,.6);
}

/* Вкладки гремени */
.time-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.time-slots button {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font: 600 13px inherit; font-family: inherit;
  cursor: pointer;
}
.time-slots button.sel { border-color: var(--accent); color: var(--accent); background: rgba(63,164,255,.1); }
/* Занятый слот: приглушён, перечёркнут, не кликается */
.time-slots button.busy {
  opacity: .45; cursor: not-allowed;
  border-style: dashed; color: var(--muted);
  text-decoration: line-through;
}
.slot-busy {
  font-size: 9.5px; font-weight: 700; color: var(--red);
  text-decoration: none; margin-left: 3px;
}
/* Ссылка «Открыть на карте» в деталях заказа (админка) */
.map-link {
  color: #9fd4ff; text-decoration: none; font-weight: 700;
  border-bottom: 1px dashed rgba(63,164,255,.4);
  padding-bottom: 1px;
}
.map-link:active { opacity: .7; }
/* Конфликт времени в списке заказов (админка): жёлтая метка */
.slot-conflict {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--amber);
  background: rgba(245,177,61,.1);
  border: 1px solid rgba(245,177,61,.3);
  border-radius: 10px; padding: 6px 10px; margin: 6px 0;
}
.slot-conflict .si { font-size: 12px; }
/* Номер в топе вкусов (дашборд) */
.top-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 7px;
  background: rgba(63,164,255,.14); color: #9fd4ff;
  font-size: 11px; font-weight: 800; margin-right: 4px;
}

.kbd {
  font-family: ui-monospace, monospace; font-size: 12px;
  background: var(--bg2); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: 6px;
}

/* Скелетон */
.skel { background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 72px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (min-width: 480px) { .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; } }
