/* ── FOODSIZO — main.css v5 (design_handoff_v2: тёплый крем + зелёный акцент) ── */
:root {
  /* ── Design Tokens ── */
  --bg:         #F6F4EF;
  --surface:    #FFFFFF;
  --surface-2:  #F1EEE8;
  --brand:      #2F7A5B;
  --brand-ink:  #245F47;
  --brand-50:   #E9F2ED;
  --accent:     #2F7A5B;
  --accent-ink: #245F47;
  --ink:        #22252B;
  --muted:      #7C7F88;
  --faint:      #A7AAB2;
  --line:       #E8E5DE;
  --line-2:     #EFEDE7;
  --ok:         #2F7A5B;
  --warn:       #C98A2B;
  --danger:     #C0503F;

  /* Накопительный вес передачи (владелец: «разные оттенки зелёного — это ни хуя не
     разные цвета») — три явно различных токена вместо одного зелёного на всё:
     --w-sent (синий, уже отправлено получателю за месяц), --w-cur (зелёный,
     собирается сейчас в корзине — тот же --accent, что и остальной бренд-зелёный),
     --w-over (красный, перебор лимита). Единственное место, где эти цвета заданы —
     header-cart.js/catalog.js/cart-page.js читают их отсюда, не заводят своих. */
  --w-sent:     #2F5FD0;
  --w-cur:      var(--accent);
  --w-over:     #C8372D;

  /* Legacy aliases used by existing JS/HTML */
  --border:         #E8E5DE;
  --border-light:   #EFEDE7;
  --ink-2:          #7C7F88;
  --ink-3:          #A7AAB2;
  --accent-hover:   #245F47;
  --accent-light:   #E9F2ED;
  --accent-muted:   #D6E7DE;
  --accent-100:     #D6E7DE;
  --danger-light:   #F6ECE9;
  --warn-light:     #FBF1E2;
  --success:        #2F7A5B;
  --success-light:  #E9F2ED;
  --weight-ok:      #2F7A5B;
  --weight-warn:    #C98A2B;
  --weight-danger:  #C0503F;

  /* Shadows (тёплый оттенок) */
  --sh-sm:  0 1px 2px rgba(30,28,22,.05);
  --sh-md:  0 8px 24px rgba(30,28,22,.09);
  --sh-lg:  0 18px 44px rgba(30,28,22,.16);

  /* Legacy shadow names */
  --shadow-xs: 0 1px 2px rgba(30,28,22,.05);
  --shadow-sm: 0 4px 12px rgba(30,28,22,.07);
  --shadow:    0 8px 24px rgba(30,28,22,.09);
  --shadow-lg: 0 18px 44px rgba(30,28,22,.16);

  /* Radii */
  --r-card:  16px;
  --r-input: 11px;
  --r-pill:  999px;
  --radius:  16px;
  --radius-sm: 11px;
  --radius-xs: 6px;

  /* Typography */
  --font: "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --header-h:      60px;
  --bottom-tabs-h: 0px;
  --cart-w:        340px;

  --transition: .15s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Kill double-tap zoom app-wide (pinch zoom stays available) */
body, body * { touch-action: manipulation; }
a  { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; }

/* ══════════════════════════════════════════════
   HEADER (desktop)
══════════════════════════════════════════════ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246,244,239,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.app-header__inner {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.app-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  flex-shrink: 0;
  letter-spacing: -.025em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.app-logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.app-logo strong { color: var(--ink); font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.app-logo small {
  font-size: .66rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .01em;
}
.app-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  transition: background var(--transition), color var(--transition);
}
.nav-link svg { stroke-width: 1.8; }
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { background: var(--brand-50); color: var(--brand); }
}
.nav-link.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }

.facility-pill {
  font-size: .7rem;
  color: var(--muted);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}
.cart-badge {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1.5;
}

/* Кнопка корзины в шапке (см. web/js/header-cart.js — единственный источник её данных:
   cart-store.js). На десктопе стоит рядом с .app-nav; на мобильном .app-nav скрыт —
   эта кнопка остаётся единственным способом открыть корзину. */
.header-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--ink);
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .header-cart:hover { background: var(--brand-50); }
}
.header-cart--open { border-color: var(--accent); background: var(--accent-light); }
.header-cart__icon-wrap { position: relative; display: flex; flex-shrink: 0; }
.header-cart__icon { color: var(--ink-2); flex-shrink: 0; }
.header-cart__count {
  position: absolute;
  top: -7px;
  right: -8px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 5px;
  min-width: 15px;
  text-align: center;
  line-height: 1.5;
  border: 1.5px solid var(--surface);
  pointer-events: none;
}
.header-cart__count[hidden] { display: none; }
.header-cart__weight {
  /* Нейтральный фон — цифры сами несут цвет (владелец: «разные оттенки зелёного —
     это ни хуя не разные цвета»), контраст с зелёной иконкой корзины рядом очевиден
     без дополнительной зелёной подложки. */
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-cart--open .header-cart__weight { background: var(--surface-2); }
.header-cart__sent { color: var(--w-sent); font-weight: 700; }
.header-cart__cur  { color: var(--w-cur); font-weight: 700; }
.header-cart__plus { color: var(--ink-3); margin: 0 1px; font-weight: 600; }
.header-cart__weight--over,
.header-cart__weight--over .header-cart__sent,
.header-cart__weight--over .header-cart__cur {
  color: var(--w-over);
  font-weight: 800;
}
.header-cart__total {
  font-size: .8125rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-cart__total[hidden] { display: none; }

/* ══════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════ */
.app-main {
  max-width: 1720px;
  margin: 0 auto;
  padding: 28px 24px 100px;
}
/* Узкие экраны (выбор учреждения, корзина) не растягиваем на всю ширину. */
.hero, .continue-card, .fs-sect, .facility-search, .region-accordion,
.cart-page {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ══════════════════════════════════════════════
   PAGE TITLE
══════════════════════════════════════════════ */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.03em;
}
.page-subtitle {
  font-size: .875rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════
   FACILITY SCREEN
══════════════════════════════════════════════ */
.hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(180deg, var(--surface), var(--accent-light));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 28px;
  box-shadow: var(--sh-sm);
  margin: 4px 0 22px;
}
.hero__art { flex: 0 0 190px; }
.hero__art svg { width: 100%; height: auto; display: block; }
.hero__tx h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.12;
  color: var(--ink);
}
.hero__tx p {
  color: var(--muted);
  margin-top: 10px;
  font-size: .95rem;
  line-height: 1.5;
}
@media (max-width: 640px) {
  .hero { flex-direction: column; text-align: center; gap: 6px; padding: 22px 20px; }
  .hero__art { flex: 0 0 auto; width: 150px; }
  .hero__tx h1 { font-size: 1.4rem; }
}

.continue-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--accent-muted);
  border-radius: var(--r-card);
  padding: 14px 18px;
  margin-bottom: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
@media (hover: hover) and (pointer: fine) {
  .continue-card:hover { box-shadow: var(--sh-md); border-color: var(--accent); }
}
.continue-card__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-input);
  background: var(--accent-light);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.continue-card__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.continue-card__label { font-size: .72rem; color: var(--muted); }
.continue-card__name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 8px rgba(47,122,91,.32);
}
@media (max-width: 640px) {
  .continue-card { flex-wrap: wrap; }
  .continue-card__btn { width: 100%; justify-content: center; }
}

/* Продолжение сборки в учреждении, куда сейчас приостановлена доставка. */
.continue-card--warn { border-color: rgba(196,131,26,.4); }
@media (hover: hover) and (pointer: fine) {
  .continue-card--warn:hover { border-color: var(--warn); }
}
.continue-card__warn {
  font-size: .76rem;
  font-weight: 600;
  color: var(--warn);
  margin-top: 1px;
}

.recip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  margin: -14px auto 22px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--accent-muted);
  border-radius: var(--r-card);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
@media (hover: hover) and (pointer: fine) {
  .recip-row:hover { box-shadow: var(--sh-md); border-color: var(--accent); }
}
.recip-row__label { color: var(--muted); font-size: .82rem; }
.recip-row__name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recip-row__action { color: var(--accent); font-weight: 600; font-size: .84rem; flex-shrink: 0; }

.fs-sect {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.fs-sect__meta { font-size: .78rem; font-weight: 500; color: var(--faint); }

.facility-search {
  position: relative;
  margin-bottom: 24px;
  margin-top: 20px;
}
.facility-search input {
  width: 100%;
  padding: 14px 18px 14px 52px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  box-shadow: var(--sh-sm);
  -webkit-appearance: none;
}
.facility-search input::placeholder { color: var(--muted); }
.facility-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,122,91,.14);
}
.facility-search__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  display: flex;
}
.facility-group { margin-bottom: 32px; }
.facility-group__title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 0 4px;
}
.facility-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.facility-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--transition);
  min-height: 60px;
}
.facility-card:last-child { border-bottom: none; }
.facility-card:active { background: var(--brand-50); }
@media (hover: hover) and (pointer: fine) {
  .facility-card:hover { background: var(--brand-50); }
}
.facility-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.facility-card__icon svg { stroke-width: 1.8; }
.facility-card__name {
  font-size: .9375rem;
  font-weight: 500;
  flex: 1;
  line-height: 1.35;
  color: var(--ink);
}
.facility-card__arrow {
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.facility-card__arrow svg { stroke-width: 1.8; }

/* Facility card body (name + item count) */
.facility-card__body { flex: 1; min-width: 0; }
.facility-card__meta {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Учреждение, куда донор сейчас не отдаёт ни одной даты доставки — честная
   пометка вместо количества товаров (см. server/sync-donor.mjs, web/js/facility.js). */
.facility-card--warn:active { background: var(--warn-light, #FBF1E2); }
@media (hover: hover) and (pointer: fine) {
  .facility-card--warn:hover { background: var(--warn-light, #FBF1E2); }
}
.facility-card__badge {
  display: inline-flex;
  align-items: center;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-light, #FBF1E2);
}

/* Region accordion (region → facilities) */
.region-accordion { display: flex; flex-direction: column; gap: 12px; }
.region-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.region-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
}
.region-header__name {
  flex: 1;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.3;
  min-width: 0;
}
.region-header__count {
  flex-shrink: 0;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-ink);
  font-size: .8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.region-header__chevron {
  flex-shrink: 0;
  color: var(--muted);
  display: flex;
  transition: transform var(--transition);
}
.region-section.is-open .region-header__chevron { transform: rotate(180deg); }
.region-section.is-open .region-header { border-bottom: 1px solid var(--line); }
.region-body .facility-list {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* ══════════════════════════════════════════════
   CATALOG — LAYOUT
══════════════════════════════════════════════ */
.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}
.catalog-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}
.sidebar-group {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 12px 16px 4px;
  border-top: 1px solid var(--line);
}
.sidebar-group:first-child { border-top: none; }
.sidebar-cat {
  display: block;
  padding: 9px 16px;
  font-size: .8125rem;
  color: var(--muted);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1.4;
}
@media (hover: hover) and (pointer: fine) {
  .sidebar-cat:hover { background: var(--brand-50); color: var(--brand); }
}
.sidebar-cat.active {
  background: var(--brand-50);
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}

/* ── Sticky date + search block (pinned under the header on all widths) ── */
.catalog-sticky {
  min-width: 0;
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: var(--bg);
  padding-top: 8px;
}
@media (max-width: 700px) {
  .catalog-sticky {
    margin: 0 -14px;
    padding: 8px 14px 0;
  }
}

/* ── Chips row: wheel-like horizontal picker, active chip auto-centers ── */
.catalog-chips {
  display: none;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 10px;
  scroll-snap-type: x proximity;
}
.catalog-chips .chip { scroll-snap-align: center; }
.catalog-chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--sh-sm);
}
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(47,122,91,.25);
}
@media (hover: hover) and (pointer: fine) {
  .chip:hover:not(.active) { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
}
.catalog-body { min-width: 0; }

/* ══════════════════════════════════════════════
   SHOP SHELL + PERSISTENT CART RAIL (mockup)
══════════════════════════════════════════════ */
.shop-shell {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 22px;
  align-items: start;
}
.shop-content { min-width: 0; }
.cart-rail {
  position: sticky;
  top: calc(var(--header-h) + 14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - var(--header-h) - 26px);
}
.cart-rail__top { display: none; }
.cart-rail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 119;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.cart-rail-overlay.open { opacity: 1; pointer-events: auto; }
.cart-rail__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

/* ── Rail tabs: «Корзина» / «Отправлено» over the bottom block of the cart rail ── */
.rail-tabs {
  display: flex;
  gap: 6px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.rail-tab {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.rail-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-sm);
}
@media (hover: hover) and (pointer: fine) {
  .rail-tab:not(.active):hover { color: var(--ink); }
}
.rail-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }

/* ── Sent list: «Отправлено» tab — orders that counted toward the recipient's monthly
   weight limit, and what each is made of (see web/js/sent-list.js). ── */
.sentlist { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 2px 2px 4px; flex: 1; min-height: 0; scrollbar-width: thin; }
.sentlist--empty { flex: none; text-align: center; color: var(--muted); padding: 34px 12px; font-size: .85rem; }
.sentorder {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 12px 14px;
}
.sentorder__h { font-size: .78rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.sentorder__items { display: flex; flex-direction: column; gap: 5px; }
.sentitem { display: flex; align-items: baseline; gap: 6px; font-size: .74rem; color: var(--ink-2, var(--ink)); }
.sentitem__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sentitem__q { color: var(--muted); flex-shrink: 0; }
.sentitem__w { color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.sentorder__link { display: inline-block; margin-top: 9px; font-size: .76rem; font-weight: 700; color: var(--accent-ink); }

/* ── Weight meter ── */
.wmeter {
  background: var(--surface);
  border: 1.5px solid var(--accent-100, #D6E7DE);
  border-radius: var(--r-card);
  padding: 16px 18px;
  box-shadow: var(--sh-sm);
  flex-shrink: 0;
}
.wmeter__t {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 4px;
}
.wmeter__t svg { color: var(--accent); flex-shrink: 0; }
.wmeter__lim {
  margin-left: auto;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-ink);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: var(--r-pill);
}
.wmeter__sub { font-size: .74rem; color: var(--muted); margin-bottom: 11px; }
.wbar {
  height: 13px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
  display: flex;
}
.wbar__sent { background: var(--w-sent); height: 100%; transition: width .35s; }
.wbar__cur { background: var(--w-cur); height: 100%; transition: width .35s; }
.wbar__cur.over { background: var(--w-over); }
.wmeter__rows { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.wmeter__row { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.wmeter__row--tap { cursor: pointer; margin: -3px -6px; padding: 3px 6px; border-radius: var(--r-input); -webkit-tap-highlight-color: transparent; transition: background var(--transition); }
@media (hover: hover) and (pointer: fine) {
  .wmeter__row--tap:hover { background: var(--surface-2); }
}
.wmeter__dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.wmeter__row b { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.wmeter__left {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  display: flex;
  justify-content: space-between;
}
.wmeter__left b { font-weight: 800; }
.wmeter__over {
  margin-top: 9px;
  color: var(--danger);
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wmeter__other {
  margin-top: 7px;
  font-size: .76rem;
  color: var(--muted);
}

/* ── Cart box ── */
.cartbox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.cartbox__h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}
.cartbox__h svg { color: var(--accent); flex-shrink: 0; }
.cartbox__h b { font-weight: 800; font-size: .98rem; }
.cartbox__cnt { margin-left: auto; font-size: .78rem; color: var(--muted); font-weight: 600; }
.cartbox__open {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-light);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  transition: background var(--transition);
  flex-shrink: 0;
}
@media (hover: hover) and (pointer: fine) {
  .cartbox__open:hover { background: var(--accent-100, #D6E7DE); }
}
.cartbox__list { overflow-y: auto; padding: 4px 16px; flex: 1; scrollbar-width: thin; }
.cartbox__empty { text-align: center; color: var(--muted); padding: 34px 12px; font-size: .85rem; }
.cartbox__empty svg { width: 40px; height: 40px; opacity: .35; margin-bottom: 10px; display: inline-block; }
.cartbox__foot { border-top: 1px solid var(--line); padding: 14px 16px; flex-shrink: 0; }
.cartbox__tot { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.05rem; margin-bottom: 11px; }

/* ── Cart row inside rail ── */
.crow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.crow:last-child { border-bottom: none; }
.crow__img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--r-input);
  background: var(--surface-2);
  object-fit: contain;
}
.crow__b { min-width: 0; flex: 1; }
.crow__n {
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.crow__m { font-size: .68rem; color: var(--muted); margin-top: 2px; }
.crow__free { color: var(--warn); font-weight: 600; }
.crow__side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.crow__p { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty-control--sm .qty-btn { width: 24px; height: 26px; font-size: .95rem; }
.qty-control--sm .qty-val { min-width: 20px; font-size: .8rem; }

/* ── Mobile/tablet: rail becomes a bottom drawer, opened only from the header cart
   button (#header-cart, см. header-cart.js) — без ручки внизу, шторка в закрытом
   состоянии полностью уходит за экран. ── */
@media (max-width: 900px) {
  .shop-shell { grid-template-columns: 1fr; }
  .cart-rail {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: var(--bottom-tabs-h, 0px);
    z-index: 120;
    max-height: none;
    gap: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-radius: var(--r-card) var(--r-card) 0 0;
    box-shadow: 0 -6px 24px rgba(30,28,22,.12);
    transform: translateY(100%);
    transition: transform .28s ease;
  }
  .cart-rail.open { transform: none; }
  .cart-rail__top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 32px;
    padding: 6px 10px 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .cart-rail__grip {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: var(--r-pill);
    background: var(--line);
  }
  .cart-rail__close { width: 26px; height: 26px; font-size: .7rem; }
  .cart-rail__inner {
    max-height: min(72dvh, 560px);
    overflow-y: auto;
    padding: 4px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .wmeter { flex-shrink: 0; }
  .cartbox { flex: none; }
  .cartbox__list { max-height: 240px; }
}

/* ── Order-date bar (pick one delivery date for the whole передача) ── */
.order-date-bar {
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
}
.order-date-bar__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.order-date-bar__icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--brand-50);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.order-date-bar__label {
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.order-date-bar__hint {
  color: var(--muted);
  font-size: .76rem;
  margin-left: auto;
  text-align: right;
  max-width: 54%;
  line-height: 1.35;
}
.order-date-bar__chips {
  position: relative; /* offsetParent для чипов — catalog.js scrollActiveDateChipIntoView считает offsetLeft от этого контейнера */
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.order-date-bar__chips::-webkit-scrollbar { display: none; }

/* Галочка «Только доступные на эту дату» — живёт между строкой-подсказкой и лентой
   дат (postановка владельца 2026-09-21: бледные недоступные карточки шли первым
   экраном и читались как «на эту дату заказать нечего», хотя доступные товары были
   ниже). Тот же компактный приём чекбокса, что nolimit-row/consent-row на #/cart
   (accent-color вместо кастомной рамки — единственный стиль чекбоксов в проекте). */
.date-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: .78rem;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.date-filter-row input {
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}
.date-chip {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  text-align: center;
  min-width: 64px;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.date-chip__d { display: block; font-weight: 700; font-size: .8rem; }
.date-chip__w { display: block; font-size: .6rem; opacity: .72; margin-top: 1px; }
@media (hover: hover) and (pointer: fine) {
  .date-chip:hover:not(.active) { border-color: var(--accent); }
}
.date-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(47,122,91,.32);
}

/* ── Product search ── */
.catalog-search {
  position: relative;
  margin-bottom: 12px;
}
.catalog-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.catalog-search__input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  font-size: .9rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--transition);
}
.catalog-search__input:focus { border-color: var(--accent); }

/* ── Muted card states: "no date chosen yet" (--pending) and "unavailable on
   the chosen date" (--off) share ONE visual language — same dimming — and are
   told apart only by their text (top date-bar hint for --pending, the
   per-card altdate badge for --off). Photos are the tricky part: most donor
   product shots sit on a plain white background, so opacity/grayscale alone
   barely reads as "faded" (white-on-white). A translucent wash layered over
   the (grayscaled) image is what actually looks muted regardless of the
   photo's own colours. ── */
.item-card--off .item-card__imgwrap,
.item-card--pending .item-card__imgwrap {
  filter: grayscale(.85);
}
.item-card--off .item-card__imgwrap::after,
.item-card--pending .item-card__imgwrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(241, 238, 232, .62); /* var(--surface-2) wash, above img/placeholder */
  pointer-events: none;
}
.item-card--off .item-card__name,
.item-card--pending .item-card__name,
.item-card--off .item-card__price,
.item-card--pending .item-card__price {
  color: var(--muted);
}
.item-card--off .item-card__name,
.item-card--off .item-card__price,
.item-card--pending .item-card__name,
.item-card--pending .item-card__price,
.item-card--off .item-card__meta,
.item-card--pending .item-card__meta {
  opacity: .65;
}
.item-card__altdate {
  font-size: .7rem;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-light, #FBF1E2);
  border-radius: var(--r-input);
  padding: 5px 8px;
  margin-top: 4px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.item-card__altdate-main { font-weight: 700; }
.item-card__altdate-more { font-weight: 500; opacity: .85; }
.item-card__altdate-switch {
  margin-top: 1px;
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .item-card__altdate-switch:hover { color: var(--accent-ink); }
}

/* Метка поставщика на карточке каталога намеренно убрана (задача владельца:
   не напоминать лишний раз про посредничество на каждой карточке — она видна
   там, где реально нужна: корзина/оплата). .item-card--limit ниже покрывает
   и весовой лимит, и потолок поставщика — общее гашение карточки. */
/* Товар вообще без синхронизированных дат — нейтральный (не жёлтый) тон,
   это не "перенос на другой день", а честное "сейчас нечего предложить". */
.item-card__altdate--nodates {
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 600;
}

/* «Дешевле рядом» — позитивная подсказка, не предупреждение: товар доступен на
   выбранную дату как есть, это просто предложение (решение — за покупателем,
   переключение той же кнопкой .item-card__altdate-switch, что и у альт-даты). */
.item-card__cheaper {
  font-size: .7rem;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-light, #E8F5EC);
  border-radius: var(--r-input);
  padding: 5px 8px;
  margin-top: 4px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

/* Дата передачи ещё не выбрана — весь каталог приглушён одинаково, карточка
   ничего не знает про свои даты, пока пользователь не определился. */
.item-card--pending .btn-add {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
}
.btn-add--disabled {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
.order-date-bar--pending {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--brand-50);
}
.order-date-bar--pending .order-date-bar__hint {
  color: var(--accent-ink);
  font-weight: 600;
}

/* Лимит 30 кг/мес исчерпан: весовой товар затенён, добавление заблокировано */
.item-card--limit .item-card__imgwrap,
.item-card--limit .item-card__name,
.item-card--limit .item-card__meta,
.item-card--limit .item-card__price {
  opacity: .38;
  filter: grayscale(.7);
}
.item-card--limit .btn-add,
.item-card--limit .qty-btn[data-action="inc"] {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}
.item-card__altdate--limit {
  color: var(--danger, #B3261E);
  background: #FBE9E7;
}
.limit-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin: 10px 0 14px;
  background: #FBF1E2;
  border: 1px solid rgba(196,131,26,.35);
  border-radius: var(--r-card);
}
.limit-banner__text {
  flex: 1 1 260px;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--ink);
}
.limit-banner__btn {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .limit-banner__btn:hover { background: var(--accent-ink); }
}

/* Баннер «Скрыто N товаров, недоступных на эту дату» — нейтральный (не жёлтый, как
   limit-banner выше): фильтр по дате не предупреждает о проблеме, а честно отчитывается
   о своей работе, поэтому тон спокойнее — var(--surface-2), не --warn-light. Живёт над
   списком карточек (см. renderHiddenNote в catalog.js). */
.avail-filter-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  margin: 0 0 10px;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--r-input);
}
.avail-filter-note__btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .avail-filter-note__btn:hover { color: var(--accent); }
}

/* ── Cart thumbnails (side cart + cart page) ── */
.cart-line__thumb,
.cart-item-thumb {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--r-input);
  overflow: hidden;
  background: var(--surface-2);
}
.cart-line__thumb img,
.cart-item-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  box-sizing: border-box;
  z-index: 1;
}
.cart-line__thumb__ph,
.cart-item-thumb__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.cart-line__thumb__ph svg,
.cart-item-thumb__ph svg { width: 20px; height: 20px; opacity: .4; stroke-width: 1.4; }

/* ══════════════════════════════════════════════
   CATALOG — GROUP HEADERS & SECTIONS
══════════════════════════════════════════════ */
.cat-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  padding: 24px 0 12px;
  margin-top: 8px;
}
.cat-group-header:first-child {
  margin-top: 0;
  padding-top: 0;
}
.cat-group-header__icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-group-header__icon-wrap svg { stroke-width: 1.8; }
.cat-group-header__count {
  font-size: .8125rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}
.cat-section { margin-bottom: 32px; }
.cat-section__title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -.01em;
}

/* ══════════════════════════════════════════════
   CATALOG — PRODUCT GRID & CARDS
══════════════════════════════════════════════ */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.item-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(231,234,242,.8);
  touch-action: manipulation;
}
.item-card__info {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .item-card__info:hover { color: var(--accent-ink); border-color: var(--accent); }
  .item-card:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
  }
}
.item-card__imgwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}
.item-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-2);
  display: block;
  padding: 8px;
  box-sizing: border-box;
  z-index: 1;
}
.item-card__img-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.item-card__img-placeholder svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.4;
  opacity: .45;
}
.item-card__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.item-card__name {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.item-card__meta {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 2px;
}
.item-card__meta-nolimit {
  color: var(--ok);
  font-style: italic;
}
/* Правило воды (server/match/water-weight-rule.mjs) — короткая пометка на карточке, тот же
   предупреждающий цвет --warn, что и у остальных "требует внимания" бейджей проекта (см.
   .undelivered-banner__icon/.cart-line__supplier--cap), НЕ зелёный --ok: notForWeightAlone —
   условная догадка владельца, а не подтверждённый факт (полный текст — в попапе "i", см.
   .item-sheet__warn ниже). */
.item-card__meta-warn {
  color: var(--warn);
}
.item-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 4px;
}
.item-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.015em;
}

/* Add button: rounded square accent */
.btn-add {
  width: 34px;
  height: 34px;
  border-radius: var(--r-input);
  background: var(--accent);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform .1s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(47,122,91,.32);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (hover: hover) and (pointer: fine) {
  .btn-add:hover { background: var(--accent-ink); }
  .btn-add:active { transform: scale(.92); }
}

/* Qty stepper pill in brand-50 */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--brand-50);
  border-radius: var(--r-pill);
  padding: 2px;
}
.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-weight: 700;
}
@media (hover: hover) and (pointer: fine) {
  .qty-btn:hover { background: var(--brand); color: #fff; }
}
/* Временно недоступный товар: убавить (dec) можно, добавить ещё (inc) — нет. */
.qty-btn[disabled] { color: var(--muted); cursor: not-allowed; opacity: .5; }
@media (hover: hover) and (pointer: fine) {
  .qty-btn[disabled]:hover { background: transparent; color: var(--muted); }
}
.qty-val {
  font-size: .875rem;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  color: var(--brand);
}

/* ══════════════════════════════════════════════
   SIDE CART (drawer)
══════════════════════════════════════════════ */
.side-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.side-cart-overlay.open { opacity: 1; pointer-events: auto; }
.side-cart {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--cart-w);
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--sh-lg);
  border-radius: var(--r-card) 0 0 var(--r-card);
}
.side-cart.open { transform: none; }
.side-cart__header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.side-cart__title { font-weight: 700; font-size: 1rem; letter-spacing: -.015em; }
.btn-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
@media (hover: hover) and (pointer: fine) {
  .btn-close:hover { background: var(--danger); color: #fff; }
}
.side-cart__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  overscroll-behavior: contain;
}
.side-cart__empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
  font-size: .9rem;
  line-height: 1.6;
}
.cart-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: none; }
.cart-line__name {
  flex: 1;
  font-size: .8125rem;
  color: var(--ink);
  line-height: 1.4;
}
/* Вес — характеристика товара, рядом с названием (тот же приём, что в cart-item-*). */
.cart-line__meta { font-size: .7rem; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.cart-line__weight-tag { font-weight: 500; }
.cart-line__nolimit { color: var(--ok); font-weight: 700; cursor: help; }
.cart-line__supplier {
  font-size: .68rem;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 1px 7px;
}
.cart-line__supplier--cap { color: var(--warn); background: var(--warn-light); }

/* Денежный ряд: количество · цена за единицу · сумма (тот же порядок, что в cart-item-money). */
.cart-line__money { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cart-line__calc { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.cart-line__unit { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.cart-line__price { font-size: .8125rem; font-weight: 600; white-space: nowrap; color: var(--ink); }
/* Товар временно недоступен (боковая корзина) — тот же язык, что и в cart-item-row--off:
   dimming через color на .cart-line__name (не opacity), чтобы вложенный .cart-line__off-tag
   не притушился вместе с текстом (opacity композитится на всё поддерево). */
.cart-line--off .cart-line__thumb,
.cart-line--off .cart-line__price,
.cart-line--off .cart-line__unit,
.cart-line--off .cart-line__weight-tag,
.cart-line--off .cart-line__nolimit {
  opacity: .55;
  filter: grayscale(.65);
}
.cart-line--off .cart-line__name { color: var(--muted); }
.cart-line__off-tag {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  margin-top: 2px;
}
.cart-line__remove-one {
  padding: 6px 10px;
  font-size: .75rem;
  white-space: nowrap;
}
.side-cart__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
}
/* Компактная строка потолка поставщика в футере боковой корзины — не «итого»,
   поэтому легче и без верхней границы (см. side-cart.js render, capFooter). */
.cart-total--cap {
  font-weight: 600;
  font-size: .78rem;
  color: var(--warn);
  padding: 0 0 6px;
  margin-bottom: 0;
  border-top: none;
}

/* ══════════════════════════════════════════════
   BOTTOM TAB BAR (mobile only)
══════════════════════════════════════════════ */
.bottom-tabs {
  display: none;
}

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 10px rgba(47,122,91,.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-ink); box-shadow: 0 4px 16px rgba(47,122,91,.35); }
}
.btn-primary:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--surface);
  color: var(--muted);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--sh-sm);
}
@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
}

/* ══════════════════════════════════════════════
   CART PAGE (screen 3)
══════════════════════════════════════════════ */
.cart-page {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}
.cart-left { display: flex; flex-direction: column; gap: 16px; }

.cart-section {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--line);
}
.cart-section__title {
  font-size: .9375rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  font-size: .9375rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,122,91,.14);
}
/* ── Группировка корзины по поставщику (задача владельца: открыто показывать,
   какие товары считаются в потолок 14 999 ₽, а какие нет — см. cart-page.js
   groupBySupplier/renderSupplierGroup). Обёртка вокруг обычных .date-group
   (категорийных) подгрупп, со своим заголовком-суммой и, у ограниченного
   поставщика, счётчиком-полосой в стиле .weight-bar. ── */
.supplier-group { margin-bottom: 22px; }
.supplier-group:last-child { margin-bottom: 0; }
.supplier-group__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1.5px solid var(--line);
}
.supplier-group__name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.supplier-group__sum {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.supplier-group__cap {
  background: var(--surface-2);
  border-radius: var(--r-input);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.supplier-group__cap-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: .78rem;
  color: var(--ink);
  font-weight: 600;
}
.supplier-group__cap-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.supplier-group__cap-note {
  margin-top: 6px;
  font-size: .71rem;
  color: var(--muted);
  line-height: 1.4;
}

.date-group { margin-bottom: 20px; }
.date-group:last-child { margin-bottom: 0; }
.date-group__header {
  font-size: .875rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-tag {
  font-size: .68rem;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--warn-light);
  color: var(--warn);
  font-weight: 700;
}
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-row:last-child { border-bottom: none; }
.cart-item-name { flex: 1; font-size: .875rem; color: var(--ink); line-height: 1.4; }
.cart-item-sub {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-item-sub--warn { color: var(--warn); }
/* Товар временно недоступен у поставщика (item.autoHidden) — тот же визуальный
   язык, что item-card--off в каталоге: приглушение + честная подпись вместо
   молчаливого исчезновения из корзины. Ручное удаление (.btn-remove) остаётся
   активным — можно убрать позицию вручную, а не только через баннер снизу. */
/* Бейдж «Временно недоступен» лежит ВНУТРИ .cart-item-name (как и cart-item-sub--warn
   до него) — поэтому дименг делаем через color, не opacity: opacity композитится на
   весь поддерево и притушит вложенный бейдж вместе с текстом, а color у бейджа —
   отдельное явное правило и переопределяет унаследованный цвет как обычно. */
.cart-item-row--off .cart-item-thumb,
.cart-item-row--off .cart-item-price,
.cart-item-row--off .cart-item-unit,
.cart-item-row--off .cart-item-weight-tag,
.cart-item-row--off .cart-item-nolimit {
  opacity: .55;
  filter: grayscale(.65);
}
.cart-item-row--off .cart-item-name { color: var(--muted); }
.cart-item-sub--off {
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--r-input);
  padding: 3px 7px;
  display: inline-flex;
  font-weight: 600;
}
.qty-val--static {
  font-size: .8125rem;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 6px;
}
.cart-unavail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin: 0 0 14px;
  background: var(--danger-light);
  border: 1px solid rgba(192,80,63,.3);
  border-radius: var(--r-card);
}
.cart-unavail-banner__text {
  flex: 1 1 200px;
  font-size: .8125rem;
  color: var(--danger);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.cart-unavail-banner__btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.cart-unavail-banner--compact {
  padding: 8px 10px;
  margin: 0 0 10px;
}
.cart-unavail-banner--compact .cart-unavail-banner__text { font-size: .75rem; }
.cp-recip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--brand-50);
  border-radius: 12px;
}
.cp-recip__name { font-size: .9rem; font-weight: 600; color: var(--ink); }
.cp-recip__birth { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.cp-recip__edit { flex-shrink: 0; padding: 7px 14px; font-size: .8125rem; }
/* Вес — характеристика товара, живёт рядом с названием (.cart-item-sub--meta),
   НЕ в денежном ряду (жалоба владельца: вес путался с количеством/ценой/суммой). */
.cart-item-sub--meta { display: flex; align-items: center; gap: 4px; }
.cart-item-weight-tag { font-weight: 500; }
.cart-item-nolimit { color: var(--ok); font-weight: 700; cursor: help; }

/* Денежный ряд строки товара: количество · цена за единицу · сумма — именно в этом
   порядке, чтобы читалось как умножение количества на цену, дающее сумму. */
.cart-item-money {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cart-item-calc {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 60px;
}
.cart-item-unit { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.cart-item-price { font-size: .875rem; font-weight: 700; white-space: nowrap; color: var(--ink); }
.btn-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
  touch-action: manipulation;
}
@media (hover: hover) and (pointer: fine) {
  .btn-remove:hover { color: var(--danger); background: var(--danger-light); }
}
.date-select {
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  font-size: .8125rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  max-width: 148px;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.date-select:focus { border-color: var(--brand); }

/* ══════════════════════════════════════════════
   WEIGHT CARD (hero feature)
══════════════════════════════════════════════ */
.weight-card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 14px 16px;
  box-shadow: var(--sh-md);
  border: 1.5px solid var(--brand-50);
}
.weight-card__title {
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  letter-spacing: -.015em;
}
.weight-card__title svg { color: var(--brand); stroke-width: 1.8; }
.weight-card__badge {
  background: var(--brand-50);
  color: var(--brand);
  border-radius: var(--r-pill);
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.weight-month { margin-bottom: 12px; }
.weight-month:last-child { margin-bottom: 0; }

/* Сворачиваемый блок «Отправлено» на странице корзины (web/js/cart-page.js::renderSentBlock) —
   тот же раскладной список заказов месяца (.sentlist/.sentorder/.sentitem), что и в шторке
   каталога (см. web/js/sent-list.js), свёрнут по умолчанию. */
.sent-block {
  background: var(--surface);
  border-radius: var(--r-card);
  border: 1.5px solid var(--line, var(--border));
  overflow: hidden;
}
.sent-block__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: none;
  border: none;
  font: inherit;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.sent-block__chevron { color: var(--muted); flex-shrink: 0; transition: transform .15s ease; }
.sent-block__chevron--open { transform: rotate(180deg); }
.sent-block__body { padding: 0 16px 14px; max-height: 340px; overflow-y: auto; }
@media (hover: hover) and (pointer: fine) {
  .sent-block__toggle:hover { color: var(--brand); }
}
.weight-month__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}
.weight-month__name { font-weight: 600; color: var(--ink); font-size: .8125rem; }
.weight-month__val {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* Раскраска строки «X за заказ / Y всего / Z кг» (cart-page.js weightLineLabel) —
   теми же тремя токенами, что и шапка/каталог (владелец: «разные оттенки зелёного —
   это ни хуя не разные цвета»). Используется и в .weight-month__val (карточка),
   и в .weight-strip__val (мобильная sticky-полоска) — общие классы, не дублируем. */
.w-num { font-weight: 700; }
.w-num--cur  { color: var(--w-cur); }
.w-num--sent { color: var(--w-sent); }
.w-num--over { color: var(--w-over); font-weight: 800; }
.weight-bar {
  position: relative;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.weight-bar__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--ok);
  transition: width .4s cubic-bezier(.4,0,.2,1), background .3s;
}
.weight-bar__fill.warn   { background: var(--warn); }
.weight-bar__fill.danger { background: var(--danger); }
/* Сегмент «уже заказано ранее в этом месяце» — лежит поверх __fill от 0, приглушённым
   цветом; текущий заказ виден там, где __fill выступает из-под него (накопительный вид). */
.weight-bar__prev {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  z-index: 1;
  background: var(--ink-3);
  opacity: .55;
  border-radius: var(--r-pill);
}
.weight-over {
  margin-top: 6px;
  font-size: .75rem;
  color: var(--danger);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.weight-disclaimer {
  margin-top: 10px;
  font-size: .69rem;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

/* Компактный чекбокс «без лимита» */
.nolimit-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
  margin-top: 4px;
}
.nolimit-row input { accent-color: var(--brand); cursor: pointer; }
.nolimit-row__hint { color: var(--ink-3); }

/* Согласие на обработку персональных данных (152-ФЗ) — экран оформления */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .8rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.45;
  margin-top: 2px;
}
.consent-row input { margin-top: 3px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }
.consent-row a { color: var(--accent-ink); text-decoration: underline; }

/* Плательщики, уже известные устройству для текущего получателя (2+) — быстрый
   выбор чипом вместо ручного набора номера. См. cart-page.js renderPayerChips. */
.cp-contact-fields[hidden] { display: none; }
.payer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.payer-chip {
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .payer-chip:hover { border-color: var(--accent); }
}
.payer-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-ink);
}
.payer-chip--other {
  color: var(--muted);
  font-weight: 500;
  border-style: dashed;
}
.payer-chip--other.is-active {
  color: var(--accent-ink);
  border-style: solid;
}

/* Sticky-полоска веса (мобайл): вес виден всегда */
.weight-strip { display: none; }

/* ══════════════════════════════════════════════
   ORDER SUMMARY (sticky right col)
══════════════════════════════════════════════ */
.cart-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.order-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: var(--sh-sm);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.summary-row.total {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  padding-top: 14px;
  border-top: 2px solid var(--line);
  margin-top: 8px;
}

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
/* ══════════════════════════════════════════════
   PRODUCT INFO SHEET
══════════════════════════════════════════════ */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(30,28,22,.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
}
.sheet-overlay.open { opacity: 1; }
.item-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 84dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-card) var(--r-card) 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--sh-lg);
  transform: translateY(24px);
  transition: transform .22s ease;
}
.sheet-overlay.open .item-sheet { transform: none; }
@media (min-width: 641px) {
  .sheet-overlay { align-items: center; padding: 24px; }
  .item-sheet { border-radius: var(--r-card); }
}
.item-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.item-sheet__media {
  width: 132px;
  height: 132px;
  margin: 0 auto 14px;
  border-radius: var(--r-card);
  background: var(--surface-2);
  overflow: hidden;
}
.item-sheet__media:empty { display: none; }
.item-sheet__media img { width: 100%; height: 100%; object-fit: contain; }
.item-sheet__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -.01em;
  padding-right: 32px;
}
.item-sheet__price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-ink);
  margin: 6px 0 12px;
}
.item-sheet__rows { border-top: 1px solid var(--line-2); }
.item-sheet__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: .82rem;
}
.item-sheet__row span { color: var(--muted); flex-shrink: 0; }
.item-sheet__row b { font-weight: 600; color: var(--ink); text-align: right; }
.item-sheet__note {
  margin-top: 12px;
  font-size: .72rem;
  line-height: 1.45;
  color: var(--faint);
}
/* Правило воды (item.weightWarningText, см. web/js/catalog.js::openItemSheet и
   server/match/water-weight-rule.mjs) — выделенный блок, а не просто ещё одна строка в
   .item-sheet__note: это условная догадка владельца по одному подтверждённому случаю, а не
   факт про товар (как остальные rows/note), поэтому её визуально нельзя спутать с обычным
   служебным текстом — тот же --warn/--warn-light, что и .undelivered-banner. */
.item-sheet__warn {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warn-light, #FBF1E2);
  color: var(--warn);
  font-size: .78rem;
  line-height: 1.45;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 11px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--sh-lg);
  animation: toast-in .2s ease, toast-out .3s ease 2.5s forwards;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.success { background: var(--ok); }
.toast.error   { background: var(--danger); }
@keyframes toast-in  { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }
@keyframes toast-out { from { opacity:1; } to { opacity:0; transform: translateY(4px); } }

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.empty-state__icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  color: var(--muted);
  opacity: .5;
}
.empty-state__icon svg { width: 56px; height: 56px; stroke-width: 1.3; }
/* Legacy emoji fallback */
.empty-state__icon:not(:has(svg)) { font-size: 3rem; opacity: .5; }
.empty-state__text { font-size: .9375rem; color: var(--muted); line-height: 1.6; }
.empty-state__action { margin-top: 22px; display: flex; justify-content: center; }

/* Учреждение открыто (URL/continue-card), но доставка туда сейчас приостановлена —
   каталог не показываем вообще (не гасим сотни карточек молча), а честно и заметно
   говорим об этом на месте каталога. См. web/js/catalog.js. */
.facility-unavailable {
  max-width: 460px;
  margin: 48px auto;
  padding: 32px 26px;
  text-align: center;
  background: var(--warn-light, #FBF1E2);
  border: 1px solid rgba(196,131,26,.35);
  border-radius: var(--r-card);
}
.facility-unavailable__icon { display: flex; justify-content: center; color: var(--warn); margin-bottom: 14px; }
.facility-unavailable__title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.facility-unavailable__text {
  font-size: .875rem;
  color: var(--ink-2, var(--muted));
  line-height: 1.6;
  margin-bottom: 22px;
}

/* ══════════════════════════════════════════════
   SPINNER
══════════════════════════════════════════════ */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 64px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   INSTALL BANNER (PWA)
══════════════════════════════════════════════ */
.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-50);
  border-radius: var(--r-card);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: .8125rem;
  color: var(--brand);
}
.install-banner__text { flex: 1; }
.install-banner__btn {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 7px 16px;
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition);
}
@media (hover: hover) and (pointer: fine) {
  .install-banner__btn:hover { background: var(--brand-ink); }
}
.install-banner__close {
  color: var(--muted);
  font-size: 1rem;
  padding: 2px 6px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET (≤860px)
══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .cart-page { grid-template-columns: 1fr; }
  .cart-right { position: static; }
  .cart-right .weight-card { display: none; }

  /* Полоска веса прилипает под шапкой и видна при любой прокрутке корзины */
  .weight-strip {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 6px);
    z-index: 40;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 14px 10px;
    box-shadow: var(--sh-md);
    font-size: .8125rem;
    color: var(--muted);
  }
  .weight-strip--free { color: var(--ok); font-weight: 600; }
  .weight-strip__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
  }
  .weight-strip__val {
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  .weight-strip__val.warn { color: var(--warn); }
  .weight-strip__val.danger { color: var(--danger); }
  .weight-strip__bar {
    position: relative;
    height: 5px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    overflow: hidden;
  }
  .weight-strip__fill {
    height: 100%;
    border-radius: var(--r-pill);
    background: var(--ok);
    transition: width .4s cubic-bezier(.4,0,.2,1), background .3s;
  }
  .weight-strip__fill.warn { background: var(--warn); }
  .weight-strip__fill.danger { background: var(--danger); }
  /* Уже заказано ранее в этом месяце — приглушённый сегмент поверх __fill от 0 */
  .weight-strip__prev {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    z-index: 1;
    background: var(--ink-3);
    opacity: .55;
    border-radius: var(--r-pill);
  }
  .weight-strip__other {
    margin-top: 5px;
    font-size: .7rem;
    color: var(--ink-3);
  }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — NARROW TABLET (≤700px)
══════════════════════════════════════════════ */
@media (max-width: 700px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { display: none; }
  .catalog-chips { display: flex !important; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤640px)
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --header-h: 54px;
    --bottom-tabs-h: calc(60px + env(safe-area-inset-bottom, 0px));
  }
  html { font-size: 14px; }

  .app-header__inner { padding: 0 16px; gap: 10px; }
  .app-nav { display: none; }
  /* .app-nav скрыт — авто-отступ, раздвигавший лого и nav, переносим на саму кнопку,
     чтобы она осталась прижатой к правому краю (см. header-cart в разметке index.html). */
  .header-cart { margin-left: auto; padding: 5px 8px; gap: 6px; }
  .header-cart__weight { font-size: .7rem; padding: 3px 7px; }
  .header-cart__total { font-size: .75rem; }

  .app-main {
    padding: 14px 14px calc(var(--bottom-tabs-h) + 88px);
  }

  /* 2-column product grid */
  .items-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .side-cart { width: 100%; border-radius: var(--r-card) var(--r-card) 0 0; top: auto; border-top-left-radius: var(--r-card); border-bottom-left-radius: 0; }

  .cart-item-row { flex-wrap: wrap; gap: 6px; }
  .cart-item-name { width: 100%; flex: unset; }
  .cart-item-money { width: 100%; justify-content: space-between; order: 3; }
  .date-select { max-width: none; width: 100%; order: 4; }

  .page-title { font-size: 1.25rem; }
  .cart-page { gap: 14px; }
  .weight-bar { height: 12px; }

  /* ── BOTTOM TAB BAR ── */
  .bottom-tabs {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 130;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 16px rgba(30,28,22,.1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: var(--bottom-tabs-h);
    align-items: stretch;
  }
  .bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .01em;
    padding: 8px 4px;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .bottom-tab.active { color: var(--brand); }
  .bottom-tab svg { stroke-width: 1.8; }
  .bottom-tab__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }
  .bottom-tab__icon-wrap {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .bottom-tab__label { line-height: 1; }

  /* Badge */
  .bottom-tab-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--r-pill);
    font-size: .6rem;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.5;
    pointer-events: none;
    border: 1.5px solid var(--surface);
  }
  .bottom-tab-badge[hidden] { display: none; }

  /* Toast: lift above tabs */
  .toast-container {
    bottom: calc(var(--bottom-tabs-h) + 16px);
  }

  .facility-card { min-height: 64px; }
}

/* Extra narrow */
@media (max-width: 380px) {
  .items-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .item-card__price { font-size: .9375rem; }
  /* Освобождаем место кнопке корзины в шапке (header-cart) на самых узких экранах. */
  .app-logo small { display: none; }
  .header-cart__total { display: none; }
}

/* ── Splash (PWA entry screen) ── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity .45s ease, visibility .45s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(47, 122, 91, .28);
  animation: splash-pop .55s cubic-bezier(.34, 1.4, .5, 1) both;
}
.splash__name { text-align: center; animation: splash-fade .5s .15s ease both; }
.splash__name strong { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.splash__name small { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }
.splash__dots { display: flex; gap: 7px; margin-top: 8px; animation: splash-fade .5s .3s ease both; }
.splash__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .25;
  animation: splash-dot 1.1s infinite ease-in-out;
}
.splash__dots i:nth-child(2) { animation-delay: .18s; }
.splash__dots i:nth-child(3) { animation-delay: .36s; }
@keyframes splash-pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splash-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes splash-dot { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ── Recipient screen (onboarding step 2) ── */
.recip-wrap { display: flex; justify-content: center; padding: 26px 0 40px; }
.recip-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px 26px 26px;
}
.recip-card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 14px;
}
.recip-card__title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 8px; }
.recip-card__sub { font-size: .875rem; color: var(--muted); line-height: 1.5; margin: 0 0 16px; }
.recip-fac {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-input);
  padding: 10px 12px;
  margin-bottom: 18px;
}
.recip-fac svg { color: var(--accent); flex-shrink: 0; }
.recip-fac span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recip-fac a { font-size: .8rem; font-weight: 600; color: var(--accent-ink); flex-shrink: 0; }
.recip-field { display: block; margin-bottom: 15px; }
.recip-field__label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.recip-field__label i { font-style: normal; font-weight: 400; color: var(--faint); }
.recip-field input {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .18s;
}
.recip-field input:focus { outline: none; border-color: var(--accent); }
.recip-field input.invalid { border-color: var(--danger); }
.recip-field__err { display: block; font-size: .78rem; color: var(--danger); margin-top: 5px; }
.recip-submit { display: block; width: 100%; margin-top: 6px; }

/* ── Recipient block in cart rail ── */
.rail-recip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 12px 14px;
}
.rail-recip__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  flex-shrink: 0;
}
.rail-recip__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rail-recip__label { font-size: .72rem; color: var(--muted); }
.rail-recip__b b {
  font-size: .84rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail-recip__edit { font-size: .78rem; font-weight: 600; color: var(--accent-ink); flex-shrink: 0; }
.recip-field__err[hidden] { display: none; }

/* ── Desktop birth-date picker (recipient) ─────────────────────────────────── */
.recip-field--dp { position: relative; display: block; }
.dp-trigger {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; font: inherit; font-size: 1rem; text-align: left;
  color: var(--ink, #1F2421); cursor: pointer;
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s;
}
.dp-trigger svg { color: var(--accent); flex-shrink: 0; }
.dp-trigger:focus-visible { border-color: var(--accent); outline: none; }
@media (hover: hover) and (pointer: fine) {
  .dp-trigger:hover { border-color: var(--accent); outline: none; }
}
.dp-trigger.is-empty { color: #9AA09B; }
.dp-trigger.invalid { border-color: #C4453C; }
.dp {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0;
  max-width: min(660px, calc(100vw - 48px));
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(31, 36, 33, .16);
  padding: 14px 16px 16px;
}
.dp__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dp__back {
  width: 28px; height: 28px; flex-shrink: 0; border: none; cursor: pointer;
  border-radius: 8px; background: var(--accent-light); color: var(--accent-ink);
  font-size: .9375rem; line-height: 1;
}
@media (hover: hover) and (pointer: fine) {
  .dp__back:hover { background: var(--accent-muted); }
}
.dp__title { font-weight: 600; font-size: .875rem; }
.dp__years { display: flex; gap: 6px; overflow-x: auto; }
.dp__decade { display: flex; flex-direction: column; gap: 2px; }
.dp__decade-h {
  font-size: .6875rem; font-weight: 700; color: #9AA09B;
  text-align: center; padding: 2px 0 5px; letter-spacing: .02em;
}
.dp__y, .dp__m, .dp__d {
  border: none; background: none; font: inherit; cursor: pointer;
  border-radius: 7px; color: inherit; transition: background .12s;
}
.dp__y { font-size: .8125rem; padding: 4px 9px; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .dp__y:hover, .dp__m:hover:not(:disabled), .dp__d:hover:not(:disabled) {
    background: var(--accent-light); color: var(--accent-ink);
  }
}
.dp__y.sel, .dp__m.sel { background: var(--accent); color: #fff; }
.dp__months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; min-width: 320px; }
.dp__m { font-size: .875rem; padding: 10px 12px; text-align: center; }
.dp__m:disabled { opacity: .35; cursor: default; }
.dp__days { display: grid; grid-template-columns: repeat(7, 38px); gap: 2px; }
.dp__wd { font-size: .6875rem; font-weight: 600; color: #9AA09B; text-align: center; padding-bottom: 4px; }
.dp__d { width: 38px; height: 34px; padding: 0; font-size: .875rem; font-variant-numeric: tabular-nums; }
.dp__d:disabled { opacity: .3; cursor: default; }

/* ══════════════════════════════════════════════
   PAYMENT SCREEN (v26)
══════════════════════════════════════════════ */
.payment-wrap {
  display: flex;
  justify-content: center;
  padding: 28px 0 60px;
}

.payment-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px 28px 28px;
  box-shadow: var(--sh-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.payment-card__heading {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.payment-card__sub {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 360px;
}

.payment-card__num {
  font-size: .8125rem;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 4px 14px;
  font-variant-numeric: tabular-nums;
}

.payment-card__hint {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Spinner inside the payment card (smaller margin than global .spinner) */
.payment-spinner {
  margin: 20px auto 8px;
}

/* Success state icon */
.payment-success__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* QR code block: white padded card, centred */
.payment-qr {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-sm);
}
.payment-qr img,
.payment-qr svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Total amount */
.payment-total {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

/* Failed state icon */
.payment-failed__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--warn-light);
  color: var(--warn);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .payment-card {
    padding: 24px 18px 20px;
    gap: 12px;
  }
  .payment-card__heading { font-size: 1.1rem; }
}

/* ── Order summary block: «на кого оформлена передача» ────────────────────────
   Единый рендер (web/js/order-summary.js, правило №6 CLAUDE.md) — используется и на
   экране оплаты (внутри .payment-card, центрированная колонка), и в карточке заказа
   (обычный блочный поток), поэтому сам компактный и не завязан на flex-контекст
   родителя. */
.order-summary {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 4px;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--ink-2, var(--muted));
}
.order-summary__label {
  color: var(--ink);
  font-weight: 600;
}

/* ── Оплата частями (заказ разделён по поставщикам, см. web/js/payment.js
   renderMultiPart) — каждая часть своя карточка со своим статусом/QR/ссылкой. */
.payment-parts { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.payment-part {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
  cursor: pointer;
}
.payment-part--failed { border-color: rgba(192,80,63,.35); }
.payment-part__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.payment-part__head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.payment-part__label { font-size: .9rem; font-weight: 700; color: var(--ink); }
.payment-part__sum { font-size: 1.05rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
@media (hover: hover) and (pointer: fine) {
  .payment-part:hover { border-color: var(--accent-muted, var(--line-2)); }
}
.payment-part__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  color: var(--muted);
}
.payment-part__spinner { width: 16px; height: 16px; border-width: 2px; margin: 0; flex-shrink: 0; }
.payment-part__reason { font-size: .8125rem; color: var(--ink-2, var(--ink)); }
.payment-part__fail-items { font-size: .78rem; color: var(--muted); }
.payment-part__refund { font-size: .78rem; color: var(--muted); }
.payment-part__qr {
  align-self: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 10px;
  box-shadow: var(--sh-sm);
}
.payment-part__qr img, .payment-part__qr svg { display: block; max-width: 160px; height: auto; }
.payment-part__actions { display: flex; justify-content: center; }
.payment-part__actions .btn-primary,
.payment-part__actions .btn-secondary { width: 100%; justify-content: center; }

.app-build { margin-top: 14px; text-align: center; font-size: .6875rem; color: #B9BEB9; }

/* ══════════════════════════════════════════════
   ORDERS: undelivered banner + reorder sheet
══════════════════════════════════════════════ */
.undelivered-banner {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border-radius: var(--r-input);
  background: var(--warn-light, #FBF1E2);
  border: 1px solid rgba(196,131,26,.3);
}
.undelivered-banner--cancelled {
  background: var(--danger-light, #F6ECE9);
  border-color: rgba(192,80,63,.3);
}
.undelivered-banner__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.undelivered-banner__icon { color: var(--warn); flex-shrink: 0; margin-top: 1px; }
.undelivered-banner--cancelled .undelivered-banner__icon { color: var(--danger); }
.undelivered-banner__title { font-size: .84rem; font-weight: 700; color: var(--ink); line-height: 1.4; }
.undelivered-banner__refund {
  font-size: .8rem;
  color: var(--ink-2, var(--muted));
  margin: 4px 0 0 24px;
}
.undelivered-banner__reason {
  font-size: .8rem;
  color: var(--ink-2, var(--muted));
  margin: 2px 0 0 24px;
}
.undelivered-banner__toggle {
  margin: 8px 0 0 24px;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.undelivered-banner__list {
  margin: 8px 0 0 24px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,.1);
}
.undelivered-banner__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .78rem;
  color: var(--ink);
  padding: 3px 0;
}
.undelivered-banner__item span:first-child { flex: 1 1 auto; }
.undelivered-banner__item span:last-child { flex-shrink: 0; color: var(--ink-2, var(--muted)); white-space: nowrap; }

/* ══════════════════════════════════════════════
   NOTIFY PANEL — «Подключить уведомления» (push + внешние каналы)
   Используется на #/orders и на экране успешной оплаты (#/payment) — js/notify-panel.js
══════════════════════════════════════════════ */
.notify-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.notify-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
}
.notify-panel__title svg { color: var(--accent); flex-shrink: 0; }
.notify-panel__sub {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 4px 0 12px;
}
.notify-panel__list { display: flex; flex-direction: column; }
.notify-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.notify-panel__list .notify-row:first-child { border-top: none; padding-top: 0; }
.notify-row__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--accent);
  flex-shrink: 0;
}
.notify-row__body { flex: 1; min-width: 0; padding-top: 2px; }
.notify-row__label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.notify-row__hint { font-size: .76rem; color: var(--muted); line-height: 1.4; margin-top: 3px; }
.notify-row__state {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 600;
  margin-top: 3px;
}
.notify-row__state--ok { color: var(--ok); }
.notify-row__action { flex-shrink: 0; align-self: center; }
.notify-row__btn { padding: 7px 14px; font-size: .8125rem; white-space: nowrap; }
.undelivered-banner__retry { margin: 10px 0 0 24px; }

.order-card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Состав заказа (карточка «Мои заказы») — свёрнутый по умолчанию список позиций,
   недоступные сейчас (autoHidden) погашены с подписью тем же языком, что и
   .item-card--off в каталоге и .reorder-sheet__item--off выше — три экрана,
   одно и то же визуальное правило «недоступно = приглушено + подписано». */
.order-composition__toggle {
  display: block;
  margin: 6px 0 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.order-composition__list {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px dashed rgba(0,0,0,.1);
}
/* Состав заказа теперь карточками (см. web/js/orders.js renderComposition) —
   переиспользует .cart-item-row/.cart-item-thumb/.cart-item-name/.cart-item-sub/
   .cart-item-money/.cart-item-calc/.cart-item-price/.qty-val из корзины (web/js/cart-page.js —
   эталон вёрстки, сам файл не меняем). Длинный состав (владелец сообщал про
   заказ на 56 позиций) не раздувает карточку заказа на весь экран: список выше
   8 строк получает ограничение по высоте со своим скроллом внутри уже
   свёрнутого по умолчанию блока. */
.order-composition__list--scroll {
  max-height: 380px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.order-composition__list .cart-item-row:first-child { padding-top: 4px; }

/* Reorder bottom sheet — reuses .sheet-overlay/.item-sheet look */
.reorder-sheet__title { font-size: 1rem; font-weight: 700; color: var(--ink); padding-right: 32px; margin-bottom: 4px; }
.reorder-sheet__subtitle { font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.reorder-sheet__section-label { font-size: .78rem; font-weight: 600; color: var(--ink); margin: 14px 0 8px; }
.reorder-sheet__dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.reorder-sheet__dates::-webkit-scrollbar { display: none; }
.reorder-sheet__items { border-top: 1px solid var(--line-2, var(--border)); }
.reorder-sheet__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2, var(--border));
  font-size: .84rem;
}
.reorder-sheet__item span:last-child { color: var(--muted); flex-shrink: 0; white-space: nowrap; }
/* Позиция сейчас недоступна (autoHidden) — тот же приглушённый визуальный язык,
   что и .order-item--off/.item-card--off: не убираем из списка, гасим и подписываем,
   чтобы «Добавить в корзину» честно совпадало с тем, что человек видит. */
.reorder-sheet__item--off { opacity: .6; }
.reorder-sheet__item--off span:first-child { color: var(--muted); }
.reorder-sheet__item-badge {
  display: inline-block;
  margin-top: 2px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--warn);
}
.reorder-sheet__warn {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: var(--r-input);
  background: var(--warn-light, #FBF1E2);
  color: var(--ink);
  font-size: .78rem;
  line-height: 1.45;
}
.reorder-sheet__warn--danger { background: var(--danger-light, #F6ECE9); }
.reorder-sheet__empty { padding: 24px 4px; text-align: center; color: var(--muted); font-size: .875rem; }
.reorder-sheet__footer { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }

/* ══════════════════════════════════════════════
   ORDERS — group sections + status badges
══════════════════════════════════════════════ */
.orders-group { margin-bottom: 22px; }
.orders-group__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}
.orders-group__count { font-size: .8125rem; font-weight: 400; color: var(--muted); }

.order-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.order-status-badge--awaiting { background: #D1FAE5; color: #065F46; }
.order-status-badge--paid { background: #DBEAFE; color: #1E3A8A; }
.order-status-badge--done { background: #CFFAFE; color: #155E75; }
.order-status-badge--cancelled { background: #FEE2E2; color: #991B1B; }
.order-status-badge--failed { background: #F3F4F6; color: #4B5563; }
.order-status-badge--processing { background: #FEF3C7; color: #92400E; }

/* Заказ разделён по поставщикам (см. web/js/orders.js renderPartsHtml) — состояние
   и кнопка оплаты по КАЖДОЙ части прямо в карточке «Мои заказы». */
.order-parts-block {
  margin: 4px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-part-row {
  border: 1px solid var(--line, var(--border));
  border-radius: var(--r-input);
  padding: 8px 10px;
  background: var(--surface-2, #F7F8F6);
  cursor: pointer;
}
.order-part-row__info { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-part-row__label { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.order-part-row__sum { font-size: .8125rem; font-weight: 700; color: var(--ink); }
.order-part-row__state { margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-part-row__fail { margin-top: 4px; font-size: .76rem; color: var(--ink-2, var(--muted)); }
.order-part-row__warn { margin-top: 4px; font-size: .74rem; font-style: italic; color: var(--ink-3, var(--muted)); }
.order-part-row__pay-btn { padding: 6px 14px; font-size: .78rem; width: 100%; justify-content: center; }
@media (hover: hover) and (pointer: fine) {
  .order-part-row:hover { border-color: var(--accent-muted, var(--line-2)); }
}

/* Раскрываемый состав части (web/js/order-parts-view.js) — общий на orders.js/payment.js,
   владелец (заказ 621896): «тыкаю в плашку поставщика и не могу раскрыть, что отменено /
   что выдано». Шеврон поворачивается при раскрытии; клик по кнопке «Оплатить» внутри
   строки не переключает состояние (см. onPartRowClick — гасит клики по a/button). */
.order-part-row__chevron { color: var(--muted); flex-shrink: 0; transition: transform .15s ease; }
.order-part-row--open .order-part-row__chevron,
.payment-part--open .order-part-row__chevron { transform: rotate(180deg); }
.order-part-composition {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line, var(--border));
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* display:flex выше перебивает атрибут hidden (у него всего лишь display:none из user-agent
   стилей) — без этой строки состав части ВСЕГДА развёрнут и не сворачивается (владелец,
   2026-09-09: «список поставки всегда развёрнутый, ни фига не сворачивается»). */
.order-part-composition[hidden] { display: none; }
.order-part-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: .78rem;
  color: var(--ink-2, var(--ink));
}
.order-part-item__name { flex: 1; min-width: 0; }
.order-part-item__marks { flex-shrink: 0; white-space: nowrap; }
.order-part-item__mark { flex-shrink: 0; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.order-part-item__mark--over { color: var(--w-over); font-weight: 700; }
.order-part-item__mark--done { color: var(--ok); }
.order-part-item__mark--working { color: var(--muted); }
.order-part-composition__note { font-size: .76rem; color: var(--ink-3, var(--muted)); font-style: italic; }

.btn-secondary--danger { color: var(--danger); }
@media (hover: hover) and (pointer: fine) {
  .btn-secondary--danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light, #F6ECE9); }
}

/* «Очистить корзину» в шапке списка товаров экрана #/cart — компактный вариант
   btn-secondary--danger, прижат вправо от заголовка «Товары N поз.». */
.cart-clear-btn { margin-left: auto; flex-shrink: 0; padding: 7px 14px; font-size: .8125rem; }

/* «Очистить» в шапке шторки каталога (cartBox()) — рядом с «Открыть →», тот же
   неяркий danger-текст без рамки/фона, чтобы не спорить визуально с основной ссылкой. */
.cartbox__clear {
  font-size: .78rem;
  font-weight: 700;
  color: var(--danger);
  background: transparent;
  padding: 5px 8px;
  flex-shrink: 0;
  border-radius: var(--r-pill);
  transition: background var(--transition);
}
@media (hover: hover) and (pointer: fine) {
  .cartbox__clear:hover { background: var(--danger-light, #F6ECE9); }
}

/* ══════════════════════════════════════════════
   RECIPIENTS SCREEN (#/recipients, web/js/recipients.js) — Этап 2
══════════════════════════════════════════════ */
.rc-wrap { max-width: 640px; margin: 0 auto; padding: 4px 0 24px; }
.rc-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.rc-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 18px 16px;
  box-shadow: var(--sh-sm);
}
.rc-card--current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,122,91,.10), var(--sh-sm); }
.rc-card__head { display: flex; align-items: center; gap: 8px; }
.rc-card__name { font-size: 1.05rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.rc-card__badge {
  display: inline-flex; align-items: center; margin-left: 8px;
  padding: 2px 9px; border-radius: var(--r-pill);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--accent);
  vertical-align: middle;
}
.rc-card__birth { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.rc-card__row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 9px 12px;
  background: var(--surface-2); border-radius: var(--r-input);
}
.rc-card__fac {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; color: var(--ink); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rc-card__fac svg { color: var(--accent); flex-shrink: 0; }
.rc-link {
  background: none; border: none; padding: 0; font: inherit;
  font-size: .8125rem; font-weight: 600; color: var(--accent-ink); cursor: pointer; flex-shrink: 0;
}
.rc-inline-picker { margin-top: 10px; max-height: 420px; overflow-y: auto; }
.rc-card__weight { font-size: .82rem; color: var(--ink-2); margin-top: 12px; }
/* Потрачено в этом месяце (web/js/recipients.js::renderSpendBlock, GET /api/stats/recipient) —
   та же строчная плотность, что и .rc-card__weight выше, плюс раскрываемая раскладка по
   месяцам (rc-spend-months), тот же принцип, что и .sentorder в web/css (вкладка «Отправлено»
   в шторке корзины) — список карточек-строк на приглушённом фоне. */
.rc-card__spend {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: .82rem; color: var(--ink-2); margin-top: 6px;
}
.rc-card__spend--muted { color: var(--muted); }
.rc-spend-months {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 8px; padding: 10px 12px;
  background: var(--surface-2); border-radius: var(--r-input);
}
.rc-spend-month {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: .8rem;
}
.rc-spend-month__name { color: var(--ink); font-weight: 600; flex-shrink: 0; }
.rc-spend-month__n { color: var(--muted); flex: 1; text-align: left; }
.rc-spend-month__sum { color: var(--ink-2); flex-shrink: 0; white-space: nowrap; }
.rc-card__payers-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-top: 14px; margin-bottom: 6px;
}
.rc-card__payers { display: flex; flex-direction: column; gap: 6px; }
.rc-payer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: .82rem; color: var(--ink); padding: 7px 10px;
  background: var(--surface-2); border-radius: 9px;
}
.rc-payer--empty { color: var(--faint); font-style: italic; }
.rc-payer__phone { font-weight: 600; font-variant-numeric: tabular-nums; }
.rc-payer__name { color: var(--ink-2); }
.rc-payer__kin {
  margin-left: auto; font-size: .72rem; color: var(--accent-ink);
  background: var(--accent-light); padding: 2px 8px; border-radius: var(--r-pill);
}
.rc-card > .rc-link { margin-top: 10px; display: inline-block; }
.rc-payer-form { margin-top: 12px; padding: 14px; background: var(--surface-2); border-radius: var(--r-input); }
.rc-payer-form__actions { display: flex; gap: 10px; margin-top: 4px; }
.rc-payer-form__actions .btn-primary { width: auto; flex: 1; }
.rc-card__actions { display: flex; gap: 10px; margin-top: 16px; }
.rc-card__actions .btn-primary { width: auto; flex: 1; }
.rc-add-btn { max-width: 340px; margin: 0 auto; display: flex; }
.rc-fac-summary { font-size: .84rem; color: var(--ink-2); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Карточка получателя, известного только ЭТОМУ устройству локально — сервер (GET
   /api/recipients) недоступен/ещё не подтвердил её (см. recipients-api.js::
   getLocalFallbackRecipient, баг со стенда 2026-09-13). Тёплый (не тревожный) акцент —
   это не ошибка пользователя, просто временно нет связи. */
.rc-card--pending { border-color: rgba(201,138,43,.45); border-style: dashed; }
.rc-card__badge--pending { background: var(--warn); }
.rc-card__pending-note {
  font-size: .8rem;
  color: var(--warn);
  background: var(--warn-light, #FBF1E2);
  border-radius: var(--r-input);
  padding: 10px 12px;
  margin-top: 12px;
  line-height: 1.45;
}
