.muted {
  color: var(--muted);
}

:root {
  --bg: #f4f6f5;
  --card: #ffffff;
  --text: #15201b;
  --muted: #647067;
  --line: #d6ded9;
  --accent: #087f5b;
  --accent-dark: #066548;
  --danger: #a33a3a;
  --shadow: 0 12px 28px rgba(17, 38, 30, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body,
.app,
.page,
.product-card,
.product-card *,
button,
button:disabled {
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 110px;
}

.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 14px;
}

.hero {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, #1f322b, #0f6b50);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.13);
  font-size: 25px;
  flex: 0 0 auto;
}

.hero h1 {
  margin: 0 0 7px;
  font-size: 21px;
  line-height: 1.16;
}

.hero p {
  margin: 0 0 4px;
  font-size: 14px;
  opacity: 0.92;
}

.hero .camera {
  font-weight: 700;
  opacity: 1;
}

/* Public auth forms: submit loading state */
.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d6ded9;
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
}
.auth-submit-btn--secondary {
  background: #f4f8f6;
}
.auth-submit-btn:disabled,
.auth-submit-btn.is-loading {
  background: #e8eeeb;
  border-color: #d6ded9;
  color: #8a9490;
  cursor: wait;
}
.auth-submit-btn:disabled:not(.is-loading) {
  cursor: not-allowed;
}
.auth-submit-btn.auth-submit-btn--compact,
.auth-submit-btn.admin-invite-action-btn {
  width: auto;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
}
.auth-submit-btn__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(100, 112, 103, 0.25);
  border-top-color: #647067;
  border-radius: 50%;
  animation: auth-submit-spin 0.8s linear infinite;
  flex: 0 0 auto;
}
.auth-submit-btn__spinner[hidden] {
  display: none;
}
@keyframes auth-submit-spin {
  to { transform: rotate(360deg); }
}

/* Merchant admin: payment method settings */
.payment-mode-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
.payment-mode-fieldset__legend {
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0;
}
.payment-mode-option {
  display: flex;
  margin-top: 6px;
}
.payment-mode-option:first-of-type {
  margin-top: 0;
}
.payment-mode-panel__lead {
  margin: 0 0 8px;
}
.payment-mode-panel__lead:last-child {
  margin-bottom: 12px;
}
.payment-mode-notice {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #d4e4dc;
  background: #f4faf7;
}
.payment-method-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.payment-method-card__title {
  font-weight: 700;
}
.payment-method-card__desc {
  margin: 8px 0 0 28px;
}
.payment-method-cards--readonly .payment-method-card {
  opacity: 0.72;
  background: #f6f8f7;
}
.payment-method-cards--readonly .payment-method-card__desc {
  color: #6b7570;
}

/* -----------------------
   Admin shell + header
   ----------------------- */
.page.admin {
  max-width: 1240px;
  padding: 24px 24px 64px;
}
@media (max-width: 860px) { .page.admin { padding: 16px 14px 64px; } }

.admin-hero {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #1f322b, #145c48);
}
.admin-hero__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
}
@media (max-width: 860px) { .admin-hero__inner { padding: 16px 14px; } }

.admin-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.admin-hero__title-block {
  flex: 1;
  min-width: 0;
}
.admin-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.admin-hero__logout-form {
  display: inline;
  margin: 0;
}
.admin-hero__logout-btn {
  font-size: 13px;
}

.admin-hero__inner h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  color: #fff;
}

.admin-hero__context {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}
.admin-hero__context-strong {
  font-weight: 800;
  color: #fff;
}
.admin-hero__context-sep {
  margin: 0 0.35em;
  opacity: 0.65;
}
.admin-hero__link {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 800;
  text-decoration: none;
}
.admin-hero__link:hover {
  color: #fff;
  text-decoration: underline;
}

.admin-hero__setup-status {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.admin-hero__setup-status-label {
  font-weight: 800;
  color: #ffd666;
}
.admin-hero__setup-status-link {
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.admin-hero__setup-status-link:hover {
  color: #ffd666;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.admin-nav a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
}
.admin-nav a:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
  text-decoration: none;
}
.admin-nav a.active,
.admin-nav a[aria-current="page"] {
  background: #fff;
  color: #145c48;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.admin-nav a.active:hover,
.admin-nav a[aria-current="page"]:hover {
  background: #f4fbf8;
  color: #0f4034;
  text-decoration: none;
}
.admin-nav a.admin-nav__link--attention {
  background: #f5b942;
  color: #4a3208;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}
.admin-nav a.admin-nav__link--attention:hover {
  background: #f0ad2e;
  color: #3d2806;
}
.admin-nav a.admin-nav__link--attention.active,
.admin-nav a.admin-nav__link--attention[aria-current="page"] {
  background: #fff;
  color: #145c48;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.admin-nav a.admin-nav__link--attention.active:hover,
.admin-nav a.admin-nav__link--attention[aria-current="page"]:hover {
  background: #f4fbf8;
  color: #0f4034;
}
.admin-nav__attention-mark {
  font-weight: 900;
}

.admin-nav--settings-sub a {
  font-size: 13px;
  font-weight: 700;
  padding: 5px 9px;
}
.admin-nav--settings-sub a:not(.active):not([aria-current="page"]) {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}
.admin-nav--settings-sub a:not(.active):not([aria-current="page"]):hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.admin-nav--settings-sub a.active,
.admin-nav--settings-sub a[aria-current="page"] {
  font-weight: 900;
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 1px;
}

/* Sub-nav on light page background (billing sections in main) */
.admin-nav--sub a {
  color: #145c48;
  background: rgba(20, 92, 72, 0.1);
}
.admin-nav--sub a:hover {
  background: rgba(20, 92, 72, 0.16);
  color: #0f4034;
}
.admin-nav--sub a.active,
.admin-nav--sub a[aria-current="page"] {
  background: #145c48;
  color: #fff;
  box-shadow: 0 2px 8px rgba(20, 92, 72, 0.22);
}
.admin-nav--sub a.active:hover,
.admin-nav--sub a[aria-current="page"]:hover {
  background: #0f4034;
  color: #fff;
}

.notice {
  margin: 12px 0 18px;
  padding: 13px 15px;
  background: #fff7e6;
  border: 1px solid #f0d7a1;
  border-radius: 16px;
  color: #5e4210;
  font-size: 14px;
}

.scan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 20px rgba(8, 127, 91, 0.20);
}

.scan-button:hover {
  background: var(--accent-dark);
}

.storefront-sticky {
  position: sticky;
  top: calc(10px + env(safe-area-inset-top, 0px));
  z-index: 15;
  margin: 12px 0 16px;
  padding: 8px 10px 10px;
  border-radius: 18px;
  background: rgba(244, 246, 245, 0.78);
  border: 1px solid rgba(214, 222, 217, 0.7);
  box-shadow: 0 10px 24px rgba(17, 38, 30, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.storefront-sticky__toolbar {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.scan-button--flex {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(8, 127, 91, 0.26);
}

.help-toolbar-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  color: var(--accent-dark);
  background: #edf5f1;
  border: 1px solid rgba(8, 127, 91, 0.22);
  box-shadow: 0 4px 12px rgba(17, 38, 30, 0.06);
  touch-action: manipulation;
  white-space: nowrap;
}

.help-toolbar-btn:active {
  opacity: 0.92;
}

.login-toolbar-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent-dark);
  background: #edf5f1;
  border: 1px solid rgba(8, 127, 91, 0.22);
  box-shadow: 0 4px 12px rgba(17, 38, 30, 0.06);
  touch-action: manipulation;
  white-space: nowrap;
  cursor: pointer;
}

.login-toolbar-btn:active {
  opacity: 0.92;
}

.login-toolbar-btn[hidden],
.profile-toolbar-btn[hidden] {
  display: none !important;
}

.profile-toolbar-btn {
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 16px;
  font-size: 18px;
  line-height: 1;
  color: var(--accent-dark);
  background: #edf5f1;
  border: 1px solid rgba(8, 127, 91, 0.22);
  box-shadow: 0 4px 12px rgba(17, 38, 30, 0.06);
  touch-action: manipulation;
  cursor: pointer;
}

.profile-toolbar-btn__icon {
  display: block;
  line-height: 1;
}

.profile-toolbar-btn__badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #12b886;
  border: 2px solid #edf5f1;
  box-shadow: 0 0 0 1px rgba(8, 127, 91, 0.25);
}

.profile-toolbar-btn:active {
  opacity: 0.92;
}

.profile-toolbar-btn.is-logged-in {
  background: #e6f7f1;
  border-color: rgba(8, 127, 91, 0.42);
  box-shadow: 0 0 0 2px rgba(18, 184, 134, 0.14);
}

.category-nav {
  margin-top: 10px;
}

.category-nav__scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-nav__scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.category-chip--active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.category-section {
  /* Значение задаётся из JS (syncCategoryScrollMargin) по высоте .storefront-sticky */
  scroll-margin-top: var(--category-sticky-offset, calc(132px + env(safe-area-inset-top, 0px)));
}

.category-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 10px;
}

.category-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.category-heading__meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.product-list {
  display: grid;
  gap: 12px;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 118px) minmax(0, 1fr);
  scroll-margin-top: 72px;
  scroll-margin-bottom: 100px;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 8px 18px rgba(17, 38, 30, 0.06);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.product-card--scan-attention {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow:
    0 0 0 2px rgba(16, 185, 129, 0.45),
    0 12px 28px rgba(17, 38, 30, 0.12);
  z-index: 1;
  position: relative;
}

@keyframes vida-plus-pulse-attention {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.product-card .qty__btn.plus.qty__btn--pulse-attention {
  animation: vida-plus-pulse-attention 0.42s ease-in-out 2;
}

@media (prefers-reduced-motion: reduce) {
  .product-card .qty__btn.plus.qty__btn--pulse-attention {
    animation: none;
    outline: 2px solid #34d399;
    outline-offset: 2px;
    border-radius: 12px;
  }
}

.product-card,
.product-card * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.product-card--out {
  opacity: 0.62;
  filter: grayscale(0.45);
  border-color: #dce4df;
  box-shadow: none;
}

.product-card--out .product-card__body {
  color: var(--muted);
}

.product-card--out h3 {
  color: var(--muted);
}

.product-card--out .qty__btn:not(:disabled) {
  opacity: 0.85;
}

.stock--out {
  color: var(--muted);
  font-weight: 600;
}

.interest {
  min-height: 16px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 16px;
  color: #b45309;
  font-weight: 600;
}

.interest[hidden] {
  display: block;
  visibility: hidden;
}

.product-card__thumb {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 118px;
  align-self: stretch;
  overflow: hidden;
  background: #d9e2dd;
  border-right: 1px solid var(--line);
}

.product-card__thumb .product-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.product-card__image--placeholder {
  width: 118px;
  min-height: 118px;
  height: 100%;
  background: linear-gradient(145deg, #e4ebe7, #f0f4f2);
  border-right: 1px solid var(--line);
}

.product-card__body {
  padding: 11px 12px 10px;
}

.product-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.product-card__price-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  max-width: 52%;
  text-align: right;
}

.price-promo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.price-promo__was {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}

.price-promo__line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.price-promo__now {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.price-promo__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(238, 90, 36, 0.38);
}

.price-plain {
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.stock {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.qty {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  margin-top: 10px;
}

.qty__btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #edf5f1;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.qty__btn.plus {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.qty__btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.qty__value {
  min-width: 20px;
  text-align: center;
  font-weight: 800;
  font-size: 18px;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(244,246,245,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.bottom-bar .pay-button {
  max-width: 520px;
  margin: 0 auto;
}

.pay-button,
.secondary-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.pay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 20px rgba(8, 127, 91, 0.24);
}

.pay-button.is-loading {
  cursor: wait;
}

.pay-button__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-submit-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.pay-button__spinner[hidden] {
  display: none;
}

.pay-button:hover {
  background: var(--accent-dark);
}

.pay-button:disabled {
  background: #9aa6a0;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  margin-top: 10px;
  background: #edf0ee;
  color: var(--text);
  border: 1px solid var(--line);
}

.modal[hidden],
.modal.modal--scanner-1d[hidden],
.toast[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 19, 15, 0.54);
}

.modal__panel {
  position: relative;
  width: min(520px, calc(100vw - 20px));
  margin-bottom: 10px;
  padding: 20px;
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
}

#html5QrReader video {
  width: 100%;
  border-radius: 16px;
}

.modal__panel h2 {
  margin: 0 0 8px;
  font-size: 23px;
}

.modal__question {
  margin: 0 0 14px;
  color: var(--muted);
}

/* 1D scanner (zxing-wasm): compact mobile sheet — видео не на весь экран, кнопки всегда в подвале панели */
.modal.modal--scanner-1d {
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 12px;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  overflow: hidden;
  box-sizing: border-box;
}

.modal--scanner-1d .modal__overlay {
  background: rgba(2, 12, 8, 0.78);
}

.modal__panel--scanner-1d {
  width: 100%;
  max-width: min(520px, 100%);
  position: relative;
  z-index: 1;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: 0 auto;
  min-height: 0;
  border-radius: 22px;
  padding: 14px 14px max(18px, env(safe-area-inset-bottom, 18px));
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(165deg, #052e22 0%, #0f172a 42%, #020617 100%);
  color: #e2e8f0;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(148, 163, 184, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 1;
}

.scanner-1d-panel-shell {
  max-height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.scanner-1d-header {
  flex-shrink: 0;
}

.scanner-modal-debug-only {
  margin-bottom: 6px;
}

.scanner-modal-debug-only .scanner-1d-brand {
  margin-bottom: 4px;
}

.scanner-1d-debug-sub {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  color: #94a3b8 !important;
}

.scanner-1d-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #34d399;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.scanner-1d-title {
  margin: 0 0 4px !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: -0.02em;
}

.scanner-1d-sub {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
}

.scanner-1d-hint-micro {
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: rgba(148, 163, 184, 0.92) !important;
  margin: 8px 0 0 !important;
}

.scanner-1d-header-help-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: 8px;
}

.scanner-1d-header-help-row .scanner-1d-hint-micro {
  margin: 0 !important;
  flex: 1 1 200px;
  min-width: min(100%, 220px);
}

.scanner-1d-help-trigger {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  color: #a7f3d0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.scanner-1d-help-trigger:active {
  background: rgba(255, 255, 255, 0.14);
}

/* Подсказка поверх окна сканера */
.modal.modal--scanner-help {
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal__panel--scanner-help {
  width: min(440px, calc(100vw - 32px));
  margin: 0;
}

.scanner-help-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.scanner-help-text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

.modal__panel--scanner-help .pay-button {
  width: 100%;
  margin-top: 8px;
}

.modal.modal--help-feedback {
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: max(12px, env(safe-area-inset-top, 12px)) 12px max(12px, env(safe-area-inset-bottom, 12px));
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  box-sizing: border-box;
}

.modal.modal--help-feedback .modal__overlay {
  position: fixed;
}

.modal__panel--help-feedback {
  width: min(440px, 100%);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  flex: 0 0 auto;
}

.modal.modal--payment-claim {
  z-index: 60;
}

.help-feedback-modal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 20px 8px;
}

.help-feedback-modal__footer {
  flex-shrink: 0;
  padding: 12px 20px max(20px, env(safe-area-inset-bottom, 20px));
  border-top: 1px solid var(--line);
  background: var(--card);
}

body.body--modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
  touch-action: none;
}

.help-feedback-field {
  margin-top: 12px;
}

.help-feedback-field:first-child {
  margin-top: 0;
}

.help-field-error {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #c92a2a;
}

.help-field-error[hidden] {
  display: none !important;
}

.help-feedback-input--invalid,
.help-feedback-textarea.help-feedback-input--invalid,
.help-purchase-picker__trigger.help-feedback-input--invalid {
  border-color: #e03131;
  box-shadow: 0 0 0 1px rgba(224, 49, 49, 0.2);
}

/* Custom purchase picker (scrollable list inside modal) */
.help-purchase-picker {
  position: relative;
}

.help-purchase-picker__trigger {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 36px 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  position: relative;
}

.help-purchase-picker__trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.help-purchase-picker__trigger:focus {
  outline: 2px solid rgba(8, 127, 91, 0.35);
  outline-offset: 1px;
}

.help-purchase-picker__trigger--placeholder {
  color: var(--muted);
}

.help-purchase-picker__list {
  margin-top: 8px;
  max-height: min(45vh, 280px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(10, 19, 15, 0.12);
}

.help-purchase-picker__list[hidden] {
  display: none !important;
}

.help-purchase-picker__option {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf0ee;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  word-break: break-word;
}

.help-purchase-picker__option:last-child {
  border-bottom: 0;
}

.help-purchase-picker__option:hover,
.help-purchase-picker__option:focus {
  background: #f1faf0;
  outline: none;
}

.help-purchase-picker__option--selected {
  background: #e6fcf5;
  font-weight: 600;
}

.help-purchase-picker__option--other {
  color: #495057;
}

.help-purchase-picker__option-line {
  display: block;
}

.help-purchase-picker__option-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* File upload blocks */
.help-file-upload {
  margin-top: 4px;
}

.help-file-upload__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.help-file-upload__head .help-feedback-label {
  margin: 0;
}

.help-file-upload__counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.help-file-upload__hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.help-file-upload__add {
  width: 100%;
  margin-top: 0 !important;
}

.help-file-upload--invalid .help-feedback-label {
  color: #c92a2a;
}

.help-file-upload--invalid .help-file-upload__add {
  border-color: #e03131;
  box-shadow: 0 0 0 1px rgba(224, 49, 49, 0.2);
}

.help-file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.help-file-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8faf9;
}

.help-file-list__thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e9ecef;
}

.help-file-list__icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: #e9ecef;
}

.help-file-list__name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.help-file-list__remove {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.help-feedback-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.help-feedback-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
  color: var(--text);
  background: #fff;
}

.help-feedback-textarea:focus {
  outline: 2px solid rgba(8, 127, 91, 0.35);
  outline-offset: 1px;
}

.help-feedback-counter {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.help-feedback-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.modal__panel--help-feedback .help-feedback-actions {
  margin-top: 0;
}

.help-feedback-actions .secondary-button {
  flex: 1 1 0;
  margin-top: 0;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  box-sizing: border-box;
}

.help-feedback-actions .pay-button {
  flex: 1 1 0;
  margin-top: 0;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: none;
  box-sizing: border-box;
}

.help-feedback-contact-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8faf9;
  cursor: pointer;
  user-select: none;
}

.help-feedback-contact-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent, #087f5b);
}

.help-feedback-contact-toggle span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.help-feedback-contact-wrap {
  margin-top: 10px;
}

.help-feedback-contact-wrap[hidden] {
  display: none !important;
}

.help-appeal-consent {
  margin-top: 12px;
  text-align: left;
}

.help-appeal-consent[hidden],
.help-appeal-consent__error[hidden] {
  display: none !important;
}

.help-appeal-consent__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.help-appeal-consent__row + .help-appeal-consent__row {
  margin-top: 8px;
}

.help-appeal-consent__row input {
  margin-top: 2px;
  flex-shrink: 0;
}

.help-appeal-consent__text p {
  margin: 0;
}

.help-appeal-consent__text a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .help-appeal-consent__text a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
  }
}

.help-appeal-consent__error {
  margin: 8px 0 0 28px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--danger);
}

.help-feedback-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}

.help-feedback-input:focus {
  outline: 2px solid rgba(8, 127, 91, 0.35);
  outline-offset: 1px;
}

.help-feedback-input--placeholder,
.help-feedback-input--type:invalid {
  color: #647067;
}

.help-feedback-input--type option {
  color: var(--text);
}

/* Контейнер превью: ограничен по высоте; ROI только внутри него */
.scanner-1d-video-outer {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  max-height: 50vh;
  max-height: 48dvh;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  z-index: 1;
}

.scanner-video.scanner-1d-video,
.scanner-1d-video-outer video.scanner-1d-video,
.scanner-1d-video {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  /* cover: превью заполняет чёрную область без «узкой столбцом» дорожки (contain); декод всё так же полный кадр сенсора */
  object-fit: cover;
  vertical-align: top;
  border-radius: 0;
  background: transparent;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}

.scanner-1d-footer-strip {
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  background: linear-gradient(175deg, rgba(5, 46, 34, 0.98) 0%, rgba(15, 23, 42, 0.99) 60%, rgba(2, 6, 23, 0.995) 100%);
}

.scanner-1d-debug {
  margin-top: 0;
  font-size: 11px;
  color: #64748b !important;
}

.scanner-1d-close {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  margin-top: 0;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.35);
}

.modal__panel--scanner-1d .secondary-button {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.35);
}

.modal__panel--scanner-1d .secondary-button:active {
  background: rgba(255, 255, 255, 0.16);
}

.modal__panel--scanner-1d .secondary-button,
.scanner-1d-controls .secondary-button,
.scanner-1d-actions .secondary-button,
.scanner-1d-close {
  margin-top: 0;
}

.modal__panel--scanner-1d .scanner-1d-actions .secondary-button,
.modal__panel--scanner-1d .scanner-1d-close {
  min-height: 48px;
  font-size: 15px;
  font-weight: 750;
  border-radius: 14px;
}

.scanner-1d-hint-prod {
  text-align: center;
}

.scanner-1d-hint-prod__line {
  font-size: 14px;
  line-height: 1.35;
  color: #e2e8f0;
}

.scanner-1d-zoom-row {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.scanner-1d-zoom-label {
  font-size: 13px;
  font-weight: 650;
  color: rgba(226, 232, 240, 0.92);
}

.scanner-1d-zoom-range {
  width: 100%;
  margin: 0;
  height: 32px;
  accent-color: #34d399;
  cursor: pointer;
}

.scanner-1d-hint--debug {
  font-size: 12px !important;
  line-height: 1.35;
}

.confirm-items {
  display: grid;
  gap: 9px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8faf9;
}

.confirm-row,
.success-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.success-item {
  min-width: 0;
}

.success-item__title {
  font-weight: 800;
  line-height: 1.25;
}

.success-item__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.success-row strong {
  white-space: nowrap;
}

.confirm-total {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
  font-size: 20px;
  font-weight: 900;
}

/* Checkout confirm modal (mobile scroll lock, single scrollable sheet) */
.modal.modal--checkout {
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  padding:
    max(8px, env(safe-area-inset-top, 8px))
    10px
    max(8px, env(safe-area-inset-bottom, 8px));
  box-sizing: border-box;
}

.modal.modal--checkout .modal__overlay {
  position: fixed;
}

.modal__panel--checkout {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  padding: 0;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.checkout-modal[hidden] {
  display: none !important;
}

.checkout-modal:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
}

.checkout-modal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom, 16px));
}

.checkout-modal__scroll h2 {
  margin: 0 0 6px;
  font-size: 21px;
}

.checkout-modal__scroll .modal__question {
  margin-bottom: 10px;
}

.checkout-modal .confirm-items {
  margin: 8px 0;
  padding: 10px;
  gap: 7px;
}

.checkout-modal .confirm-total {
  margin: 8px 0 10px;
  font-size: 18px;
}

.checkout-modal__pay {
  margin-top: 8px;
}

.checkout-modal__return {
  margin-top: 8px;
  width: 100%;
}

.checkout-modal__scroll--waiting {
  text-align: center;
}

.checkout-modal__waiting-lead {
  margin-bottom: 8px;
}

.checkout-modal__waiting-total {
  justify-content: center;
  margin-top: 10px;
  font-size: 17px;
}

.checkout-modal__waiting-timer {
  margin-top: 10px;
}

.checkout-modal__waiting-action {
  margin-top: 10px;
  width: 100%;
}

.checkout-modal__waiting-escalate {
  margin-top: 12px;
}

.receipt-contact-block {
  margin: 8px 0 2px;
  text-align: left;
}

.receipt-contact-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}

.receipt-contact-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(21, 32, 27, 0.2);
  font-size: 16px;
}

.receipt-contact-hint {
  margin: 5px 0 0;
  font-size: 13px;
}

.receipt-contact-save--obedru {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.obedru-card-balance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.obedru-card-balance-btn {
  font-size: 14px;
  padding: 8px 12px;
}

.obedru-card-balance-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f8f6;
  border: 1px solid #e0ebe5;
  font-size: 14px;
  line-height: 1.45;
}

.obedru-card-balance-result--warn {
  border-color: #e8c89a;
  background: #fff8ef;
}

.obedru-card-balance-result--err {
  border-color: #e8b4b4;
  background: #fff5f5;
}

.obedru-checkout-block {
  margin-top: 8px;
}

.obedru-checkout-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8faf9;
}

.obedru-checkout-row__text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obedru-checkout-row__sep {
  font-weight: 400;
  color: var(--muted);
}

.obedru-checkout-row__balance {
  font-weight: 700;
}

.obedru-checkout-row__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.obedru-checkout-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.obedru-checkout-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.obedru-checkout-icon-btn__svg {
  width: 20px;
  height: 20px;
}

.obedru-checkout-icon-btn--spin .obedru-checkout-icon-btn__svg {
  animation: obedru-checkout-spin 0.8s linear infinite;
}

@keyframes obedru-checkout-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.obedru-checkout-icon-btn__chevron {
  font-size: 12px;
  line-height: 1;
}

.modal__panel--obedru-sheet {
  max-height: min(70dvh, 520px);
  overflow: hidden;
}

.obedru-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.obedru-sheet-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 4px 8px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.obedru-sheet-item:first-child {
  border-top: none;
}

.obedru-sheet-item__pick {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.obedru-sheet-item__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.obedru-sheet-item__check {
  width: 16px;
  flex-shrink: 0;
  color: #087f5b;
  font-weight: 700;
}

.obedru-sheet-item__title {
  font-size: 15px;
  font-weight: 700;
}

.obedru-sheet-item__mask,
.obedru-sheet-item__balance {
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.35;
}

.obedru-sheet-item__balance {
  font-weight: 700;
}

.obedru-sheet-item__info {
  align-self: start;
  margin-top: 2px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: #eef3f0;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}

.obedru-sheet-add-btn {
  margin-top: 8px;
  width: 100%;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 14px 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #087f5b;
  cursor: pointer;
  text-align: left;
}

.obedru-detail-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  font-size: 14px;
}

.obedru-detail-dl dt {
  margin: 0;
  color: var(--muted);
}

.obedru-detail-dl dd {
  margin: 0;
  font-weight: 600;
}

.obedru-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.obedru-detail-actions__danger {
  color: #c92a2a;
}

.obedru-detail-rename {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.obedru-detail-rename-actions {
  display: flex;
  gap: 8px;
}

.customer-profile-obedru-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-profile-obedru-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #f8faf9;
}

.customer-profile-obedru-card__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.customer-profile-obedru-card__meta {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.customer-profile-obedru-card__updated,
.customer-profile-obedru-card__error {
  color: var(--muted);
  font-size: 13px;
}

.customer-profile-obedru-card__badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f5ef;
  color: #087f5b;
  font-size: 12px;
  font-weight: 700;
}

.customer-profile-obedru-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.customer-profile-obedru-card__btn {
  font-size: 13px;
  padding: 8px 10px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.customer-profile-obedru-card__btn.is-loading,
.customer-profile-obedru-card__rename-actions .secondary-button.is-loading {
  cursor: wait;
  opacity: 0.85;
}

.customer-profile-obedru-card__btn .pay-button__spinner,
.customer-profile-obedru-card__rename-actions .secondary-button .pay-button__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: auth-submit-spin 0.8s linear infinite;
  flex-shrink: 0;
}

.customer-profile-obedru-card__btn .pay-button__spinner[hidden],
.customer-profile-obedru-card__rename-actions .secondary-button .pay-button__spinner[hidden] {
  display: none;
}

.customer-profile-obedru-card__custom-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.customer-profile-obedru-card__muted {
  color: var(--muted);
  font-size: 13px;
}

.customer-profile-obedru-card__rename {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-profile-obedru-card__rename-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-profile-obedru-add-btn {
  margin-top: 12px;
  width: 100%;
}

#obedruSavedCardSection {
  margin-bottom: 8px;
}

#obedruCardPicker {
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf9;
}

.obedru-card-picker__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.obedru-card-picker__item:last-child {
  border-bottom: none;
}

.obedru-checkout-card__title {
  font-weight: 600;
}

.obedru-checkout-card__owner,
.obedru-checkout-card__balance,
.obedru-checkout-card__status {
  font-size: 14px;
  margin-top: 4px;
}

.obedru-card-picker__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.payment-method-option {
  display: grid;
  grid-template-columns: auto 1fr 44px;
  align-items: center;
  column-gap: 12px;
  min-height: 44px;
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.payment-method-option + .payment-method-option {
  margin-top: 6px;
}

.payment-method-option__control {
  display: contents;
}

.payment-method-option__label {
  min-width: 0;
  line-height: 1.25;
  cursor: pointer;
}

.payment-method-unavailable .muted {
  color: var(--muted, #6b7280);
}

.payment-method-help-spacer {
  width: 44px;
  height: 44px;
  justify-self: end;
}

.payment-method-help {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  justify-self: end;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.payment-method-help__icon {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(21, 32, 27, 0.22);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: var(--text);
  background: #fff;
  flex-shrink: 0;
  pointer-events: none;
}

.consent-block {
  margin-top: 10px;
  text-align: left;
}

.consent-block[hidden],
.consent-block__error[hidden] {
  display: none !important;
}

.consent-block__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.consent-block__row + .consent-block__row {
  margin-top: 8px;
}

.consent-block__row input,
.consent-block__input {
  margin-top: 2px;
  flex-shrink: 0;
  width: auto;
}

.consent-block__text p {
  margin: 0;
}

.consent-block__text a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .consent-block__text a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
  }
}

.consent-block__error {
  margin: 8px 0 0 28px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--danger);
}

.consent-block--invalid .consent-block__error {
  display: block;
}

.consent-block__notice {
  margin-top: 12px;
}

.saved-payment-card-block .consent-block {
  margin-top: 10px;
}

.help-feedback-modal__scroll .consent-block {
  margin-top: 12px;
}

/* Legacy aliases — prefer .consent-block */
.help-appeal-consent,
.saved-payment-consent-row {
  margin-top: 10px;
  text-align: left;
}

.help-appeal-consent__row,
.saved-payment-consent-row__label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.help-appeal-consent__text,
.saved-payment-consent__text,
.consent-block__text {
  /* unified text */
}

.help-appeal-consent__error,
.saved-payment-consent-error {
  margin: 8px 0 0 28px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--danger);
}

.checkout-legal {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  text-align: left;
}

.checkout-legal__body p {
  margin: 0;
}

.checkout-legal__body p + p {
  margin-top: 4px;
}

.checkout-legal__links {
  margin-top: 4px;
}

.checkout-legal__links p {
  margin: 0;
}

.checkout-legal a {
  color: var(--accent);
  font-size: inherit;
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .checkout-legal a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
  }
}

.saved-payment-card-block {
  margin: 10px 0 0;
}

.saved-payment-card-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-payment-card-toggle__text {
  min-width: 0;
  flex: 1 1 auto;
}

.saved-payment-card-toggle__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.saved-payment-card-toggle__hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.saved-payment-card-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 28px;
  flex: 0 0 auto;
}

.saved-payment-card-switch__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.saved-payment-card-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d6ded9;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.saved-payment-card-switch__slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(21, 32, 27, 0.18);
}

.saved-payment-card-switch__input:checked + .saved-payment-card-switch__slider {
  background: var(--accent);
}

.saved-payment-card-switch__input:checked + .saved-payment-card-switch__slider::before {
  transform: translateX(18px);
}

.saved-payment-consent-row {
  margin-top: 10px;
}

.saved-payment-consent-row[hidden],
.saved-payment-consent-error[hidden] {
  display: none !important;
}

.saved-payment-consent-row__label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.saved-payment-consent-row__label input {
  margin-top: 2px;
  flex-shrink: 0;
}

.saved-payment-consent__text p {
  margin: 0;
}

.saved-payment-consent__text a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .saved-payment-consent__text a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
  }
}

.saved-payment-consent-error {
  margin: 6px 0 0 28px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--danger);
}

.modal.modal--payment-help {
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding:
    max(12px, env(safe-area-inset-top, 12px))
    12px
    max(12px, env(safe-area-inset-bottom, 12px));
  max-height: 100dvh;
  overflow: hidden;
  box-sizing: border-box;
}

.modal.modal--payment-help .modal__overlay {
  position: fixed;
  background: rgba(10, 19, 15, 0.42);
}

.modal__panel--payment-help {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  margin: 0;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom, 16px));
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-help-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.payment-help-modal__body {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.payment-help-modal__body p {
  margin: 0;
}

.payment-help-modal__body p + p {
  margin-top: 8px;
}

.payment-help-modal__close {
  margin-top: 2px;
  min-height: 48px;
  font-size: 15px;
  border-radius: 14px;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 92px;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff;
  background: var(--danger);
  text-align: center;
  z-index: 30;
  font-weight: 700;
}

.toast.toast--success {
  background: linear-gradient(175deg, #0d9488 0%, #047857 55%, #065f46 100%);
  box-shadow: 0 6px 20px rgba(5, 80, 60, 0.35);
}

/* Только для ?debugScanner=1 — панели по умолчанию [hidden] */
.vida1d-selftest-banner {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 124px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: #fff;
  background: rgba(180, 83, 9, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.28);
  z-index: 39;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.vida1d-debug-panel {
  position: fixed;
  left: max(8px, env(safe-area-inset-left, 8px));
  right: max(8px, env(safe-area-inset-right, 8px));
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  max-width: 100%;
  max-height: 32vh;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #e4e4e7;
  background: rgba(15, 15, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 39;
  -webkit-overflow-scrolling: touch;
}

.vida1d-debug-panel .vida1d-debug-row {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  gap: 6px 8px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.vida1d-debug-panel .vida1d-debug-row:last-child {
  border-bottom: none;
}

.vida1d-debug-panel .vida1d-debug-k {
  color: #a1a1aa;
  word-break: break-word;
}

.vida1d-debug-panel .vida1d-debug-v {
  color: #fafafa;
  word-break: break-word;
}

.success-card {
  width: 100%;
  padding: 24px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.success-icon {
  font-size: 44px;
  margin-bottom: 8px;
}

.success-card h1 {
  margin: 0 0 16px;
  font-size: 26px;
}

.success-items {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border-radius: 18px;
  background: #f8faf9;
  border: 1px solid var(--line);
  text-align: left;
}

.success-total {
  margin: 18px 0 10px;
  font-size: 30px;
  font-weight: 900;
}

.success-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
}

.pickup-callout {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #e7f6ef;
  border: 1px solid #b9e3cf;
  color: #085f45;
  font-weight: 900;
}

.thanks {
  margin: 18px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.secondary-link-button {
  display: block;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #edf0ee;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  text-align: center;
}

.buy-more {
  margin-top: 16px;
  text-decoration: none;

  display: flex;              /* 👈 ключ */
  align-items: center;        /* вертикально */
  justify-content: center;    /* горизонтально */

  text-align: center;         /* на всякий случай */
}

/* -----------------------
   Admin layout helpers
   ----------------------- */
.admin-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.admin-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}
@media (max-width: 860px) { .admin-form-grid { grid-template-columns: 1fr; } }
.admin-form-grid label { display: block; }
.admin-form-grid input[type="text"],
.admin-form-grid input[type="number"],
.admin-form-grid select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d6ded9;
}
.admin-checkbox { display:flex; gap: 8px; align-items: center; padding-top: 6px; }
.admin-form-actions { display:flex; justify-content: flex-end; }

.admin-filter-tabs { display:flex; gap: 10px; flex-wrap: wrap; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
  color: var(--text);
}
.admin-tab.active { background: #eef8f2; border-color: #9dcfb5; color: #0d5c2e; }

.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { border-bottom: 1px solid #d6ded9; padding: 10px 8px; text-align: left; font-size: 14px; vertical-align: middle; }
.admin-table td.admin-table-actions { white-space: nowrap; }

.admin-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.admin-action-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  text-decoration: none;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.admin-action-btn--secondary { background: #f4f6f5; }
.admin-action-btn.active,
.admin-action-btn--secondary.active,
.admin-action-btn[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(8, 127, 91, 0.25);
}
.admin-action-btn.active:hover,
.admin-action-btn--secondary.active:hover,
.admin-action-btn[aria-current="page"]:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

button.admin-action-btn,
input.admin-action-btn[type="submit"] {
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
button.admin-action-btn.auth-submit-btn,
input.admin-action-btn.auth-submit-btn[type="submit"] {
  width: auto;
  max-width: 100%;
}
.admin-action-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(8, 127, 91, 0.2);
}
.admin-action-btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.admin-action-btn--danger {
  background: #fff5f5;
  border-color: #e8b4b4;
  color: #7a1c1c;
}

.admin-flash {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.admin-flash--ok {
  background: #eef4f0;
  border: 1px solid #9dcfb5;
  color: #2d5a3d;
}
.admin-flash--err {
  background: #fff3f3;
  border: 1px solid #f0caca;
  color: #7a1c1c;
}
.admin-flash--warn {
  background: #fff7e6;
  border: 1px solid #f0d7a1;
  color: #5e4210;
}

.profile-status-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid;
}
.profile-status-banner__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.profile-status-banner__icon-svg {
  width: 22px;
  height: 22px;
  display: block;
}
.profile-status-banner__icon-svg--check {
  width: 24px;
  height: 24px;
}
.profile-status-banner__icon-svg--alert {
  width: 28px;
  height: 28px;
}
.profile-status-banner__body {
  flex: 1 1 auto;
  min-width: 0;
}
.profile-status-banner__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.profile-status-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #243328;
}
.profile-status-banner__text + .profile-status-banner__text {
  margin-top: 4px;
}
.profile-status-banner__text--emphasis {
  font-weight: 700;
}
.profile-status-banner--ok {
  background: #f1faf4;
  border-color: #b9e0c6;
}
.profile-status-banner--ok .profile-status-banner__icon {
  background: #2fa866;
}
.profile-status-banner--ok .profile-status-banner__title {
  color: #1f7a45;
}
.profile-status-banner--warn {
  background: #fff5f5;
  border-color: #f0c8c8;
}
.profile-status-banner--warn .profile-status-banner__icon {
  background: #e53935;
}
.profile-status-banner--warn .profile-status-banner__title {
  color: #c62828;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-top: 16px;
}
.admin-back {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  text-decoration: none;
  color: var(--accent);
}
.admin-back:hover { color: var(--accent-dark); }
.admin-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.admin-section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
}
.admin-section-title--lg {
  font-size: 18px;
  margin-top: 0;
}

.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
  margin-top: 16px;
}
.admin-filter-bar label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.admin-filter-bar input[type="search"],
.admin-filter-bar input[type="text"],
.admin-filter-bar input[type="email"],
.admin-filter-bar select {
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-sizing: border-box;
  font: inherit;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.admin-stat-tile {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(17, 38, 30, 0.04);
}
.admin-stat-tile strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.1;
}

.admin-form-stack label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 12px;
}
.admin-form-stack label:first-child { margin-top: 0; }
.admin-form-stack input[type="text"],
.admin-form-stack input[type="email"],
.admin-form-stack input[type="password"],
.admin-form-stack input[type="number"],
.admin-form-stack input[type="search"],
.admin-form-stack select,
.admin-form-stack textarea {
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
}
.admin-form-stack input[readonly] {
  background: #f4f6f5;
  color: var(--muted);
}
.admin-form-stack .admin-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  margin-top: 12px;
}
.admin-form-stack .admin-checkbox input { width: auto; max-width: none; }
.admin-form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.admin-subcard {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfa;
}
.admin-subcard:first-child { margin-top: 0; }

.admin-fieldset {
  margin-top: 16px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbfa;
}
.admin-fieldset legend {
  font-weight: 800;
  padding: 0 8px;
  font-size: 14px;
}

.admin-feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.admin-feat-cell {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.admin-feat-cell code {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}
.admin-feat-cell--on {
  border-color: #b8dcc8;
  background: #f4fbf7;
}
.admin-feat-cell__desc {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

.admin-role-intro {
  margin-bottom: 0;
}
.admin-role-intro .admin-section-title {
  margin-top: 0;
}
.admin-field-hint {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.admin-field-error {
  margin: 4px 0 0;
  font-size: 13px;
  color: #7a1c1c;
  line-height: 1.4;
  font-weight: 600;
}
.admin-role-feature-group {
  margin-top: 20px;
  padding-top: 4px;
}
.admin-role-feature-group__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #3d4a42;
}
.admin-role-submit-btn {
  margin-top: 20px;
  max-width: 280px;
}
.admin-role-secondary-action {
  margin-top: 12px;
}
.admin-role-secondary-btn,
.admin-role-danger-btn {
  width: auto;
  max-width: 320px;
}
.admin-role-danger-btn {
  background: #fff5f5;
  border-color: #e8b4b4;
  color: #7a1c1c;
}
.admin-role-danger-btn:disabled,
.admin-role-danger-btn.is-loading {
  background: #f8ecec;
  color: #9a6a6a;
}
.admin-role-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.admin-role-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-role-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.admin-role-legend__swatch--on { background: #f4fbf7; border-color: #b8dcc8; }
.admin-role-legend__swatch--off { background: #f4f6f5; }
.admin-role-legend__swatch--readonly { background: #eef4f0; border-color: #c5d9cc; }

.admin-kv-table th {
  width: 34%;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.admin-login-page .card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  max-width: 420px;
  box-shadow: var(--shadow);
}
.admin-login-page label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 10px;
}
.admin-login-page input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-sizing: border-box;
  font: inherit;
}
.admin-login-page button[type="submit"] {
  margin-top: 14px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.admin-login-page button[type="submit"]:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.status-badge {
  display:inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.status-badge--active { background:#e8f7ef; color:#0d5c2e; }
.status-badge--inactive { background:#fff0f0; color:#8a1c1c; }
.status-badge--warn { background:#fff9e8; color:#7a5a00; }
.status-badge--err { background:#fff0f0; color:#7a1c1c; font-weight:700; }
.status-badge--system { background:#eef4f0; color:#2d5a3d; font-size:11px; }
.status-badge--neutral { background:#eef1f3; color:#4b5a52; }

/* RBAC permission matrix (admin role form) */
.admin-perm-matrix { margin-top: 16px; }
.admin-perm-feature {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-perm-feature--off h3 { color: var(--muted); }
.admin-perm-feature__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.admin-perm-feature__head .admin-section-title {
  margin: 0;
}
.admin-perm-feature__hint {
  margin: 4px 0 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #647067;
  max-width: 720px;
}
.admin-perm-feature__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-perm-feature__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: #f4f6f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}
.admin-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}
.admin-perm-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.admin-perm-cell__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.admin-perm-cell__row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}
.admin-perm-cell--disabled { opacity: 0.65; background: #f4f6f5; }
.admin-perm-cell--readonly { background: #eef4f0; cursor: default; }
.admin-perm-cell--on { border-color: #b8dcc8; background: #f8fcf9; }
.admin-perm-cell__label { font-weight: 600; line-height: 1.35; }
.admin-perm-cell__hint {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: #647067;
  font-weight: 400;
  padding-left: 22px;
}
.admin-perm-badge-off {
  font-size: 11px;
  color: #6b4e16;
  background: #fff6e6;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  font-weight: 700;
}

.category-section { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #d6ded9; }
.category-section__header { display:flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.category-section__count { font-size: 12px; font-weight: 800; color: #647067; background: #f4f6f5; border: 1px solid #e2eae5; border-radius: 999px; padding: 2px 8px; }
.category-products-table table { margin-top: 0; }

.scanner-1d-video-wrap {
  position: relative;
}

.scanner-1d-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/**
 * Рамка только UI (не zxing).
 * Fallback % — пока модалка скрыта, у video часто cw/ch=0; первый layoutRoi мог «очистить» inline
 * и без fallback рамка схлопывалась до внутренней линии (узкая полоса). Inline из JS переопределит это.
 */
.scanner-1d-overlay .scanner-1d-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92%, calc(100% - 24px));
  max-width: calc(100% - 16px);
  height: auto;
  max-height: 34%;
  aspect-ratio: 3.85 / 1;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.14s ease-out;
  border: 2px solid rgba(52, 211, 153, 0.92);
  border-radius: min(12px, 18%);
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(16, 185, 129, 0.3);
  animation: scanner-1d-pulse 2.4s ease-in-out infinite;
}

.scanner-1d-overlay .scanner-1d-frame.scanner-1d-frame--visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .scanner-1d-overlay .scanner-1d-frame {
    transition-duration: 0.01ms;
  }
}

@keyframes scanner-1d-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 9999px rgba(0, 0, 0, 0.4),
      0 0 12px rgba(16, 185, 129, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 9999px rgba(0, 0, 0, 0.4),
      0 0 22px rgba(52, 211, 153, 0.45);
  }
}

.scanner-1d-frame-line {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.95), transparent);
  transform: translateY(-50%);
  opacity: 0.9;
}

.scanner-1d-controls {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  margin-top: 0;
  display: grid;
  gap: 10px;
}

.scanner-1d-actions {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.scanner-actions {
  position: relative;
  z-index: 10;
}

.scanner-1d-error {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 10px 12px;
}

/* Active barcode pipeline badge (ZXING-WASM vs legacy diagnostics) */
.scanner-pipeline-badge {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 12px));
  right: max(10px, env(safe-area-inset-right, 12px));
  z-index: 46;
  max-width: min(90vw, 220px);
  padding: 5px 10px;
  border-radius: 8px;
  font: 700 11px / 1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
  color: #ecfdf5;
  background: rgba(6, 78, 59, 0.78);
  border: 1px solid rgba(167, 243, 208, 0.6);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  text-align: right;
}

.page--help {
  padding-bottom: 28px;
}

/* «Оставить обращение» — заметная вторичная CTA (не зелёная, не красная). */
.help-cta-feedback {
  display: block;
  width: 100%;
  min-height: 54px;
  box-sizing: border-box;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: #0b2d5c;
  background: linear-gradient(180deg, #f3f8ff 0%, #e5eefc 100%);
  border: 2px solid #2563eb;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
}

.help-cta-feedback:active {
  transform: scale(0.99);
}

.help-cta-feedback:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.help-card__storefront-link.pay-button {
  margin-top: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.help-card {
  margin-top: 14px;
  padding: 16px 16px 18px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.help-card__body p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.45;
}

.help-card__body p:last-child {
  margin-bottom: 0;
}

.help-card__placeholder {
  margin: 0;
}

.help-card__subhead {
  margin: 18px 0 8px;
  font-size: 16px;
}

.help-card__cta {
  width: 100%;
  margin-top: 18px;
}

.help-open-refunds {
  margin: 18px 0 4px;
  padding: 14px 14px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.help-open-refunds__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.help-open-refunds__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.help-open-refunds__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.help-open-refunds__item {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.help-open-refunds__item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.help-open-refunds__item-status {
  font-size: 12px;
  font-weight: 800;
  color: #087f5b;
  white-space: nowrap;
}

.help-open-refunds__item-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.help-open-refunds__item-purchase {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.help-open-refunds__item-reason {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.help-refund-detail {
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.help-refund-detail__row {
  margin: 0;
}

.help-refund-detail__row dt {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.help-refund-detail__row dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.help-card__fineprint {
  margin: 10px 0 0;
  font-size: 12px;
  text-align: center;
}

.help-card__body--md {
  font-size: 15px;
  line-height: 1.45;
}

.help-md {
  margin: 0;
}

.help-md > :first-child {
  margin-top: 0;
}

.help-md > :last-child {
  margin-bottom: 0;
}

.help-md h1,
.help-md h2,
.help-md h3,
.help-md h4 {
  margin: 14px 0 8px;
  line-height: 1.25;
  font-size: 1.05rem;
}

.help-md h1:first-child,
.help-md h2:first-child {
  margin-top: 0;
}

.help-md p {
  margin: 0 0 10px;
}

.help-md ul,
.help-md ol {
  margin: 0 0 10px;
  padding-left: 1.35em;
}

.help-md a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-md code {
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(8, 127, 91, 0.09);
}

.help-md pre {
  margin: 0 0 10px;
  padding: 10px 12px;
  overflow-x: auto;
  border-radius: 12px;
  background: #f0f4f2;
  font-size: 13px;
}

.help-md--local {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(100, 112, 103, 0.45);
}

.admin-field-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.admin-field-tip__btn {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #c5d0ca;
  border-radius: 50%;
  background: #fff;
  color: #647067;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}
.admin-field-tip__btn:hover,
.admin-field-tip__btn:focus-visible {
  border-color: #7ab893;
  color: #145c48;
  outline: none;
  box-shadow: 0 0 0 2px rgba(122, 184, 147, 0.35);
}
.admin-field-tip__popup {
  display: none;
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(22rem, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 10px 24px rgba(17, 38, 30, 0.12);
  pointer-events: none;
}
.admin-field-tip__popup.is-open {
  display: block;
}
.admin-field-tip__popup ul {
  margin: 6px 0 0;
  padding-left: 1.1rem;
}
.admin-field-tip__popup li {
  margin: 2px 0;
}

@media (max-width: 380px) {
  .product-card {
    grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
  }

  .product-card__image--placeholder {
    width: 104px;
  }

  .qty__btn {
    width: 38px;
    height: 38px;
  }
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  transform: translateY(calc(100% + 12px));
  visibility: hidden;
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.38s;
}

.cookie-banner--visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: opacity 0.15s ease;
    transform: none;
  }

  .cookie-banner--visible {
    transition: opacity 0.15s ease;
  }
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__card {
  pointer-events: auto;
  width: 100%;
  max-width: 420px;
  max-height: min(25vh, calc(100dvh - 72px));
  margin: 0 auto;
  padding: 12px 14px;
  background: var(--card, #fff);
  border-radius: 14px;
  border: 1px solid rgba(21, 32, 27, 0.08);
  box-shadow:
    0 10px 24px rgba(21, 32, 27, 0.12),
    0 1px 4px rgba(21, 32, 27, 0.05);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cookie-banner__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text, #15201b);
}

.cookie-banner__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted, #647067);
}

.cookie-banner__body p {
  margin: 0;
}

.cookie-banner__body p + p {
  margin-top: 8px;
}

.cookie-banner__links {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.cookie-banner__links p {
  margin: 0;
}

.cookie-banner__links a {
  color: var(--accent, #087f5b);
  text-decoration: none;
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .cookie-banner__links a:hover {
    color: var(--accent-dark, #066548);
    text-decoration: underline;
  }
}

.cookie-banner__accept.pay-button {
  margin-top: 2px;
  min-height: 48px;
  font-size: 15px;
  border-radius: 14px;
}

.cookie-banner__accept.pay-button:disabled {
  opacity: 0.85;
}

@media (min-width: 520px) {
  .cookie-banner {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .cookie-banner__card {
    max-height: min(220px, 25vh);
    padding: 14px 16px;
    gap: 10px;
  }

  .cookie-banner__title {
    font-size: 16px;
  }

  .cookie-banner__body,
  .cookie-banner__links {
    font-size: 14px;
  }
}

/* --- Storefront customer profile modal --- */

.modal--customer-profile [hidden] {
  display: none !important;
}

.customer-profile-panel[data-view="loading"] [data-profile-screen]:not([data-profile-screen="loading"]),
.customer-profile-panel[data-view="error"] [data-profile-screen]:not([data-profile-screen="error"]),
.customer-profile-panel[data-view="offline"] [data-profile-screen]:not([data-profile-screen="offline"]),
.customer-profile-panel[data-view="login-email"] [data-profile-screen]:not([data-profile-screen="login-email"]),
.customer-profile-panel[data-view="login-code"] [data-profile-screen]:not([data-profile-screen="login-code"]),
.customer-profile-panel[data-view="main"] [data-profile-screen]:not([data-profile-screen="main"]),
.customer-profile-panel[data-view="account"] [data-profile-screen]:not([data-profile-screen="account"]),
.customer-profile-panel[data-view="account-edit-name"] [data-profile-screen]:not([data-profile-screen="account-edit-name"]),
.customer-profile-panel[data-view="account-edit-phone"] [data-profile-screen]:not([data-profile-screen="account-edit-phone"]),
.customer-profile-panel[data-view="purchases"] [data-profile-screen]:not([data-profile-screen="purchases"]),
.customer-profile-panel[data-view="stores"] [data-profile-screen]:not([data-profile-screen="stores"]),
.customer-profile-panel[data-view="obedru-cards"] [data-profile-screen]:not([data-profile-screen="obedru-cards"]),
.customer-profile-panel[data-view="obedru-add"] [data-profile-screen]:not([data-profile-screen="obedru-add"]),
.customer-profile-panel[data-view="change-email-email"] [data-profile-screen]:not([data-profile-screen="change-email-email"]),
.customer-profile-panel[data-view="change-email-code"] [data-profile-screen]:not([data-profile-screen="change-email-code"]) {
  display: none !important;
}

.customer-profile-panel[data-view="login-email"] #customerProfileLogin,
.customer-profile-panel[data-view="login-code"] #customerProfileLogin {
  display: block;
}

.customer-profile-panel[data-view="loading"] .customer-profile-footer,
.customer-profile-panel[data-view="error"] .customer-profile-footer,
.customer-profile-panel[data-view="offline"] .customer-profile-footer {
  display: none !important;
}

.modal--customer-profile .customer-profile-panel {
  width: min(480px, 100%);
}

.customer-profile-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.customer-profile-header__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
}

.customer-profile-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #f0f4f2;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.customer-profile-back[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.customer-profile-back:active {
  opacity: 0.85;
}

.customer-profile-header__spacer {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.customer-profile-scroll {
  padding-top: 16px;
}

.customer-profile-state {
  padding: 28px 0 20px;
  text-align: center;
}

.customer-profile-state--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.customer-profile-state__icon {
  font-size: 28px;
  line-height: 1;
}

.customer-profile-state__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.customer-profile-state__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 28ch;
}

.customer-profile-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(8, 127, 91, 0.16);
  border-top-color: var(--accent, #087f5b);
  border-radius: 50%;
  animation: vida-spin-wait 0.9s linear infinite;
}

.customer-profile-spinner--small {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

.customer-profile-retry-btn {
  margin-top: 8px;
  min-width: 140px;
}

.customer-profile-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.customer-profile-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.customer-profile-message {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  background: #edf5f1;
  color: #2f4a3d;
}

.customer-profile-message--error {
  background: #fff0f0;
  color: #b42318;
}

.customer-profile-otp-input {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-align: center;
}

.customer-profile-text-btn {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #087f5b);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.customer-profile-text-btn:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.customer-profile-login-consent {
  margin-top: 14px;
}

.customer-profile-login-consent .consent-block__row {
  align-items: flex-start;
}

.customer-profile-login-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}

.customer-profile-identity {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f3faf7 0%, #eef6f2 100%);
  border: 1px solid rgba(8, 127, 91, 0.14);
}

.customer-profile-identity__avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(17, 38, 30, 0.06);
}

.customer-profile-identity__label {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.customer-profile-identity__email {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
}

.customer-profile-edit-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #087f5b);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.customer-profile-edit-email__icon {
  font-size: 14px;
}

.customer-profile-lead--compact {
  margin-bottom: 12px;
}

.customer-profile-nav {
  margin-top: 18px;
}

.customer-profile-menu__item--action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fafcfb;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  font: inherit;
  color: inherit;
}

.customer-profile-menu__item--action:active {
  background: #f2f7f4;
}

.customer-profile-menu__item--action .customer-profile-menu__icon {
  align-self: flex-start;
  margin-top: 1px;
}

.customer-profile-menu__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.customer-profile-menu__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.customer-profile-menu__subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.customer-profile-menu__chevron {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
}

.customer-profile-account-actions {
  margin: 18px 0 8px;
  text-align: center;
}

.customer-profile-logout-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  touch-action: manipulation;
}

.customer-profile-logout-link:active {
  opacity: 0.8;
}

.customer-profile-logout-link.is-loading,
.customer-profile-logout-link:disabled {
  opacity: 0.6;
  cursor: default;
}

.customer-profile-purchases-screen {
  padding-bottom: 8px;
}

.customer-profile-account-screen {
  padding-bottom: 12px;
}

.customer-profile-settings {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #fafcfb;
}

.customer-profile-settings__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.customer-profile-settings__item:last-child .customer-profile-settings__row {
  border-bottom: none;
}

.customer-profile-settings__content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.customer-profile-settings__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}

.customer-profile-settings__value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.customer-profile-settings__value--empty,
.customer-profile-settings__value--add {
  color: var(--muted);
  font-weight: 600;
}

.customer-profile-settings__edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #f0f4f2;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.customer-profile-settings__edit-btn:active {
  opacity: 0.85;
}

.customer-profile-edit-screen {
  padding-bottom: 12px;
}

.customer-profile-account-field {
  margin-bottom: 18px;
}

.customer-profile-account-field:last-of-type {
  margin-bottom: 8px;
}

.customer-profile-account-value {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.customer-profile-account-value--empty {
  color: var(--muted);
  font-weight: 600;
}

.customer-profile-account-save {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}

.customer-profile-section {
  margin-bottom: 18px;
}

.customer-profile-section__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.customer-profile-section--future .customer-profile-section__title {
  color: var(--muted);
}

.customer-profile-inline-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
}

.customer-profile-purchases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-profile-purchase {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
}

.customer-profile-purchase__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.customer-profile-purchase__id {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.customer-profile-purchase__total {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-dark, #087f5b);
  white-space: nowrap;
}

.customer-profile-purchase__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.customer-profile-purchase__items {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.customer-profile-stores {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-profile-store {
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
}

.customer-profile-store--unavailable {
  opacity: 0.55;
}

.customer-profile-store__head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.customer-profile-store__icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.customer-profile-store__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.customer-profile-store__address {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.customer-profile-store__stats {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.customer-profile-store__visit {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.customer-profile-store__actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 28px;
}

.customer-profile-store__here {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark, #087f5b);
}

.customer-profile-store__unavailable {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.customer-profile-store__go {
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark, #087f5b);
  cursor: pointer;
}

.customer-profile-store__go:disabled {
  opacity: 0.6;
  cursor: default;
}

.customer-profile-empty {
  padding: 20px 14px;
  text-align: center;
  border-radius: 14px;
  border: 1px dashed rgba(8, 127, 91, 0.22);
  background: #f9fcfb;
}

.customer-profile-empty__icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
}

.customer-profile-empty__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}

.customer-profile-empty__text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.customer-profile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.customer-profile-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: #fafcfb;
  border-bottom: 1px solid var(--line);
}

.customer-profile-menu li:last-child .customer-profile-menu__item {
  border-bottom: none;
}

.customer-profile-menu__icon {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.customer-profile-menu__badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: lowercase;
  background: #eef1f3;
  color: #647067;
}

.customer-profile-change-email {
  padding-bottom: 12px;
}

.customer-profile-footer__block,
.customer-profile-footer__actions {
  width: 100%;
}

.customer-profile-footer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.customer-profile-footer__actions .secondary-button,
.customer-profile-footer__actions .pay-button {
  width: 100%;
  min-height: 48px;
  margin-top: 0;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customer-profile-footer__actions .pay-button {
  box-shadow: none;
}

.customer-profile-footer__secondary {
  width: 100%;
  min-height: 48px;
}

.customer-profile-footer__primary {
  width: 100%;
  margin-top: 0;
}

.customer-profile-panel[data-view="change-email-email"] .customer-profile-footer__actions,
.customer-profile-panel[data-view="change-email-code"] .customer-profile-footer__actions {
  display: grid;
}

@media (max-width: 359px) {
  .customer-profile-footer__actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 600px) {
  .modal--customer-profile {
    justify-content: center;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
  }

  .modal--customer-profile .customer-profile-panel {
    border-radius: 20px;
    max-height: min(88dvh, 720px);
  }
}

.checkout-obedru-qr {
  display: flex;
  justify-content: center;
  margin: 12px 0 8px;
}

.checkout-obedru-qr svg {
  max-width: 220px;
  height: auto;
}

.checkout-modal__waiting-status {
  text-align: center;
  margin-top: 8px;
}

/* Obed.ru admin: secret clear + point toggle */
.admin-secret-field-row {
  display: block;
  margin-top: 12px;
}
.admin-secret-field-row:first-child {
  margin-top: 0;
}
.admin-secret-field-row__label-text {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.admin-secret-field-row__control {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
}
.admin-secret-field-row__control input[type="password"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line, #d6ded9);
  font: inherit;
}
.admin-secret-clear-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line, #d6ded9);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.admin-secret-clear-btn:hover {
  background: #f4f6f5;
}
.admin-secret-clear-btn.is-active {
  background: #fff3e6;
  border-color: #e8b86d;
}
.admin-toggle-switch-wrap {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 28px;
  flex: 0 0 auto;
}
.admin-toggle-switch__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.admin-toggle-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d6ded9;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.admin-toggle-switch__slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(21, 32, 27, 0.18);
}
.admin-toggle-switch__input:checked + .admin-toggle-switch__slider {
  background: var(--accent, #1a6b3c);
}
.admin-toggle-switch__input:checked + .admin-toggle-switch__slider::before {
  transform: translateX(18px);
}
.obedru-fridge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.obedru-fridge-head__label {
  font-size: 14px;
  font-weight: 600;
}
.obedru-fridge-settings-panel.is-collapsed,
.obedru-fridge-enable-hint.is-collapsed {
  display: none;
}
.obedru-fridge-enable-hint {
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--muted, #647067);
  max-width: 640px;
}
.obedru-fridge-save-row {
  margin-top: 20px;
}

/* Merchant profile — document flow / EDO */
.edo-connection-panel {
  margin-top: 16px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf9;
}
.edo-connection-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.edo-connection-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.edo-connection-panel__alert {
  margin: 0 0 12px;
}
.edo-pending-instructions {
  margin-top: 4px;
}
.edo-pending-instructions__text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #3d4a42;
}
.edo-counterparty-card {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.edo-counterparty-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 14px;
}
.edo-counterparty-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.edo-counterparty-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.edo-kv {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.edo-kv--full,
.edo-kv--wide {
  grid-column: 1 / -1;
}
.edo-kv__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #647067;
}
.edo-kv__value {
  font-size: 14px;
  line-height: 1.45;
  color: #1f2a24;
  word-break: break-word;
}
.edo-kv__control {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #1f2a24;
}
.edo-kv__control:focus {
  outline: none;
  border-color: #3d8f67;
  box-shadow: 0 0 0 3px rgba(61, 143, 103, 0.15);
}
.edo-kv__control--textarea {
  min-height: 88px;
  max-width: 100%;
  resize: vertical;
}
.edo-kv__hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #647067;
}
.edo-kv__row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.edo-kv__row-inline .edo-kv__control {
  flex: 1 1 140px;
  min-width: 0;
}
.edo-profile-panel-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.edo-profile-panel-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.edo-profile-panel-section__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #4b5a52;
}
.edo-copy-field {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
  min-width: 0;
}
.edo-copy-field__value {
  flex: 1 1 200px;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f6f4;
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.edo-mode-form--secondary {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.edo-mode-form__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #4b5a52;
}
.edo-docflow-save-row {
  margin-top: 12px;
}
.edo-mode-form--hidden {
  display: none;
}
.edo-inn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.edo-inn-row .edo-kv__control {
  flex: 1 1 220px;
}
.edo-inn-row .js-edo-inn-save {
  flex: 0 0 auto;
  min-width: 44px;
}
@media (max-width: 640px) {
  .edo-counterparty-card__grid {
    grid-template-columns: 1fr;
  }
}

