/* ════════════════════════════════════════════════════════════════
   Sway POS — Dark Premium Design System
   Bold. Refined. Dark. Luxury retail meets serious software.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg:            #0f0f0f;
  --surface:       #161616;
  --surface-2:     #1c1c1c;
  --surface-raised:#222222;

  /* Borders */
  --border:        #272727;
  --border-light:  #1e1e1e;

  /* Gold — the only accent */
  --gold:          #c9a84c;
  --gold-mid:      #b8943f;
  --gold-dim:      rgba(201,168,76,0.28);
  --gold-light:    rgba(201,168,76,0.09);

  /* Text */
  --text:          #ede8e0;
  --text-muted:    #7a7570;
  --text-light:    #3e3a36;

  /* Status */
  --success:       #7aad6a;
  --success-light: rgba(122,173,106,0.10);
  --danger:        #c94c4c;
  --danger-light:  rgba(201,76,76,0.10);
  --warning:       #c98c4c;
  --warning-light: rgba(201,140,76,0.10);
  --info:          #7a9cb0;
  --info-light:    rgba(122,156,176,0.10);

  /* Layout */
  --sidebar-width: 224px;
  --topbar-height: 56px;

  /* Type */
  --radius:    4px;
  --radius-sm: 2px;
  --transition: 0.15s ease;
  --font-ui:   'Syne', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── Light Mode — only colours change, nothing else ─────────────── */
[data-theme="light"] {
  --bg:            #f5f0e8;
  --surface:       #ffffff;
  --surface-2:     #ede6d8;
  --surface-raised:#e4dccb;

  --border:        #d0c4aa;
  --border-light:  #e2d9c6;

  --gold:          #b8860b;
  --gold-mid:      #a07208;
  --gold-dim:      rgba(184,134,11,0.30);
  --gold-light:    rgba(184,134,11,0.10);

  --text:          #1c1710;
  --text-muted:    #6b5e48;
  --text-light:    #b8a880;

  --success:       #3a6e2e;
  --success-light: rgba(58,110,46,0.10);
  --danger:        #9e2020;
  --danger-light:  rgba(158,32,32,0.10);
  --warning:       #96601a;
  --warning-light: rgba(150,96,26,0.10);
  --info:          #1e5a78;
  --info-light:    rgba(30,90,120,0.10);
}

/* Sidebar always stays dark — it's a fixed design choice in both modes */
[data-theme="light"] .sidebar          { background: #0d0d0d; border-right-color: #1e1e1e; }
[data-theme="light"] .sidebar-nav a,
[data-theme="light"] .sidebar-footer a { color: #fff; }
[data-theme="light"] .sidebar-nav a:hover,
[data-theme="light"] .sidebar-footer a:hover { color: #ede8e0; background: rgba(255,255,255,0.025); border-left-color: #272727; }
[data-theme="light"] .sidebar-nav a.active { color: var(--gold); background: rgba(184,134,11,0.09); border-left-color: var(--gold); }
[data-theme="light"] .sidebar-nav a.active .nav-icon,
[data-theme="light"] .sidebar-nav a:hover .nav-icon,
[data-theme="light"] .sidebar-footer a:hover i { color: inherit; }
[data-theme="light"] .logo-text { color: #ede8e0; }
/* [data-theme="light"] .logo-sub  { color: #3e3a36; } */

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  transition: all var(--transition);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* Floating toggle for standalone pages (login, landing, etc.) */
.theme-toggle-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 8000;   /* below catalog modal (9100) */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
  border-radius: var(--radius);
  box-shadow: none;
}
.theme-toggle-float {
  transition: all var(--transition), transform 0.3s ease, opacity 0.3s ease;
}
.theme-toggle-float:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle-float.float-hidden,
.float-btn-hidden {
  transform: translateY(90px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── Toggle Switch (is_public, etc.) ────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch .toggle-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 4px; top: 4px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle-checkbox:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: #fff;
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-mid); }

/* ── Layout ──────────────────────────────────────────────────────── */
.sway-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: #0d0d0d;
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Logo */
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 32px; height: 32px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #0f0f0f;
  flex-shrink: 0;
  letter-spacing: 0;
}

.logo-text {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1;
}

.logo-sub {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

/* Nav */
.sidebar-nav { flex: 1; padding: 10px 0; }

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-light);
  padding: 14px 20px 5px;
  display: block;
}

.sidebar-nav a,
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border-left: 2px solid transparent;
  white-space: nowrap;
}

.sidebar-nav a .nav-icon,
.sidebar-footer a i {
  width: 16px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
  transition: color var(--transition);
}

.sidebar-nav a:hover,
.sidebar-footer a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.025);
  border-left-color: var(--border);
}

.sidebar-nav a:hover .nav-icon,
.sidebar-footer a:hover i { color: var(--text-muted); }

.sidebar-nav a.active {
  color: var(--gold);
  background: var(--gold-light);
  border-left-color: var(--gold);
  font-weight: 600;
}

.sidebar-nav a.active .nav-icon { color: var(--gold); }

.sidebar-footer {
  padding: 8px 0 16px;
  border-top: 1px solid var(--border-light);
}

/* ── Main Content ────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ──────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.store-name-badge {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.avatar {
  width: 32px; height: 32px;
  background: var(--gold-light);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 5px 8px;
  border-radius: var(--radius);
}

/* ── Page Content ────────────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1440px;
  width: 100%;
}

/* ── Page Header ─────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.page-header .subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert-sway {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 16px;
  border-left: 3px solid currentColor;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.alert-sway.success { color: var(--success); border-left-color: var(--success); background: var(--success-light); }
.alert-sway.error   { color: var(--danger);  border-left-color: var(--danger);  background: var(--danger-light); }
.alert-sway.warning { color: var(--warning); border-left-color: var(--warning); background: var(--warning-light); }
.alert-sway.info    { color: var(--info);    border-left-color: var(--info);    background: var(--info-light); }

.errorlist {
  list-style: none;
  background: var(--danger-light);
  border: 1px solid rgba(201,76,76,0.3);
  color: var(--danger);
  padding: 10px 14px;
  font-size: 12.5px;
  margin-top: 6px;
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card-sway {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 24px;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

/* ── Stat Cards ──────────────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  padding: 20px 22px;
  height: 100%;
}

.stat-card.amber, .stat-card.gold   { border-left-color: var(--gold); }
.stat-card.green                    { border-left-color: var(--success); }
.stat-card.rose, .stat-card.red     { border-left-color: var(--danger); }
.stat-card.purple                   { border-left-color: #9b7fd6; }
.stat-card.blue                     { border-left-color: var(--info); }

.stat-icon {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.stat-card.amber .stat-icon, .stat-card.gold .stat-icon { border-color: var(--gold-dim); color: var(--gold); }
.stat-card.green .stat-icon  { border-color: rgba(122,173,106,0.28); color: var(--success); }
.stat-card.rose .stat-icon, .stat-card.red .stat-icon   { border-color: rgba(201,76,76,0.28); color: var(--danger); }
.stat-card.purple .stat-icon { border-color: rgba(155,127,214,0.28); color: #9b7fd6; }

.stat-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 7px;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary-sway {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gold);
  color: #0f0f0f;
  border: 1px solid var(--gold);
  padding: 9px 18px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  border-radius: var(--radius);
  white-space: nowrap;
}

.btn-primary-sway:hover {
  background: var(--gold-mid);
  border-color: var(--gold-mid);
  color: #0f0f0f;
}

.btn-secondary-sway {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  border-radius: var(--radius);
  white-space: nowrap;
}

.btn-secondary-sway:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: rgba(255,255,255,0.03);
}

.btn-danger-sway {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(201,76,76,0.3);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  border-radius: var(--radius);
  white-space: nowrap;
}

.btn-danger-sway:hover {
  background: var(--danger-light);
  border-color: var(--danger);
}

.btn-sm { padding: 5px 11px !important; font-size: 10.5px !important; }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label-sway {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 7px;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="file"],
textarea,
select {
  width: 100%;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 9px 12px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 400;
  transition: border-color var(--transition), background var(--transition);
  appearance: none;
  border-radius: var(--radius);
  box-shadow: none !important;
  caret-color: var(--gold);
}

/* Override Bootstrap's focus styles — must beat .form-control:focus specificity */
.form-control:focus,
.form-control:focus-visible,
input[type]:focus,
input[type]:focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: var(--gold) !important;
  background: var(--surface-raised) !important;
  color: var(--text) !important;
  caret-color: var(--gold);
}

.form-control::placeholder { color: var(--text-light); }
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--surface-2); color: var(--text); }

/* ── Tables ──────────────────────────────────────────────────────── */
.table-sway {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table-sway thead tr { border-bottom: 1px solid var(--border); }

.table-sway th {
  padding: 9px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
  white-space: nowrap;
  background: var(--surface-2);
}

.table-sway td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
  vertical-align: middle;
}

.table-sway tbody tr:last-child td { border-bottom: none; }
.table-sway tbody tr:hover td { background: rgba(255,255,255,0.018); }
.table-sway td a { color: var(--text); font-weight: 600; }
.table-sway td a:hover { color: var(--gold); }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge-sway {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.badge-sway.badge-green  { color: var(--success); background: var(--success-light); }
.badge-sway.badge-red    { color: var(--danger);  background: var(--danger-light); }
.badge-sway.badge-amber,
.badge-sway.badge-gold   { color: var(--gold);    background: var(--gold-light); }
.badge-sway.badge-gray   { color: var(--text-light); border-color: var(--border); background: transparent; }
.badge-sway.badge-blue   { color: var(--info);    background: var(--info-light); }

/* ── Bar Charts ──────────────────────────────────────────────────── */
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.bar-label {
  width: 110px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
  font-weight: 500;
}

.bar-track {
  flex: 1;
  height: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}

.bar-fill.green { background: var(--success); }
.bar-fill.amber { background: var(--gold); }
.bar-fill.red   { background: var(--danger); }

.bar-value {
  width: 120px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  flex-shrink: 0;
}

/* ── Item Grid ───────────────────────────────────────────────────── */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
}

.item-card {
  background: var(--surface);
  overflow: hidden;
  transition: background var(--transition);
  text-decoration: none;
  display: block;
  color: var(--text);
}

.item-card:hover { background: var(--surface-2); color: var(--text); }

.item-img {
  width: 100%;
  height: 160px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 36px;
  overflow: hidden;
}

.item-img img { width: 100%; height: 100%; object-fit: cover; }

.item-body { padding: 14px 16px; }

.item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.3;
}

.item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.8;
}

.item-price {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

/* ── Filter Bar ──────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.filter-bar .form-control { width: auto; min-width: 0; }

/* Quick-actions button grid */
.quick-actions-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }

/* ── Auth Pages ──────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}

.auth-logo { text-align: center; margin-bottom: 32px; }

.auth-logo-text {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 5px;
  text-transform: uppercase;
  display: block;
}

.auth-logo-sub {
  font-size: 9.5px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-top: 5px;
  display: block;
}

.auth-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 26px; }

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: var(--text-light);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 43%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── Error Pages (400 / 403 / 404 / 500) ────────────────────────── */
.error-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.error-wrap {
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(72px, 18vw, 120px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--primary);
  opacity: .18;
  margin-bottom: -16px;
  user-select: none;
}
.error-code--red   { color: var(--danger); }
.error-code--amber { color: var(--gold); }

.error-icon {
  font-size: 52px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.error-title {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  font-family: var(--font-ui);
}

.error-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Landing Page ────────────────────────────────────────────────── */
.landing-page { min-height: 100vh; background: var(--bg); }

.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 52px;
  justify-content: space-between;
}

.landing-logo {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
}

.landing-nav-links { display: flex; align-items: center; gap: 8px; }

/* Hero */
.hero {
  padding: 140px 52px 100px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 5px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.hero h1 {
  font-family: var(--font-ui);
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -3px;
  line-height: 1.02;
  max-width: 760px;
  margin: 0 auto 22px;
}

.hero h1 span { color: var(--gold); }

.hero p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 42px;
  line-height: 1.75;
  font-weight: 400;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.features-section  { padding: 96px 52px; border-bottom: 1px solid var(--border); }
.pricing-section   { padding: 96px 52px; border-bottom: 1px solid var(--border); }
.stores-section    { padding: 96px 52px; }

.section-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-ui);
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  text-align: center;
  margin-bottom: 10px;
}

.section-sub { text-align: center; color: var(--text-muted); font-size: 14.5px; margin-bottom: 54px; }

/* Features grid — ledger style with 1px separator lines */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
  background: var(--border);
}

.feature-card {
  background: var(--bg);
  padding: 34px 28px;
  gap: 1px;
  transition: background var(--transition);
}

.feature-card:hover { background: var(--surface); }

.feature-icon {
  width: 38px; height: 38px;
  border: 1px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--gold);
  margin-bottom: 18px;
}

.feature-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.feature-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 38px 32px;
  text-align: center;
  position: relative;
  transition: border-color var(--transition);
}

.pricing-card.featured { border-color: var(--gold); }
.pricing-card:hover { border-color: var(--gold-dim); }

.pricing-tag {
  position: absolute;
  top: -1px; right: 24px;
  background: var(--gold);
  color: #0f0f0f;
  padding: 3px 12px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.pricing-plan {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-bottom: 16px;
}

.pricing-amount {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-period { font-size: 12px; color: var(--text-muted); margin-bottom: 30px; }

.pricing-features { list-style: none; text-align: left; margin-bottom: 28px; }

.pricing-features li {
  padding: 9px 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i { color: var(--gold); font-size: 13px; }

/* ── Premium Featured Stores ───────────────────────────────────────── */
.premium-section {
  padding: 96px 52px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Ambient gold glow */
.premium-section::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 350px;
  background: radial-gradient(ellipse, rgba(180,140,60,.07) 0%, transparent 68%);
  pointer-events: none;
}

.premium-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.premium-label::before { content: ''; display: block; height: 1px; width: 48px; background: linear-gradient(to right,  transparent, var(--gold-dim)); }
.premium-label::after  { content: ''; display: block; height: 1px; width: 48px; background: linear-gradient(to left,   transparent, var(--gold-dim)); }

.premium-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Card shell ── */
.premium-slot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow .25s ease, border-color .25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.premium-slot:not(.empty) {
  cursor: pointer;
}

.premium-slot:not(.empty):hover {
  border-color: var(--gold-dim);
  box-shadow: 0 16px 48px rgba(0,0,0,.28), 0 0 0 1px var(--gold-dim);
}

/* Invisible full-card link — z-index 1, social icons float above at z-index 3 */
.premium-slot-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 16px;
}

/* ── Rank badge ── */
.premium-slot-rank {
  position: absolute;
  top: 10px; left: 12px;
  z-index: 4;
  background: rgba(0,0,0,.5);
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--font-mono);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Photo section ── */
.premium-img-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: var(--surface-2);
  border-top-right-radius: 16px;
  border-top-left-radius: 16px;
}

.premium-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .45s ease;
}

.premium-slot:not(.empty):hover .premium-img { transform: scale(1.05); }

/* Gradient bleeds photo into card body */
.premium-img-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to bottom, transparent 0%, var(--surface) 100%);
  pointer-events: none;
}

/* No-photo placeholder */
.premium-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
  color: var(--gold);
  font-size: 42px;
}

/* ── Card body ── */
.premium-body {
  padding: 2px 14px 18px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.premium-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.premium-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 10px;
}

/* Social icons */
.premium-socials {
  display: flex;
  justify-content: center;
  gap: 7px;
  position: relative;
  z-index: 3;
}

.premium-social-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  position: relative;
  z-index: 3;
}

.premium-social-icon:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.premium-view-hint {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: .3px;
}

/* ── Empty placeholder ── */
.premium-slot.empty {
  border-style: dashed;
  border-color: var(--border);
  opacity: .4;
  pointer-events: none;
}

.premium-slot.empty .premium-img-placeholder {
  color: var(--text-muted);
  font-size: 28px;
}

.premium-slot.empty .premium-name { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.premium-slot.empty .premium-view-hint { color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .premium-section { padding: 64px 28px; }
  .premium-row { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .premium-img-wrap { height: 170px; }
}

@media (max-width: 600px) {
  .premium-section { padding: 56px 20px; }
  .premium-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .premium-img-wrap { height: 155px; }
}

/* Stores grid */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

.store-card {
  background: var(--bg);
  padding: 30px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
  display: block;
}

.store-card:hover { background: var(--surface); color: var(--text); }

.store-card-avatar {
  width: 60px; height: 60px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
}

.store-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-card-name   { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.store-card-region { font-size: 10px; color: var(--primary); font-weight: 600; margin-bottom: 3px; opacity: 0.85; }
.store-card-sub    { font-size: 11px; color: var(--text-muted); }

@media (max-width: 600px) {
  .stores-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Region tabs ──────────────────────────────────────────────────── */
.region-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 24px 0 0;
  scrollbar-width: none;
}
.region-tabs::-webkit-scrollbar { display: none; }

.region-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.region-tab:hover { border-color: var(--primary); color: var(--primary); }
.region-tab.active {
  background: var(--primary);
  border-color: var(--primary);
}
.region-tab-count {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
}
.region-tab:not(.active) .region-tab-count {
  background: var(--surface);
  color: var(--text-muted);
}

/* Premium section title row */
.premium-section-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.premium-section-title-row span:first-child {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

/* Region badge on premium card */
.premium-region-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  opacity: 0.8;
}

.landing-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 36px;
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
}
.footer-left {
  flex-shrink: 0;
}
.footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: 5px;
}
.footer-tagline {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}
.footer-links a:hover { color: var(--text); }
.footer-watermark {
  margin-left: auto;
  font-size: 36px;
  font-weight: 800;
  color: var(--border);
  letter-spacing: -.02em;
  user-select: none;
  flex-shrink: 0;
}
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 40px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-bottom a:hover { color: var(--text); }
@media (max-width: 700px) {
  .footer-main { flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px 24px 24px; }
  .footer-watermark { display: none; }
  .footer-bottom { padding: 14px 24px 18px; flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ── Public Catalog ──────────────────────────────────────────────── */
.catalog-page { min-height: 100vh; background: var(--bg); }

/* Modal open state */
.catalog-modal.open { display: flex !important; }

/* ── Contact Picker ─────────────────────────────────────────────── */
.contact-picker-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
  scrollbar-width: thin;
}
.contact-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  font-size: 13px;
}
.contact-picker-item:last-child { border-bottom: none; }
.contact-picker-item:hover  { background: var(--surface-2); }
.contact-picker-item.active { background: var(--primary-light); }

/* ── Variant Rows (multi-item add) ──────────────────────────────── */
.variant-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface-2);
}
.variant-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.variant-row-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
}
.variant-remove-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--danger);
  border-radius: 6px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--transition), border-color var(--transition);
}
.variant-remove-btn:hover { background: var(--danger-light); border-color: var(--danger); }

/* ── Group item checkbox row ────────────────────────────────────── */
.group-item-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.group-item-check-row:last-child { border-bottom: none; }
.group-item-check-row:hover { background: var(--surface-2); }

/* ── Catalog Nav ─────────────────────────────────────────────────── */
.catalog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.catalog-nav-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.catalog-nav-count strong { color: var(--text); }

.catalog-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* shared pill button style */
.catalog-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .18s, color .18s, background .18s;
  font-family: var(--font-ui);
}
.catalog-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.catalog-nav-home { color: var(--primary); }
.catalog-nav-home:hover { background: var(--primary-light); }

/* ── Responsive: tablets ≤ 600px ─ shrink padding, icon-only buttons */
@media (max-width: 600px) {
  .catalog-nav { padding: 8px 14px; }
  .catalog-nav-count { font-size: 12px; }
  .catalog-nav-label { display: none; }          /* hide text, keep icon */
  .catalog-nav-btn { padding: 8px 10px; gap: 0; }
}

/* ── Responsive: very small ≤ 380px ─ stack into two rows */
@media (max-width: 380px) {
  .catalog-nav { flex-wrap: wrap; }
  .catalog-nav-count { width: 100%; }
  .catalog-nav-actions { width: 100%; justify-content: flex-end; }
}

.catalog-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 56px 32px 44px;
  text-align: center;
}

.catalog-header h1 {
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 6px;
}

.catalog-header p { font-size: 13.5px; color: var(--text-muted); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.catalog-item {
  background: var(--surface);
  overflow: hidden;
  transition: background var(--transition);
}

.catalog-item:hover { background: var(--surface-2); }
.catalog-item:active { background: var(--surface-raised); }

.catalog-item-img {
  width: 100%; height: 170px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 40px;
  overflow: hidden;
}

.catalog-item-img img { width: 100%; height: 100%; object-fit: cover; }
.catalog-item-body { padding: 16px; }
.catalog-item-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.catalog-item-meta { font-size: 12px; color: var(--text-muted); }
.catalog-item-meta span { display: block; margin-bottom: 3px; }

/* ── PIN Display ─────────────────────────────────────────────────── */
.pin-display {
  background: var(--surface-2);
  border: 1px solid var(--gold-dim);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pin-code {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 10px;
}

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 38px; color: var(--text-light); margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-light); }

/* ── Divider ─────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 22px 0; }

/* ── Subscription Banner ─────────────────────────────────────────── */
.sub-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 22px;
}

.sub-banner i { font-size: 15px; flex-shrink: 0; }
.sub-banner span { flex: 1; }

.sub-banner-btn {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 4px 12px;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background var(--transition);
  border-radius: var(--radius);
}

.sub-banner-btn:hover { background: rgba(255,255,255,0.07); color: inherit; }

.sub-warning  { background: rgba(201,140,76,0.07); border-color: rgba(201,140,76,0.35); color: var(--warning); }
.sub-critical { background: rgba(201,76,76,0.07);  border-color: rgba(201,76,76,0.35);  color: var(--danger); }
.sub-expired  { background: rgba(201,76,76,0.10);  border-color: var(--danger);         color: var(--danger); }

/* ── QR Print ────────────────────────────────────────────────────── */
@media print {
  body { background: white; color: black; }
  .no-print { display: none !important; }
}

/* ── Debt / Amber tokens ─────────────────────────────────────────── */
:root {
  --amber:       #c98c4c;
  --amber-light: rgba(201,140,76,0.10);
  --amber-dark:  #a06a28;
}
[data-theme="light"] {
  --amber:       #96601a;
  --amber-light: rgba(150,96,26,0.10);
  --amber-dark:  #6e4410;
}

/* Debt button — amber outline style */
.btn-debt-sway {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--amber);
  border: 1px solid rgba(201,140,76,0.4);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  border-radius: var(--radius);
  white-space: nowrap;
}
.btn-debt-sway:hover {
  background: var(--amber-light);
  border-color: var(--amber);
  color: var(--amber);
}

/* Sidebar overdue badge */
.nav-overdue-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}

/* Debt table row highlights */
.debt-row-overdue td { background: rgba(201,76,76,0.05); }
.debt-row-overdue:hover td { background: rgba(201,76,76,0.09) !important; }
.debt-row-warning td { background: rgba(201,140,76,0.05); }
.debt-row-warning:hover td { background: rgba(201,140,76,0.09) !important; }

/* ── Sidebar Overlay ─────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 999;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .page-content { padding: 16px 18px; }
  .topbar { padding: 10px 18px; }
  .landing-nav { padding: 0 20px; }
  .hero { padding: 100px 20px 64px; }
  .hero h1 { font-size: 32px; letter-spacing: -1.5px; }
  .features-section, .pricing-section, .stores-section { padding: 52px 20px; }
  .auth-card { padding: 30px 24px; max-width: 100%; }
  .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-bar .form-control { max-width: none !important; width: 100% !important; }
  .filter-bar > div { width: 100%; display: flex; align-items: center; gap: 8px; }
  .filter-bar > div .form-control { flex: 1; max-width: none !important; }
  .filter-bar .btn-primary-sway,
  .filter-bar .btn-secondary-sway { width: 100%; justify-content: center; }
  .quick-actions-grid { grid-template-columns: 1fr 1fr !important; }
  .catalog-grid { padding: 0px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .page-content { padding: 16px; }
}

/* ── Utilities ───────────────────────────────────────────────────── */
.text-primary { color: var(--gold) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted   { color: var(--text-muted) !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.mono   { font-family: var(--font-mono) !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ═══════════════════════════════════════════════════════════════
   CUSTOMER-FACING PUBLIC PAGES  (always light, no dark toggle)
   ═══════════════════════════════════════════════════════════════ */
.cust-nav { position:sticky;top:0;z-index:200;backdrop-filter: blur(10px);;border-bottom:1px solid #e8e4dc;display:flex;align-items:center;gap:14px;padding:11px 24px;box-shadow:0 1px 6px rgba(0,0,0,.05); }
.cust-nav-logo { font-size:20px;font-weight:900;color:#1a1a1a;text-decoration:none;white-space:nowrap;letter-spacing:-.5px; }
.cust-search-form { flex:1;display:flex;gap:8px;max-width:640px; }
.cust-search-input { flex:1;height:40px;border:1.5px solid #e0d9ce;border-radius:10px;padding:0 14px;font-size:14px;background:#faf9f6;outline:none;font-family:inherit;color:#1a1a1a; }
.cust-search-input:focus { border-color:#c9a84c;background:#fff; }
.cust-region-select { height:40px;border:1.5px solid #e0d9ce;border-radius:10px;padding:0 10px;font-size:13px;background:#faf9f6;font-family:inherit;color:#555;outline:none;cursor:pointer; }
.cust-region-select:focus { border-color:#c9a84c; }
.cust-search-btn { height:40px;padding:0 16px;background:#1a1a1a;color:#fff;border:none;border-radius:10px;cursor:pointer;font-size:15px;display:flex;align-items:center;flex-shrink:0; }
.cust-search-btn:hover { background:#333; }
.cust-nav-links { display:flex;gap:8px;flex-shrink:0;align-items:center; }
.cat-section { padding:28px 0px 20px;max-width:1200px;margin:0 auto; }
.cat-section-title { font-size:16px;font-weight:800;color:#1a1a1a;margin-bottom:14px;margin-left:24px; }
.cat-grid { display:flex;gap:12px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none; }
.cat-grid::-webkit-scrollbar { display:none; }
.cat-card { flex-shrink:0;width:96px;text-decoration:none;text-align:center; }
.cat-img { width:96px;height:96px;border-radius:14px;background:#f0ebe0 center/cover no-repeat;margin-bottom:8px;overflow:hidden;border:1.5px solid #e8e4dc;display:flex;align-items:center;justify-content:center;transition:border-color .18s,transform .18s; }
.cat-img img { width:100%;height:100%;object-fit:cover;display:block; }
.cat-name { font-size:11.5px;font-weight:700;color:#333;line-height:1.3; }
.cat-card:hover .cat-img { border-color:#c9a84c;transform:scale(1.04); }
.products-section { padding:8px 24px 32px;max-width:1200px;margin:0 auto; }
.products-section-head { display:flex;align-items:baseline;justify-content:space-between;margin-bottom:16px; }
.products-section-title { font-size:18px;font-weight:800;color:#1a1a1a; }
.products-grid { display:grid;grid-template-columns:repeat(5,1fr);gap:13px; }
.product-card { text-decoration:none;color:#1a1a1a;border-radius:12px;overflow:hidden;background:#fff;border:1px solid #eee;transition:box-shadow .18s,transform .18s;display:block; }
.product-card:hover { box-shadow:0 6px 20px rgba(0,0,0,.10);transform:translateY(-2px); }
.product-img { position:relative;aspect-ratio:1;background:#f5f0e8;overflow:hidden; }
.product-img img { width:100%;height:100%;object-fit:cover;display:block; }
.featured-badge { position:absolute;top:7px;left:7px;background:#c9a84c;color:#fff;font-size:9px;font-weight:800;border-radius:5px;padding:2px 7px;letter-spacing:.3px; }
.product-info { padding:9px 10px 11px; }
.product-name { font-size:12.5px;font-weight:700;color:#1a1a1a;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.product-store-name { font-size:11px;color:#999;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.product-proba { display:inline-block;font-size:10px;font-weight:700;color:#9a7a1a;background:#fdf6e3;border-radius:4px;padding:1px 6px; }
.show-more-btn { display:inline-block;padding:11px 32px;border:1.5px solid #1a1a1a;border-radius:10px;color:#1a1a1a;text-decoration:none;font-size:14px;font-weight:700;transition:background .15s,color .15s; }
.show-more-btn:hover { background:#1a1a1a;color:#fff; }
.seller-cta-wrap { padding:0 24px 48px;max-width:1200px;margin:0 auto; }
.seller-cta { background:linear-gradient(135deg,#1a1a1a 0%,#2d2d2d 100%);border-radius:20px;padding:40px 32px;text-align:center;color:#fff; }
.seller-cta-icon { font-size:40px;color:#c9a84c;display:block;margin-bottom:12px; }
.seller-cta h3 { font-size:22px;font-weight:800;margin:0 0 8px; }
.seller-cta p { color:rgba(255,255,255,.65);font-size:14px;margin:0 0 22px;max-width:420px;margin-left:auto;margin-right:auto; }
.seller-cta-btn { display:inline-block;padding:12px 28px;background:#c9a84c;color:#fff;text-decoration:none;border-radius:10px;font-weight:700;font-size:14px;transition:opacity .15s; }
.seller-cta-btn:hover { opacity:.88;color:#fff; }
.catalog-wrap { max-width:1200px;margin:0 auto;padding:24px; }
.catalog-search-bar { display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px; }
.catalog-search-input { flex:1;min-width:180px;height:44px;border:1.5px solid #e0d9ce;border-radius:10px;padding:0 16px;font-size:14px;font-family:inherit;color:#1a1a1a;background:#fff;outline:none; }
.catalog-search-input:focus { border-color:#c9a84c; }
.catalog-select { height:44px;border:1.5px solid #e0d9ce;border-radius:10px;padding:0 12px;font-size:13px;font-family:inherit;background:#fff;color:#555;outline:none;cursor:pointer; }
.catalog-select:focus { border-color:#c9a84c; }
.catalog-submit { height:44px;padding:0 20px;background:#1a1a1a;color:#fff;border:none;border-radius:10px;cursor:pointer;font-weight:700;font-family:inherit; }
.catalog-meta { font-size:13px;color:#999;margin-bottom:20px; }
.catalog-grid { display:grid;grid-template-columns:repeat(5,1fr);gap:13px; }
.catalog-pagination { display:flex;gap:10px;justify-content:center;align-items:center;margin-top:32px; }
.catalog-page-btn { padding:9px 18px;border:1.5px solid #e0d9ce;border-radius:8px;text-decoration:none;color:#1a1a1a;font-size:13px;font-weight:600; }
.catalog-page-btn:hover { background:#1a1a1a;color:#fff;border-color:#1a1a1a; }
.detail-wrap { max-width:900px;margin:0 auto;padding:28px 24px; }
.detail-grid { display:grid;grid-template-columns:1fr 1fr;gap:36px;align-items:start; }
.detail-img-main { border-radius:18px;overflow:hidden;aspect-ratio:1;background:#f5f0e8; }
.detail-img-main img { width:100%;height:100%;object-fit:cover;display:block; }
.detail-store-line { font-size:12px;color:#999;margin-bottom:6px; }
.detail-title { font-size:26px;font-weight:800;color:#1a1a1a;line-height:1.25;margin-bottom:10px; }
.detail-tags { display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px; }
.detail-tag { background:#f0ebe0;border-radius:6px;padding:3px 10px;font-size:12px;font-weight:600;color:#555; }
.detail-tag.gold { background:#fdf6e3;color:#9a7a1a; }
.price-notice { background:#fdf6e3;border:1px solid #e8d9a0;border-radius:12px;padding:14px 16px;display:flex;align-items:flex-start;gap:10px;margin-bottom:20px; }
.price-notice-text { font-size:14px;color:#7a6a1a;font-weight:600;flex:1; }
.price-info-btn { width:22px;height:22px;border-radius:50%;border:1.5px solid #c9a84c;background:transparent;color:#c9a84c;font-size:11px;font-weight:800;cursor:pointer;flex-shrink:0;line-height:1; }
.ask-btn { display:flex;align-items:center;gap:10px;background:#2AABEE;color:#fff;text-decoration:none;border-radius:12px;padding:14px 20px;font-weight:700;font-size:15px;justify-content:center;width:100%;transition:opacity .15s; }
.ask-btn:hover { opacity:.88;color:#fff; }
.detail-store-card { border:1.5px solid #e8e4dc;border-radius:14px;padding:16px;margin-top:16px;background:#fff; }
.detail-store-card-hd { display:flex;align-items:center;gap:12px;margin-bottom:12px; }
.detail-store-avatar { width:44px;height:44px;border-radius:10px;background:#f0ebe0;display:flex;align-items:center;justify-content:center;font-weight:700;color:#c9a84c;overflow:hidden;flex-shrink:0; }
.detail-store-avatar img { width:100%;height:100%;object-fit:cover; }
.detail-store-name { font-size:15px;font-weight:800;color:#1a1a1a; }
.detail-store-region { font-size:11px;color:#c9a84c;font-weight:700; }
.more-from-store { margin-top:40px; }
.more-from-title { font-size:16px;font-weight:800;color:#1a1a1a;margin-bottom:14px; }
.more-from-grid { display:grid;grid-template-columns:repeat(6,1fr);gap:10px; }
.inline-modal-bg { display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9000;align-items:center;justify-content:center;padding:20px; }
.inline-modal-bg.open { display:flex; }
.inline-modal { background:#fff;border-radius:16px;padding:28px;max-width:380px;width:100%;position:relative; }
.stores-page { max-width:1200px;margin:0 auto;padding:28px 24px; }
.stores-page-search { display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px; }
.stores-page-grid { display:grid;grid-template-columns:repeat(4,1fr);gap:16px; }
.stores-page-card { text-decoration:none;color:#1a1a1a;background:#fff;border:1.5px solid #e8e4dc;border-radius:14px;padding:20px 16px;text-align:center;transition:box-shadow .18s,border-color .18s;display:block; }
.stores-page-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.08);border-color:#c9a84c; }
.stores-page-card .spa { width:64px;height:64px;border-radius:14px;background:#f0ebe0;margin:0 auto 12px;overflow:hidden;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;color:#c9a84c; }
.stores-page-card .spa img { width:100%;height:100%;object-fit:cover; }
.stores-page-card .sname { font-size:14px;font-weight:800;margin-bottom:4px; }
.stores-page-card .sregion { font-size:11px;color:#c9a84c;font-weight:700;margin-bottom:4px; }
.stores-page-card .scta { font-size:11px;color:#aaa; }
.stores-page-card.is-featured { border-color:#c9a84c;background:#fffdf6; }
.pub-nav { background:#fff;border-bottom:1px solid #e8e4dc;padding:12px 24px;display:flex;align-items:center;gap:16px;position:sticky;top:0;z-index:100; }
.pub-nav-logo { font-size:18px;font-weight:900;color:#1a1a1a;text-decoration:none; }
.pub-nav-back { font-size:13px;color:#888;text-decoration:none;display:flex;align-items:center;gap:5px;margin-left:auto; }
.pub-nav-back:hover { color:#1a1a1a; }
@media(max-width:1024px) { .products-grid,.catalog-grid { grid-template-columns:repeat(4,1fr); } .stores-page-grid { grid-template-columns:repeat(3,1fr); } .more-from-grid { grid-template-columns:repeat(4,1fr); } }
@media(max-width:768px) { .products-grid,.catalog-grid { grid-template-columns:repeat(3,1fr); } .detail-grid { grid-template-columns:1fr;gap:20px; } .stores-page-grid { grid-template-columns:repeat(2,1fr); } .more-from-grid { grid-template-columns:repeat(3,1fr); } .cust-nav { flex-wrap:wrap;padding:10px 14px;gap:10px; } .cust-search-form { order:3;width:100%; } .cust-nav-links { margin-left:auto; } .cat-card { width:80px; } .cat-img { width:80px;height:80px; } }
@media(max-width:480px) { .products-grid,.catalog-grid { grid-template-columns:repeat(2,1fr); } .stores-page-grid { grid-template-columns:repeat(2,1fr); } }

/* ═══════════════════════════════════════════════════════════════
   CUSTOMER PAGES v2 — Refinements, Custom Dropdowns, Search Fixes
   ═══════════════════════════════════════════════════════════════ */

/* ── Nav: fix search input vs region select proportions ─────── */
.cust-search-input { flex:1 1 0;min-width:0; }

/* ── Cat-grid: outer wrapper for fade effect ─────────────────── */
.cat-grid-outer { position:relative; }
.cat-grid-outer::before,.cat-grid-outer::after { content:'';position:absolute;top:0;bottom:10px;width:48px;pointer-events:none;z-index:2; }
.cat-grid-outer::before { left:0;background:linear-gradient(to right,#faf9f6 30%,transparent); }
.cat-grid-outer::after  { right:0;background:linear-gradient(to left,#faf9f6 30%,transparent); }
/* Breathing room so scaled items don't clip against container edge */
.cat-grid { padding:6px 4px !important;margin:-6px 0; }

/* ── Sway custom select (sw-select) ─────────────────────────── */
.sw-select { position:relative;display:inline-flex;align-items:center;height:40px;padding:0 10px 0 14px;border:1.5px solid #e0d9ce;border-radius:10px;background:#faf9f6;cursor:pointer;gap:8px;font-family:inherit;min-width:0;-webkit-user-select:none;user-select:none;box-sizing:border-box;white-space:nowrap;flex-shrink:0; }
.sw-select:hover { border-color:#c9a84c; }
.sw-select.open  { border-color:#c9a84c;background:#fff; }
.sw-select-val   { font-size:13px;color:#555;overflow:hidden;text-overflow:ellipsis; }
.sw-select-caret { font-size:10px;color:#aaa;transition:transform .18s;flex-shrink:0; }
.sw-select.open .sw-select-caret { transform:rotate(180deg); }
.sw-select-opts  { display:none;position:absolute;top:calc(100% + 6px);left:0;min-width:180px;max-height:280px;overflow-y:auto;background:#fff;border:1.5px solid #e0d9ce;border-radius:14px;padding:5px;z-index:9999;box-shadow:0 12px 40px rgba(0,0,0,.13);scrollbar-width:thin; }
.sw-select.open .sw-select-opts { display:block; }
.sw-select-opt   { padding:9px 14px;border-radius:8px;font-size:13px;color:#333;cursor:pointer;transition:background .1s;display:flex;justify-content:space-between;align-items:center; }
.sw-select-opt:hover  { background:#f5f0e8; }
.sw-select-opt.sw-sel { color:#1a1a1a;font-weight:700; }
.sw-select-opt.sw-sel::after { content:'✓';font-size:11px;color:#c9a84c; }
/* Variant: 44px height for page search bars */
.sw-select.h44 { height:44px;border-radius:12px;padding:0 12px 0 16px; }
.sw-select.h44 .sw-select-val { font-size:13.5px; }

/* ── Search box with embedded submit icon ────────────────────── */
.sw-search-wrap { position:relative;flex:1;min-width:0; }
.sw-search-input { width:100%;height:44px;border:1.5px solid #e0d9ce;border-radius:12px;padding:0 46px 0 16px;font-size:14px;font-family:inherit;background:#fff;color:#1a1a1a;outline:none;box-sizing:border-box;transition:border-color .15s; }
.sw-search-input:focus { border-color:#c9a84c; }
.sw-search-btn { position:absolute;right:5px;top:50%;transform:translateY(-50%);width:34px;height:34px;background:#1a1a1a;color:#fff;border:none;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;transition:background .15s; }
.sw-search-btn:hover { background:#3a3a3a; }

/* ── Stores page grid: equal minmax columns ──────────────────── */
.stores-page-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
@media(max-width:1024px) { .stores-page-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; } }
@media(max-width:640px)  { .stores-page-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; } }

/* ── Customer catalog (all-items): separate grid class ──────── */
.cust-catalog-grid { display:grid;grid-template-columns:repeat(5,1fr);gap:13px; }
@media(max-width:1024px) { .cust-catalog-grid { grid-template-columns:repeat(4,1fr); } }
@media(max-width:768px)  { .cust-catalog-grid { grid-template-columns:repeat(3,1fr); } }
@media(max-width:480px)  { .cust-catalog-grid { grid-template-columns:repeat(2,1fr); } }

/* ── Ask dealer button: Sway-dark, no Telegram blue ─────────── */
.ask-btn { background:#1a1a1a !important;color:#fff !important; }
.ask-btn:hover { background:#2d2d2d !important;opacity:1 !important; }
.ask-btn .bi-telegram { color:#c9a84c !important; }

/* ── Stores page region-tabs: use dark instead of --primary ──── */
.cust-stores-section .region-tab.active { background:#1a1a1a;border-color:#1a1a1a; }
.cust-stores-section .region-tab:hover  { border-color:#c9a84c;color:#c9a84c; }

/* ── Nav responsive: tighten on very small screens ───────────── */
@media(max-width:400px) {
  .cust-nav-logo { font-size:17px; }
  .cust-nav-links a { font-size:11px !important;padding:6px 8px !important; }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING NAV v3 — Two-row design (logo+pill / search)
   ═══════════════════════════════════════════════════════════════ */
.cust-nav { flex-direction:column;align-items:stretch;gap:10px;padding:12px 20px 10px; }
.cust-nav-row1 { display:flex;align-items:center;gap:10px; }
.cust-nav-row2 { position:relative;width:100%; }

/* Region pill — right side of row1 */
.cust-region-pill { margin-left:auto;height:36px;border-radius:20px;padding:0 12px 0 10px;gap:6px;border:1.5px solid #e0d9ce;background:#faf9f6;font-size:13px;flex-shrink:0; }
.cust-region-pill .sw-select-val { max-width:100px;overflow:hidden;text-overflow:ellipsis;color:#333; }
.cust-region-pill .sw-select-opts { left:auto;right:0;min-width:200px; }

/* Panel button */
.cust-panel-btn { height:32px;padding:0 14px;background:#1a1a1a;color:#fff;border-radius:10px;font-size:12px;font-weight:700;text-decoration:none;display:flex;align-items:center;white-space:nowrap;flex-shrink:0;transition:background .15s; }
.cust-panel-btn:hover { background:#3a3a3a;color:#fff; }

/* Search: icon on left, full-width, no visible button */
.cust-search-form { display:block;width:100%;max-width:none; }
.cust-search-inner { position:relative;width:100%; }
.cust-search-licon { position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#bbb;font-size:15px;pointer-events:none;z-index:1; }
.cust-search-input { width:100%;height:44px;border:1.5px solid #e8e4dc;border-radius:14px;padding:0 16px 0 44px;font-size:14px;font-family:inherit;background:#f5f0e8;color:#1a1a1a;outline:none;box-sizing:border-box;transition:border-color .15s,background .15s;display:block; }
.cust-search-input:focus { border-color:#c9a84c;background:#fff; }
.cust-search-btn { display:none; }

/* ── Sub-page search bars: same icon-left, no visible button ──── */
.sw-search-input { padding:0 16px 0 44px;background:#f5f0e8;border:1.5px solid #e8e4dc;border-radius:14px;transition:border-color .15s,background .15s; }
.sw-search-input:focus { border-color:#c9a84c;background:#fff; }
.sw-search-licon { position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#bbb;font-size:15px;pointer-events:none; }
.sw-search-btn { display:none; }

/* Region pill on sub-pages too */
.sw-select.pill { border-radius:20px;height:44px;padding:0 14px 0 12px;gap:6px; }
.sw-select.pill .sw-select-opts { left:auto;right:0;min-width:200px; }

/* Responsive tweaks */
@media(max-width:480px) {
  .cust-region-pill .sw-select-val { max-width:60px; }
}

/* ═══════════════════════════════════════════════════════════════
   PUBLIC SUB-PAGE SEARCH  — dedicated .pub-search-* classes
   (stores_list, public_catalog_all — fully separate from .sw-search-*)
   ═══════════════════════════════════════════════════════════════ */
.pub-search-wrap  { position:relative;flex:1;min-width:0; }
.pub-search-licon { position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#bbb;font-size:15px;pointer-events:none;z-index:1; }
.pub-search-input { width:100%;height:44px;border:1.5px solid #e8e4dc;border-radius:14px;padding:0 16px 0 44px;font-size:14px;font-family:inherit;background:#f5f0e8;color:#1a1a1a;outline:none;box-sizing:border-box;transition:border-color .15s,background .15s; }
.pub-search-input:focus { border-color:#c9a84c;background:#fff; }

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE — stores section (warm light cards, lp-store-*)
   ═══════════════════════════════════════════════════════════════ */
.lp-stores-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px; }
@media(max-width:1024px) { .lp-stores-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:768px)  { .lp-stores-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:480px)  { .lp-stores-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.lp-store-card { text-decoration:none;color:#1a1a1a;background:#fff;border:1.5px solid #e8e4dc;border-radius:14px;padding:16px 12px;text-align:center;transition:box-shadow .18s,border-color .18s;display:block; }
.lp-store-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.08);border-color:#c9a84c; }
.lp-store-card.is-featured { border-color:#e8d9a0;background:#fffdf6; }
.lp-store-avatar { width:52px;height:52px;border-radius:12px;background:#f0ebe0;margin:0 auto 10px;overflow:hidden;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:#c9a84c;border:1.5px solid #e8e4dc; }
.lp-store-avatar img { width:100%;height:100%;object-fit:cover;display:block; }
.lp-store-name { font-size:13px;font-weight:800;color:#1a1a1a;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.lp-store-region { font-size:10.5px;color:#c9a84c;font-weight:700;margin-bottom:4px; }
.lp-store-cta { font-size:10.5px;color:#bbb; }

/* ═══════════════════════════════════════════════════════════════
   STORE CATALOG  — light redesign (sc-* classes)
   ═══════════════════════════════════════════════════════════════ */
.catalog-modal.open { display:flex !important; }

/* Store hero */
.sc-hero { background:#fff;border-bottom:1px solid #e8e4dc;padding:18px 24px 14px; }
.sc-hero-inner { display:flex;align-items:center;gap:14px;max-width:1200px;margin:0 auto 10px; }
.sc-avatar { width:54px;height:54px;border-radius:14px;background:#f0ebe0;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;color:#c9a84c;overflow:hidden;flex-shrink:0;border:1.5px solid #e8e4dc; }
.sc-avatar img { width:100%;height:100%;object-fit:cover;display:block; }
.sc-info { flex:1;min-width:0; }
.sc-name { font-size:17px;font-weight:800;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2; }
.sc-pro { font-size:10px;font-weight:700;color:#c9a84c;background:#fdf6e3;border-radius:4px;padding:1px 7px;margin-left:5px;vertical-align:middle; }
.sc-region { font-size:11.5px;color:#c9a84c;font-weight:600;margin-top:3px;display:flex;align-items:center;gap:3px; }
.sc-action-btns { display:flex;gap:6px;flex-shrink:0; }
.sc-btn { display:inline-flex;align-items:center;gap:5px;height:34px;padding:0 12px;border:1.5px solid #e0d9ce;border-radius:20px;background:#faf9f6;color:#555;font-size:12px;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap;font-family:inherit;transition:border-color .15s,color .15s; }
.sc-btn:hover { border-color:#c9a84c;color:#1a1a1a; }
.sc-register-fab { position:fixed;bottom:24px;right:20px;z-index:800;display:inline-flex;align-items:center;gap:8px;padding:0 18px;height:44px;border-radius:22px;background:#c9a84c;color:#fff;font-size:13px;font-weight:700;text-decoration:none;font-family:inherit;box-shadow:0 4px 16px rgba(201,168,76,.45);transition:transform .15s,box-shadow .15s; }
.sc-register-fab:hover { transform:translateY(-2px);box-shadow:0 6px 22px rgba(201,168,76,.55);color:#fff; }
.sc-meta { max-width:1200px;margin:0 auto;font-size:12.5px;color:#aaa;padding-top:2px; }

/* Product grid wrapper */
.sc-catalog-wrap { max-width:1200px;margin:0 auto;padding:20px 20px 48px; }

/* Mobile: hide action btn labels, tighten hero */
@media(max-width:480px) {
  .sc-hero { padding:12px 14px 10px; }
  .sc-hero-inner { gap:10px; }
  .sc-avatar { width:46px;height:46px;border-radius:10px;font-size:18px; }
  .sc-name { font-size:15px; }
  .sc-btn span { display:none; }
  .sc-btn { padding:0 9px;gap:0;height:32px; }
  .sc-catalog-wrap { padding:14px 10px 48px; }
  .pub-nav-back-label { display:none; }
  .pub-nav { padding:10px 14px; gap:10px; }
}

/* ═══════════════════════════════════════════════════════════════
   APP DOWNLOAD SECTION  (landing page permanent banner)
   ═══════════════════════════════════════════════════════════════ */
.app-dl-wrap { max-width:1200px;margin:0 auto;padding:0 24px 48px; }
.app-dl-card { background:linear-gradient(135deg,#1a1a1a 0%,#2a2a2a 100%);border-radius:20px;padding:28px 32px;display:flex;align-items:center;gap:24px;flex-wrap:wrap; }

/* Phone icon */
.app-dl-phone { position:relative;width:56px;height:56px;flex-shrink:0; }
.app-dl-phone .bi-phone { font-size:42px;color:rgba(255,255,255,.15);line-height:1; }
.app-dl-badge { position:absolute;top:0;right:-2px;width:22px;height:22px;background:#c9a84c;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;color:#fff; }

/* Text */
.app-dl-text { flex:1;min-width:180px; }
.app-dl-title { font-size:17px;font-weight:800;color:#fff;margin-bottom:5px; }
.app-dl-sub { font-size:13px;color:rgba(255,255,255,.55);line-height:1.5; }

/* Buttons */
.app-dl-btns { display:flex;gap:10px;flex-shrink:0;flex-wrap:wrap; }
.app-dl-btn-main { height:44px;padding:0 22px;background:#c9a84c;color:#fff;border:none;border-radius:12px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;display:flex;align-items:center;gap:7px;transition:background .15s;white-space:nowrap; }
.app-dl-btn-main:hover { background:#b8923f; }
.app-dl-btn-how { height:44px;padding:0 18px;background:transparent;color:rgba(255,255,255,.6);border:1.5px solid rgba(255,255,255,.18);border-radius:12px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;transition:border-color .15s,color .15s; }
.app-dl-btn-how:hover { border-color:rgba(255,255,255,.45);color:#fff; }

/* Hide when already installed */
.app-dl-wrap.pwa-installed { display:none; }

@media(max-width:600px) {
  .app-dl-card { padding:20px;gap:16px;flex-direction:column;align-items:flex-start; }
  .app-dl-btns { width:100%; }
  .app-dl-btn-main { flex:1;justify-content:center; }
  .app-dl-btn-how  { flex:1;justify-content:center; }
}

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════════════ */
.pwa-banner { position:fixed;bottom:0;left:0;right:0;z-index:8500;background:#1a1a1a;color:#fff;display:flex;align-items:center;gap:12px;padding:14px 16px max(16px,env(safe-area-inset-bottom));border-radius:18px 18px 0 0;box-shadow:0 -4px 32px rgba(0,0,0,.22);transform:translateY(100%);transition:transform .38s cubic-bezier(.16,1,.3,1);will-change:transform; }
.pwa-banner.visible { transform:translateY(0); }
.pwa-banner-icon { font-size:26px;font-weight:900;color:#c9a84c;flex-shrink:0;line-height:1; }
.pwa-banner-text { flex:1;min-width:0; }
.pwa-banner-text strong { display:block;font-size:14px;font-weight:800;margin-bottom:1px; }
.pwa-banner-text span { font-size:12px;color:rgba(255,255,255,.6); }
.pwa-banner-btn { flex-shrink:0;height:36px;padding:0 18px;background:#c9a84c;color:#fff;border:none;border-radius:10px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .15s; }
.pwa-banner-btn:hover { background:#b8923f; }
.pwa-banner-dismiss { flex-shrink:0;width:30px;height:30px;background:transparent;border:none;color:rgba(255,255,255,.45);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;border-radius:6px;line-height:1; }
.pwa-banner-dismiss:hover { color:#fff; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE — landing page polish
   ═══════════════════════════════════════════════════════════════ */
@media(max-width:480px) {
  /* Section padding */
  .cat-section { padding:20px 0 14px; }
  .cat-section-title { margin-left:16px; }
  .products-section { padding:6px 14px 24px; }
  .seller-cta-wrap { padding:0 14px 36px; }
  .seller-cta { padding:28px 20px; }
  .seller-cta h3 { font-size:18px; }
  /* Store grid on landing: 2 cols */
  .lp-stores-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  /* Nav on very small */
  .cust-nav { padding:10px 14px 8px; }
}


/* ════════════════════════════════════════════════════════════════
   PWA Native Feel
   ════════════════════════════════════════════════════════════════ */

/* No tap flash anywhere */
* { -webkit-tap-highlight-color: transparent; }

/* Prevent pull-to-refresh bounce on iOS/Android */
html, body { overscroll-behavior: none; }

/* Prevent double-tap zoom on all interactive elements */
a, button, [role="button"], label, input[type="submit"], input[type="button"] {
  touch-action: manipulation;
}

/* Disable text selection everywhere — restore for form fields */
body {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}


/* ════════════════════════════════════════════════════════════════
   Bottom Navigation Bar
   ════════════════════════════════════════════════════════════════ */

.bottom-nav { display: none; } /* hidden on desktop */
.more-sheet, .more-sheet-overlay { display: none; } /* hidden on desktop */

@media (max-width: 768px) {

  /* ── Hide sidebar, show bottom nav ─────────────────────── */
  .sidebar          { display: none !important; }
  .sidebar-overlay  { display: none !important; }
  .sidebar-toggle   { display: none !important; }
  .main-content     { margin-left: 0 !important; }

  /* Extra padding so content isn't hidden under the bar */
  .page-content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ── Bottom nav bar ─────────────────────────────────────── */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 600;
    align-items: center;
    justify-content: space-around;
    background: var(--surface);
    border-top: 1px solid var(--border);
    /* Safe area for iPhone notch */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  .bn-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 60px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .01em;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    transition: color .15s;
    position: relative;
  }
  .bn-link i { font-size: 21px; line-height: 1; }
  .bn-link > span { font-size: 10px; font-weight: 600; }
  .bn-link.active { color: var(--primary); }

  /* ── Dashboard center bubble ───────────────────────────── */
  .bn-center { flex: 1; padding-bottom: 2px; }

  .bn-center-bubble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-top: -18px;
    box-shadow: 0 4px 14px rgba(201,168,76,.45);
    transition: transform .15s, box-shadow .15s;
  }
  .bn-center-bubble i { font-size: 22px; }
  .bn-center-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
  }
  .bn-center.active .bn-center-bubble {
    box-shadow: 0 4px 20px rgba(201,168,76,.65);
    transform: scale(1.06);
  }
  .bn-center.active .bn-center-label { color: var(--primary); }

  /* ── More button overdue dot ───────────────────────────── */
  .bn-more { position: relative; }
  .bn-more-dot {
    position: absolute;
    top: 8px;
    right: calc(50% - 14px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--surface);
  }

  /* ── More sheet overlay ────────────────────────────────── */
  .more-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 700;
    backdrop-filter: blur(2px);
  }
  .more-sheet-overlay.open { display: block; }

  /* ── More sheet panel ──────────────────────────────────── */
  .more-sheet {
    display: block; /* override global display:none */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    border-top: 1px solid var(--border);
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32,1,.46,1);
  }
  .more-sheet.open { transform: translateY(0); }

  .more-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 0 auto 16px;
  }

  .more-sheet-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 16px;
    text-align: center;
  }

  .more-sheet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .more-sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px 10px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    transition: background .15s, border-color .15s;
    position: relative;
  }
  .more-sheet-item i { font-size: 20px; color: var(--primary); }
  .more-sheet-item:active { background: var(--primary-light); border-color: var(--primary); }

  .more-sheet-danger i { color: var(--danger) !important; }
  .more-sheet-danger { color: var(--danger); }

  .more-sheet-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    border-radius: 10px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
  }
}
