/* ========================================
   lxwis Shop — style.css
   Dark cyber/neon glassmorphism aesthetic
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Variables ── */
:root {
  --bg:           #07070f;
  --bg-2:         #0c0c1a;
  --bg-3:         #11112a;
  --surface:      rgba(255, 255, 255, 0.04);
  --surface-h:    rgba(255, 255, 255, 0.07);
  --border:       rgba(255, 255, 255, 0.08);
  --border-h:     rgba(139, 92, 246, 0.45);

  --primary:      #8b5cf6;
  --primary-l:    #a78bfa;
  --primary-d:    #6d28d9;
  --accent:       #06b6d4;
  --accent-l:     #67e8f9;
  --gold:         #f59e0b;
  --gold-l:       #fcd34d;

  --success:      #10b981;
  --error:        #ef4444;
  --warning:      #f59e0b;

  --text:         #f0f0ff;
  --text-s:       #c0c0dd;
  --text-m:       #8888aa;
  --text-d:       #444466;

  --radius:       14px;
  --radius-s:     8px;
  --radius-l:     20px;
  --radius-xl:    28px;

  --shadow:       0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.4);
  --glow:         0 0 30px rgba(139, 92, 246, 0.25);
  --glow-gold:    0 0 20px rgba(245, 158, 11, 0.3);

  --transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font-head:    'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --nav-h:        64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 110%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, select, textarea { font-family: var(--font-body); }

/* ── Utility ── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex     { display: flex; }
.center   { align-items: center; justify-content: center; }
.gap-1    { gap: 8px; }
.gap-2    { gap: 12px; }
.gap-3    { gap: 16px; }

/* ── Glass Surface ── */
.glass {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 99px; }

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(7, 7, 15, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.navbar-logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-l    { color: var(--primary-l); }
.logo-xwis { color: var(--text); }
.logo-shop { color: var(--gold); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Balance chip ── */
.balance-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold-l);
  cursor: pointer;
  transition: var(--transition);
}
.balance-chip:hover {
  background: rgba(245, 158, 11, 0.18);
  box-shadow: var(--glow-gold);
}
.balance-chip .coin-icon { font-size: 14px; }

/* ── Nav Buttons ── */
.btn-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-l);
  box-shadow: var(--glow);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-s);
}
.btn-ghost:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
  color: var(--text);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-s);
  transition: var(--transition);
}
.btn-icon:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
  color: var(--text);
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.avatar-btn:hover {
  border-color: var(--primary-l);
  box-shadow: var(--glow);
}

/* ── Guest badge ── */
.guest-badge {
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-m);
}

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 80px) 32px 64px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-brand-l    { color: var(--primary-l); }
.hero-brand-xwis { color: var(--text); }
.hero-brand-s    { color: var(--text); }
.hero-brand-hop  {
  background: linear-gradient(90deg, var(--gold), var(--gold-l));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-m);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

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

/* ── Hero divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider span {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-d);
}

/* ══════════════════════════════════════
   SHOP SECTION
   ══════════════════════════════════════ */
.shop-section {
  position: relative;
  z-index: 1;
  padding: 0 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.shop-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-s);
}

.item-count {
  font-size: 0.8rem;
  color: var(--text-m);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 99px;
}

/* ── Grid ── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Item Card ── */
.item-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.item-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.15), var(--glow);
}

.item-card:hover::before { opacity: 1; }

.item-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.item-info { flex: 1; }

.item-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.item-stock {
  font-size: 0.8rem;
  color: var(--text-m);
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.stock-dot.low { background: var(--warning); }

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.item-price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-l);
}

.item-price .price-icon {
  font-size: 14px;
  opacity: 0.8;
}

.btn-buy {
  padding: 9px 20px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-buy:hover {
  background: var(--primary-l);
  box-shadow: var(--glow);
  transform: scale(1.04);
}
.btn-buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Empty / Loading State ── */
.state-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-m);
}

.state-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-d);
  margin-bottom: 8px;
}

.state-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-s);
}

.state-sub { font-size: 0.875rem; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-h) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite;
  border-radius: var(--radius-s);
}
@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════
   PROFILE DRAWER
   ══════════════════════════════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.profile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  z-index: 201;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
}

.btn-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-m);
  transition: var(--transition);
}
.btn-close:hover { background: var(--surface-h); color: var(--text); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Profile card ── */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  box-shadow: var(--glow);
}

.profile-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
}

.profile-email {
  font-size: 0.8rem;
  color: var(--text-m);
}

.unverified-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ── Balance card ── */
.balance-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-l);
  padding: 20px;
}

.balance-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-m);
  margin-bottom: 8px;
}

.balance-amount {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-l);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.balance-currency {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.8;
}

.btn-topup {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-s);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold-l);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-topup:hover {
  background: rgba(245, 158, 11, 0.22);
  box-shadow: var(--glow-gold);
}

/* ── Order history ── */
.orders-section-title {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-m);
  margin-bottom: -12px;
}

.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  gap: 12px;
}

.order-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-s);
  flex: 1;
}

.order-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}

.order-date {
  font-size: 0.72rem;
  color: var(--text-d);
  display: block;
  margin-top: 2px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.orders-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-m);
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
}

/* ── Drawer footer ── */
.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn-signout {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-s);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-signout:hover {
  background: rgba(239, 68, 68, 0.14);
}

/* ══════════════════════════════════════
   MODALS (shared)
   ══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
  margin-bottom: 4px;
}

.modal-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-body { padding: 24px; }

/* ── Tabs ── */
.tab-bar {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 8px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-m);
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ── Form elements ── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-m);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-input::placeholder { color: var(--text-d); }

.form-input[type="file"] {
  padding: 8px 14px;
  cursor: pointer;
}

.form-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-m);
  margin-top: 6px;
}

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-s);
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.btn-submit:hover {
  background: var(--primary-l);
  box-shadow: var(--glow);
}
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span {
  font-size: 0.75rem;
  color: var(--text-d);
}

/* ── Google button ── */
.btn-google {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-s);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  margin-bottom: 4px;
}
.btn-google:hover {
  background: var(--surface-h);
  border-color: rgba(255,255,255,0.15);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Guest row ── */
.guest-row {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.guest-row p {
  font-size: 0.8rem;
  color: var(--text-m);
  margin-bottom: 8px;
}
.btn-guest {
  font-size: 0.875rem;
  color: var(--primary-l);
  font-weight: 500;
  transition: var(--transition);
}
.btn-guest:hover { color: var(--primary); text-decoration: underline; }

/* ── Top-up modal ── */
.topup-modal { max-width: 420px; }

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.qr-container img {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-s);
  object-fit: contain;
  background: #fff;
  padding: 8px;
}

.qr-label {
  font-size: 0.8rem;
  color: var(--text-m);
  text-align: center;
}

.topup-note {
  font-size: 0.78rem;
  color: var(--text-m);
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: var(--radius-s);
  padding: 10px 12px;
  margin-top: 8px;
  line-height: 1.5;
}

/* ══════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 280px;
  max-width: 360px;
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.removing {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from { transform: translateX(100%) scale(0.9); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0) scale(1); opacity: 1; }
  to   { transform: translateX(100%) scale(0.9); opacity: 0; }
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.toast-success .toast-icon { background: rgba(16,185,129,0.15); color: var(--success); }
.toast-error   .toast-icon { background: rgba(239,68,68,0.15);   color: var(--error); }
.toast-warning .toast-icon { background: rgba(245,158,11,0.15);  color: var(--warning); }
.toast-info    .toast-icon { background: rgba(139,92,246,0.15);  color: var(--primary-l); }

.toast-content { flex: 1; }

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.toast-msg {
  font-size: 0.78rem;
  color: var(--text-m);
  margin-top: 2px;
}

/* ══════════════════════════════════════
   BANNER (verification / welcome)
   ══════════════════════════════════════ */
.banner {
  position: relative;
  z-index: 1;
  margin: calc(var(--nav-h) + 16px) 32px 0;
  padding: 14px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
}

.banner-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--gold-l);
}

.banner-info {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--primary-l);
}

.banner-close {
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.6;
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.banner-close:hover { opacity: 1; }

/* ══════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════ */
.admin-body {
  background: var(--bg);
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
}

/* Password gate */
.admin-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
}

.gate-logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.gate-sub {
  font-size: 0.875rem;
  color: var(--text-m);
  margin-bottom: 28px;
}

.gate-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 8px;
  min-height: 18px;
}

/* Admin layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-logo {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  padding: 8px 12px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  color: var(--primary-l);
}

.admin-logo span { color: var(--gold); }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  color: var(--text-m);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.admin-nav-item.active {
  color: var(--primary-l);
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.07);
}

.admin-nav-badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
}

.admin-main {
  margin-left: 220px;
  flex: 1;
  padding: 32px;
  max-width: calc(100vw - 220px);
}

.admin-page-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-page-sub {
  color: var(--text-m);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

/* Admin sections */
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  margin-bottom: 24px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.admin-section-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-m);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 20px;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.admin-table-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-m);
  font-size: 0.875rem;
}

/* ── Table Action Buttons ── */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-s);
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-edit {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--primary-l);
}
.btn-edit:hover { background: rgba(139, 92, 246, 0.2); }

.btn-delete {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  margin-left: 6px;
}
.btn-delete:hover { background: rgba(239, 68, 68, 0.15); }

.btn-approve {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.btn-approve:hover { background: rgba(16, 185, 129, 0.18); }

/* ── Stock badge ── */
.stock-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.stock-ok  { background: rgba(16,185,129,0.12); color: #34d399; }
.stock-low { background: rgba(245,158,11,0.12);  color: var(--gold); }
.stock-out { background: rgba(239,68,68,0.12);   color: #f87171; }

/* Status badge */
.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-pending  { background: rgba(245,158,11,0.12);  color: var(--gold); }
.status-approved { background: rgba(16,185,129,0.12); color: #34d399; }

/* ── Add item form ── */
.add-item-form {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.add-item-form .form-group { margin: 0; }

.add-item-form .btn-submit {
  grid-column: span 1;
  padding: 11px;
  margin: 0;
}

/* Edit inline */
.edit-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 5px 8px;
  font-size: 0.875rem;
  width: 90px;
  outline: none;
}
.edit-input:focus { border-color: var(--primary); }

/* Receipt link */
.receipt-link {
  color: var(--accent);
  font-size: 0.78rem;
  transition: var(--transition);
}
.receipt-link:hover { color: var(--accent-l); text-decoration: underline; }

/* ── Admin Tab panel ── */
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* ══════════════════════════════════════
   SPINNER
   ══════════════════════════════════════ */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }

  .navbar-logo { font-size: 1.1rem; }

  .hero { padding: calc(var(--nav-h) + 48px) 20px 48px; }

  .shop-section { padding: 0 16px 60px; }

  .banner { margin: calc(var(--nav-h) + 12px) 16px 0; }

  .shop-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .item-card { padding: 16px; }

  .profile-drawer { width: 100%; max-width: none; }

  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; max-width: 100vw; padding: 20px; }

  .add-item-form { grid-template-columns: 1fr; }
  .add-item-form .btn-submit { grid-column: span 1; }
}

@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.4rem; }
  .toast { min-width: 0; max-width: calc(100vw - 32px); }
  .toast-container { right: 16px; bottom: 16px; }
}
