/* ---------------------------------------------------------------------------
   Design tokens — mirrors landing-farm-shop/src/styles.css (@theme).
   The legacy aliases below (--bg, --text, --button, …) are what every rule in
   this file uses, so the whole Mini App theme flips here.
   --------------------------------------------------------------------------- */
:root {
  --color-bg: #070b14;
  --color-surface: #10182a;
  --color-elevated: #161f35;
  --color-fg: #f4f6fb;
  --color-muted: #9aa3b8;
  --color-primary: #9b7dff;
  --color-primary-deep: #6d4dff;
  --color-lilac: #c4b5fd;
  --color-border: #2a3350;
  --color-ok: #7ee0c4;
  --color-warn: #fbbf24;
  --color-danger: #e5484d;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-primary: 0 8px 24px rgba(109, 77, 255, 0.35);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Legacy aliases. */
  --bg: var(--color-bg);
  --secondary-bg: var(--color-surface);
  --section-bg: var(--color-surface);
  --text: var(--color-fg);
  --hint: var(--color-muted);
  --link: var(--color-primary);
  --button: var(--color-primary);
  --button-text: #ffffff;
  --destructive: var(--color-danger);
  --accent: var(--color-primary);
  --accent-soft: rgba(155, 125, 255, 0.14);
  --border: var(--color-border);
  --radius: var(--radius-md);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

[hidden] { display: none !important; }

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------------
   Background glow (landing `.orb`) — content sits above it.
   --------------------------------------------------------------------------- */
.app-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  width: 38rem;
  height: 38rem;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.28;
}
.orb-a { left: -12rem; top: -14rem; background: var(--color-primary-deep); }
.orb-b { right: -14rem; top: 38%; background: var(--color-elevated); }

.app-header, .hero, .tabs, .filters, .content { position: relative; z-index: 1; }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-text { min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-deep));
  box-shadow: var(--shadow-primary);
  font-size: 20px;
  flex: 0 0 auto;
}
.brand-wordmark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand-wordmark .accent { color: var(--color-primary); }
.greeting {
  font-size: 12px;
  color: var(--hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}
.cart-btn:active { background: var(--color-elevated); }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: var(--shadow-primary);
}

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.hero { padding: 20px 16px 4px; }
.hero-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-lilac);
  text-transform: uppercase;
}
.hero-title {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.hero-title .accent { color: var(--color-primary); }
.hero-sub { margin-top: 8px; font-size: 14px; color: var(--hint); }

/* ---------------------------------------------------------------------------
   Tabs & filters
   --------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  margin: 16px 16px 0;
  padding: 4px;
  background: var(--color-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.tab {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--hint);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tab.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.filters[hidden] { display: none; }
.filters::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--hint);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.filter-chip.active {
  border-color: var(--color-primary);
  background: var(--color-elevated);
  color: var(--text);
}

.content { flex: 1; padding: 0 16px 24px; overflow-y: auto; }

.view { display: none; }
.view.active { display: block; }

/* ---------------------------------------------------------------------------
   Product grid
   --------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  position: relative;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.1s ease;
}
.product-card:hover { border-color: var(--color-primary); }
.product-card:active { transform: scale(0.98); }
.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--border);
  margin-bottom: 4px;
}
.product-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.product-meta { font-size: 12px; color: var(--hint); }
.product-stock { font-size: 12px; color: var(--color-ok); }
.product-stock.out { color: var(--hint); }
.product-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.product-price {
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.price-rub { font-size: 15px; font-weight: 700; line-height: 1.2; }
.price-usd { font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--hint); }
.add-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 20px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
}
.add-btn.added {
  background: var(--color-primary-deep);
  font-size: 14px;
  font-weight: 700;
}

/* Появляется вместо `+`, когда товар уже в корзине. */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 40px;
  margin-top: 4px;
  padding: 0 4px;
  background: var(--color-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.stepper-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
}
.stepper-btn:active { background: var(--color-surface); }
.stepper-btn[data-action="inc"] { color: var(--color-primary); }
.stepper-count {
  font-size: 15px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.details-btn {
  margin-top: 4px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.details-btn:active { background: var(--color-elevated); }

/* ---------------------------------------------------------------------------
   Orders
   --------------------------------------------------------------------------- */
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  background: var(--color-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.order-id { font-size: 13px; font-weight: 700; }
.order-date { font-size: 12px; color: var(--hint); }
.order-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
  color: var(--text);
}
.order-total {
  text-align: right;
  font-weight: 700;
  margin-top: 8px;
  color: var(--text);
}
.cancel-btn {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.cancel-btn:active { background: var(--color-elevated); }
.empty-state {
  text-align: center;
  color: var(--hint);
  padding: 48px 16px;
  font-size: 14px;
}
.empty-state .emoji { font-size: 48px; display: block; margin-bottom: 12px; }

/* ---------------------------------------------------------------------------
   Product details page
   --------------------------------------------------------------------------- */
.detail-page {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: var(--bg);
  display: none;
  flex-direction: column;
  padding: calc(12px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  overflow-y: auto;
}
.detail-page.open { display: flex; }
.detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.detail-head h2 { font-size: 16px; font-weight: 700; color: var(--hint); }
.detail-body { display: flex; flex-direction: column; gap: 10px; }
.detail-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-lilac);
}
.detail-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--border);
}
.detail-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.detail-price { font-size: 20px; font-weight: 700; color: var(--text); }
.detail-usd { font-size: 14px; font-weight: 600; color: var(--hint); }
.detail-meta { font-size: 13px; color: var(--hint); }
.detail-meta .in-stock { color: var(--color-ok); }
.detail-meta .out-stock { color: var(--hint); }
.detail-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-line;
}
.detail-add { margin-top: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  font-size: 18px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}
.icon-btn:active { background: var(--color-elevated); }

/* ---------------------------------------------------------------------------
   Cart
   --------------------------------------------------------------------------- */
.cart-drawer { position: fixed; inset: 0; z-index: 20; visibility: hidden; }
.cart-drawer.open { visibility: visible; }
.cart-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 14, 0.7);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cart-drawer.open .cart-scrim { opacity: 1; }
.cart-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 16px calc(16px + var(--safe-bottom));
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.cart-drawer.open .cart-panel { transform: translateY(0); }
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cart-head h2 { font-size: 18px; font-weight: 700; }
.cart-items {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.cart-item-image {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-bg);
  flex: 0 0 auto;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; }
.cart-item-price { font-size: 12px; color: var(--hint); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.qty-btn:active { background: var(--color-surface); }
.qty-val {
  font-size: 14px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}
.cart-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.checkout-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
}
.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Toast / loading / empty
   --------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  z-index: 30;
  max-width: calc(100% - 32px);
  text-align: center;
}

.loading {
  text-align: center;
  color: var(--hint);
  padding: 48px 0;
  font-size: 14px;
}

/* ---------------------------------------------------------------------------
   Order status badges
   --------------------------------------------------------------------------- */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 6px 0;
}
.status-created { background: rgba(43, 95, 217, 0.18); border-color: rgba(43, 95, 217, 0.45); color: #8fb2ff; }
.status-payment_verification { background: rgba(109, 77, 255, 0.18); border-color: rgba(109, 77, 255, 0.5); color: var(--color-lilac); }
.status-preparing { background: rgba(251, 191, 36, 0.16); border-color: rgba(251, 191, 36, 0.45); color: var(--color-warn); }
.status-in_delivery { background: rgba(39, 97, 199, 0.18); border-color: rgba(39, 97, 199, 0.5); color: #8ab4ff; }
.status-ready_for_pickup { background: rgba(126, 224, 196, 0.16); border-color: rgba(126, 224, 196, 0.45); color: var(--color-ok); }
.status-completed { background: rgba(126, 224, 196, 0.22); border-color: rgba(126, 224, 196, 0.5); color: #9ff0d6; }
.status-paused { background: rgba(154, 163, 184, 0.16); border-color: rgba(154, 163, 184, 0.4); color: var(--color-muted); }
.status-declined { background: rgba(229, 72, 77, 0.18); border-color: rgba(229, 72, 77, 0.45); color: #ff9b9e; }

.order-reason {
  font-size: 12px;
  color: var(--hint);
  background: var(--color-elevated);
  border-radius: 8px;
  padding: 6px 8px;
  margin: 6px 0;
}

/* ---------------------------------------------------------------------------
   Payment details
   --------------------------------------------------------------------------- */
.payment-box {
  background: var(--color-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.payment-title {
  font-size: 13px;
  font-weight: 700;
}
.payment-wallet {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--color-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
  user-select: all;
}
.payment-hint {
  font-size: 12px;
  color: var(--hint);
}
.payment-input {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-mono);
  background: var(--color-bg);
  color: var(--text);
}
.payment-input:focus { outline: none; border-color: var(--color-primary); }
.payment-submit {
  height: 44px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.payment-submit:active { background: var(--color-primary-deep); }
.payment-tx {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
}

/* ---------------------------------------------------------------------------
   Admin panel markup lives in css/admin.css; these selectors are kept from the
   original stylesheet but are not loaded by admin.html/join.html.
   --------------------------------------------------------------------------- */
.sub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.sub-tab {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--hint);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.sub-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.admin-status-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.admin-status-filters::-webkit-scrollbar { display: none; }

.orders-desk { display: flex; flex-direction: column; gap: 12px; }

.admin-order-card { padding: 14px; }
.order-customer { font-size: 13px; color: var(--hint); margin-bottom: 4px; }

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.status-btn {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
}
.status-btn.advance { background: var(--color-ok); color: #06231b; }
.status-btn.pause { background: var(--color-warn); color: #2a1d00; }
.status-btn.decline { background: var(--color-danger); }
.status-btn.resume { background: var(--color-primary-deep); }

.add-product-btn {
  width: 100%;
  padding: 12px;
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 12px;
}
.admin-products { display: flex; flex-direction: column; gap: 10px; }
.admin-product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}
.admin-product-row.inactive { opacity: 0.5; }
.admin-product-emoji { font-size: 26px; }
.admin-product-info { flex: 1; min-width: 0; }
.admin-product-name { font-size: 14px; font-weight: 700; }
.admin-product-meta { font-size: 12px; color: var(--hint); }
.admin-product-actions { display: flex; gap: 6px; }
.mini-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Modals
   --------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal-scrim { position: absolute; inset: 0; background: rgba(3, 6, 14, 0.7); }
.modal-panel {
  position: relative;
  width: calc(100% - 32px);
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  z-index: 1;
}
.modal-panel h3 { font-size: 18px; margin-bottom: 14px; }
.modal-panel textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.modal-panel input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 10px;
}
.modal-panel input:focus,
.modal-panel textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.modal-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.modal-btn.primary { background: var(--color-primary); color: #fff; }
.modal-btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ---------------------------------------------------------------------------
   Focus & motion
   --------------------------------------------------------------------------- */
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   Payment method chooser (basket) and card payment block
   --------------------------------------------------------------------------- */
.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.pay-methods-title {
  width: 100%;
  font-size: 12px;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pay-method {
  flex: 1 1 0;
  min-width: 120px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--color-elevated);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.pay-method.active {
  border-color: var(--color-primary);
  background: var(--accent-soft);
  color: var(--color-lilac);
  box-shadow: var(--shadow-primary);
}
.pay-methods-hint,
.pay-methods-empty {
  width: 100%;
  font-size: 12px;
  color: var(--hint);
}
.pay-methods-empty {
  color: var(--color-warn);
}
.payment-card .payment-bank {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-lilac);
}
.detail-methods {
  margin-top: 4px;
  font-size: 13px;
  color: var(--hint);
}
