/* ══ TOKENS ═══════════════════════════════════════════════════════════ */
:root {
  /* ── Light-green defaults (fallback when no theme class is present) ── */
  --page-bg:      #FFFFFF;
  --bg:           #FFFFFF;
  --surface:      #FFFFFF;
  --surface-soft: #F7FEF9;
  --surface-hover:#F0FDF4;
  --text:         #052E24;
  --text-strong:  #064E3B;
  --muted:        #6B7280;
  --muted-text:   #6B7280;
  --line:         #BBF7D0;
  --border:       #BBF7D0;
  --brand:        #16A34A;
  --brand-dark:   #15803D;
  --primary:      #16A34A;
  --primary-hover:#15803D;
  --accent:       #22C55E;
  --mint:         #22C55E;
  --mint-2:       #A7F3D0;
  --input-bg:     #FFFFFF;
  --button-text:  #FFFFFF;
  --shadow:       0 14px 35px rgba(6, 78, 59, 0.10);
  --shadow-soft:  0 8px 24px rgba(6, 78, 59, 0.08);
  --sidebar-bg:   #0f1517;
  --sidebar-soft: #182522;
  --danger:       #d34037;
  --radius:       10px;
  --header-height: 68px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* clip instead of hidden: prevents horizontal scroll without creating a new scroll container,
   so position:sticky on the header keeps working */
html { overflow-x: clip; }
body { font-family: 'Noto Sans', Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
a { color: inherit; text-decoration: none; }

/* ══ OWNER BAR ═════════════════════════════════════════════════════════ */
.owner-bar {
  background: var(--sidebar-bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; min-height: 42px; gap: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.owner-bar-title { font-size: 13px; color: rgba(255,255,255,.65); white-space: nowrap; flex-shrink: 0; }
.owner-bar-nav { display: flex; gap: 4px; flex-shrink: 0; }
.owner-bar-nav a {
  font-size: 13px; color: rgba(255,255,255,.75);
  padding: 6px 12px; border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.owner-bar-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ══ STICKY HEADER (owner-bar + navbar) ════════════════════════════════ */
.site-header-wrapper,
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  isolation: isolate;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

/* ══ NAVBAR ════════════════════════════════════════════════════════════ */
.navbar {
  background: rgba(12, 18, 20, .82);
  border-bottom: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.navbar-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.navbar-logo {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(0,0,0,.18); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; flex-shrink: 0;
  overflow: hidden;
}
.navbar-title { font-size: 17px; font-weight: 800; line-height: 1.1; color: #fff; }
.navbar-subtitle { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 2px; }
.navbar-links { display: flex; align-items: center; gap: 8px; }
/* Кнопки/ссылки внутри навбара — белые */
.navbar .btn { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.navbar .btn:hover { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.8); }
.navbar .btn-primary { background: rgba(0,0,0,.18); border-color: rgba(255,255,255,.4); color: #fff; }
.navbar .btn-primary:hover { background: rgba(0,0,0,.28); }
.navbar .user-menu-toggle, .navbar .lang-menu-toggle { color: #fff; }
.navbar .lang-code { background: rgba(0,0,0,.20); color: #fff; }
.nav-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-back-btn:hover,
.nav-back-btn:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.desktop-my-shops-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1.5px solid rgba(187,247,208,.58);
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.desktop-my-shops-btn:hover,
.desktop-my-shops-btn:focus-visible {
  background: rgba(255,255,255,.18);
  border-color: rgba(187,247,208,.86);
  color: #fff;
  outline: none;
}
.desktop-my-shops-btn.is-active {
  background: rgba(22,163,74,.18);
  border-color: var(--brand);
  color: #bbf7d0;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.18);
}
.desktop-my-shops-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  font-size: 14px;
  line-height: 1;
  color: currentColor;
}

/* ── User dropdown ── */
.user-menu { position: relative; }
.user-menu-toggle { cursor: pointer; }
.user-menu-dropdown { display: none; position: absolute; top: calc(100% + 6px); right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 160px; z-index: 500; overflow: hidden; }
.user-menu-dropdown.is-open { display: block; }
.user-menu-item { display: block; width: 100%; padding: 10px 16px; font-size: 14px; text-align: left; background: none; border: none; cursor: pointer; color: var(--text); text-decoration: none; transition: background .12s; white-space: nowrap; }
.user-menu-item:hover { background: var(--bg); }
.user-menu-item.is-active { color: var(--brand); background: var(--surface-soft); font-weight: 700; }
.user-menu-item--danger { color: var(--danger); }
.user-menu-item--danger:hover { background: #fff1f0; }
.user-menu-divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ── Language switcher ── */
.lang-menu { position: relative; }
.lang-menu-toggle { cursor: pointer; white-space: nowrap; }
.lang-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 150px;
  z-index: 500;
  overflow: hidden;
}
.lang-menu-dropdown.is-open { display: block; }
.lang-menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
  transition: background .12s;
}
.lang-menu-item:hover { background: var(--bg); }
.lang-menu-item.is-active { font-weight: 700; color: var(--brand); background: var(--surface-soft); }
.lang-code {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  vertical-align: middle;
  line-height: 1.5;
}

/* ══ BUTTONS ═══════════════════════════════════════════════════════════ */
.btn {
  min-height: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px;
  border: 1.5px solid var(--brand);
  border-radius: var(--radius);
  background: transparent;
  color: var(--brand);
  font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.btn:hover { background: var(--brand); color: #fff; }
.btn-sm  { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }
.btn-outline { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-link { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 14px; font-weight: 700; padding: 0; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #9a3333; border-color: #9a3333; }
.btn-primary, .btn.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-whatsapp {
  background: #25d366; border-color: #25d366; color: #fff;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; justify-content: center;
}
.btn-whatsapp:hover { background: #1ebe5a; border-color: #1ebe5a; color: #fff; }
.wa-svg { width: 18px; height: 18px; fill: #fff; flex-shrink: 0; }
.btn-icon { width: 38px; min-width: 38px; padding: 0; font-size: 17px; }

/* ══ CONTAINER ═════════════════════════════════════════════════════════ */
.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 44px; }

/* ══ ALERTS (keep for dashboard, etc.) ═════════════════════════════════ */
.messages { margin-bottom: 20px; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 8px; font-size: 14px; border: 1px solid transparent; }
.alert-success  { background: #e6f7f1; color: #0a5740; border-color: #b6e8d5; }
.alert-error, .alert-warning { background: #fef9ec; color: #7a5000; border-color: #fae5a0; }
.alert-info     { background: #e8f5fd; color: #0a4a72; border-color: #b6dff5; }

/* ══ TOAST NOTIFICATIONS ════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: calc(var(--header-height, 68px) + 12px);
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 360px;
}
.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  border: 1px solid transparent;
  animation: toast-in .25s ease both;
}
.toast-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.toast-text { flex: 1; }
.toast-close {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  font-size: 18px; line-height: 1; opacity: .5; padding: 0 0 0 4px;
  color: inherit;
}
.toast-close:hover { opacity: 1; }
.toast.toast-out { animation: toast-out .25s ease both; }
.toast-success { background: #e6f7f1; color: #0a5740; border-color: #b6e8d5; }
.toast-error   { background: #fef2f2; color: #7f1d1d; border-color: #fca5a5; }
.toast-warning { background: #fef9ec; color: #7a5000; border-color: #fae5a0; }
.toast-info    { background: #e8f5fd; color: #0a4a72; border-color: #b6dff5; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}
@media (max-width: 640px) {
  .toast-container {
    left: 12px;
    right: 12px;
    top: calc(var(--header-height, 64px) + 8px);
    max-width: none;
  }
  @keyframes toast-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-12px); }
  }
}

/* ══ MY SHOPS UNIFIED BUTTON (header) ══════════════════════════════════ */
/* Saved-state tint on the existing desktop-my-shops-btn */
.desktop-my-shops-btn.is-saved {
  background: rgba(22,163,74,.18);
  border-color: rgba(34,197,94,.55);
  color: #bbf7d0;
}
.desktop-my-shops-btn.is-saved:hover,
.desktop-my-shops-btn.is-saved:focus-visible {
  background: rgba(22,163,74,.28);
  border-color: rgba(34,197,94,.8);
}
/* Dropdown-variant: make it a button, keep same look */
.desktop-my-shops-btn--dropdown {
  cursor: pointer;
  background: none;
  border: 1.5px solid rgba(187,247,208,.58);
  font-family: inherit;
  gap: 6px;
}
.my-shops-chevron { opacity: .65; flex-shrink: 0; margin-left: 2px; }

/* Wrapper */
.my-shops-menu { position: relative; }

/* Dropdown panel */
.my-shops-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  min-width: 210px;
  z-index: 2500;
  overflow: hidden;
}
.my-shops-dropdown.is-open { display: block; }
.my-shops-dropdown-item {
  display: block; width: 100%;
  padding: 10px 16px;
  font-size: 14px; text-align: left;
  background: none; border: none; cursor: pointer;
  color: var(--text); text-decoration: none;
  transition: background .12s; white-space: nowrap;
  font-family: inherit;
}
.my-shops-dropdown-item:hover { background: var(--bg); }
.my-shops-dropdown-item--add  { color: var(--brand); font-weight: 600; }
.my-shops-dropdown-item--add:hover  { background: var(--surface-soft); }
.my-shops-dropdown-item--danger { color: var(--danger); }
.my-shops-dropdown-item--danger:hover { background: #fff1f0; }
.my-shops-dropdown-divider { height: 1px; background: var(--line); margin: 4px 0; }
.my-shops-dropdown form { margin: 0; }

/* ══ MOBILE SHOP SAVE ═══════════════════════════════════════════════════ */
.mob-shop-save { padding: 4px 20px 0; }
.mob-shop-save-state {
  display: block; padding: 8px 0 4px;
  font-size: 14px; font-weight: 600; color: var(--brand);
}
.mob-shop-save-add { color: var(--brand); }
.mob-shop-save-remove { color: var(--danger); }

/* ══ PAGE HEADER ═══════════════════════════════════════════════════════ */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.page-header h1 { font-size: 26px; }

/* ══ MY-SHOP BLOCK ═════════════════════════════════════════════════════ */
.my-shop-block {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--brand);
  border-radius: 50px; padding: 8px 16px 8px 8px;
}
.my-shop-label { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; overflow: hidden; }
.my-shop-title { font-weight: 800; color: var(--brand); font-size: 13px; }
.my-shop-name  { font-size: 14px; font-weight: 600; }
.my-shop-actions { display: flex; gap: 8px; }

/* ══ LICENSE TIERS ══════════════════════════════════════════════════════ */
.tier-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
}
.tier-bronze   { background: linear-gradient(135deg,#cd7f32,#8b4513); color:#fff; }
.tier-silver   { background: linear-gradient(135deg,#c0c0c0,#8a8a8a); color:#fff; }
.tier-gold     { background: linear-gradient(135deg,#ffd700,#e6a800); color:#5a3e00; }
.tier-platinum { background: linear-gradient(135deg,#00ced1,#0077b6); color:#fff; }
.tier-diamond  { background: linear-gradient(135deg,#b9f2ff,#67d4f8); color:#003d5c; }
.tier-badge--lg { font-size: 14px; padding: 6px 16px; gap: 6px; }

/* ── Plan cards (dashboard license) ── */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.tier-card {
  border-radius: 16px;
  border: 2px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--surface);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.tier-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(0,0,0,.13);
}
.tier-card--current {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}
.tier-card--current:hover {
  box-shadow: 0 18px 42px rgba(0,0,0,.13), 0 0 0 1px var(--brand);
}

/* Gradient caps per tier */
.tier-card-cap {
  padding: 28px 14px 22px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tier-card--bronze .tier-card-cap   { background: linear-gradient(150deg, #e8a455 0%, #a0522d 100%); }
.tier-card--silver .tier-card-cap   { background: linear-gradient(150deg, #d8d8d8 0%, #7a7a7a 100%); }
.tier-card--gold   .tier-card-cap   { background: linear-gradient(150deg, #ffe566 0%, #e09800 100%); }
.tier-card--platinum .tier-card-cap { background: linear-gradient(150deg, #5de0e0 0%, #0d72a8 100%); }
.tier-card--diamond  .tier-card-cap { background: linear-gradient(150deg, #a4eeff 0%, #1888cc 100%); }

.tier-card-icon { font-size: 46px; line-height: 1; filter: drop-shadow(0 3px 8px rgba(0,0,0,.22)); }

/* "CURRENT" pill in the cap */
.tier-card-cur-label {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.38);
  color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

/* "POPULAR" pill */
.tier-card-popular {
  position: absolute;
  top: 10px; left: 10px;
  background: #ff6f00;
  color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(255,111,0,.45);
}

/* Card body */
.tier-card-body {
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  gap: 12px;
}
.tier-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.tier-card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  text-align: left;
  flex: 1;
  margin: 0;
  padding: 0;
}
.tier-card-features li {
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.4;
}
.tier-card-features li::before {
  content: '✓';
  color: var(--brand);
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tier-card-your-plan {
  font-size: 13px;
  color: var(--brand);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 6px 0;
}
.tier-card-btn { width: 100%; }

@media (max-width: 1100px) {
  .tier-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .tier-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .tier-cards { grid-template-columns: 1fr; }
}

.badge-recommended { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:800; background:#fff8e1; color:#b87800; border:1px solid #ffd54f; }
.badge-pinned      { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:800; background:#e3f2fd; color:#1565c0; border:1px solid #90caf9; }
.badge-promoted    { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:800; background:#e8f5e9; color:#1b5e20; border:1px solid #81c784; }
.badge-expired-lic { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:800; background:#fce4ec; color:#880e4f; border:1px solid #f48fb1; }

.shop-card-top-badges { position:absolute; top:10px; right:10px; display:flex; flex-direction:column; gap:4px; align-items:flex-end; z-index:2; }
.shop-logo-wrap { position:relative; }

.license-expiry-bar {
  background: linear-gradient(90deg,#fff3cd,#ffe082);
  border-bottom: 1px solid #ffc107;
  color: #7a4e00; font-size: 13px; font-weight: 600;
  padding: 8px 24px; text-align: center;
}
.license-expiry-bar--urgent { background: linear-gradient(90deg,#ffebee,#ef9a9a); border-color:#ef5350; color:#b71c1c; }

/* Superadmin panel */
.sa-nav { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:24px; scroll-margin-top:120px; }
.sa-tab { min-height:36px; padding:0 16px; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:999px; font-size:13px; font-weight:700; color:var(--muted); background:var(--surface); cursor:pointer; text-decoration:none; transition:background .15s; }
.sa-tab:hover  { background:var(--surface-soft); }
.sa-tab.active { background:var(--brand); border-color:var(--brand-dark); color:#fff; }
.sa-tab .badge { background:var(--danger); color:#fff; border-radius:999px; font-size:11px; padding:1px 7px; font-weight:800; }
.sa-tab.active .badge { background:rgba(255,255,255,.3); }

.sa-app-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; margin-bottom:10px; box-shadow:var(--shadow); display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; }
.sa-app-card:hover { border-color:var(--brand); }
.sa-app-name { font-size:16px; font-weight:800; }
.sa-app-meta { font-size:13px; color:var(--muted); margin-top:3px; }

.sa-review-layout { display:grid; grid-template-columns:1fr 380px; gap:24px; align-items:start; }
.sa-info-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); }
.sa-info-card h2 { font-size:18px; margin-bottom:14px; }
.sa-info-row { display:flex; gap:8px; margin-bottom:10px; font-size:14px; }
.sa-info-label { color:var(--muted); font-weight:700; min-width:110px; flex-shrink:0; }

.tier-selector { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-bottom:16px; }
.tier-opt { display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 6px; border:2px solid var(--line); border-radius:var(--radius); cursor:pointer; transition:border-color .15s; font-size:12px; font-weight:800; }
.tier-opt input { display:none; }
.tier-opt:hover { border-color:var(--brand); }
.tier-opt.selected { border-color:var(--brand); background:var(--surface-soft); }
.tier-opt .tier-icon { font-size:22px; }

.action-panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.action-panel-head { background:var(--bg); border-bottom:1px solid var(--line); padding:14px 18px; font-size:15px; font-weight:800; }
.action-section { padding:16px 18px; border-bottom:1px solid var(--line); }
.action-section:last-child { border-bottom:none; }
.action-section h4 { font-size:13px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:10px; }

.history-timeline { }
.history-item { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--line); font-size:13px; }
.history-item:last-child { border-bottom:none; }
.history-dot { width:10px; height:10px; border-radius:50%; background:var(--brand); flex-shrink:0; margin-top:4px; }
.history-action { font-weight:700; }
.history-meta { color:var(--muted); font-size:12px; margin-top:2px; }

.import-history-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.import-history-table-wrap { overflow-x: auto; }
.import-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 880px;
}
.import-history-table th,
.import-history-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.import-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.import-history-table tbody tr:last-child td { border-bottom: 0; }
.import-history-table tbody tr:hover { background: var(--surface-soft); }
.import-history-table .num { text-align: right; }
.import-file-name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.import-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.import-count-badge.success { color: #15803d; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.28); }
.import-count-badge.info { color: #0369a1; background: rgba(14,165,233,.12); border-color: rgba(14,165,233,.28); }
.import-count-badge.warning { color: #a16207; background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.3); }
.import-count-badge.danger { color: var(--danger); background: rgba(211,64,55,.12); border-color: rgba(211,64,55,.3); }
.import-history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.import-history-actions form { margin: 0; }
.import-history-actions .btn {
  min-height: 32px;
  white-space: nowrap;
}
.import-history-mobile { display: none; }
.import-history-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}
.import-history-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}
@media (max-width: 768px) {
  .import-history-card { padding: 12px; }
  .import-history-table-wrap { display: none; }
  .import-history-mobile {
    display: grid;
    gap: 12px;
  }
  .import-history-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
  }
  .import-history-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  .import-history-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .import-history-date {
    font-size: 15px;
    font-weight: 900;
    margin-top: 2px;
  }
  .import-history-file {
    display: grid;
    gap: 3px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
  }
  .import-history-file span,
  .import-history-stats dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }
  .import-history-file strong { overflow-wrap: anywhere; }
  .import-history-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
  }
  .import-history-stats div {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
  }
  .import-history-stats dd {
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 900;
  }
  .import-history-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .import-history-actions form,
  .import-history-actions .btn { width: 100%; }
  .import-history-actions .btn {
    padding-left: 8px;
    padding-right: 8px;
  }
}
@media (max-width: 420px) {
  .import-history-actions {
    grid-template-columns: 1fr;
  }
}

.lic-stats-row { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:20px; }
.lic-stat { background:var(--bg); border-radius:var(--radius); padding:14px; text-align:center; }
.lic-stat-val { font-size:26px; font-weight:800; }
.lic-stat-label { font-size:12px; color:var(--muted); margin-top:4px; }

/* ══ SHOP LIST ═════════════════════════════════════════════════════════ */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.shop-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
  cursor: pointer;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(18,32,43,.12); border-color: var(--brand); }

/* Квадратная область лого */
.shop-logo-wrap {
  width: 100%; aspect-ratio: 1/1; overflow: hidden;
  background: var(--surface-soft); flex-shrink: 0;
}
.shop-logo { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-logo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}

/* Тело карточки — растягивается, кнопка всегда внизу */
.shop-card-body {
  padding: 18px; flex: 1;
  display: flex; flex-direction: column;
}
.shop-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.shop-desc { color: var(--muted); font-size: 14px; margin-bottom: 14px; line-height: 1.5; flex: 1; }
.shop-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 16px; min-height: 44px; }
.shop-meta-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ SHOP HERO ══════════════════════════════════════════════════════════ */
.shop-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 50%, rgba(102,192,164,.30), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(155,228,204,.20), transparent 35%),
    linear-gradient(135deg, #0f1517 0%, #182522 50%, #0c1412 100%);
  padding: 52px 0 48px;
  margin-bottom: 0;
}
.shop-hero--sm { padding: 24px 0 20px; }
.shop-hero--sm .shop-hero-badge { width: 80px; height: 80px; font-size: 28px; border-radius: 16px; }
.shop-hero--md { padding: 52px 0 48px; }
.shop-hero--lg { padding: 88px 0 80px; }
.shop-hero--lg .shop-hero-badge { width: 200px; height: 200px; font-size: 66px; border-radius: 36px; }

/* Banner height picker */
.banner-height-picker { margin-top: 20px; }
.banner-height-options { display: flex; gap: 12px; flex-wrap: wrap; }
.banner-height-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--surface);
  cursor: pointer; transition: border-color .15s, background .15s;
  font-size: 13px; font-weight: 700; color: var(--muted);
  min-width: 90px;
}
.banner-height-opt input { display: none; }
.banner-height-opt:hover { border-color: var(--brand); color: var(--text); }
.banner-height-opt.is-active { border-color: var(--brand); background: var(--surface-soft); color: var(--brand); }
.banner-height-preview {
  width: 72px; border-radius: 4px;
  background: linear-gradient(135deg, #66c0a4, #2f8f72);
}
.banner-height-preview--sm { height: 18px; }
.banner-height-preview--md { height: 30px; }
.banner-height-preview--lg { height: 48px; }


/* Декоративные круги-блобы на фоне */
.shop-hero-blob {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.shop-hero-blob--1 { width: 420px; height: 420px; top: -120px; right: -80px; }
.shop-hero-blob--2 { width: 260px; height: 260px; bottom: -90px; left: 10%; background: rgba(255,255,255,.04); }
.shop-hero-blob--3 { width: 140px; height: 140px; top: 30px; left: 55%; background: rgba(255,255,255,.05); }

/* Внутренний контейнер — двухколоночный */
.shop-hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center;
  justify-content: space-between; gap: 40px;
}

/* Левая колонка — текст */
.shop-hero-left {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-start;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 24px 28px;
  max-width: 560px;
}

/* Правая колонка — бейдж */
.shop-hero-right {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Хлебные крошки */
.shop-hero-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,.55);
  margin-bottom: 18px;
}
.shop-hero-breadcrumb a { color: rgba(255,255,255,.55); }
.shop-hero-breadcrumb a:hover { color: rgba(255,255,255,.85); }

/* Бейдж (лого или инициалы) — большой, справа */
.shop-hero-badge {
  width: 160px; height: 160px;
  border-radius: 28px;
  border: 2px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-size: 52px; font-weight: 900; color: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.shop-hero-badge img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Заголовок */
.shop-hero-title {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 900; color: #fff;
  line-height: 1.05; letter-spacing: -.5px;
  margin-bottom: 12px;
}
.shop-hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.shop-title-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.shop-title-main .shop-hero-title {
  overflow-wrap: anywhere;
}
.shop-favorite-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.shop-favorite-actions form {
  margin: 0;
}
.shop-favorite-btn,
.shop-favorite-remove,
.shop-favorite-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.34);
  background: rgba(0,0,0,.34);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.shop-favorite-btn,
.shop-favorite-remove {
  cursor: pointer;
}
.shop-favorite-btn:hover,
.shop-favorite-btn:focus-visible {
  background: rgba(255,255,255,.22);
}
.shop-favorite-state {
  background: rgba(255,255,255,.2);
}
.shop-favorite-remove {
  background: rgba(239,68,68,.16);
  border-color: rgba(248,113,113,.45);
}
.shop-favorite-remove:hover,
.shop-favorite-remove:focus-visible {
  background: rgba(239,68,68,.28);
}

/* Описание */
.shop-hero-desc {
  font-size: 16px; color: rgba(255,255,255,.7);
  line-height: 1.6; max-width: 560px;
  margin-bottom: 24px;
}

/* Факты-пилюли */
.shop-hero-pills {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.shop-hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 14px; color: #fff;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
a.shop-hero-pill { transition: background .15s; }
a.shop-hero-pill:hover { background: rgba(0,0,0,.62); }
.shop-hero-pill--edit { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); font-weight: 700; }
.shop-hero-pill--edit:hover { background: rgba(255,255,255,.35) !important; }


/* ══ TOOLBAR (search + chips) ══════════════════════════════════════════ */
.shop-toolbar {
  display: grid; grid-template-columns: 1fr auto;
  gap: 14px; align-items: center;
  padding: 20px 0;
  scroll-margin-top: 120px;
}
.shop-search {
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.shop-search-icon { color: var(--muted); font-size: 18px; }
.shop-search input {
  width: 100%; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--text); font-size: 15px;
}
.shop-search-submit { flex-shrink: 0; min-height: 34px; }
.shop-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip {
  min-height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: background .15s;
}
.chip:hover  { background: var(--surface-soft); }
.chip.active { background: var(--brand); border-color: var(--brand-dark); color: #fff; }

/* ══ SHOP FILTERS ══════════════════════════════════════════════════════ */
.shop-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.shop-filter-group { display: flex; flex-direction: column; gap: 5px; }
.shop-filter-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.shop-filter-price { display: flex; align-items: center; gap: 6px; }
.shop-filter-sep { color: var(--muted); font-size: 13px; }
.shop-filter-input {
  height: 36px; width: 84px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; background: var(--input-bg); color: var(--text); outline: 0;
}
.shop-filter-input:focus { border-color: var(--brand); }
/* Custom select dropdown */
.custom-select { position: relative; min-width: 170px; }
.custom-select-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 13px;
  cursor: pointer; transition: border-color .15s; white-space: nowrap;
}
.custom-select-btn:hover { border-color: var(--brand); }
.custom-select-btn.is-open { border-color: var(--brand); border-radius: var(--radius) var(--radius) 0 0; }
.custom-select-arrow { flex-shrink: 0; color: var(--muted); transition: transform .2s; }
.custom-select-btn.is-open .custom-select-arrow { transform: rotate(180deg); }
.custom-select-list {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--surface); border: 1px solid var(--brand); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 20px rgba(0,0,0,.1); list-style: none; padding: 4px 0; margin: 0;
}
.custom-select-list.is-open { display: block; }
.custom-select-opt {
  padding: 9px 14px; font-size: 13px; cursor: pointer; color: var(--text);
  transition: background .1s;
}
.custom-select-opt:hover { background: var(--bg); }
.custom-select-opt.active { color: var(--brand); font-weight: 600; }
.shop-filter-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; }

/* Problem products filter */
.problem-filter-panel {
  position: relative;
  z-index: 20;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(46, 125, 50, .18);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(20, 83, 45, .08);
}
.problem-filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.problem-filter-dropdown {
  position: relative;
  width: min(100%, 330px);
}
.problem-filter-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 0 16px;
  border: 1.5px solid rgba(46, 125, 50, .55);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.problem-filter-trigger:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}
.problem-filter-trigger:focus-visible,
.problem-filter-dropdown.is-open .problem-filter-trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, .16);
}
.problem-filter-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--brand);
  transition: transform .18s ease;
}
.problem-filter-dropdown.is-open .problem-filter-chevron {
  transform: rotate(180deg);
}
.problem-filter-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 700;
  max-height: min(352px, calc(100vh - 210px));
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1.5px solid rgba(46, 125, 50, .55);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 83, 45, .16);
}
.problem-filter-dropdown.is-open .problem-filter-menu {
  display: block;
}
.problem-filter-option {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  outline: none;
  transition: background .12s ease, color .12s ease;
}
.problem-filter-option:hover,
.problem-filter-option:focus {
  background: rgba(76, 175, 80, .10);
  color: var(--brand-dark);
}
.problem-filter-option.is-active,
.problem-filter-option[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
}
.problem-filter-option.is-active:hover,
.problem-filter-option.is-active:focus {
  background: var(--brand-dark);
  color: #fff;
}
.problem-filter-submit {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.problem-filter-submit:hover,
.problem-filter-submit:focus-visible {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.problem-filter-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, .16);
}

/* ══ SHOP LAYOUT ═══════════════════════════════════════════════════════ */
.shop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; padding-bottom: 44px; }
.sidebar {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
body:has(.owner-bar) .sidebar { top: 116px; }
.sidebar h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.category-list { list-style: none; }
.category-list li { border-bottom: 1px solid var(--line); }
.category-list li:last-child { border-bottom: 0; }
.category-list a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; color: var(--muted); font-size: 14px;
  transition: color .15s;
}
.category-list a:hover, .category-list a.active { color: var(--brand); font-weight: 700; }

/* ══ PRODUCT GRID ══════════════════════════════════════════════════════ */
.content-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 16px; }
.content-head h2 { font-size: 20px; }
.search-label { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.product-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 22px rgba(20,32,44,.05);
  transition: transform .2s;
  display: flex; flex-direction: column;
  min-width: 0;
  height: 100%;
}
.product-card:hover { transform: translateY(-3px); }
/* image wrap — position:relative for discount overlay */
.product-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--surface-soft); width: 100%; position: relative; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-img-placeholder { aspect-ratio: 4/3; width: 100%; background: var(--surface-soft); display: flex; align-items: center; justify-content: center; font-size: 3rem; position: relative; }
.product-img-placeholder.large { aspect-ratio: unset; height: 340px; font-size: 5rem; }
/* discount badge on image */
.product-discount-overlay {
  position: absolute; top: 8px; right: 8px;
  background: #e53935; color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 2px 6px rgba(229,57,53,.35);
}
.product-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-category { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; background: #fff0ca; color: #6d4b00; font-size: 11px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card-body h3 {
  min-height: 39px;
  font-size: 15px;
  line-height: 1.3;
  margin: 8px 0 4px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.product-card-body h3 a { color: var(--text); }
.product-meta { color: var(--muted); font-size: 12px; line-height: 1.4; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* price row: prices stacked left, badge-out right */
.product-price-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 10px; margin-top: auto; }
.product-price-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.product-price { font-size: 18px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.product-price--sale { color: #e53935; }
.product-price-strike { font-size: 12px; color: var(--muted); text-decoration: line-through; font-weight: 400; }
.badge-out { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #ffeeba; color: #856404; white-space: nowrap; flex-shrink: 0; }
/* actions: flex — main button grows, icons fixed */
.product-actions { display: flex; gap: 8px; align-items: stretch; }
.product-actions > form { display: contents; }
.product-actions .btn-whatsapp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-actions .btn-icon { flex: 0 0 42px; width: 42px; height: auto; min-height: 38px; padding: 0; font-size: 17px; font-weight: 700; }

@media (min-width: 1400px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 961px) and (max-width: 1399px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ══ PRODUCT DETAIL ════════════════════════════════════════════════════ */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.product-detail-image img { width: 100%; border-radius: var(--radius); }
.product-detail-info h1 { font-size: 28px; margin: 10px 0; }
.product-meta-line { margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.product-price-large { font-size: 36px; font-weight: 800; color: var(--brand); margin: 16px 0; }
.stock-status { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.in-stock { color: var(--brand); }
.out-of-stock { color: var(--danger); }
.product-description {
  margin: 16px 0 4px; color: var(--muted); font-size: 15px; line-height: 1.7;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5;
  overflow: hidden;
}
.product-description.is-expanded {
  display: block; overflow: visible; -webkit-line-clamp: unset;
}
.desc-toggle {
  background: none; border: none; color: var(--brand); font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 0; margin-bottom: 12px;
}
.product-detail-info { display: flex; flex-direction: column; height: 100%; }
.product-info-spacer { flex: 1; min-height: 24px; }
.product-detail-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }

.product-detail-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.product-sticky-bar { display: none; }
.product-gallery { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumb:hover { border-color: var(--brand); }

/* ══ GLOBAL CART ═══════════════════════════════════════════════════════ */
.cart-shop-group { margin-bottom: 28px; }
.cart-shop-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}
.cart-shop-logo {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
}
.cart-shop-logo--placeholder {
  background: var(--surface-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.cart-shop-name { font-size: 16px; font-weight: 800; }
.cart-shop-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 12px 0 0; margin-top: 4px;
  border-top: 1px solid var(--line);
}
.cart-shop-subtotal { font-size: 15px; font-weight: 700; }

/* ══ CART ══════════════════════════════════════════════════════════════ */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-top: 20px; }
.cart-item { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(18,32,43,.04); align-items: center; }
.cart-item-img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-item-img-placeholder { width: 80px; height: 80px; background: var(--surface-soft); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info small { color: var(--muted); font-size: 13px; }
.cart-item-controls { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.qty-controls { display: flex; align-items: center; gap: 4px; }
.qty-btn { min-height: 32px; width: 32px; padding: 0; font-size: 20px; line-height: 1; font-weight: 700; }
.qty-display { min-width: 28px; text-align: center; font-size: 15px; font-weight: 700; }
.cart-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; height: fit-content; box-shadow: var(--shadow); }
.cart-summary h3 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.cart-summary .btn { margin-bottom: 10px; }

/* ══ FORMS ═════════════════════════════════════════════════════════════ */
.form-page { max-width: 700px; margin: 0 auto; }
.form-page-sm { max-width: 440px; }
.form-lead { color: var(--muted); margin-bottom: 20px; font-size: 15px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 14px; outline: 0;
  transition: border-color .15s;
}
.form-group textarea { min-height: 80px; padding-top: 10px; resize: vertical; }
.form-group:has(input[type="checkbox"]) {
  display: flex; flex-direction: row; align-items: center; gap: 12px;
}
.form-group:has(input[type="checkbox"]) label { margin-bottom: 0; cursor: pointer; font-size: 14px; }
.form-group input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px; min-height: unset; padding: 0;
  background: var(--line); border: none; border-radius: 999px;
  cursor: pointer; flex-shrink: 0;
  position: relative; transition: background .2s;
}
.form-group input[type="checkbox"]::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s;
}
.form-group input[type="checkbox"]:checked { background: var(--brand); }
.form-group input[type="checkbox"]:checked::before { transform: translateX(18px); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--brand); }
.field-error { color: var(--danger); font-size: 13px; }
.help-text { color: var(--muted); font-size: 12px; margin-top: 4px; display: block; }
.required { color: var(--danger); }
.form-footer { text-align: center; color: var(--muted); margin-top: 14px; font-size: 14px; }
.open-shop-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.open-shop-action {
  min-height: 48px;
  max-width: 100%;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.open-shop-action--primary {
  flex: 1 1 0;
  min-width: 0;
  background: #25d366;
  border-color: #25d366;
  font-size: 15px;
  font-weight: 800;
}

/* ══ PROFILE ═══════════════════════════════════════════════════════════ */
.avatar-upload { display: flex; align-items: center; gap: 24px; padding: 8px 0 20px; }
.avatar-preview {
  width: 90px; height: 90px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; overflow: hidden;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-meta { display: flex; flex-direction: column; }
.avatar-name { font-size: 17px; font-weight: 800; }
.avatar-username { font-size: 13px; color: var(--muted); }

.profile-carts { margin-top: 28px; }
.profile-carts h2 { font-size: 18px; margin-bottom: 12px; }
.cart-summary-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; font-size: 14px; }
.cart-summary-item a:first-child { font-weight: 700; }

/* ══ EMPTY STATE ═══════════════════════════════════════════════════════ */
.empty-state { text-align: center; color: var(--muted); padding: 48px 20px; font-size: 16px; }

/* ══ STATUS BADGES ═════════════════════════════════════════════════════ */
.badge-active   { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #d6f0e8; color: var(--brand-dark); }
.badge-inactive { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #fff1c7; color: #7b5300; }

/* ══ ADMIN-REQUEST PAGE ════════════════════════════════════════════════ */
.wa-notice { display: flex; gap: 12px; align-items: flex-start; background: #fef9ec; border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; font-size: 14px; color: #5a4000; }
.wa-notice-required { background: #fff3cd; border-color: #f5b942; }
.wa-notice-icon { font-size: 1.3rem; flex-shrink: 0; }
.pending-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 28px; text-align: center; box-shadow: var(--shadow); }
.pending-icon { font-size: 3rem; margin-bottom: 12px; }
.pending-card h1 { font-size: 26px; margin-bottom: 8px; }
.pending-shop-name { font-size: 18px; color: var(--brand); font-weight: 700; margin-bottom: 22px; }
.pending-hint { margin-top: 18px; color: var(--muted); font-size: 14px; }
.btn-wa-large { font-size: 15px; min-height: 48px; margin-top: 8px; }

/* ══ DELIVERY MAP ══════════════════════════════════════════════════════ */
.cart-total-line { font-size: 22px; font-weight: 800; margin-bottom: 14px; line-height: 1.2; }
.delivery-block { margin-bottom: 14px; }
.delivery-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.delivery-fields { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 8px; margin-bottom: 8px; }
#delivery-map { height: 170px; border-radius: var(--radius); margin-bottom: 7px; border: 1px solid var(--line); }
.delivery-input { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; background: var(--surface-soft); box-sizing: border-box; }
.delivery-hint { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; line-height: 1.35; }

/* ══ CART TOAST ════════════════════════════════════════════════════════ */
.cart-toast {
  position: fixed; top: 80px; right: 24px; z-index: 9999;
  background: var(--brand); color: #fff;
  padding: 13px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  max-width: 320px;
  transform: translateX(calc(100% + 32px));
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.cart-toast--show { transform: translateX(0); }

/* ══ INSTALL PROMPT ════════════════════════════════════════════════════ */
.install-prompt {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 9200;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(187,247,208,.45);
  border-radius: 14px;
  background: rgba(13,21,23,.96);
  color: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.install-prompt[hidden] { display: none; }
.install-prompt-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  flex: 0 0 42px;
}
.install-prompt-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.install-prompt-text { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.install-prompt-text strong { font-size: 14px; }
.install-prompt-text span { color: rgba(255,255,255,.72); font-size: 12px; }
.install-prompt-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.install-prompt-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* ══ FLOATING WA BUTTON ════════════════════════════════════════════════ */
.wa-help-fab {
  position: fixed; bottom: 28px; right: 24px; z-index: 999;
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  background: #25d366; color: #fff;
  border-radius: 50px; padding: 12px 20px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(37,211,102,.42);
  transition: transform .2s, box-shadow .2s;
  user-select: none;
}
.wa-help-fab:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(37,211,102,.54); }
.wa-fab-svg { width: 24px; height: 24px; fill: #fff; flex-shrink: 0; }
.wa-help-label { font-size: 14px; font-weight: 700; }

@media (max-width: 768px) {
  .wa-help-fab { padding: 12px; border-radius: 50%; bottom: 16px; right: 16px; }
  .wa-help-label { display: none; }
}

/* ══ FLOATING CART FAB ═════════════════════════════════════════════════ */
.cart-fab {
  position: fixed;
  /* sits above .wa-help-fab (height ≈56px + 14px gap + 28px base = 98px) */
  bottom: 98px; right: 24px; z-index: 998;
  width: 52px; height: 52px;
  background: var(--brand); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  transition: transform .2s, box-shadow .2s;
}
.cart-fab:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(0,0,0,.32); color: #fff; }
.cart-fab svg { flex-shrink: 0; }
.cart-fab-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 4px;
  background: #e53935; color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  transition: transform .15s;
}
.cart-fab-badge--hidden { display: none; }

@media (max-width: 768px) {
  /* wa-help-fab is circle 50px at bottom:16px → cart sits at 16+50+12=78px */
  .cart-fab { bottom: 78px; right: 16px; width: 46px; height: 46px; }
}

/* ══ DASHBOARD ═════════════════════════════════════════════════════════ */
.dashboard-body { background: var(--bg); }
.dashboard-layout { display: block; min-height: 100vh; }

/* Sidebar — fixed full-height so background never ends mid-page */
.dashboard-sidebar { background: var(--sidebar-bg); color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; width: 260px; height: 100vh; overflow-y: auto; z-index: 200; }
.dashboard-multistore-link {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-decoration: none;
  background: rgba(255,255,255,.05);
  transition: background .15s;
}
.dashboard-multistore-link:hover { background: rgba(255,255,255,.1); }
.dashboard-multistore-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.dashboard-multistore-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.8); }
.dashboard-brand { padding: 20px; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; transition: background .15s; }
.dashboard-brand:hover { background: rgba(255,255,255,.06); }
.dashboard-logo { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0; overflow: hidden; }
.dashboard-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dashboard-brand-title { font-size: 16px; font-weight: 800; }
.dashboard-brand-sub { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 3px; }
.sidebar-shop-name { display: none; }
.dashboard-nav { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; }
.dashboard-nav a {
  min-height: 42px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; color: rgba(255,255,255,.72);
  border-radius: var(--radius); font-size: 14px;
  transition: background .15s, color .15s;
}
.dashboard-nav a:hover, .dashboard-nav a.active { color: #fff; background: var(--sidebar-soft); }
.dashboard-nav hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 6px 0; }
.dashboard-nav-home { gap: 10px; }
.dashboard-nav-home-logo { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }

/* Topbar */
.dashboard-topbar {
  position: sticky; top: 0; z-index: 100;
  min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.dashboard-topbar h1 { font-size: 22px; }
.dashboard-topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Main content — offset by sidebar width */
.dashboard-main { margin-left: 260px; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.dashboard-content { padding: 24px 28px 40px; }

/* Stats */
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.dash-stat { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.dash-stat-label { color: var(--muted); font-size: 13px; }
.dash-stat-value { margin-top: 8px; font-size: 32px; font-weight: 800; }

/* Panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 17px; white-space: nowrap; }
.dash-search { flex: 1; min-width: 160px; max-width: 320px; height: 34px; padding: 0 10px 0 32px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; color: var(--text); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2368737f' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 10px center no-repeat; outline: none; transition: border-color .15s; }
.dash-search:focus { border-color: var(--brand); }
.panel-filters { display: flex; gap: 8px; align-items: center; }
.panel-filters input, .panel-filters select { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--text); background: var(--surface); outline: 0; }

/* ── Filter bar ── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-group--wide { flex: 1; min-width: 140px; }
.filter-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.filter-input, .filter-select {
  height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; background: var(--input-bg); color: var(--text); outline: 0;
  transition: border-color .15s;
}
.filter-input:focus, .filter-select:focus { border-color: var(--brand); }
.filter-input--price { width: 80px; }
.filter-price-row { display: flex; gap: 6px; align-items: center; }

/* Dashboard grid */
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 20px; align-items: start; }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th { background: var(--surface-soft); padding: 12px 16px; text-align: left; font-size: 12px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); letter-spacing: .03em; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.data-table tr:hover td { background: var(--surface-hover); }
.data-table tr:last-child td { border-bottom: 0; }
.product-cell { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.product-thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius); object-fit: cover; background: var(--surface-soft); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.product-thumb img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius); }
.cell-muted { color: var(--muted); font-size: 13px; margin-top: 2px; }
.actions { display: flex; gap: 8px; }

/* ── Image upload fields ── */
.img-field { display: flex; flex-direction: column; gap: 14px; }
.img-field-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.img-field-logo-body { display: flex; gap: 20px; align-items: flex-start; }
.img-field-logo-preview {
  width: 120px; height: 120px; flex-shrink: 0;
  border-radius: 14px; overflow: hidden;
  border: 2px dashed var(--line); background: var(--surface-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
}
.img-field-logo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-field-meta { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.img-field-hint { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; }
.img-pick-btn { cursor: pointer; }
.img-field-fname { font-size: 12px; color: var(--muted); word-break: break-all; }
.img-clear-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--danger); cursor: pointer; margin-top: 6px; }
.img-clear-label input[type="checkbox"] { appearance: auto; width: auto; height: auto; margin: 0; }
.img-field-input-wrap { display: none; }
.dash-divider { border: none; border-top: 1px solid var(--line); margin: 0; }
.img-field-banner-footer { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.img-field-banner-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

/* ── Banner preview ── */
.banner-preview-wrap {
  width: 100%; aspect-ratio: 3/1;
  border-radius: var(--radius); overflow: hidden;
  border: 2px dashed var(--line); background: var(--surface-soft);
}
.banner-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-preview-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; color: var(--muted); font-size: 13px;
}

/* ══ MASCOT ════════════════════════════════════════════════════════════ */
#mascot-root {
  position: fixed;
  bottom: 24px; left: 24px;
  z-index: 9000;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  transform: translate(0, 0);
  transition: transform .48s cubic-bezier(.34, 1.28, .64, 1);
  will-change: transform;
}

.mascot-avatar {
  width: 100%;
  height: auto;
  cursor: pointer;
  pointer-events: all;
  filter: drop-shadow(0 6px 20px rgba(12,36,26,.30));
  animation: mascot-float 3s ease-in-out infinite;
  transition: filter .2s;
  display: block;
}
.mascot-avatar:hover {
  animation-play-state: paused;
  filter: drop-shadow(0 10px 26px rgba(12,36,26,.40)) brightness(1.06);
}
.mascot-avatar.mascot-talk  { animation: mascot-talk  .85s ease; }
.mascot-avatar.mascot-greet { animation: mascot-greet 3.2s cubic-bezier(.34,1.28,.64,1) forwards; }
.mascot-svg { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }

@keyframes mascot-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes mascot-talk {
  0%   { transform: translateY(0) scale(1); }
  20%  { transform: translateY(-10px) scale(1.06); }
  50%  { transform: translateY(-10px) scale(1.06) rotate(3deg); }
  80%  { transform: translateY(-5px) scale(1.03) rotate(-1deg); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes mascot-greet {
  0%   { transform: scale(1)    translateY(0); }
  20%  { transform: scale(1.9)  translateY(-24px); }
  65%  { transform: scale(1.9)  translateY(-24px); }
  100% { transform: scale(1)    translateY(0); }
}

/* Пузырь — над персонажем */
.mascot-bubble {
  position: relative;
  align-self: flex-start;
  left: var(--mascot-bubble-x, 0px);
  top: var(--mascot-bubble-y, 0px);
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  pointer-events: all;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 14px 16px 12px;
  box-shadow: 0 8px 28px rgba(12,36,26,.14);
  transition: opacity .22s ease, transform .22s ease;
}
/* хвостик — снизу-слева, указывает на персонажа */
.mascot-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px; left: 20px;
  border: 5px solid transparent;
  border-top-color: var(--surface);
}
.mascot-bubble::before {
  content: '';
  position: absolute;
  bottom: -11px; left: 19px;
  border: 6px solid transparent;
  border-top-color: var(--line);
}

/* Левый режим */
#mascot-root.mascot-left {
  align-items: flex-start;
}
#mascot-root.mascot-left .mascot-bubble {
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
}
#mascot-root.mascot-left .mascot-bubble::after {
  right: auto; left: 20px;
}
#mascot-root.mascot-left .mascot-bubble::before {
  right: auto; left: 19px;
}

#mascot-root.mascot-right {
  align-items: flex-end;
}
#mascot-root.mascot-right .mascot-bubble {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
}
#mascot-root.mascot-right .mascot-bubble::after {
  left: auto; right: 18px;
}
#mascot-root.mascot-right .mascot-bubble::before {
  left: auto; right: 17px;
}

.mascot-bubble--hidden {
  opacity: 0; transform: translateY(10px) scale(.95);
  pointer-events: none;
}
.mascot-bubble--show {
  opacity: 1; transform: translateY(0) scale(1);
}

.mascot-close {
  position: absolute; top: 7px; right: 9px;
  background: none; border: none;
  font-size: 17px; line-height: 1;
  cursor: pointer; padding: 2px 4px; border-radius: 4px;
  color: var(--muted); opacity: .55; transition: opacity .15s, background .15s;
}
.mascot-close:hover { opacity: 1; background: var(--surface-soft); }

.mascot-text {
  font-size: 13px; line-height: 1.55; color: var(--text);
  margin: 0 20px 10px 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.mascot-text:only-child { margin-right: 20px; margin-bottom: 0; }

.mascot-choices { display: flex; flex-direction: column; gap: 5px; }

.mascot-choice {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: left; color: var(--text);
  transition: background .15s, border-color .15s, color .15s;
}
.mascot-choice:hover {
  background: var(--brand); color: #fff; border-color: var(--brand);
}

/* Mascot: on dashboard pages push above bottom nav and anchor to right */
.dashboard-body #mascot-root {
  left: auto;
  right: 24px;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
  #mascot-root {
    position: fixed;
    width: 72px;
    left: 16px;
    right: auto;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
    will-change: transform;
    z-index: 9000;
  }
  .mascot-bubble {
    max-width: min(220px, calc(100vw - 24px));
  }
  .mascot-avatar { touch-action: none; }
  body[data-mascot-page="cart"] #mascot-root {
    width: 56px;
    left: 10px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  body[data-mascot-page="cart"] .mascot-bubble {
    max-width: min(230px, calc(100vw - 24px));
  }
  /* Dashboard: keep mascot on right so it doesn't cover checkbox rows */
  .dashboard-body #mascot-root {
    left: auto;
    right: 12px;
  }
}

/* ══ CATEGORY ICON PICKER ══════════════════════════════════════════════ */
.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.icon-picker-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
  transition: border-color .15s, background .15s, color .15s;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  line-height: 0;
}
.dash-field .icon-picker-label {
  justify-content: center;
  margin-bottom: 0;
}
.icon-picker-label:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--surface-soft);
}
.icon-picker-label--active {
  border-color: var(--brand);
  background: var(--surface-soft);
  color: var(--brand);
}
.icon-picker-label input[type="radio"] { display: none; }
.icon-picker-cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.icon-picker-cell svg {
  display: block;
  flex: 0 0 auto;
  margin: auto;
}

/* Legacy logo preview (used elsewhere) */
.logo-preview-wrap {
  width: 96px; height: 96px; border-radius: 12px;
  overflow: hidden; border: 1px solid var(--line);
  background: var(--surface-soft);
  margin-bottom: 10px; flex-shrink: 0;
}
.logo-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-preview-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }

/* Generic dashboard card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

/* ══ CATEGORIES PAGE (table ↔ card toggle) ══════════════════════════════ */
.cat-table-wrap { display: block; }
.cat-card-list  { display: none; }
/* cat-card-item base (desktop: never shown) */
.cat-icon-field { flex-direction: column; align-items: flex-start; gap: 8px; }

/* ══ PRODUCTS PAGE (table ↔ card toggle) ════════════════════════════════ */
.prod-table-wrap { display: block; }
.prod-card-list  { display: none; }

/* Dashboard form panel */
.dash-form { display: grid; gap: 14px; padding: 18px; }
.dash-field label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.char-counter { font-size: 12px; font-weight: 400; color: var(--muted); }
.dash-field input, .dash-field select, .dash-field textarea { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--text); background: var(--surface); outline: 0; }
.dash-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--text); background: var(--surface); outline: 0; resize: vertical; font-family: inherit; box-sizing: border-box; }
.dash-field textarea { min-height: 82px; padding-top: 10px; resize: vertical; }

/* ── Checkbox toggle inside dash-field ── */
.dash-field:has(input[type="checkbox"]) {
  display: flex; flex-direction: row; align-items: center; gap: 12px;
}
.dash-field:has(input[type="checkbox"]) label {
  margin-bottom: 0; order: 2; cursor: pointer; color: var(--text); font-size: 14px;
}
.dash-field input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px; min-height: unset; padding: 0;
  background: var(--line); border: none; border-radius: 999px;
  cursor: pointer; flex-shrink: 0; order: 1;
  position: relative; transition: background .2s;
}
.dash-field input[type="checkbox"]::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s;
}
.dash-field input[type="checkbox"]:checked { background: var(--brand); }
.dash-field input[type="checkbox"]:checked::before { transform: translateX(18px); }
.dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-area {
  min-height: 130px; display: grid; place-items: center;
  padding: 20px 16px;
  border: 2px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); background: var(--surface-soft);
  text-align: center; font-size: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-area:hover { border-color: var(--brand); background: var(--surface-hover); }

/* ── Quick-add form: sections ── */
.dash-form-sections { display: flex; flex-direction: column; }
.quick-section { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.quick-section--last { border-bottom: none; }
.quick-section-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.quick-submit { padding: 14px 18px; }
.quick-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.form-error { color: #e53935; font-size: 12px; margin-top: 2px; }

/* ── Quick-add: custom file upload ── */
.qa-upload-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qa-upload-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-soft);
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: border-color .2s, background .2s; flex-shrink: 0;
}
.qa-upload-btn:hover { border-color: var(--brand); background: var(--surface-hover); color: var(--brand); }
.qa-upload-name { font-size: 12px; color: var(--muted); min-width: 0; word-break: break-all; }
.qa-upload-input { display: none; }

.import-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .52);
}
.import-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}
.import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.import-kicker {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.import-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.import-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}
.import-close:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.import-body {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.import-note {
  padding: 14px;
  border: 1px solid rgba(46, 125, 50, .18);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.import-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
}
.import-columns {
  display: grid;
  gap: 12px;
}
.import-columns-title {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.import-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.import-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(46, 125, 50, .22);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.import-template-btn {
  width: fit-content;
}
.import-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.import-file-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px dashed rgba(46, 125, 50, .42);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.import-file-box:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}
.import-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.import-file-text {
  flex: 1;
  min-width: 0;
}
.import-file-text strong,
.import-file-text small {
  display: block;
}
.import-file-text strong {
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.import-file-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.import-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.import-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.import-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Old dashboard compat */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; }
.section-header h1 { font-size: 22px; }
.dashboard-two-col { display: grid; grid-template-columns: 1fr 360px; gap: 28px; }

/* ══ DASHBOARD HAMBURGER ════════════════════════════════════════════════ */
.dashboard-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
  background: none; border: none; cursor: pointer; flex-shrink: 0;
}
.dashboard-hamburger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--text); transition: background .15s;
}
.dashboard-hamburger:hover span { background: var(--brand); }

/* ══ MOBILE BOTTOM NAV (dashboard) ═════════════════════════════════════ */
.dash-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 600;
  background: var(--sidebar-bg);
  border-top: 1px solid rgba(255,255,255,.10);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.dash-mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 9px;
  color: rgba(255,255,255,.50);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.dash-mobile-nav-item span { line-height: 1.1; text-align: center; }
.dash-mobile-nav-item svg { flex-shrink: 0; }
.dash-mobile-nav-item:hover,
.dash-mobile-nav-item--active { color: #fff; }
.dash-mobile-nav-item--active svg { stroke: var(--accent, #22C55E); }
.dash-mobile-nav-item--active span { color: var(--accent, #22C55E); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 499;
  background: rgba(0,0,0,.45);
}
.sidebar-overlay.is-open { display: block; }

/* ══ RESPONSIVE ════════════════════════════════════════════════════════ */

/* --- Tablet landscape / small desktop (≤ 1100px) --- */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .shop-hero { padding: 36px 0 32px; }
  .shop-hero-badge { width: 130px; height: 130px; font-size: 42px; }
  .shop-hero-title { font-size: 32px; }
}

/* --- Tablet (≤ 960px) --- */
@media (max-width: 960px) {
  .dashboard-sidebar {
    z-index: 500; transform: translate3d(-100%, 0, 0);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    will-change: transform; -webkit-overflow-scrolling: touch;
  }
  .dashboard-sidebar.is-open { transform: translate3d(0, 0, 0); }
  .dashboard-main { margin-left: 0; }
  .dashboard-hamburger { display: flex; }
  .dash-mobile-nav { display: flex; }
  /* Отступ снизу чтобы контент не скрывался за нижней панелью */
  .dashboard-content { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; top: auto; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-facts { grid-template-columns: repeat(2, 1fr); }
  .dashboard-two-col { grid-template-columns: 1fr; }
}

/* --- Mobile landscape / large phone (≤ 768px) --- */
@media (max-width: 768px) {
  /* ── Categories: switch table → cards ── */
  .cat-table-wrap { display: none; }
  .cat-card-list  { display: block; }
  .cat-card-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .cat-card-item:last-child { border-bottom: none; }
  .cat-card-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
  }
  .cat-card-icon {
    width: 36px; height: 36px; min-width: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-soft); border-radius: 8px;
    color: var(--brand);
  }
  .cat-card-name {
    font-size: 15px; font-weight: 600; flex: 1; min-width: 0;
    word-break: break-word; color: var(--text);
  }
  .cat-card-badge {
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 999px; white-space: nowrap; flex-shrink: 0;
  }
  .cat-card-badge--yes { background: #e8f5e9; color: #1b5e20; }
  .cat-card-badge--no  { background: #f5f5f5; color: var(--muted); }
  .cat-card-meta {
    font-size: 12px; color: var(--muted); margin-bottom: 10px;
    padding-left: 46px;
  }
  .cat-card-actions {
    display: flex; gap: 8px; padding-left: 46px;
  }
  .cat-card-btn {
    flex: 1; min-width: 0; width: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; min-height: 38px;
  }
  .cat-card-btn--del {
    background: #fce4ec; color: #c62828;
    border-color: #ef9a9a;
  }
  .cat-card-btn--del:hover { background: #f8bbd0; }

  /* ── Icon picker: 4 per row on mobile ── */
  .icon-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .icon-picker-label {
    width: 100%; height: 52px;
  }
  /* Active icon: stronger green border */
  .icon-picker-label--active {
    border-color: var(--brand);
    background: var(--surface-soft);
    box-shadow: 0 0 0 1px var(--brand);
  }

  /* ── Cat icon field: column layout ── */
  .cat-icon-field { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }

  /* ── Products: switch table → cards ── */
  .prod-table-wrap { display: none; }
  .prod-card-list  { display: block; }
  .prod-card-item {
    padding: 12px 14px; border-bottom: 1px solid var(--line);
  }
  .prod-card-item:last-child { border-bottom: none; }
  .prod-card-header {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px;
  }
  .prod-card-thumb {
    width: 54px; height: 54px; min-width: 54px; object-fit: cover;
    border-radius: 8px; flex-shrink: 0;
  }
  .prod-card-thumb-ph {
    width: 54px; height: 54px; min-width: 54px; flex-shrink: 0;
    background: var(--line); border-radius: 8px;
  }
  .prod-card-info { flex: 1; min-width: 0; }
  .prod-card-name {
    font-size: 14px; font-weight: 600; color: var(--text);
    word-break: break-word; margin-bottom: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .prod-card-cat { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
  .prod-card-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
  .prod-card-price { font-size: 15px; font-weight: 700; white-space: nowrap; }
  .prod-card-price--sale { color: #e53935; }
  .prod-card-price-old { font-size: 12px; color: var(--muted); text-decoration: line-through; white-space: nowrap; }
  .prod-card-discount {
    font-size: 11px; font-weight: 700; color: #fff;
    background: #e53935; border-radius: 4px; padding: 1px 5px; white-space: nowrap;
  }
  .prod-card-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  .prod-card-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
  .prod-card-badge--pub { background: #e8f5e9; color: #1b5e20; }
  .prod-card-badge--hid { background: #fce4ec; color: #880e4f; }
  .prod-card-actions { display: flex; gap: 6px; }

  /* ── Quick form: stack split 2-col to 1-col on narrow screens ── */
  .dash-split { grid-template-columns: 1fr; }
  .quick-toggles { grid-template-columns: 1fr 1fr; }

  /* Owner bar */
  .owner-bar { padding: 0 12px; min-height: 38px; }
  .owner-bar-title { display: none; }
  .owner-bar-nav a { font-size: 12px; padding: 5px 8px; }

  /* Safe space below floating WA button / bottom UI */
  main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

  /* Navbar */
  .navbar-inner { gap: 8px; }
  .navbar-subtitle { display: none; }
  .navbar-links { gap: 4px; }
  .navbar-links .btn-sm { padding: 0 8px; font-size: 12px; min-height: 34px; }

  /* Container */
  .container { padding: 20px 0 32px; }

  .open-shop-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .open-shop-action,
  .open-shop-action--primary,
  .form-card .btn-block,
  .cart-summary .btn,
  .profile-carts .btn,
  .product-form-actions .btn,
  .mass-preview-actions .btn,
  .mass-secondary-actions .btn {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    text-align: center;
    line-height: 1.25;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  /* Shop toolbar: chips wrap below search */
  .shop-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .shop-chips { flex-wrap: nowrap; }

  /* Shop hero */
  .shop-hero { padding: 32px 0 28px; }
  .shop-hero-inner { gap: 24px; }
  .shop-hero-badge { width: 120px; height: 120px; font-size: 38px; border-radius: 22px; }
  .shop-hero-title { font-size: 26px; }
  .shop-hero-pills { gap: 8px; }
  .shop-hero-pill { font-size: 13px; padding: 6px 12px; }

  /* Product grid: 2 cols on tablet */
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card-body h3 { font-size: 14px; }
  .product-price { font-size: 16px; }

  /* Product detail */
  .product-detail { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .product-price-large { font-size: 28px; }

  /* Cart */
  .cart-layout { grid-template-columns: 1fr; gap: 16px; }
  .cart-item { flex-wrap: wrap; gap: 10px; }
  .cart-item-controls { width: 100%; flex-direction: row; justify-content: flex-start; }
  .cart-summary { padding: 16px; }
  .cart-total-line { font-size: 21px; margin-bottom: 12px; }
  .delivery-fields { grid-template-columns: 1fr; gap: 7px; }
  #delivery-map { height: 180px; }

  /* Page header */
  .page-header { flex-wrap: wrap; gap: 10px; }
  .my-shop-block { flex-wrap: wrap; width: 100%; justify-content: space-between; }

  /* Forms */
  .form-card { padding: 18px; }

  /* Dashboard */
  .dashboard-topbar { padding: 0 16px; flex-wrap: wrap; min-height: unset; padding-top: 12px; padding-bottom: 12px; gap: 8px; }
  .dashboard-content { padding: 16px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* --- Mobile landscape (≤ 640px) --- */
@media (max-width: 640px) {
  .shop-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .shop-hero-right { order: -1; }
  .shop-hero-badge { width: 80px; height: 80px; font-size: 26px; border-radius: 16px; box-shadow: none; }
  .shop-hero-title { font-size: 22px; }
  .shop-hero-title-row { align-items: flex-start; }
  .shop-title-main { width: 100%; }
  .shop-favorite-actions { width: 100%; margin-left: 0; }
  .shop-favorite-actions form { width: 100%; }
  .shop-favorite-btn,
  .shop-favorite-remove,
  .shop-favorite-state {
    width: 100%;
    white-space: normal;
    text-align: center;
  }
  .shop-hero-desc { font-size: 14px; margin-bottom: 16px; }
}

/* ── Mobile right-end group (cart icon + hamburger, hidden on desktop) ── */
.navbar-mobile-end {
  display: none;
  align-items: center; gap: 2px; flex-shrink: 0;
}

/* ── Hamburger button ── */
.nav-hamburger,
.nav-theme-toggle,
.mobile-lang-toggle {
  display: flex; align-items: center;
  background: none; border: none; cursor: pointer;
  color: #fff; font-size: 22px; line-height: 1;
  padding: 6px 8px; border-radius: 8px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-theme-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; font-size: 18px; }
.mobile-lang-menu { display: none; position: relative; }
.mobile-lang-toggle { width: 40px; height: 40px; justify-content: center; padding: 0; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.mobile-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: #0d1517;
  box-shadow: 0 14px 34px rgba(0,0,0,.46);
  z-index: 9100;
}
.mobile-lang-dropdown.is-open { display: block; }
.mobile-lang-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.86);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.mobile-lang-item.is-active { color: #86efac; background: rgba(22,163,74,.14); font-weight: 800; }
.nav-hamburger:hover,
.nav-theme-toggle:hover,
.mobile-lang-toggle:hover { background: rgba(255,255,255,.15); }

/* ── Cart icon in mobile header (hidden on desktop) ── */
.nav-cart-fab {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  color: rgba(255,255,255,.90);
  -webkit-tap-highlight-color: transparent;
}
.nav-cart-fab:hover { background: rgba(255,255,255,.12); }

/* ── Mobile drawer elements (hidden on desktop) ── */
.mob-drawer-header { display: none; }
.mob-nav-owner     { display: none; }
.mob-nav-link      { display: none; }
.mob-nav-divider   { display: none; }
.mob-shop-save     { display: none; }

/* --- Mobile portrait (≤ 540px) --- */
@media (max-width: 540px) {
  /* Owner bar: hide, its links are moved into the burger drawer */
  .owner-bar { display: none; }

  /* Navbar: hamburger mode */
  .navbar-mobile-end { display: flex; }
  .nav-back-btn { display: flex; }
  .mobile-lang-menu { display: block; }
  .nav-theme-toggle { display: flex; }
  .desktop-my-shops-btn { display: none; }
  .my-shops-menu { display: none; }
  .navbar-inner { width: calc(100% - 20px); flex-wrap: nowrap; padding: 0; min-height: 56px; gap: 6px; }
  .navbar-brand { gap: 7px; flex: 1 1 auto; }
  .navbar-logo { width: 34px; height: 34px; }
  .navbar-title { font-size: 15px; white-space: nowrap; }
  .nav-back-btn,
  .nav-cart-fab,
  .nav-theme-toggle,
  .mobile-lang-toggle {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .nav-hamburger {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
  }
  .navbar-mobile-end { gap: 0; }

  /* Drawer panel */
  .navbar-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0d1517;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 2px solid rgba(22,163,74,.35);
    padding: 0 0 16px;
    z-index: 8999;
    box-shadow: 0 12px 32px rgba(0,0,0,.55);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .navbar-links.nav-open { display: flex; }

  /* ── Drawer: sticky header row (title + close button) ── */
  .mob-drawer-header { display: none; }
  .mob-drawer-title {
    font-size: 11px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: rgba(255,255,255,.38);
  }
  .nav-drawer-close {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: rgba(255,255,255,.09); border: none; cursor: pointer;
    color: rgba(255,255,255,.80);
    -webkit-tap-highlight-color: transparent;
  }
  .nav-drawer-close:active { background: rgba(255,255,255,.18); color: #fff; }

  /* ── Drawer: owner / superadmin section ── */
  .mob-nav-owner { display: block; padding: 4px 0; }
  .mob-nav-owner-header {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 10px 16px 4px;
  }
  .mob-nav-owner-name {
    font-size: 11px; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: rgba(255,255,255,.38);
  }
  .mob-nav-lic-badge {
    font-size: 11px; font-weight: 700;
    padding: 2px 10px; border-radius: 999px;
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.70);
  }
  .mob-nav-lic-badge--warn { background: rgba(230,81,0,.30); color: #ffab91; }
  .mob-nav-link {
    display: flex; align-items: center; gap: 14px;
    width: 100%; min-height: 52px; padding: 0 16px;
    font-size: 15px; font-weight: 500; color: rgba(255,255,255,.92);
    background: none; border: none; cursor: pointer; text-align: left;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-nav-link:active { background: rgba(255,255,255,.07); }
  .mob-nav-link.is-active {
    background: rgba(22,163,74,.16);
    color: #86efac;
    font-weight: 800;
  }
  .mob-nav-link svg { opacity: .60; flex-shrink: 0; stroke: currentColor; }
  .mob-nav-link.is-active svg { opacity: 1; }

  /* ── Drawer: section divider ── */
  .mob-nav-divider {
    display: block; height: 1px;
    background: rgba(255,255,255,.08); margin: 4px 0;
  }

  /* ── Drawer: shop save section ── */
  .mob-shop-save { display: block; padding: 0; }
  .mob-shop-save-state {
    display: block; padding: 10px 20px 2px;
    font-size: 13px; font-weight: 700; color: #86efac;
  }
  .mob-shop-save form { margin: 0; width: 100%; }
  .mob-shop-save-add { color: rgba(187,247,208,.85); }
  .mob-shop-save-remove { color: #fca5a5; }

  /* ── Drawer: existing items (cart btn, theme, lang, user) ── */
  .navbar-links .btn-sm {
    width: 100%; min-height: 52px; font-size: 15px;
    border-radius: 0; border: none;
    border-bottom: 1px solid rgba(255,255,255,.07);
    justify-content: flex-start;
    padding: 0 16px;
    color: rgba(255,255,255,.90);
    background: transparent;
    font-weight: 500;
  }
  .navbar-links .btn-sm:active { background: rgba(255,255,255,.07); color: #fff; }
  .navbar-links .theme-toggle { display: none; }
  .navbar-links .user-menu,
  .navbar-links .lang-menu { width: 100%; border-bottom: 1px solid rgba(255,255,255,.07); }
  .navbar-links .user-menu-toggle,
  .navbar-links .lang-menu-toggle {
    width: 100%; min-height: 52px; font-size: 15px; font-weight: 500;
    border-radius: 0; border: none;
    justify-content: flex-start; padding: 0 16px;
    color: rgba(255,255,255,.90); background: transparent;
  }
  .navbar-links .user-menu-toggle:active,
  .navbar-links .lang-menu-toggle:active { background: rgba(255,255,255,.07); color: #fff; }
  .navbar-links .user-menu-dropdown,
  .navbar-links .lang-menu-dropdown {
    position: static; box-shadow: none;
    background: rgba(255,255,255,.04);
    border: none; border-top: 1px solid rgba(255,255,255,.06);
    border-radius: 0; margin: 0;
  }
  .navbar-links .user-menu-item,
  .navbar-links .lang-menu-item {
    color: rgba(255,255,255,.78); min-height: 46px;
    display: flex; align-items: center; padding: 0 32px;
    font-size: 14px;
  }
  .navbar-links .user-menu-item:active { background: rgba(255,255,255,.07); color: #fff; }
  .navbar-links .user-menu-item.is-active { color: #86efac; background: rgba(22,163,74,.12); font-weight: 800; }
  .navbar-links .user-menu-item--danger { color: #ef9a9a; }
  .navbar-links .lang-menu-item.is-active { color: #52b594; background: rgba(22,163,74,.10); }
  .navbar-links .user-menu-divider { background: rgba(255,255,255,.08); margin: 2px 0; }
  .site-header-wrapper,
  .sticky-header { position: sticky; top: 0; left: auto; right: auto; }

  /* Product grid: 2 narrow cols */
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-card-body { padding: 8px; }
  .product-card-body h3 { font-size: 12px; margin: 6px 0 3px; }
  .product-price { font-size: 14px; }
  .product-price-strike { font-size: 11px; }
  .product-meta { font-size: 11px; margin-bottom: 6px; }
  /* On narrow screens hide info button, keep cart icon compact */
  .product-actions { gap: 5px; }
  .product-actions .btn-info { display: none; }
  .product-actions .btn-icon { flex: 0 0 36px; width: 36px; min-height: 34px; font-size: 16px; }
  .product-actions .btn-whatsapp { font-size: 12px; min-height: 34px; }

  /* Shop list cards */
  .shop-grid { grid-template-columns: 1fr; }

  /* Cart item */
  .cart-item-img, .cart-item-img-placeholder { width: 60px; height: 60px; }

  /* My shop block */
  .my-shop-block { border-radius: 12px; padding: 10px 12px; }
  .my-shop-actions { gap: 6px; }

  /* Breadcrumb */
  .breadcrumb { font-size: 12px; }

  /* Dashboard stats */
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-stat-value { font-size: 24px; }

  /* Dashboard grid: stack on mobile */
  .dashboard-grid { grid-template-columns: 1fr; }

  /* Forms */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], input[type="tel"], input[type="url"],
  select, textarea {
    font-size: 16px; /* предотвращает авто-зум на iOS */
  }
  .form-page { padding: 16px; }
  .form-card { padding: 14px; }
  .btn-block { font-size: 15px; min-height: 46px; }

  /* Dashboard topbar actions: stack */
  .dashboard-topbar-actions { flex-wrap: wrap; gap: 6px; }
  .dashboard-topbar-actions .btn { width: 100%; justify-content: center; }

  /* Sa-table on mobile: scroll */
  .sa-table { display: block; overflow-x: auto; }
}

/* --- Small phone (≤ 380px) --- */
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr; }
  .shop-facts { grid-template-columns: 1fr; }
  .navbar-logo { width: 34px; height: 34px; font-size: 12px; }
  .navbar-title { font-size: 14px; }
}

/* ── Shop expired overlay ──────────────────────────────────────────────── */
.shop-expired-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.shop-expired-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  animation: expired-card-in .25s ease;
}

@keyframes expired-card-in {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.shop-expired-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 auto 4px;
  overflow: hidden;
}

.shop-expired-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.shop-expired-lock { font-size: 44px; margin: 8px 0 14px; }

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

.shop-expired-msg {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 24px;
}

/* ══ HERO CAROUSEL ═══════════════════════════════════════════════════════ */

.hero-carousel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: 240px;
  margin-bottom: 28px;
  user-select: none;
  background: #4f46e5;
}

.hero-carousel-track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.hero-slide {
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.52) 0%, rgba(0,0,0,.12) 70%, transparent 100%);
}

.hero-slide-content {
  position: relative;
  z-index: 1;
  padding: 0 40px;
  color: #fff;
  max-width: 520px;
}

.hero-slide-title {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 8px;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,.25);
}

.hero-slide-subtitle {
  font-size: 14px;
  opacity: .88;
  margin: 0 0 18px;
  line-height: 1.5;
}

.hero-slide-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: opacity .15s;
}
.hero-slide-btn:hover { opacity: .88; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.82);
  cursor: pointer;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .15s;
  padding: 0;
  line-height: 1;
  color: #111;
}
.hero-arrow:hover { background: #fff; }
.hero-arrow--left  { left: 14px; }
.hero-arrow--right { right: 14px; }

.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 5;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  border: none;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  padding: 0;
  transition: background .2s, width .25s cubic-bezier(.4,0,.2,1);
}
.hero-dot.is-active { background: #fff; width: 24px; }

.hero-edit-link {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .15s;
}
.hero-edit-link:hover { background: rgba(0,0,0,.8); color: #fff; }

@media (max-width: 600px) {
  .hero-carousel { height: 175px; border-radius: 12px; }
  .hero-slide-title { font-size: 18px; }
  .hero-slide-subtitle { font-size: 12px; margin-bottom: 12px; }
  .hero-slide-content { padding: 0 18px; }
  .hero-arrow { width: 32px; height: 32px; font-size: 20px; }
  .hero-slide-btn { padding: 8px 16px; font-size: 12px; }
}

/* ══ SHOP LIST — Yandex Eats style ══════════════════════════════════════ */

/* Search bar */
.sl-search-bar {
  position: relative;
  margin-bottom: 28px;
}
.sl-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--muted);
  pointer-events: none;
}
.sl-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.sl-search-input:focus { border-color: var(--brand); }

/* Section */
.sl-section { margin-bottom: 36px; }
.sl-section-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sl-heart-title { color: #e53935; }

/* Mini carousel */
.sl-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.sl-carousel::-webkit-scrollbar { display: none; }

.sl-mini-card {
  flex: 0 0 120px;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sl-mini-card:hover .sl-mini-img { box-shadow: 0 4px 14px rgba(0,0,0,.14); transform: translateY(-2px); }

.sl-mini-img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: box-shadow .15s, transform .15s;
  flex-shrink: 0;
}
.sl-mini-img img { width: 100%; height: 100%; object-fit: cover; }

.sl-mini-name {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.sl-mini-meta { font-size: 11px; color: var(--muted); text-align: center; }

/* Like button on shop card */
.shop-like-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: transform .15s;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #9e9e9e;
  padding: 0;
}
.shop-like-btn:hover { transform: scale(1.2); }
.shop-like-btn.is-liked { color: #e53935; }

/* ══ DISCOUNT CAROUSEL (shop detail) ════════════════════════════════════ */

.dc-wrap {
  margin-bottom: 28px;
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 20px 20px 16px;
  border: 1px solid var(--border);
}
.dc-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 14px;
}
.dc-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 20px 8px 4px; /* trailing padding so last card isn't clipped */
}
.dc-carousel::-webkit-scrollbar { display: none; }

.dc-card {
  flex: 0 0 158px;
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 10px rgba(12,36,26,.08);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.dc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(12,36,26,.14); }

.dc-card-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.dc-card-ph {
  width: 100%;
  height: 120px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.dc-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  line-height: 1;
}

.dc-card-body { padding: 8px 10px 10px; flex: 1; }
.dc-card-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}
.dc-prices { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.dc-price-new { font-size: 14px; font-weight: 800; color: #e53935; }
.dc-price-old { font-size: 11px; color: var(--muted); text-decoration: line-through; }

/* ══ DISCOUNT STYLES in product grid & detail ═══════════════════════════ */

.product-price-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.product-price--sale { color: #e53935; }
.product-price-strike { font-size: 13px; color: var(--muted); text-decoration: line-through; font-weight: 400; }

.discount-pill {
  display: inline-flex;
  align-items: center;
  background: #ffebee;
  color: #e53935;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Product detail discount */
.product-price-detail-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.product-price-large--sale { color: #e53935 !important; margin: 0; }
.product-price-large--old {
  font-size: 20px;
  color: var(--muted);
  text-decoration: line-through;
  margin: 0;
  font-weight: 400;
}

/* Dashboard price column */
.dash-price-old {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 4px;
}

/* ══ CAROUSEL ARROWS ════════════════════════════════════════════════════ */

.carousel-outer {
  position: relative;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,.14);
  transition: background .15s, color .15s, opacity .2s, transform .15s;
  padding: 0;
}
.carousel-arrow:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-50%) scale(1.08);
}
.carousel-arrow--left  { left: -18px; }
.carousel-arrow--right { right: -18px; }
.carousel-arrow.is-hidden { opacity: 0; pointer-events: none; }

/* Arrows sit at left:-18px / right:-18px; the section wrap has ≥18px own padding
   so arrows never get clipped — no extra carousel-outer padding needed */
.carousel-outer + * { margin-top: 0; }
.sl-section .carousel-outer,
.dc-wrap .carousel-outer { padding: 0; }

/* ── 1–2 item sections: left-aligned, no auto-scroll, no trailing gap ── */
.carousel-few-items .js-carousel-track {
  overflow-x: visible;
  padding-right: 0;
}
.carousel-few-items .carousel-arrow { display: none !important; }

/* ══ POPULAR PRODUCTS CAROUSEL ═══════════════════════════════════════════ */

.pop-wrap {
  margin-bottom: 28px;
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 20px 20px 16px;
  border: 1px solid var(--border);
}
.pop-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand);
  margin: 0 0 14px;
}
.pop-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 20px 8px 4px;
}
.pop-carousel::-webkit-scrollbar { display: none; }

.pop-card {
  flex: 0 0 158px;
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 10px rgba(12,36,26,.08);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.pop-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(12,36,26,.14); }

.pop-card-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.pop-card-ph {
  width: 100%;
  height: 120px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.pop-badge {
  position: absolute;
  top: 7px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  line-height: 1;
}
.pop-badge--hot  { right: 7px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.pop-badge--sale { left: 7px; background: #e53935; color: #fff; }

.pop-card-body { padding: 8px 10px 10px; flex: 1; }
.pop-card-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}
.pop-prices { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pop-price-new { font-size: 14px; font-weight: 800; }
.pop-price-old { font-size: 11px; color: var(--muted); text-decoration: line-through; }

/* ══ Dots indicator ═══════════════════════════════════════════════════════ */
.carousel-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 10px;
}
.carousel-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line); border: none; padding: 0; cursor: pointer;
  transition: background .2s, transform .2s;
}
.carousel-dot--active { background: var(--brand); transform: scale(1.3); }

/* ══ RESPONSIVE — carousel on mobile ════════════════════════════════════ */

@media (max-width: 600px) {
  .dc-card  { flex: 0 0 138px; }
  .pop-card { flex: 0 0 138px; }
  .new-card { flex: 0 0 138px; }
  .dc-card-img,  .dc-card-ph  { height: 100px; }
  .pop-card-img, .pop-card-ph { height: 100px; }
  .new-card-img, .new-card-ph { height: 100px; }
  .sl-mini-card { flex: 0 0 100px; }
  .sl-mini-img { width: 70px; height: 70px; border-radius: 14px; }
  .dc-wrap  { padding: 14px 12px 12px; border-radius: 12px; }
  .pop-wrap { padding: 14px 12px 12px; border-radius: 12px; }
  .carousel-arrow { display: none; }
  .carousel-dots  { display: none; } /* свайп достаточен на мобильном */
  .sl-section .carousel-outer,
  .dc-wrap  .carousel-outer,
  .pop-wrap .carousel-outer { padding: 0; }
  .new-wrap .carousel-outer { padding: 0; }
}

/* ══ PUSH NOTIFICATION TOAST ═════════════════════════════════════════════ */

#push-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 400px;
  width: calc(100% - 32px);
  z-index: 9999;
  opacity: 0;
  transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s;
}
#push-toast.push-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.push-toast-icon { font-size: 26px; flex-shrink: 0; }
.push-toast-text { font-size: 14px; line-height: 1.45; flex: 1; }
.push-toast-btns { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.push-toast-allow {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.push-toast-allow:hover { opacity: .88; }
.push-toast-deny {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.push-toast-deny:hover { border-color: var(--muted); }

/* ── Push bell pill states ─────────────────────────────────────────────── */
.push-bell-pill {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.push-bell-pill--on {
  background: var(--brand);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(15,143,111,.35);
}
.push-bell-pill--off {
  background: rgba(255,255,255,.18);
}
.push-bell-pill--na {
  opacity: .45;
  cursor: not-allowed;
}
.push-bell-pill:hover:not(.push-bell-pill--na):not(.push-bell-pill--on) {
  background: rgba(255,255,255,.35);
}

/* ══ PROFILE — my shops ══════════════════════════════════════════════ */
.profile-shops-section { margin-top: 32px; }
.profile-shops-title {
  font-size: 20px; font-weight: 800; color: var(--text);
  margin: 0 0 16px;
}
.profile-shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.profile-shop-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  position: relative;
}
.profile-shop-card:hover {
  box-shadow: 0 6px 24px rgba(13,122,95,.14);
  transform: translateY(-3px);
  border-color: var(--brand);
}
.profile-shop-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: #eef9f5;
  border: 1px solid rgba(13,122,95,.15);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.profile-shop-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-shop-logo span { font-size: 18px; font-weight: 900; color: var(--brand); }
.profile-shop-body { flex: 1; min-width: 0; }
.profile-shop-name { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-shop-city { font-size: 12px; color: var(--muted); margin-top: 3px; }
.profile-shop-hours { font-size: 12px; color: var(--muted); margin-top: 2px; }
.profile-shop-arrow { font-size: 22px; color: var(--muted); flex-shrink: 0; transition: color .2s; }
.profile-shop-card:hover .profile-shop-arrow { color: var(--brand); }
.profile-shops-empty {
  padding: 40px 24px; border-radius: 16px;
  border: 2px dashed var(--line);
  text-align: center;
}
.profile-shops-empty-icon { font-size: 40px; margin-bottom: 12px; }
.profile-shops-empty p { color: var(--text); font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.profile-shops-empty-hint { color: var(--muted) !important; font-size: 13px !important; font-weight: 400 !important; }
@media (max-width: 640px) {
  .profile-shops-grid { grid-template-columns: 1fr; }
}

/* ── Banner gradient overlay: ensures text is readable over photo ── */
.shop-hero--banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.38) 0%, rgba(0,0,0,.68) 100%);
  pointer-events: none;
}
.shop-hero--banner .navbar-inner {
  position: relative;
  z-index: 1;
}

/* ══ SHOP HERO — new layout (logo-pill inline) ════════════════════════ */
.shop-hero-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 22px 26px;
  max-width: 620px;
}

/* Logo as pill (first item in pills row) */
.shop-hero-logo-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  overflow: hidden;
  flex-shrink: 0;
}
.shop-hero-logo-pill-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.shop-hero-logo-pill-init {
  font-size: 16px; font-weight: 900; color: #fff;
  line-height: 1;
}

/* ══ NEW ARRIVALS CAROUSEL ════════════════════════════════════════════ */
.new-wrap {
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px 16px;
}
.new-title {
  font-size: 20px; font-weight: 800;
  color: var(--text); margin: 0 0 14px;
}
.new-wrap .carousel-outer { padding: 0; }
.new-carousel {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 4px 20px 8px 4px;
}
.new-carousel::-webkit-scrollbar { display: none; }
.new-card {
  flex: 0 0 158px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(12,36,26,.08);
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
  display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s;
  position: relative;
}
.new-card:hover { box-shadow: 0 8px 24px rgba(12,36,26,.14); transform: translateY(-2px); }
.new-card-img {
  width: 100%; height: 120px; object-fit: cover; display: block;
}
.new-card-ph {
  width: 100%; height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; background: var(--surface-soft);
}
.new-badge {
  position: absolute; top: 7px; left: 7px;
  background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  letter-spacing: .4px;
}
.new-badge--sale {
  left: auto; right: 7px;
  background: #e53935;
}
.new-card-body {
  padding: 8px 10px 10px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.new-card-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.new-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin-top: auto; }
.new-price-cur { font-size: 14px; font-weight: 800; color: var(--brand); }
.new-price-old { font-size: 12px; color: var(--muted); text-decoration: line-through; }

@media (max-width: 640px) {
  .new-wrap { padding: 14px 12px 12px; border-radius: 12px; }
  .shop-hero-content { padding: 16px 14px; border-radius: 10px; }
  .shop-hero-logo-pill { width: 40px; height: 40px; }
  .shop-hero-logo-pill-init { font-size: 13px; }
}

/* ══ FOOTER ════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--sidebar-bg);
  color: rgba(255,255,255,.75);
  margin-top: 64px;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}
.site-footer-brand { display: flex; align-items: center; gap: 14px; }
.site-footer-logo {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.site-footer-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.site-footer-logo-text { font-size: 20px; font-weight: 900; color: #fff; }
.site-footer-name { font-size: 18px; font-weight: 800; color: #fff; line-height: 1.2; }
.site-footer-sub { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 3px; }
.site-footer-contacts { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.site-footer-wa {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  transition: background .15s;
  text-decoration: none;
}
.site-footer-wa:hover { background: #1ebe5d; }
.site-footer-wa svg { flex-shrink: 0; }
.site-footer-phone { font-size: 13px; color: rgba(255,255,255,.5); }
.site-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,.35);
}
@media (max-width: 600px) {
  .site-footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .site-footer-contacts { align-items: flex-start; }
  .site-footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* ══ THEME TOGGLE BUTTON ══════════════════════════════════════════════════ */
.theme-toggle {
  width: 36px; min-height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
  line-height: 1;
}
.theme-toggle:hover { background: rgba(255,255,255,.12); }

/* ══ DARK THEME ═══════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg:           #0d1315;
  --surface:      #182522;
  --surface-soft: #1d2d29;
  --text:         #f0f7f5;
  --text-strong:  #c8eae0;
  --muted:        #8fa8a3;
  --line:         rgba(255,255,255,.11);
  --border:       rgba(255,255,255,.13);
  --brand:        #52b594;
  --brand-dark:   #9be4cc;
  --mint:         #66c0a4;
  --mint-2:       #9be4cc;
  --accent:       #f5b942;
  --danger:       #e05a51;
  --shadow:       0 6px 22px rgba(0,0,0,.40);
  --sidebar-bg:   #080c0e;
  --sidebar-soft: #0d1315;
}

/* Body */
[data-theme="dark"] body { color: var(--text); }

/* Filter bar & table head (hardcoded #f9fafb / #fafafa) */
[data-theme="dark"] .filter-bar { background: var(--surface-soft); }
[data-theme="dark"] .data-table th { background: var(--surface-soft); border-color: var(--line); }
[data-theme="dark"] .data-table tr:hover td { background: rgba(255,255,255,.04); }

/* Upload area */
[data-theme="dark"] .upload-area {
  background: var(--surface-soft);
  border-color: rgba(255,255,255,.18);
  color: var(--muted);
}
[data-theme="dark"] .upload-area:hover { background: rgba(102,192,164,.07); border-color: var(--brand); }

/* Alerts */
[data-theme="dark"] .alert-success  { background: rgba(47,143,114,.18); color: #9be4cc; border-color: rgba(47,143,114,.35); }
[data-theme="dark"] .alert-error,
[data-theme="dark"] .alert-warning  { background: rgba(245,185,66,.12); color: #f5d27a; border-color: rgba(245,185,66,.3); }
[data-theme="dark"] .alert-info     { background: rgba(10,74,114,.22); color: #7bc9f0; border-color: rgba(10,74,114,.4); }

/* Forms */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .dash-field input,
[data-theme="dark"] .dash-field select,
[data-theme="dark"] .dash-field textarea,
[data-theme="dark"] .dash-textarea,
[data-theme="dark"] .filter-input,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .shop-filter-input,
[data-theme="dark"] .panel-filters input,
[data-theme="dark"] .panel-filters select,
[data-theme="dark"] .sl-search-input,
[data-theme="dark"] .dash-search {
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--line);
}

/* Dropdowns */
[data-theme="dark"] .user-menu-dropdown,
[data-theme="dark"] .lang-menu-dropdown {
  background: var(--surface);
  border-color: var(--line);
}
[data-theme="dark"] .user-menu-item:hover { background: var(--surface-soft); }
[data-theme="dark"] .user-menu-item--danger:hover { background: rgba(224,90,81,.12); }
[data-theme="dark"] .lang-menu-item:hover { background: var(--surface-soft); }
[data-theme="dark"] .lang-menu-item.is-active { background: var(--surface-soft); color: var(--mint); }

/* Custom select */
[data-theme="dark"] .custom-select-btn,
[data-theme="dark"] .custom-select-list {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
[data-theme="dark"] .custom-select-opt:hover { background: var(--surface-soft); }

/* Shop search & chips */
[data-theme="dark"] .shop-search { background: var(--surface); }
[data-theme="dark"] .chip { background: var(--surface); color: var(--muted); }
[data-theme="dark"] .chip:hover { background: var(--surface-soft); }

/* Product category badge */
[data-theme="dark"] .product-category { background: rgba(245,185,66,.16); color: #f5d27a; }
[data-theme="dark"] .badge-out        { background: rgba(245,185,66,.16); color: #f5d27a; }

/* Carousels */
[data-theme="dark"] .dc-wrap {
  background: linear-gradient(135deg, rgba(200,60,0,.10) 0%, var(--surface) 100%);
  border-color: rgba(200,60,0,.22);
}
[data-theme="dark"] .dc-card,
[data-theme="dark"] .pop-card,
[data-theme="dark"] .new-card { background: var(--surface-soft); }
[data-theme="dark"] .dc-card-ph,
[data-theme="dark"] .pop-card-ph,
[data-theme="dark"] .new-card-ph { background: rgba(255,255,255,.06); }
[data-theme="dark"] .pop-wrap {
  background: linear-gradient(135deg, rgba(102,192,164,.07) 0%, var(--surface) 100%);
  border-color: rgba(102,192,164,.2);
}
[data-theme="dark"] .new-wrap { background: var(--surface); }

/* Like button */
[data-theme="dark"] .shop-like-btn { background: rgba(0,0,0,.55); color: rgba(255,255,255,.65); }
[data-theme="dark"] .shop-like-btn.is-liked { color: #e53935; }

/* Mascot bubble */
[data-theme="dark"] .mascot-bubble { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .mascot-bubble::after  { border-top-color: var(--surface); }
[data-theme="dark"] .mascot-bubble::before { border-top-color: rgba(255,255,255,.11); }
[data-theme="dark"] .mascot-choice { background: var(--surface-soft); border-color: var(--line); }
[data-theme="dark"] .mascot-svg { mix-blend-mode: screen; }

/* Push toast */
[data-theme="dark"] #push-toast { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .push-toast-deny { border-color: var(--line); }

/* Cart toast */
[data-theme="dark"] .cart-toast { background: var(--brand); }

/* Toast notifications */
[data-theme="dark"] .toast-success { background: #0a2e1c; color: #6ee7a0; border-color: #166534; }
[data-theme="dark"] .toast-error   { background: #2d1414; color: #fca5a5; border-color: #7f1d1d; }
[data-theme="dark"] .toast-warning { background: #2d2000; color: #fde68a; border-color: #854d0e; }
[data-theme="dark"] .toast-info    { background: #0c2340; color: #7dd3fc; border-color: #1e3a5f; }

/* My shops dropdown (dark) */
[data-theme="dark"] .my-shops-dropdown { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .my-shops-dropdown-item { color: var(--text); }
[data-theme="dark"] .my-shops-dropdown-item:hover { background: var(--surface-hover); }
[data-theme="dark"] .my-shops-dropdown-item--add:hover { background: rgba(22,163,74,.12); }
[data-theme="dark"] .my-shops-dropdown-item--danger:hover { background: rgba(211,64,55,.15); }

/* Tier cards */
[data-theme="dark"] .tier-card { background: var(--surface); }
[data-theme="dark"] .tier-opt  { background: var(--surface); }
[data-theme="dark"] .tier-opt.selected { background: var(--surface-soft); }

/* Profile shop cards */
[data-theme="dark"] .profile-shop-logo { background: rgba(102,192,164,.1); border-color: rgba(102,192,164,.18); }

/* Dashboard search */
[data-theme="dark"] .dash-search {
  background: var(--surface-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238fa8a3' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 10px center no-repeat;
}

/* Panel filters */
[data-theme="dark"] .action-panel-head { background: var(--surface-soft); }

/* License expiry bar (keep warning colors, just darken bg slightly) */
[data-theme="dark"] .license-expiry-bar { background: linear-gradient(90deg,rgba(255,243,205,.15),rgba(255,224,130,.1)); color: #f5d27a; border-color: rgba(255,193,7,.3); }
[data-theme="dark"] .license-expiry-bar--urgent { background: linear-gradient(90deg,rgba(255,235,238,.12),rgba(239,154,154,.08)); border-color: rgba(239,83,80,.3); color: #ef9a9a; }

/* Pending / WA notice */
[data-theme="dark"] .wa-notice { background: rgba(245,185,66,.08); border-color: rgba(245,185,66,.28); color: #f5d27a; }

/* Navbar lang-code in dark mode already fine; override the light-mode surface color */
[data-theme="dark"] .lang-code { background: rgba(255,255,255,.18); color: #fff; }

/* sa-app-card */
[data-theme="dark"] .sa-app-card:hover { border-color: var(--brand); }

/* ── Dark theme: problem-products & mass-actions ─────────────────────── */

/* Problem filter panel */
[data-theme="dark"] .problem-filter-panel {
  background: var(--surface-soft);
  border-color: rgba(82, 181, 148, .18);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
[data-theme="dark"] .problem-filter-trigger {
  background: var(--surface);
  color: var(--text);
  border-color: rgba(82, 181, 148, .35);
}
[data-theme="dark"] .problem-filter-trigger:hover,
[data-theme="dark"] .problem-filter-dropdown.is-open .problem-filter-trigger {
  background: var(--surface-soft);
  border-color: var(--brand);
}
[data-theme="dark"] .problem-filter-trigger:focus-visible,
[data-theme="dark"] .problem-filter-dropdown.is-open .problem-filter-trigger {
  box-shadow: 0 0 0 4px rgba(82, 181, 148, .18);
}
[data-theme="dark"] .problem-filter-menu {
  background: var(--surface);
  border-color: rgba(82, 181, 148, .35);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .50);
}
[data-theme="dark"] .problem-filter-option {
  color: var(--text);
}
[data-theme="dark"] .problem-filter-option:hover,
[data-theme="dark"] .problem-filter-option:focus {
  background: rgba(82, 181, 148, .12);
  color: var(--brand-dark);
}

/* Dashboard controls (input / select) */
[data-theme="dark"] .dashboard-control {
  background-color: var(--surface-soft);
  color: var(--text);
  border-color: rgba(82, 181, 148, .30);
}
[data-theme="dark"] .dashboard-control:hover {
  border-color: var(--brand);
}
[data-theme="dark"] .dashboard-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(82, 181, 148, .16);
}
[data-theme="dark"] .import-dialog,
[data-theme="dark"] .import-file-box {
  background: var(--surface);
  border-color: rgba(82, 181, 148, .24);
}
[data-theme="dark"] .import-close,
[data-theme="dark"] .import-note {
  background: var(--surface-soft);
  border-color: rgba(82, 181, 148, .20);
}
[data-theme="dark"] .import-tags span {
  background: var(--surface-soft);
  border-color: rgba(82, 181, 148, .22);
}
[data-theme="dark"] .import-file-box:hover {
  background: #1e3330;
  border-color: var(--brand);
}
/* Mass-condition checkbox rows */
[data-theme="dark"] .mass-condition {
  background: #192a26;
  border-color: rgba(82, 181, 148, .22);
  color: var(--text);
}
[data-theme="dark"] .mass-condition:hover {
  background: #1e3330;
  border-color: rgba(82, 181, 148, .40);
}

/* Custom checkboxes inside mass-condition rows */
[data-theme="dark"] .mass-condition input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(82, 181, 148, .45);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s, box-shadow .15s;
  accent-color: unset;
}
[data-theme="dark"] .mass-condition input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}
[data-theme="dark"] .mass-condition input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
[data-theme="dark"] .mass-condition input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(82, 181, 148, .24);
}
[data-theme="dark"] .mass-condition input[type="checkbox"]:hover {
  border-color: var(--brand);
}

/* Table row checkboxes (problem-products list) */
[data-theme="dark"] .prod-table-wrap input[type="checkbox"] {
  accent-color: var(--brand);
}

/* Problem bulk-actions panel */
[data-theme="dark"] .problem-bulk-actions {
  background: var(--surface-soft);
  border-color: rgba(82, 181, 148, .18);
}
[data-theme="dark"] .problem-category-trigger {
  background: var(--surface-soft);
  color: var(--text);
  border-color: rgba(82, 181, 148, .30);
}
[data-theme="dark"] .problem-category-trigger:hover,
[data-theme="dark"] .problem-category-dropdown.is-open .problem-category-trigger {
  background: #1e3330;
  border-color: var(--brand);
}
[data-theme="dark"] .problem-category-trigger:focus-visible,
[data-theme="dark"] .problem-category-dropdown.is-open .problem-category-trigger {
  box-shadow: 0 0 0 4px rgba(82, 181, 148, .16);
}
[data-theme="dark"] .problem-category-menu {
  background: var(--surface);
  border-color: rgba(82, 181, 148, .42);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .34);
}
[data-theme="dark"] .problem-category-option {
  color: var(--text);
}
[data-theme="dark"] .problem-category-option:hover,
[data-theme="dark"] .problem-category-option:focus {
  background: rgba(82, 181, 148, .12);
  color: var(--brand-dark);
}

/* Section headings / labels */
[data-theme="dark"] .mobile-section-head h3 { color: var(--text); }
[data-theme="dark"] .mobile-section-head p  { color: var(--muted); }
[data-theme="dark"] .mobile-section-label,
[data-theme="dark"] .problem-bulk-title,
[data-theme="dark"] .mobile-card-title { color: var(--text-strong); }

/* ===================================================================
   Category panel
   =================================================================== */
.cat-panel-wrap {
  padding: 20px 16px 0;
}
.cat-panel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.cat-panel::-webkit-scrollbar { display: none; }

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 20px;
  padding: 14px 10px 12px;
  flex: 0 0 96px;
  width: 96px;
  min-height: 112px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 5px rgba(0,0,0,.06);
}
.cat-card:hover {
  border-color: #16A34A;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(22,163,74,.18);
  text-decoration: none;
}
.cat-card--active {
  border-color: #16A34A;
  background: #F0FDF4;
  box-shadow: 0 2px 10px rgba(22,163,74,.15);
}

.cat-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ECFDF5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
  color: #16A34A;
}
.cat-icon-box svg { width: 24px !important; height: 24px !important; display: block; flex-shrink: 0; }

.cat-icon-box--all {
  background: #064E3B;
  color: #BBF7D0;
}

.cat-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #052E24;
  line-height: 1.3;
  margin-bottom: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cat-card--active .cat-card-name { color: #064E3B; }

.cat-card-count {
  font-size: 11px;
  color: #6B7280;
  white-space: nowrap;
  margin-top: auto;
  padding-top: 3px;
}
.cat-card--active .cat-card-count { color: #16A34A; font-weight: 600; }

@media (min-width: 768px) {
  .cat-panel-wrap { padding: 24px 24px 0; }
  .cat-panel { flex-wrap: wrap; overflow-x: visible; }
  .cat-card { flex: 0 0 108px; width: 108px; min-height: 118px; }
}

/* Dark mode */
[data-theme="dark"] .cat-card {
  background: var(--surface-soft);
  border-color: rgba(255,255,255,.1);
  color: var(--fg);
}
[data-theme="dark"] .cat-card:hover,
[data-theme="dark"] .cat-card--active {
  border-color: var(--brand);
  background: rgba(22,163,74,.1);
}
[data-theme="dark"] .cat-icon-box { background: rgba(22,163,74,.18); color: var(--brand); }
[data-theme="dark"] .cat-icon-box--all { background: #052E24; color: #BBF7D0; }
[data-theme="dark"] .cat-card-name { color: var(--fg); }
[data-theme="dark"] .cat-card--active .cat-card-name { color: var(--brand); }
[data-theme="dark"] .cat-card-count { color: var(--fg-muted); }

/* "All categories" button resets button default styles */
button.cat-card { border: 1.5px solid var(--border); background: var(--surface); font-family: inherit; cursor: pointer; }
button.cat-card:hover { border-color: #16A34A; }
[data-theme="dark"] button.cat-card { background: var(--surface-soft); border-color: rgba(255,255,255,.1); }

/* ===================================================================
   Categories popup
   =================================================================== */
.cat-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1100;
  backdrop-filter: blur(2px);
}
.cat-popup-backdrop.is-open { display: block; animation: catFadeIn .18s ease; }

.cat-popup {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.95);
  width: min(420px, calc(100vw - 32px));
  max-height: 70vh;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  z-index: 1101;
  flex-direction: column;
  overflow: hidden;
}
.cat-popup.is-open {
  display: flex;
  animation: catPopupIn .2s ease forwards;
}

@keyframes catFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes catPopupIn { from { opacity: 0; transform: translate(-50%,-50%) scale(.92); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

.cat-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}
.cat-popup-title {
  font-size: 15px;
  font-weight: 700;
  color: #052E24;
}
.cat-popup-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #F3F4F6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #374151;
  transition: background .15s;
  padding: 0;
}
.cat-popup-close:hover { background: #E5E7EB; color: #052E24; }

.cat-popup-list {
  overflow-y: auto;
  padding: 8px 0;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #BBF7D0 transparent;
}
.cat-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  text-decoration: none;
  color: #052E24;
  font-size: 14px;
  transition: background .12s;
  gap: 8px;
}
.cat-popup-item:hover { background: #F0FDF4; }
.cat-popup-item--active {
  background: #ECFDF5;
  font-weight: 600;
  color: #16A34A;
}
.cat-popup-item--active::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #16A34A;
  flex-shrink: 0;
  margin-right: -4px;
}
.cat-popup-item-icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex-shrink: 0; color: var(--brand); opacity: .8; }
.cat-popup-item-name { flex: 1; }
.cat-popup-item-count {
  font-size: 12px;
  color: #6B7280;
  white-space: nowrap;
  background: #F3F4F6;
  padding: 2px 8px;
  border-radius: 20px;
}
.cat-popup-item--active .cat-popup-item-count { background: #BBF7D0; color: #064E3B; }

/* Dark mode popup */
[data-theme="dark"] .cat-popup { background: var(--surface); }
[data-theme="dark"] .cat-popup-head { border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .cat-popup-title { color: var(--fg); }
[data-theme="dark"] .cat-popup-close { background: rgba(255,255,255,.1); color: var(--fg); }
[data-theme="dark"] .cat-popup-close:hover { background: rgba(255,255,255,.18); }
[data-theme="dark"] .cat-popup-item { color: var(--fg); }
[data-theme="dark"] .cat-popup-item:hover { background: rgba(22,163,74,.1); }
[data-theme="dark"] .cat-popup-item--active { background: rgba(22,163,74,.15); color: var(--brand); }
[data-theme="dark"] .cat-popup-item-count { background: rgba(255,255,255,.08); color: var(--fg-muted); }
[data-theme="dark"] .cat-popup-item--active .cat-popup-item-count { background: rgba(22,163,74,.2); color: var(--brand); }

/* ===================================================================
   Promo banners block
   =================================================================== */
.promo-wrap {
  padding: 20px 16px 0;
}
.promo-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.promo-track::-webkit-scrollbar { display: none; }

.promo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 240px;
  max-width: 300px;
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
  padding: 20px 18px 18px;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  cursor: default;
}
a.promo-card { cursor: pointer; }
a.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  text-decoration: none;
}

/* Themes */
.promo-card--dark_green  { background: linear-gradient(135deg, #064E3B 0%, #065F46 100%); color: #fff; }
.promo-card--light_green { background: linear-gradient(135deg, #16A34A 0%, #15803D 100%); color: #fff; }
.promo-card--mint        { background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%); color: #052E24; }
.promo-card--white       { background: #fff; color: #052E24; border: 1.5px solid #E5E7EB; }
.promo-card--orange      { background: linear-gradient(135deg, #F97316 0%, #EA580C 100%); color: #fff; }

/* Background image overlay */
.promo-card-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .18;
  pointer-events: none;
}

/* Card body */
.promo-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

/* Icon */
.promo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.promo-card--dark_green  .promo-icon,
.promo-card--light_green .promo-icon,
.promo-card--orange      .promo-icon { background: rgba(255,255,255,.18); color: #fff; }
.promo-card--mint        .promo-icon { background: #BBF7D0; color: #064E3B; }
.promo-card--white       .promo-icon { background: #ECFDF5; color: #16A34A; }

/* Text */
.promo-card-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.promo-card-sub {
  font-size: 13px;
  line-height: 1.4;
  opacity: .82;
}
.promo-card--mint  .promo-card-sub,
.promo-card--white .promo-card-sub { color: #6B7280; opacity: 1; }

/* Button */
.promo-card-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  align-self: flex-start;
}
.promo-card--dark_green  .promo-card-btn,
.promo-card--light_green .promo-card-btn,
.promo-card--orange      .promo-card-btn { background: rgba(255,255,255,.22); color: #fff; }
.promo-card--mint        .promo-card-btn { background: #16A34A; color: #fff; }
.promo-card--white       .promo-card-btn { background: #16A34A; color: #fff; }

@media (min-width: 768px) {
  .promo-wrap { padding: 24px 24px 0; }
  .promo-track { flex-wrap: nowrap; }
  .promo-card { min-width: 260px; max-width: 320px; }
}

/* Dark mode adjustments */
[data-theme="dark"] .promo-card--white {
  background: var(--surface-soft);
  border-color: rgba(255,255,255,.1);
  color: var(--fg);
}
[data-theme="dark"] .promo-card--mint {
  background: linear-gradient(135deg, rgba(6,78,59,.4) 0%, rgba(6,95,70,.3) 100%);
  color: #D1FAE5;
}

/* ── Dashboard — promo theme badge ── */
.promo-theme-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.promo-theme-badge--dark_green  { background: #064E3B; color: #BBF7D0; }
.promo-theme-badge--light_green { background: #16A34A; color: #fff; }
.promo-theme-badge--mint        { background: #ECFDF5; color: #064E3B; border: 1px solid #BBF7D0; }
.promo-theme-badge--white       { background: #F9FAFB; color: #374151; border: 1px solid #E5E7EB; }
.promo-theme-badge--orange      { background: #F97316; color: #fff; }

/* ══ SHOP COLOUR THEMES ════════════════════════════════════════════════ */

/* light_green — bright, clean, mint-white */
body.theme-light-green {
  --page-bg:      #FFFFFF;
  --bg:           #FFFFFF;
  --surface:      #FFFFFF;
  --surface-soft: #F7FEF9;
  --surface-hover:#F0FDF4;
  --text:         #052E24;
  --text-strong:  #064E3B;
  --muted:        #6B7280;
  --muted-text:   #6B7280;
  --line:         #BBF7D0;
  --border:       #BBF7D0;
  --brand:        #16A34A;
  --brand-dark:   #15803D;
  --primary:      #16A34A;
  --primary-hover:#15803D;
  --accent:       #22C55E;
  --mint:         #22C55E;
  --mint-2:       #A7F3D0;
  --input-bg:     #FFFFFF;
  --button-text:  #FFFFFF;
  --shadow:       0 14px 35px rgba(6, 78, 59, 0.10);
  --shadow-soft:  0 8px 24px rgba(6, 78, 59, 0.08);
}

/* dark_green — deep forest-green, bright mint accents */
body.theme-dark-green {
  --page-bg:      #031B13;
  --bg:           #031B13;
  --surface:      #052E24;
  --surface-soft: #0B3D2E;
  --surface-hover:#0F4A38;
  --text:         #ECFDF5;
  --text-strong:  #FFFFFF;
  --muted:        #A7F3D0;
  --muted-text:   #A7F3D0;
  --line:         #166534;
  --border:       #166534;
  --brand:        #22C55E;
  --brand-dark:   #34D399;
  --primary:      #22C55E;
  --primary-hover:#34D399;
  --accent:       #A7F3D0;
  --mint:         #A7F3D0;
  --mint-2:       #6EE7B7;
  --input-bg:     #0B3D2E;
  --button-text:  #031B13;
  --shadow:       0 18px 45px rgba(0, 0, 0, 0.35);
  --shadow-soft:  0 10px 28px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

/* ── Component overrides for dark-green (hardcoded colors that need explicit override) ── */

/* Badges */
body.theme-dark-green .product-category  { background: rgba(34,197,94,.15); color: #86EFAC; border: 1px solid rgba(34,197,94,.25); }
body.theme-dark-green .badge-out         { background: rgba(245,185,66,.15); color: #FCD34D; border: 1px solid rgba(245,185,66,.25); }
body.theme-dark-green .badge-active      { background: rgba(34,197,94,.18); color: #86EFAC; }
body.theme-dark-green .badge-inactive    { background: rgba(245,185,66,.12); color: #FCD34D; }
body.theme-dark-green .discount-pill     { background: rgba(229,57,53,.18); color: #FC8181; }

/* Alerts */
body.theme-dark-green .alert-success     { background: rgba(34,197,94,.12); color: #86EFAC; border-color: rgba(34,197,94,.25); }
body.theme-dark-green .alert-error,
body.theme-dark-green .alert-warning     { background: rgba(245,185,66,.10); color: #FCD34D; border-color: rgba(245,185,66,.25); }
body.theme-dark-green .alert-info        { background: rgba(10,74,114,.22); color: #7bc9f0; border-color: rgba(10,74,114,.4); }

/* Search, chips, filters */
body.theme-dark-green .shop-search       { background: var(--surface); border-color: var(--border); }
body.theme-dark-green .shop-search input { color: var(--text); }
body.theme-dark-green .chip              { background: var(--surface); color: var(--muted); border-color: var(--border); }
body.theme-dark-green .chip:hover        { background: var(--surface-soft); }
body.theme-dark-green .shop-filter-input,
body.theme-dark-green .filter-input,
body.theme-dark-green .filter-select,
body.theme-dark-green .sl-search-input  { background: var(--input-bg); border-color: var(--border); color: var(--text); }

/* Discount / popular / new carousels */
body.theme-dark-green .dc-wrap           { background: var(--surface-soft); border-color: var(--border); }
body.theme-dark-green .pop-wrap          { background: var(--surface-soft); border-color: var(--border); }
body.theme-dark-green .new-wrap          { background: var(--surface); border-color: var(--border); }
body.theme-dark-green .dc-card,
body.theme-dark-green .pop-card          { background: var(--surface); border-color: var(--border); }
body.theme-dark-green .dc-card-ph,
body.theme-dark-green .pop-card-ph       { background: var(--surface-soft); }

/* Like button */
body.theme-dark-green .shop-like-btn     { background: rgba(0,0,0,.55); color: rgba(255,255,255,.65); }
body.theme-dark-green .shop-like-btn.is-liked { color: #e53935; }

/* Mascot */
body.theme-dark-green .mascot-svg        { mix-blend-mode: screen; }
body.theme-dark-green #push-toast        { background: var(--surface); border-color: var(--border); }
body.theme-dark-green .push-toast-deny   { border-color: var(--border); }

/* Dropdowns */
body.theme-dark-green .user-menu-dropdown,
body.theme-dark-green .lang-menu-dropdown  { background: var(--surface); border-color: var(--border); }
body.theme-dark-green .user-menu-item:hover   { background: var(--surface-soft); }
body.theme-dark-green .lang-menu-item:hover   { background: var(--surface-soft); }
body.theme-dark-green .lang-menu-item.is-active { background: var(--surface-soft); color: var(--accent); }

/* Category panel */
body.theme-dark-green .cat-card           { background: var(--surface); border-color: var(--border); }
body.theme-dark-green button.cat-card     { background: var(--surface); border-color: var(--border); }
body.theme-dark-green .cat-card:hover,
body.theme-dark-green .cat-card--active   { background: var(--surface-soft); border-color: var(--brand); }
body.theme-dark-green .cat-icon-box       { background: rgba(34,197,94,.15); color: var(--brand); }
body.theme-dark-green .cat-icon-box--all  { background: var(--surface-soft); color: var(--accent); }
body.theme-dark-green .cat-popup          { background: var(--surface); }
body.theme-dark-green .cat-popup-head     { border-color: var(--border); }
body.theme-dark-green .cat-popup-close    { background: rgba(255,255,255,.08); color: var(--text); }
body.theme-dark-green .cat-popup-close:hover { background: rgba(255,255,255,.14); }
body.theme-dark-green .cat-popup-item     { color: var(--text); }
body.theme-dark-green .cat-popup-item:hover { background: rgba(34,197,94,.08); }
body.theme-dark-green .cat-popup-item--active { background: rgba(34,197,94,.14); color: var(--brand); }
body.theme-dark-green .cat-popup-item-count { background: rgba(255,255,255,.07); color: var(--muted); }
body.theme-dark-green .cat-popup-item--active .cat-popup-item-count { background: rgba(34,197,94,.18); color: var(--brand); }

/* Promo banners */
body.theme-dark-green .promo-card--white {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}
body.theme-dark-green .promo-card--mint {
  background: linear-gradient(135deg, rgba(6,78,59,.6) 0%, rgba(6,95,70,.5) 100%);
  color: #D1FAE5;
}

/* Dashboard table & uploads */
body.theme-dark-green .data-table th     { background: var(--surface-soft); border-color: var(--border); }
body.theme-dark-green .data-table td     { border-color: var(--border); }
body.theme-dark-green .data-table tr:hover td { background: var(--surface-hover); }
body.theme-dark-green .upload-area       { background: var(--surface-soft); border-color: var(--border); }
body.theme-dark-green .upload-area:hover { background: var(--surface-hover); }
body.theme-dark-green .wa-notice         { background: rgba(245,185,66,.08); border-color: rgba(245,185,66,.3); color: #FCD34D; }

/* Cart delivery panel */
body.theme-dark-green .cart-summary {
  background: rgba(5,46,36,.96);
  border-color: rgba(187,247,208,.20);
}
body.theme-dark-green .delivery-input {
  background: rgba(255,255,255,.08);
  border-color: rgba(187,247,208,.26);
  color: #ECFDF5;
}
body.theme-dark-green .delivery-input::placeholder {
  color: rgba(236,253,245,.58);
}
body.theme-dark-green .delivery-input:focus {
  border-color: #34D399;
  box-shadow: 0 0 0 3px rgba(52,211,153,.18);
  outline: none;
}
body.theme-dark-green .delivery-hint {
  color: rgba(209,250,229,.78);
}
body.theme-dark-green #delivery-map {
  border-color: rgba(187,247,208,.26);
}
body.theme-dark-green .cart-summary .btn-outline {
  border-color: #34D399;
  color: #A7F3D0;
  background: rgba(52,211,153,.04);
}
body.theme-dark-green .cart-summary .btn-outline:hover {
  background: #22C55E;
  border-color: #22C55E;
  color: #031B13;
}

/* ── Product load-more / infinite scroll ── */
.prod-load-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: prod-spin .7s linear infinite;
  margin-right: 8px; vertical-align: middle;
}
@keyframes prod-spin { to { transform: rotate(360deg); } }
#products-loading { display: none; align-items: center; justify-content: center; }
#products-footer { margin-bottom: 20px; }
@media (max-width: 960px) {
  #products-footer { margin-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 768px) {
  .import-dialog {
    max-height: 94vh;
    border-radius: 12px;
  }
  .import-head,
  .import-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .import-title {
    font-size: 18px;
  }
  .import-file-box {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .import-file-text {
    flex: 1 1 calc(100% - 58px);
  }
  .import-file-box .btn,
  .import-template-btn {
    width: 100%;
  }
  .import-actions {
    grid-template-columns: 1fr;
  }
  .problem-filter-panel {
    padding: 12px;
    margin-bottom: 14px;
  }
  .problem-filter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .problem-filter-dropdown,
  .problem-filter-submit {
    width: 100%;
  }
  .problem-filter-menu {
    max-height: min(336px, calc(100vh - 190px - env(safe-area-inset-bottom, 0px)));
  }
}

/* Dashboard mobile polish for management tools */
.dashboard-control {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid rgba(46, 125, 50, .42);
  border-radius: 12px;
  background-color: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
select.dashboard-control {
  background-image: none;
  padding-right: 14px;
}
select.nika-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232e7d32' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
  padding-right: 40px;
}
[data-theme="dark"] select.nika-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352b594' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}
.dashboard-control:hover {
  border-color: var(--brand);
}
.dashboard-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, .14);
}
.mobile-section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.mobile-section-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
}
.mobile-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.mobile-card-title,
.mobile-section-label,
.problem-bulk-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-strong, var(--text));
}
.mobile-section-label {
  margin-bottom: 10px;
}
.mobile-form-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.mobile-form-section:first-child {
  padding-top: 0;
  border-top: 0;
}
.mobile-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.mobile-full-btn {
  min-height: 46px;
  border-radius: 12px;
}

.problem-products-form {
  padding-bottom: 16px;
}
.problem-bulk-actions {
  margin: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(46, 125, 50, .18);
  border-radius: 14px;
  background: var(--surface-soft);
}
.problem-bulk-title {
  grid-column: 1 / -1;
}
.problem-action-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.problem-action-field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.problem-action-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
}
.problem-category-dropdown {
  position: relative;
  width: 100%;
}
.problem-category-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1.5px solid rgba(46, 125, 50, .42);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.problem-category-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.problem-category-trigger:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}
.problem-category-trigger:focus-visible,
.problem-category-dropdown.is-open .problem-category-trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, .14);
}
.problem-category-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--brand);
  transition: transform .18s ease;
}
.problem-category-dropdown.is-open .problem-category-chevron {
  transform: rotate(180deg);
}
.problem-category-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 760;
  max-height: min(320px, calc(100vh - 220px));
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1.5px solid rgba(46, 125, 50, .55);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 83, 45, .16);
}
.problem-category-dropdown.is-open .problem-category-menu {
  display: block;
}
.problem-category-option {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  outline: none;
  transition: background .12s ease, color .12s ease;
}
.problem-category-option:hover,
.problem-category-option:focus {
  background: rgba(76, 175, 80, .10);
  color: var(--brand-dark);
}
.problem-category-option.is-active,
.problem-category-option[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
}
.problem-category-option.is-active:hover,
.problem-category-option.is-active:focus {
  background: var(--brand-dark);
  color: #fff;
}

.mass-actions-page {
  display: grid;
  gap: 18px;
}
.mass-actions-card,
.mass-secondary-card,
.mass-preview-card {
  padding: 18px;
  border-radius: 14px;
}
.mass-actions-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mass-condition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mass-condition {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
.mass-condition--wide {
  grid-column: span 2;
}
.mass-condition input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: var(--brand);
}
.mass-secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mass-secondary-actions .btn {
  min-height: 44px;
  border-radius: 12px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
.mass-preview-actions {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
.mass-preview-card .mobile-card-title {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.dashboard-last-card,
.product-form-actions,
.quick-submit {
  margin-bottom: 32px;
}

.product-edit-form {
  padding-bottom: 24px;
}
.product-form-actions .btn {
  min-height: 46px;
  border-radius: 12px;
}

.dashboard-body #mascot-root {
  z-index: 560;
}
.problem-filter-menu,
.problem-filter-dropdown.is-open {
  z-index: 900;
}

@media (max-width: 960px) {
  .dashboard-content {
    padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
  }
  .dashboard-last-card,
  .product-form-actions,
  .quick-submit,
  .mass-preview-card,
  .problem-products-form {
    margin-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  }
  .dashboard-body #mascot-root {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    left: auto;
    right: 12px;
    width: 86px;
    z-index: 560;
  }
}

@media (max-width: 768px) {
  .problem-filter-panel,
  .mass-actions-card,
  .mass-secondary-card,
  .mass-preview-card {
    border-radius: 14px;
  }
  .problem-filter-form .problem-filter-dropdown,
  .problem-filter-form .problem-filter-submit {
    width: 100%;
  }
  .problem-bulk-actions {
    grid-template-columns: 1fr;
    margin: 12px;
    padding: 14px;
    gap: 12px;
  }
  .problem-action-btn,
  .problem-action-field,
  .problem-action-field .dashboard-control {
    width: 100%;
  }
  .mobile-field-grid,
  .mass-condition-list,
  .mass-secondary-actions,
  .mass-preview-actions {
    grid-template-columns: 1fr;
  }
  .mass-condition--wide {
    grid-column: auto;
  }
  .mass-actions-card,
  .mass-secondary-card {
    padding: 16px;
  }
  .mass-secondary-actions .btn,
  .mobile-full-btn {
    width: 100%;
  }
  .product-edit-layout {
    grid-template-columns: 1fr !important;
  }
  .product-edit-layout > div[style*="sticky"] {
    position: static !important;
  }
  .product-form-actions {
    flex-direction: column;
    gap: 12px !important;
  }
  .product-form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .dashboard-content {
    padding-left: 12px;
    padding-right: 12px;
  }
  .problem-filter-trigger,
  .dashboard-control,
  .problem-action-btn,
  .mobile-full-btn {
    min-height: 46px;
  }
  .mass-condition {
    min-height: 46px;
  }
}
