/* ============================================================
   NEON VIOLET THEME
   ============================================================ */
:root {
  --bg: #08060f;
  --bg-elev: #100c1a;
  --bg-card: #151022;
  --bg-hover: #1e1730;
  --bg-input: #0a0812;

  --text: #f4f1fb;
  --text-muted: #9187a8;
  --text-dim: #5c5470;

  --accent: #a855f7;
  --accent-2: #d946ef;
  --accent-3: #7c3aed;
  --accent-soft: rgba(168, 85, 247, 0.14);
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --accent-glow: 0 0 24px rgba(168, 85, 247, 0.55);

  --danger: #ff4d6d;
  --danger-soft: rgba(255, 77, 109, 0.14);
  --warn: #ffb648;
  --warn-soft: rgba(255, 182, 72, 0.14);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.14);

  --border: rgba(168, 85, 247, 0.1);
  --border-2: rgba(168, 85, 247, 0.22);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 8px 32px rgba(168, 85, 247, 0.4);
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Декоративное свечение на фоне */
body::before {
  content: "";
  position: fixed;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* На ПК центрируем контент в узкой «мобильной» колонке */
.app-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(200px + var(--tg-bottom-inset, 0px));
  position: relative;
  z-index: 1;
}

a { color: var(--accent); text-decoration: none; }

button {
  font-family: inherit; font-size: 15px;
  cursor: pointer; border: none; outline: none; color: inherit;
}
button:disabled { cursor: default; }

input, textarea, select { font-family: inherit; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 6, 15, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 14px 16px;
  padding-top: calc(14px + var(--tg-top-inset, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.header h1 {
  margin: 0; font-size: 19px; font-weight: 800;
  flex: 1; min-width: 0;
  letter-spacing: -0.3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.back-btn {
  background: var(--bg-elev); color: var(--text);
  font-size: 14px; padding: 8px 14px;
  border-radius: var(--r-full);
  white-space: nowrap; flex-shrink: 0;
  border: 1px solid var(--border);
  transition: background 0.15s;
}
.back-btn:active { background: var(--bg-hover); }

.cart-btn {
  position: relative;
  background: var(--bg-elev); color: var(--text);
  font-size: 18px; padding: 8px 12px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: background 0.15s;
}
.cart-btn:active { background: var(--bg-hover); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent-grad); color: #fff;
  font-size: 10px; border-radius: var(--r-full);
  padding: 2px 6px; min-width: 18px;
  text-align: center; font-weight: 800; line-height: 1.3;
  box-shadow: var(--accent-glow);
}

/* ============================================================
   CHIPS
   ============================================================ */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  padding: 14px 16px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  background: var(--bg-elev); color: var(--text);
  padding: 9px 16px; border-radius: var(--r-full);
  white-space: nowrap; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border);
  scroll-snap-align: start; flex-shrink: 0;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis;
  transition: all 0.15s;
}
.chip.active {
  background: var(--accent-grad); color: #fff;
  border-color: transparent;
  box-shadow: var(--accent-glow);
}

@media (min-width: 720px) {
  .chips {
    flex-wrap: wrap;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
    padding: 14px 16px;
    gap: 8px;
  }
  .chip {
    max-width: none;
    white-space: normal;
  }
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 0 16px 20px;
}
.product-card {
  background: var(--bg-card); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
}
.product-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-2);
}
.product-thumb {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-elev);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--text-dim); overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0;
}
.product-name {
  font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  font-size: 16px; font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.product-meta { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   EMPTY / SKELETON
   ============================================================ */
.empty { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty .empty-icon { font-size: 56px; margin-bottom: 14px; opacity: 0.5; }
.empty .empty-title { font-size: 16px; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.empty .empty-sub { font-size: 13px; color: var(--text-muted); }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-elev) 0%, var(--bg-hover) 50%, var(--bg-elev) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
}

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.gallery {
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1;
  background: var(--bg-elev);
  display: flex; align-items: center; justify-content: center;
  font-size: 90px; color: var(--text-dim);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.product-detail { padding: 18px 16px 0; }
.product-detail h2 {
  margin: 0 0 10px; font-size: 22px; font-weight: 800;
  letter-spacing: -0.4px;
}
.product-detail .description {
  color: var(--text-muted); font-size: 14px; margin-bottom: 20px;
  white-space: pre-wrap; line-height: 1.5;
}
.product-detail .variants-label {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  font-weight: 700; margin-bottom: 10px;
}
.variants { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.variant-btn {
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border);
  padding: 14px 16px; border-radius: var(--r);
  text-align: left;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  font-size: 15px; transition: all 0.15s;
}
.variant-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(168, 85, 247, 0.25);
}
.variant-btn .variant-name {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; min-width: 0; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.variant-btn .variant-stock {
  font-size: 12px; color: var(--text-muted); font-weight: 400;
}
.variant-btn .variant-price {
  color: var(--accent); font-weight: 800; font-size: 16px;
  flex-shrink: 0;
}

/* ============================================================
   BOTTOM ACTIONS
   ============================================================ */
.bottom-action {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  padding: 12px 16px calc(12px + var(--tg-bottom-inset, 0px) + env(safe-area-inset-bottom));
  background: rgba(8, 6, 15, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  z-index: 25;
}


.btn {
  flex: 1;
  background: var(--accent-grad); color: #fff;
  padding: 15px 22px; border-radius: var(--r);
  font-size: 16px; font-weight: 700;
  transition: transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-glow);
  letter-spacing: 0.2px;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:disabled {
  background: var(--bg-elev); color: var(--text-dim);
  box-shadow: none; transform: none;
}
.btn-secondary {
  background: var(--bg-elev); color: var(--text);
  padding: 14px 22px; border-radius: var(--r);
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--border);
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-danger {
  background: var(--danger-soft); color: var(--danger);
  padding: 14px 22px; border-radius: var(--r);
  font-size: 15px; font-weight: 600;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 110px; left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 14, 30, 0.98); color: #fff;
  padding: 12px 22px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 500;
  z-index: 100; animation: toastIn 2.2s ease;
  max-width: 90vw; text-align: center;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-glow);
}
@keyframes toastIn {
  0%   { opacity: 0; transform: translate(-50%, 20px); }
  15%  { opacity: 1; transform: translate(-50%, 0); }
  85%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: rgba(8, 6, 15, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 6px 0 calc(6px + var(--tg-bottom-inset, 0px) + env(safe-area-inset-bottom));
  z-index: 30;
}
.nav-btn {
  flex: 1; min-width: 0;
  background: transparent; color: var(--text-muted);
  padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  position: relative;
  transition: color 0.15s;
}
.nav-btn.active { color: var(--accent); }
.nav-icon { font-size: 22px; position: relative; display: inline-block; }
.nav-label {
  letter-spacing: 0.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}

/* ============================================================
   CART
   ============================================================ */
.cart-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg-card);
  border-radius: var(--r); margin-bottom: 10px;
  position: relative;
  border: 1px solid var(--border);
}
.cart-row-thumb {
  width: 64px; height: 64px;
  background: var(--bg-elev); border-radius: var(--r-sm);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--text-dim);
}
.cart-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-info { flex: 1; min-width: 0; }
.cart-row-name {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-row-variant { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cart-row-price {
  font-size: 15px; color: var(--accent); font-weight: 800; margin-top: 6px;
}
.cart-row-actions {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg); border-radius: var(--r-sm); padding: 3px;
  flex-shrink: 0;
}
.qty-btn {
  width: 30px; height: 30px;
  background: transparent; color: var(--text);
  font-size: 18px; font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:active { background: var(--bg-hover); }
.qty-value { min-width: 26px; text-align: center; font-size: 15px; font-weight: 800; }
.cart-row-remove {
  position: absolute; top: 8px; right: 8px;
  background: transparent; color: var(--text-dim);
  font-size: 16px; padding: 4px 8px;
  border-radius: var(--r-sm);
}
.cart-row-remove:active { color: var(--danger); }

/* ============================================================
   FORMS
   ============================================================ */
.form { padding: 0 16px 16px; }
.form-section {
  background: var(--bg-card); border-radius: var(--r);
  padding: 18px; margin-bottom: 12px;
  border: 1px solid var(--border);
}
.form-section-title {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  font-weight: 800; margin-bottom: 14px;
}
.field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: block; font-size: 13px; color: var(--text-muted);
  margin-bottom: 8px; font-weight: 600;
}
.field-hint { display: block; font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.field-error { display: block; font-size: 12px; color: var(--danger); margin-top: 6px; }
.input {
  width: 100%;
  background: var(--bg-input); color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 13px 14px; font-size: 15px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-error { border-color: var(--danger); }
.textarea { resize: vertical; min-height: 70px; }

.radio-row { display: flex; gap: 8px; }
.radio-btn {
  flex: 1; min-width: 0;
  background: var(--bg-input); color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px; font-size: 14px; font-weight: 700;
  text-align: center; transition: all 0.15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radio-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft); color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.pickup-item {
  background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 14px; margin-bottom: 8px;
  display: flex; gap: 12px; align-items: center;
  transition: all 0.15s;
}
.pickup-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.pickup-info { flex: 1; min-width: 0; }
.pickup-name { font-size: 14px; font-weight: 600; }
.pickup-address { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.pickup-map {
  font-size: 13px; color: var(--accent);
  flex-shrink: 0; padding: 6px 10px;
  background: var(--accent-soft); border-radius: var(--r-sm);
  font-weight: 700;
}

.order-summary {
  background: var(--bg-card); border-radius: var(--r);
  padding: 18px; margin-bottom: 12px;
  border: 1px solid var(--border);
}
.order-line {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 6px 0; color: var(--text-muted);
  gap: 12px;
}
.order-line > span:first-child {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-line > span:last-child { flex-shrink: 0; }
.order-line-total {
  font-size: 17px; font-weight: 800; color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 10px; padding-top: 14px;
}

/* ============================================================
   MY ORDERS
   ============================================================ */
.order-card {
  background: var(--bg-card); border-radius: var(--r);
  padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--border);
}
.order-head {
  display: flex; justify-content: space-between;
  align-items: center; gap: 10px; margin-bottom: 6px;
}
.order-id { font-size: 16px; font-weight: 800; min-width: 0; }
.order-status {
  font-size: 11px; padding: 4px 10px;
  border-radius: var(--r-full);
  font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0; white-space: nowrap;
}
.status-new        { background: rgba(110, 150, 240, 0.18); color: #90b8ff; }
.status-confirmed  { background: var(--success-soft); color: var(--success); }
.status-assembling { background: var(--warn-soft); color: var(--warn); }
.status-delivering { background: rgba(200, 130, 255, 0.18); color: #d4a8ff; }
.status-done       { background: var(--success-soft); color: var(--success); }
.status-cancelled  { background: var(--danger-soft); color: var(--danger); }

.order-date { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.order-items { margin-bottom: 12px; }
.order-item-line {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--text-muted);
  padding: 3px 0; gap: 12px;
}
.order-item-line > span:first-child {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-item-line > span:last-child { flex-shrink: 0; }
.order-foot {
  display: flex; justify-content: space-between;
  align-items: center; gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 12px; color: var(--text-muted);
}
.order-foot > div:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.order-total {
  font-size: 16px; font-weight: 800;
  color: var(--text); flex-shrink: 0;
}

/* ============================================================
   ADMIN — общие
   ============================================================ */
.admin-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 20px;
}
.admin-tile {
  background: var(--bg-card);
  border-radius: var(--r);
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
  min-height: 128px;
  position: relative; overflow: hidden; min-width: 0;
}
.admin-tile:active {
  transform: scale(0.97);
  background: var(--bg-hover);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-2);
}
.admin-tile-icon { font-size: 30px; line-height: 1; }
.admin-tile-label {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-tile-sub {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.admin-tile-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent-grad); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 3px 8px; border-radius: var(--r-full);
  box-shadow: var(--accent-glow);
}

.admin-bar {
  display: flex; gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.admin-bar::-webkit-scrollbar { display: none; }
.admin-tab {
  background: transparent; color: var(--text-muted);
  padding: 8px 14px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.admin-tab.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent);
}

.admin-product {
  background: var(--bg-card); border-radius: var(--r);
  margin-bottom: 10px; overflow: hidden;
  border: 1px solid var(--border);
}
.admin-product-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; cursor: pointer;
}
.admin-product-head--inactive { opacity: 0.55; }
.admin-product-thumb {
  width: 54px; height: 54px;
  background: var(--bg-elev); border-radius: var(--r-sm);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-dim);
}
.admin-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-info { flex: 1; min-width: 0; }
.admin-product-name {
  font-size: 15px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-product-cat { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.admin-product-meta { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.admin-product-toggle {
  color: var(--text-muted); font-size: 18px; flex-shrink: 0;
  padding: 4px 8px;
}
.admin-product-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}
.admin-product-actions {
  display: flex; gap: 8px; margin-top: 12px;
}
.admin-product-actions .btn-secondary,
.admin-product-actions .btn-danger {
  flex: 1; min-width: 0; text-align: center;
  padding: 11px 14px; font-size: 14px;
}

.admin-variant {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.admin-variant:last-child { border-bottom: none; }
.admin-variant.inactive { opacity: 0.55; }
.admin-variant-info { flex: 1; min-width: 0; }
.admin-variant-name {
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.admin-variant-price {
  font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 3px;
}
.badge-off {
  background: var(--danger-soft); color: var(--danger);
  font-size: 10px; padding: 2px 8px;
  border-radius: var(--r-full); font-weight: 800;
}
.badge-zero {
  background: var(--warn-soft); color: var(--warn);
  font-size: 10px; padding: 2px 8px;
  border-radius: var(--r-full); font-weight: 800;
}
.admin-variant-actions {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg); border-radius: var(--r-sm);
  padding: 3px; flex-shrink: 0;
}
.admin-icon-btn {
  background: transparent; color: var(--text);
  font-size: 18px; padding: 6px 10px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
  flex-shrink: 0;
}
.admin-icon-btn:active { background: var(--bg-hover); }

/* ADMIN ORDERS */
.admin-order-card {
  background: var(--bg-card); border-radius: var(--r);
  padding: 14px; margin-bottom: 12px;
  border: 1px solid var(--border);
}
.admin-order-head {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 8px; margin-bottom: 8px;
}
.admin-order-info {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0; flex: 1;
}
.admin-order-id { font-size: 16px; font-weight: 800; }
.admin-order-contacts {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-order-body {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--bg-input);
  border-radius: var(--r-sm);
}
.admin-order-line {
  display: flex; justify-content: space-between;
  padding: 2px 0; gap: 10px;
}
.admin-order-line > span:first-child {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-order-line > span:last-child { flex-shrink: 0; }
.admin-order-total {
  border-top: 1px solid var(--border);
  margin-top: 6px; padding-top: 6px;
  color: var(--text); font-weight: 800;
}
.admin-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.admin-status-btn {
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 8px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 700;
  transition: all 0.15s;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}
.admin-status-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ADMIN PICKUP */
.admin-pickup-card {
  background: var(--bg-card); border-radius: var(--r);
  padding: 14px; margin-bottom: 10px;
  border: 1px solid var(--border);
}
.admin-pickup-card.inactive { opacity: 0.6; }
.admin-pickup-row { display: flex; align-items: flex-start; gap: 12px; }
.admin-pickup-info { flex: 1; min-width: 0; }
.admin-pickup-name {
  font-size: 15px; font-weight: 700; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-pickup-address {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-pickup-coords {
  font-size: 11px; color: var(--text-dim); margin-top: 3px;
  font-family: ui-monospace, Menlo, monospace;
}
.admin-pickup-actions {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.admin-pickup-actions .btn-secondary,
.admin-pickup-actions .btn-danger {
  flex: 1 1 calc(50% - 3px);
  min-width: 0; padding: 10px 12px; font-size: 13px; text-align: center;
}

/* ANALYTICS */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; padding: 0 16px 14px;
}
.analytics-stat {
  background: var(--bg-card); border-radius: var(--r);
  padding: 14px 8px;
  border: 1px solid var(--border);
  text-align: center; min-width: 0;
}
.analytics-stat-label {
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 6px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.analytics-stat-value {
  font-size: 19px; font-weight: 800;
  letter-spacing: -0.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.analytics-stat-value.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.analytics-stat-value.money { color: var(--success); }

.analytics-section {
  background: var(--bg-card); border-radius: var(--r);
  padding: 16px; margin: 0 16px 12px;
  border: 1px solid var(--border);
}
.analytics-section-title {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted); margin-bottom: 12px;
}
.analytics-row {
  display: flex; justify-content: space-between;
  align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.analytics-row:last-child { border-bottom: none; }
.analytics-row-name {
  color: var(--text); font-weight: 500;
  min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.analytics-row-value {
  color: var(--text-muted); font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}

.status-bars { display: flex; flex-direction: column; gap: 10px; }
.status-bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.status-bar-label {
  flex: 0 0 110px; min-width: 0;
  color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-bar-track {
  flex: 1; min-width: 0; height: 8px;
  background: var(--bg-input);
  border-radius: var(--r-full); overflow: hidden;
}
.status-bar-fill {
  height: 100%;
  background: var(--accent-grad);
  border-radius: var(--r-full);
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}
.status-bar-value {
  flex: 0 0 36px; text-align: right;
  font-weight: 800; font-size: 13px;
}

/* EDIT PRODUCT */
.edit-card {
  background: var(--bg-card); border-radius: var(--r);
  padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--border);
}
.edit-section-title {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  font-weight: 800; margin-bottom: 12px;
}
.edit-image-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.edit-image {
  position: relative; aspect-ratio: 1;
  background: var(--bg-elev); border-radius: var(--r-sm);
  overflow: hidden; border: 1px solid var(--border);
}
.edit-image img { width: 100%; height: 100%; object-fit: cover; }
.edit-image-remove {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px;
  background: rgba(0, 0, 0, 0.75); color: #fff;
  border-radius: 50%; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.edit-upload-btn {
  background: var(--bg-input); color: var(--text-muted);
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-sm);
  padding: 20px; width: 100%;
  font-size: 14px; font-weight: 500;
}
.edit-variant {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px; margin-bottom: 10px;
}
.edit-variant-head {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 10px;
}
.edit-variant-label {
  font-size: 12px; color: var(--text-muted); font-weight: 700;
}
.edit-variant-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px; margin-bottom: 8px;
}
.edit-variant-grid .input { padding: 9px 10px; font-size: 13px; }
.edit-variant-actions { display: flex; gap: 6px; margin-top: 4px; }
.edit-variant-actions button {
  flex: 1; min-width: 0; padding: 9px 10px;
  font-size: 13px; border-radius: var(--r-sm);
}
.edit-variant-toggle {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
}
.edit-variant-toggle.off {
  background: var(--warn-soft); color: var(--warn);
  border-color: transparent;
}
.edit-variant-delete {
  background: var(--danger-soft); color: var(--danger);
}
.edit-add-variant {
  background: transparent; color: var(--accent);
  border: 1.5px dashed var(--accent);
  border-radius: var(--r-sm);
  padding: 12px; width: 100%;
  font-weight: 700; font-size: 14px;
}
.edit-actions { display: flex; gap: 8px; margin-top: 12px; }
.edit-actions .btn { padding: 14px; }
.edit-actions .btn-danger { flex: 0 0 auto; padding: 14px 18px; }

/* MODAL */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  animation: modalFade 0.2s ease;
}
@keyframes modalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal {
  background: var(--bg-card);
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  animation: modalSlide 0.25s ease;
  border-top: 1px solid var(--border-2);
}
@keyframes modalSlide {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal-title {
  font-size: 18px; font-weight: 800;
  margin-bottom: 16px; letter-spacing: -0.3px;
}

/* ============================================================
   LOGIN SCREEN (только для сайта, не в Telegram)
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.login-logo {
  font-size: 72px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.6));
}
.login-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.6px;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.login-widget {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.login-hint {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 300px;
  line-height: 1.5;
}

/* Адаптив для планшетов и десктопа */
@media (min-width: 560px) {
  body { padding: 0; }
  .header {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

/* Компактность для очень маленьких экранов */
@media (max-width: 340px) {
  .grid { gap: 8px; padding: 0 12px 20px; }
  .product-info { padding: 10px 12px 12px; }
  .analytics-grid { gap: 6px; padding: 0 12px 14px; }
  .analytics-stat { padding: 12px 6px; }
  .analytics-stat-value { font-size: 16px; }
}
/* Кнопка логина в хедере (только для сайта) */
.login-btn {
  background: var(--bg-elev);
  color: var(--text);
  font-size: 18px;
  padding: 8px 12px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.login-btn:active { background: var(--bg-hover); }
.login-btn--active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}
/* На широких экранах сайт выглядит как окно телефона */
@media (min-width: 720px) {
  html, body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    max-height: none;
  }
  body {
    background:
      radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.08), transparent 60%),
      radial-gradient(circle at 80% 80%, rgba(217, 70, 239, 0.06), transparent 60%),
      #04020a;
    padding: 40px 0;
    min-height: 100vh;
    /* Убеждаемся, что ничто не режет скролл */
    position: static;
  }
  body::before {
    display: none;
  }
  .app-shell {
    background: var(--bg);
    border-radius: 24px;
    box-shadow:
      0 0 0 1px rgba(168, 85, 247, 0.18),
      0 40px 80px rgba(0, 0, 0, 0.6),
      0 0 80px rgba(168, 85, 247, 0.15);
    min-height: calc(100vh - 80px);
    position: relative;
    /* Никакого overflow: hidden */
    overflow: visible;
  }
  /* Фиксированные снизу элементы должны оставаться в пределах «рамки» */
  .bottom-nav {
    max-width: 520px;
  }
  .bottom-action {
    max-width: 520px;
  }
}
  /* Скрываем нижнюю навигацию в положении «fixed», она прилипает к низу контейнера */
  .bottom-nav {
    max-width: 520px;
  }
}
/* На широких экранах админ-фильтры и табы переносятся на новые строки */
@media (min-width: 720px) {
  .admin-bar {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
  }
  .admin-tab {
    flex: 0 0 auto;
    white-space: normal;
  }

  /* Аналогично — список табов фильтров заказов */
  .orders-filters {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
  }
}
/* ============================================================
   ШИРОКИЕ ЭКРАНЫ (ПК): перенос фильтров и кнопок статусов
   ============================================================ */
@media (min-width: 720px) {
  /* Фильтры над списком заказов (Активные / Новые / ... / Отмен.) */
  .admin-bar {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
    padding: 14px 16px;
  }
  .admin-bar::-webkit-scrollbar { display: none; }
  .admin-tab {
    flex: 0 0 auto;
    white-space: normal;
    max-width: none;
  }

  /* Сетка кнопок статусов внутри карточки заказа */
  .admin-order-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .admin-status-btn {
    font-size: 13px;
    padding: 10px 10px;
  }

  /* Кнопки в карточках точек самовывоза — тоже в 3 колонки */
  .admin-pickup-actions .btn-secondary,
  .admin-pickup-actions .btn-danger {
    flex: 1 1 calc(33.33% - 4px);
  }

  /* Карточка заказа — чуть больше паддинг на широком экране */
  .admin-order-card {
    padding: 16px 18px;
  }

  /* Табы в админке тоже переносим */
  .admin-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* Очень широкие экраны — 4 кнопки статуса в ряд */
@media (min-width: 900px) {
  .admin-order-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .admin-status-btn {
    font-size: 12px;
    padding: 9px 6px;
  }
}
/* Кнопка выхода в хедере (только на сайте) */
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 12px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
  white-space: nowrap;
}
.logout-btn:active {
  transform: scale(0.96);
  background: rgba(168, 85, 247, 0.25);
}
.logout-btn-icon {
  font-size: 15px;
  line-height: 1;
}
.logout-btn-text {
  line-height: 1;
}

/* На очень узких экранах — только иконка, чтобы не зажимать заголовок */
@media (max-width: 360px) {
  .logout-btn-text {
    display: none;
  }
}


.bottom-action.cart-bottom {
  bottom: calc(64px + var(--tg-bottom-inset, 0px));
  padding-bottom: 12px;
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
  border-top: 1px solid var(--border-2);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
  z-index: 40;
}
/* ============================================================
   WAREHOUSE PICKER
   ============================================================ */
.picker-screen {
  padding: 12px 16px;
}
.picker-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px 0;
}
.picker-icon {
  font-size: 56px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.5));
}
.picker-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.picker-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}
.picker-section {
  margin-bottom: 22px;
}
.picker-section-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  margin-bottom: 10px;
}
.picker-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.picker-card:active {
  transform: scale(0.98);
  background: var(--bg-hover);
}
.picker-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(168, 85, 247, 0.2);
}
.picker-card-info { flex: 1; min-width: 0; }
.picker-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: var(--accent-glow);
}

/* Плашка выбранного склада под хедером */
.wh-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.wh-bar:active { background: var(--bg-hover); }
.wh-bar-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.wh-bar-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-bar-change {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Сводка склада на checkout */
.wh-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wh-summary-icon { font-size: 24px; flex-shrink: 0; }
.wh-summary-info { flex: 1; min-width: 0; }
.wh-summary-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-weight: 600;
}
.wh-summary-value {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Плашка выбора способа получения */
.wh-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.wh-bar:active { background: var(--bg-hover); }
.wh-bar-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-bar-change {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
/* Ячейка склада в редакторе товара */
.stock-cell {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.stock-cell-head {
  margin-bottom: 8px;
}
.stock-cell-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.stock-cell-addr {
  font-size: 11px;
  color: var(--text-muted);
}
.stock-cell-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.stock-cell-inputs .input {
  padding: 9px 10px;
  font-size: 13px;
}
.stock-cell-hint {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  text-align: center;
}
/* ============================================================
   СКЛАДЫ (админка)
   ============================================================ */
.warehouse-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.warehouse-card:active {
  transform: scale(0.98);
  background: var(--bg-hover);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-2);
}
.warehouse-card.inactive { opacity: 0.55; }
.warehouse-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.warehouse-card-info { flex: 1; min-width: 0; }
.warehouse-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.warehouse-card-address {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.warehouse-card-arrow {
  font-size: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Заголовок склада */
.wh-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(217, 70, 239, 0.08));
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 14px;
}
.wh-hero-icon { font-size: 32px; flex-shrink: 0; }
.wh-hero-info { flex: 1; min-width: 0; }
.wh-hero-name {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-hero-address {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Строка варианта в складе */
.wh-variant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.wh-variant-row:last-child { border-bottom: none; }
.wh-variant-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-variant-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.wh-qty {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-sm);
}
.wh-qty.zero {
  background: var(--danger-soft);
  color: var(--danger);
}
.wh-price {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 55px;
  text-align: right;
}
.wh-edit-btn {
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  padding: 4px 6px;
  border-radius: var(--r-sm);
}
.wh-edit-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.wh-edit-form .input {
  padding: 7px 8px;
  font-size: 12px;
}
.wh-edit-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.wh-edit-save, .wh-edit-cancel {
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 13px;
}

/* ============================================================
   КАТЕГОРИИ (админка)
   ============================================================ */
.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.category-card.inactive { opacity: 0.55; }
.category-card-info { flex: 1; min-width: 0; }
.category-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.category-card-meta { font-size: 12px; color: var(--text-muted); }
.category-card-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ============================================================
   Кликабельный заголовок и топ-ссылки
   ============================================================ */
.header-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  flex: 1;
  min-width: 0;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header-title--link {
  cursor: pointer;
  transition: opacity 0.15s;
}
.header-title--link:active {
  opacity: 0.7;
}

/* Панель под хедером */
.top-links {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.top-links::-webkit-scrollbar { display: none; }
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}
.top-link:active {
  background: var(--bg-hover);
  transform: scale(0.97);
  border-color: var(--border-2);
}
.top-link-icon {
  font-size: 15px;
  line-height: 1;
}

/* ============================================================
   БРЕНД-КНОПКА И ССЫЛКИ
   ============================================================ */
.brand-btn {
  background: transparent;
  border: none;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  flex: 1;
  text-align: left;
  padding: 0;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}
.brand-btn:active { opacity: 0.7; }

.links-btn {
  background: var(--bg-elev);
  color: var(--text);
  font-size: 16px;
  padding: 8px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.links-btn:active { background: var(--bg-hover); }

.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}
.link-card:active {
  transform: scale(0.98);
  background: var(--bg-hover);
  border-color: var(--border-2);
}
.link-card-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.link-card-info { flex: 1; min-width: 0; }
.link-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.link-card-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   AGE GATE (18+)
   ============================================================ */
.age-gate {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
}
.age-gate-icon {
  font-size: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.7));
}
.age-gate-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.age-gate-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 32px;
  max-width: 320px;
}
.age-gate-question {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}
.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 28px;
}
.age-gate-yes {
  padding: 16px 24px;
  font-size: 16px;
}
.age-gate-no {
  padding: 16px 24px;
  font-size: 15px;
}
.age-gate-foot {
  font-size: 11px;
  color: var(--text-dim);
  max-width: 320px;
  line-height: 1.5;
}
.age-gate-blocked {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.age-gate-blocked-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 10px;
}
.age-gate-blocked-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}
