/* «Заказ продуктов» — стили приложения шефа. Только переменные из tokens.css, без «сырых» цветов. */

/* ---------- каркас ---------- */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--sp-2) 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-header__left, .app-header__right { flex: none; display: flex; align-items: center; min-width: var(--tap-min); }
.app-header__main { flex: 1; min-width: 0; display: flex; align-items: center; }
.app-header__title, .app-header__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-header__left:empty { min-width: var(--sp-2); }
.app-header__home { min-width: 0; padding-left: var(--sp-2); }
.app-header__home .t-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header--search .app-header__main { padding-right: 0; }
.splash-mark img { width: 32px; height: 32px; }

.app-main {
  display: block;
  padding: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--sp-16));
  outline: none;
}
.has-cart-panel .app-main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 64px + var(--sp-8)); }
.is-bare .app-main { padding-bottom: var(--sp-12); }

.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  min-height: 70vh;
}
.splash__icon { width: 96px; height: 96px; }

.noscript { padding: var(--sp-6); text-align: center; }

/* страница «Сменить ресторан?» при входе по чужой ссылке (отдаёт сервер, без скриптов) */
.switch-page {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.switch-page h1, .switch-page p { margin: 0; }
.switch-page__actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-2); }

/* ---------- экран ---------- */
.screen { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-6); }
.screen--my, .screen--catalog, .screen--category, .screen--search, .screen--orders, .screen--cart { padding: 0; gap: 0; }
.screen__controls {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg);
}
.screen--cart, .screen--checkout { padding-bottom: calc(var(--btn-h-lg) + var(--sp-8)); }

.section { display: flex; flex-direction: column; gap: var(--sp-2); }
.section__title { color: var(--text-2); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.card--warn { background: var(--warn-soft); border-color: transparent; }
.card--flat { padding: var(--sp-2) var(--sp-4); }

.row-buttons { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.stack-buttons { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--btn-h);
  padding: 0 var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-2);
  transition: transform var(--dur) ease, opacity var(--dur) ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn.is-busy:disabled { opacity: .8; }
.btn--lg { min-height: var(--btn-h-lg); border-radius: var(--radius-lg); }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: var(--tap-min); padding: 0 var(--sp-3); font-size: var(--fs-label); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--secondary { background: var(--surface-2); color: var(--text); }
.btn--outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn--danger { background: transparent; border-color: var(--border); color: var(--danger); }
.btn--danger-fill { background: var(--danger); color: var(--on-accent); }
[data-theme="dark"] .btn--danger-fill { color: var(--bg); }
.btn--icon {
  width: var(--tap-min);
  height: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  background: transparent;
  border-radius: var(--radius-md);
}
.btn--link {
  background: transparent;
  min-height: var(--tap-min);
  padding: 0 var(--sp-2);
  text-decoration: underline;
  font-weight: var(--fw-semibold);
}
.btn .icon { width: 22px; height: 22px; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: zp-spin .8s linear infinite;
  flex: none;
}
@keyframes zp-spin { to { transform: rotate(360deg); } }

/* ---------- поля ---------- */
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field__label { color: var(--text-2); }
.field__row { display: flex; align-items: center; gap: var(--sp-3); }
.field__input {
  width: 100%;
  min-height: var(--btn-h);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.field__input::placeholder { color: var(--text-2); opacity: 1; }
.field__textarea { min-height: 96px; resize: vertical; }
.field__error { color: var(--danger); min-height: 0; }
.field__error:empty { display: none; }
.field__counter { align-self: flex-end; }
.field__counter:empty { display: none; }
.qty-sheet__name { margin-bottom: var(--sp-2); }

/* ---------- поиск ---------- */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--btn-h);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.search__icon { position: absolute; left: var(--sp-3); color: var(--text-2); pointer-events: none; }
.search__input {
  flex: 1;
  min-width: 0;
  height: var(--btn-h);
  padding: 0 var(--sp-2) 0 calc(var(--sp-3) + 24px + var(--sp-2));
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--fs-body);
  -webkit-appearance: none;
  appearance: none;
}
.search__input::-webkit-search-cancel-button { display: none; }
.search__input::placeholder { color: var(--text-2); opacity: 1; }
.search__clear { flex: none; }
.search--fake { text-align: left; cursor: text; }
.search__placeholder { padding-left: calc(var(--sp-3) + 24px + var(--sp-2)); color: var(--text-2); }
.search--header { min-height: 44px; }
.search--header .search__input { height: 44px; }
.search__used { padding: var(--sp-3) var(--sp-4) 0; }
.search__more { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); }

mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- сегменты ---------- */
.segmented {
  display: flex;
  gap: var(--sp-1);
  padding: var(--sp-1);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.segmented__btn {
  flex: 1;
  min-height: 40px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
}
.segmented__btn.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px var(--overlay); }

/* ---------- списки и строки ---------- */
.list { display: flex; flex-direction: column; background: var(--surface); }
.screen--home .list, .screen--order .list { background: transparent; }
.list__subhead {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  z-index: 5;
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg);
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.list__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-4); }
.list__note { padding: var(--sp-4); }
.list__foot { padding: var(--sp-2) var(--sp-4) var(--sp-4); background: var(--surface); }
.list__foot:empty { display: none; }
.list__end { text-align: center; padding: var(--sp-4); }
.sentinel { height: 1px; }

.item-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--row-min-h);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur) ease;
}
.item-row.is-incart { background: var(--accent-soft); }
.item-row.is-inactive .item-row__main { opacity: .55; }
.item-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 0;
  color: var(--text);
}
.item-row__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  word-break: break-word;
}
.item-row__meta { display: block; }
.item-row__was { text-decoration: line-through; }
.item-row__total { color: var(--text); font-weight: var(--fw-semibold); }
.item-row__side { flex: none; display: flex; align-items: center; }
.item-row--removed { justify-content: space-between; background: var(--surface-2); min-height: 56px; }
.item-row__removed-text { color: var(--text-2); }

/* ---------- степпер ---------- */
.stepper { display: flex; align-items: center; gap: var(--sp-1); }
.stepper__btn {
  width: var(--stepper-btn);
  height: var(--stepper-btn);
  min-height: var(--stepper-btn);
  padding: 0;
  border-radius: var(--radius-md);
}
.stepper__add { background: var(--surface); }
.stepper__num {
  min-width: 44px;
  height: var(--stepper-btn);
  padding: 0 var(--sp-1);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  text-align: center;
}
.stepper--lg { gap: var(--sp-2); }
.stepper--lg .stepper__btn { width: 48px; height: 48px; min-height: 48px; }
.stepper--lg .stepper__num { min-width: 72px; height: 48px; font-size: var(--fs-heading); }

/* ---------- строки-ссылки ---------- */
.link-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 56px;
  padding: var(--sp-2) var(--sp-4);
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.link-row__icon { color: var(--text-2); }
.link-row__mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-row__title { overflow: hidden; text-overflow: ellipsis; }
.link-row__chev { color: var(--text-2); width: 20px; height: 20px; }
.link-row--card {
  min-height: var(--row-min-h);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.link-row--plain { background: transparent; border-bottom: 0; padding-left: 0; }
.home-links { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 400px) { .home-links { grid-template-columns: 1fr 1fr; } }

/* ---------- главная ---------- */
.delivery-card .t-heading { margin: 2px 0; }
.repeat-box { display: flex; flex-direction: column; gap: var(--sp-2); }
.repeat-box__sub { text-align: center; min-height: 1.4em; }
.cart-notice .t-body { margin: 0; }

/* ---------- бейджи статусов ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--text);
}
.badge--queued, .badge--changed { background: var(--warn-soft); color: var(--warn); }
.badge--failed, .badge--rejected { background: var(--danger-soft); color: var(--danger); }
.badge--confirmed { background: var(--accent-soft); color: var(--accent); }
.badge--cancelled { color: var(--text-2); }

/* ---------- полоска минималки ---------- */
.min-bar { display: flex; flex-direction: column; gap: var(--sp-1); }
.min-bar__track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.min-bar__fill { height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width var(--dur) ease; }
.min-bar__label--ok { display: flex; align-items: center; gap: var(--sp-1); color: var(--accent); }
.min-bar--compact .min-bar__track { height: 4px; }
.icon--sm { width: 16px; height: 16px; }
.sticky-min {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  z-index: 6;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* ---------- корзина ---------- */
.cart-block { display: flex; flex-direction: column; }
.cart-block__note { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; padding: var(--sp-3) var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--border); }
.cart-clear { padding: var(--sp-6) var(--sp-4); background: var(--bg); }

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  z-index: 25;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface);
  box-shadow: var(--shadow-up);
}
.bottom-bar__sum { display: flex; flex-direction: column; min-width: 0; }
.bottom-bar__btn { flex: 1; }
.bottom-bar--single .btn { flex: 1; }

/* ---------- панель корзины ---------- */
.cart-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  z-index: 25;
  max-width: 640px;
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface);
  box-shadow: var(--shadow-up);
  cursor: pointer;
}
.cart-panel__left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.cart-panel__btn { flex: none; }

/* ---------- нижняя навигация ---------- */
.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.nav-tab {
  flex: 1;
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-label);
  line-height: 1.1;
}
.nav-tab.is-active { color: var(--accent); }
.nav-tab.is-active .nav-tab__label { font-weight: var(--fw-semibold); }
.nav-tab__icon { position: relative; display: block; }
.nav-tab__label { font-size: 0.75em; white-space: nowrap; }
@media (min-width: 360px) { .nav-tab__label { font-size: var(--fs-label); } }
.nav-badge {
  position: absolute;
  top: -6px;
  left: 14px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  line-height: 20px;
  text-align: center;
}

/* ---------- баннеры ---------- */
.app-banner:empty { display: none; }
.app-banner { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top)); z-index: 15; }
.banner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--warn-soft);
  color: var(--text);
}
.screen .banner { border-radius: var(--radius-md); }
.banner--danger { background: var(--danger-soft); }
.banner--success { background: var(--accent-soft); }
.banner--neutral { background: var(--surface-2); }
.banner__icon { flex: none; color: var(--warn); }
.banner--danger .banner__icon { color: var(--danger); }
.banner--success .banner__icon { color: var(--accent); }
.banner--neutral .banner__icon { color: var(--text-2); }
.banner__text { flex: 1; min-width: 0; font-size: var(--fs-label); line-height: var(--lh-label); }
.banner__action {
  flex: none;
  min-height: var(--tap-min);
  padding: 0 var(--sp-2);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  color: var(--text);
}

/* ---------- тост ---------- */
.toast-region {
  position: fixed;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 64px + var(--sp-2));
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.is-bare .toast-region { bottom: calc(env(safe-area-inset-bottom) + var(--sp-4)); }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: 560px;
  width: 100%;
  min-height: var(--btn-h);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  background: var(--text);
  color: var(--bg);
  animation: zp-up var(--dur) ease;
}
.toast__text { flex: 1; font-size: var(--fs-label); line-height: var(--lh-label); }
.toast__action {
  flex: none;
  min-height: var(--tap-min);
  padding: 0 var(--sp-3);
  color: var(--bg);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
}
@keyframes zp-up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- слой: лист и диалог ---------- */
.has-layer { overflow: hidden; }
.layer__item { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.layer__item--center { align-items: center; padding: var(--sp-4); }
.overlay { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity var(--dur) ease; }
.layer__item.is-open .overlay { opacity: 1; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform var(--dur) ease;
}
.layer__item.is-open .sheet { transform: none; }
.sheet.is-dragging { transition: none; }
.sheet__handle { width: 32px; height: 4px; border-radius: 2px; background: var(--border); margin: var(--sp-2) auto 0; flex: none; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) 0 var(--sp-4); flex: none; touch-action: none; }
.sheet__title { padding-top: var(--sp-2); word-break: break-word; }
.sheet__body { overflow-y: auto; padding: var(--sp-3) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-4); overscroll-behavior: contain; }
.sheet__foot { display: flex; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4) var(--sp-4); flex: none; }
.sheet__foot .btn { flex: 1; }

.dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transform: scale(.96);
  opacity: 0;
  transition: transform var(--dur) ease, opacity var(--dur) ease;
}
.layer__item.is-open .dialog { transform: none; opacity: 1; }
.dialog__buttons { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.dialog__buttons .btn { flex: 1; }
.dialog__buttons--stack { flex-direction: column; }

/* ---------- карточка товара ---------- */
.card-sheet { display: flex; flex-direction: column; gap: var(--sp-4); }
.card-sheet__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2); }
.card-sheet__price .btn { margin-top: var(--sp-1); }
.card-sheet__stepper { display: flex; align-items: center; gap: var(--sp-3); }

/* ---------- скелетоны, пустые состояния ---------- */
.skeletons { display: flex; flex-direction: column; }
.skeleton {
  height: var(--row-min-h);
  margin: 1px 0;
  background: var(--surface-2);
  animation: zp-pulse 1.2s ease-in-out infinite;
}
.skeleton--56 { height: 56px; }
.skeleton--line { height: 1.2em; border-radius: var(--radius-sm); width: 70%; margin: 0 auto; }
@keyframes zp-pulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.slow { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); padding: var(--sp-6) var(--sp-4); text-align: center; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-12) var(--sp-6);
  text-align: center;
}
.empty__icon { width: 48px; height: 48px; color: var(--text-2); }
.empty .btn--lg { max-width: 360px; }
.empty__extra { display: flex; justify-content: center; padding: 0 var(--sp-4); }

/* ---------- оформление ---------- */
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-1); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 56px;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  line-height: 1.2;
}
.chip .t-label { color: var(--text-2); }
.chip.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.checkout__summary { gap: var(--sp-2); }

/* ---------- история и заказ ---------- */
.order-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--row-min-h);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.screen--home .order-row { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: var(--sp-2); }
.order-row__mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.order-row__right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); }
.order-row--queued { background: var(--warn-soft); }
.order-row--foreign { background: var(--surface-2); }

.status-head { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); text-align: center; padding-top: var(--sp-4); }
.status-head__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
}
.status-head__icon .icon { width: 48px; height: 48px; }
.status-head--queued .status-head__icon, .status-head--changed .status-head__icon { background: var(--warn-soft); color: var(--warn); }
.status-head--failed .status-head__icon, .status-head--rejected .status-head__icon { background: var(--danger-soft); color: var(--danger); }
.status-head--confirmed .status-head__icon, .status-head--new .status-head__icon { background: var(--accent-soft); color: var(--accent); }
.status-head.is-fresh .status-head__icon { animation: zp-pop 200ms ease-out; }
@keyframes zp-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.status-text { text-align: center; }
.order-sum { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
.order-line { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.order-line:last-child { border-bottom: 0; }
.order-line__mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.order-line__name { word-break: break-word; }
.order-line__sum { flex: none; }
.order-line.is-unavailable .order-line__name, .order-line.is-unavailable .order-line__sum { text-decoration: line-through; color: var(--text-2); }
.note { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); background: var(--surface-2); display: flex; flex-direction: column; gap: var(--sp-1); word-break: break-word; }
.note--supplier { background: var(--warn-soft); }

/* ---------- вход, приветствие, «Ещё» ---------- */
.screen--gate, .screen--welcome {
  min-height: 80vh;
  justify-content: center;
  align-items: stretch;
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
  gap: var(--sp-4);
}
.welcome__icon { width: 72px; height: 72px; margin: 0 auto; }
.gate__icon { width: 48px; height: 48px; color: var(--text-2); margin: 0 auto; }
.paste-link { display: flex; flex-direction: column; gap: var(--sp-2); text-align: left; margin-top: var(--sp-4); }
.details { text-align: left; border-top: 1px solid var(--border); padding-top: var(--sp-3); }
.details summary { min-height: var(--tap-min); display: flex; align-items: center; cursor: pointer; }
.install-hint { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) 0; }
.more__head { padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.more__section { display: flex; flex-direction: column; gap: var(--sp-2); }
.more__version { text-align: center; }
.layer .link-row { padding-left: 0; padding-right: 0; }

/* ---------- широкие экраны ---------- */
@media (min-width: 641px) {
  .app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}
