/* ══════════════════════════════════════════════════
   POKEVAULT — DARK PREMIUM THEME
   Mobile-first · Gold accents · Charcoal surfaces
══════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
:root {
  --bg-page:      #0e0e11;
  --bg-surface:   #17171f;
  --bg-elevated:  #1e1e28;
  --bg-hover:     #22222e;

  --border:       #2a2a35;
  --border-hover: #3d3d4f;
  --border-gold:  rgba(201,168,76,0.35);

  --gold:         #c9a84c;
  --gold-hover:   #d4b060;
  --gold-dim:     rgba(201,168,76,0.12);
  --gold-text:    #c9a84c;

  --text-primary:   #e2e2e8;
  --text-secondary: #7a7a8a;
  --text-dim:       #4a4a5a;

  --danger:  #e24b4a;
  --success: #1d9e75;
  --info:    #378add;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --navbar-h: 56px;
  --cart-pill-h: 56px;

  --transition: 180ms ease;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Utility ────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ══════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: rgba(14,14,17,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.logo-hex {
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}
.logo-hex.large { font-size: 48px; }

.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 16px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--gold); }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.balance-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-gold);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
}
.balance-icon { color: var(--gold); font-size: 12px; }
#balance-amount { font-weight: 500; color: var(--gold); }
.balance-label { color: var(--text-secondary); font-size: 11px; }

.btn-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.btn-icon:hover { color: var(--text-primary); background: var(--bg-hover); }

.cart-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--gold);
  color: var(--bg-page);
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.btn-ghost {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-hover); }

/* ══════════════════════════════════════════════════
   MAIN CONTENT WRAPPER
══════════════════════════════════════════════════ */
.main-content {
  padding-top: var(--navbar-h);
  min-height: 100dvh;
}

/* Generic page containers */
.page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 100px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════
   AUTH VIEW
══════════════════════════════════════════════════ */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--navbar-h));
  padding: 24px 16px;
}

.auth-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-divider-label {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition), transform 80ms;
  margin-bottom: 10px;
}
.btn-oauth:active { transform: scale(0.98); }

.btn-google {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  color: var(--text-primary);
}
.btn-google:hover { border-color: var(--border-hover); background: var(--bg-hover); }

.btn-discord {
  background: #5865f2;
  border: 0.5px solid transparent;
  color: #fff;
}
.btn-discord:hover { background: #4752c4; }

.auth-footer {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 20px;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   CATALOG LAYOUT
══════════════════════════════════════════════════ */
.catalog-layout {
  display: flex;
  min-height: calc(100dvh - var(--navbar-h));
}

/* ── Sidebar ────────────────────────────────────── */
.catalog-sidebar {
  display: none; /* hidden on mobile */
  width: 200px;
  flex-shrink: 0;
  border-right: 0.5px solid var(--border);
  position: sticky;
  top: var(--navbar-h);
  height: calc(100dvh - var(--navbar-h));
  overflow-y: auto;
  padding: 20px 12px;
  background: var(--bg-surface);
}

.sidebar-header {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding: 0 6px;
}

.sidebar-series-list { display: flex; flex-direction: column; gap: 2px; }

.series-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  line-height: 1.3;
}
.series-item:hover { color: var(--text-primary); background: var(--bg-hover); }
.series-item.active {
  color: var(--gold);
  background: var(--gold-dim);
  font-weight: 500;
}

/* ── Mobile series bar ──────────────────────────── */
.mobile-series-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
  scrollbar-width: none;
  background: var(--bg-surface);
  position: sticky;
  top: var(--navbar-h);
  z-index: 10;
}
.mobile-series-bar::-webkit-scrollbar { display: none; }

.mobile-series-item {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.mobile-series-item:hover { color: var(--text-primary); border-color: var(--border-hover); }
.mobile-series-item.active {
  color: var(--gold);
  border-color: var(--border-gold);
  background: var(--gold-dim);
  font-weight: 500;
}

/* ── Main catalog ───────────────────────────────── */
.catalog-main {
  flex: 1;
  min-width: 0;
  padding: 20px 16px 120px;
}

.catalog-header {
  margin-bottom: 20px;
}

.catalog-series-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.filter-chip:hover { color: var(--text-primary); border-color: var(--border-hover); }
.filter-chip.active {
  color: var(--gold);
  border-color: var(--border-gold);
  background: var(--gold-dim);
  font-weight: 500;
}

/* ── Product grid ───────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px;
}

.product-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), background var(--transition), transform 80ms;
  cursor: default;
}
.product-card:hover { border-color: var(--border-hover); background: var(--bg-elevated); }

.product-card.out-of-stock { opacity: 0.45; pointer-events: none; }

.product-type-badge {
  display: inline-block;
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}

.product-stock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}

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

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 6px;
}

.product-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
}

.product-price .price-unit {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 1px;
}

.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  border: 0.5px solid var(--border-gold);
  color: var(--gold);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transition: background var(--transition), color var(--transition), transform 80ms;
  flex-shrink: 0;
}
.btn-add:hover { background: var(--gold); color: var(--bg-page); }
.btn-add:active { transform: scale(0.9); }

/* qty stepper (replaces + btn when item is in cart) */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 0.5px solid var(--border-gold);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 26px; height: 28px;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--gold); color: var(--bg-page); }

.qty-value {
  min-width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  padding: 0 2px;
}

/* Catalog states */
.catalog-loading,
.catalog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  gap: 16px;
}

/* ══════════════════════════════════════════════════
   CART DRAWER (bottom sheet — mobile first)
══════════════════════════════════════════════════ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  animation: fadeIn 180ms ease;
}

.cart-drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-surface);
  border-top: 0.5px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  max-height: 80dvh;
  transform: translateY(0);
  animation: slideUp 220ms cubic-bezier(0.22,1,0.36,1);
}

.cart-handle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.handle-bar {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 3px;
  background: var(--border-hover);
  border-radius: 3px;
}

.cart-drawer-title {
  font-size: 15px;
  font-weight: 500;
}

.cart-total-label {
  margin-left: auto;
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
}

.cart-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 16px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-bottom: 8px;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}

.cart-line-name {
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.35;
}

.cart-line-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.cart-line-price {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  flex-shrink: 0;
}

.cart-line-remove {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
}
.cart-line-remove:hover { color: var(--danger); }

.cart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  font-size: 14px;
  color: var(--text-secondary);
}

.cart-footer {
  padding: 14px 0 24px;
  flex-shrink: 0;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 14px;
}
.cart-summary-label { color: var(--text-secondary); }
.cart-summary-value { font-size: 18px; font-weight: 600; color: var(--gold); }

/* ── Cart pill (collapsed) ──────────────────────── */
.cart-pill {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--bg-page);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 40px;
  z-index: 150;
  box-shadow: 0 4px 20px rgba(201,168,76,0.25);
  white-space: nowrap;
  transition: transform 80ms, box-shadow var(--transition);
}
.cart-pill:active { transform: translateX(-50%) scale(0.97); }
.cart-pill svg { flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   BUTTONS (global)
══════════════════════════════════════════════════ */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: var(--bg-page);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: none;
  transition: background var(--transition), transform 80ms;
}
.btn-gold:hover { background: var(--gold-hover); }
.btn-gold:active { transform: scale(0.98); }
.btn-gold.btn-full { width: 100%; }
.btn-gold:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ══════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 180ms ease;
}

@media (min-width: 600px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: var(--radius-xl) !important; max-width: 440px !important; }
}

.modal {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  animation: slideUp 220ms cubic-bezier(0.22,1,0.36,1);
}

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

.modal-title {
  font-size: 16px;
  font-weight: 500;
}

.modal-close {
  color: var(--text-secondary);
  font-size: 16px;
  width: 30px; height: 30px;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 0 20px 20px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px 24px;
  border-top: 0.5px solid var(--border);
}
.modal-footer .btn-ghost { flex: 1; justify-content: center; text-align: center; padding: 11px; }
.modal-footer .btn-gold  { flex: 2; }

/* Modal receipt */
.modal-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 0.5px solid var(--border);
}
.modal-item-row:last-child { border-bottom: none; }
.modal-item-name { color: var(--text-primary); }
.modal-item-price { color: var(--gold); font-weight: 500; }

.modal-total-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 0;
  font-size: 16px;
  font-weight: 600;
}
.modal-balance-after {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ── Receipt (post-checkout) ────────────────────── */
.receipt-code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  color: var(--text-secondary);
  word-break: break-all;
  display: inline-block;
  margin: 2px 0;
}

.receipt-copy-btn {
  font-size: 11px;
  color: var(--gold);
  padding: 2px 6px;
  border: 0.5px solid var(--border-gold);
  border-radius: 4px;
  background: var(--gold-dim);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background var(--transition);
}
.receipt-copy-btn:hover { background: var(--gold); color: var(--bg-page); }

/* ══════════════════════════════════════════════════
   HISTORY VIEW
══════════════════════════════════════════════════ */
.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}
.history-card:hover { border-color: var(--border-hover); }

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  gap: 12px;
}

.history-product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.history-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.history-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
  flex-shrink: 0;
}

.history-chevron {
  color: var(--text-dim);
  font-size: 14px;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.history-card.expanded .history-chevron { transform: rotate(180deg); }

.history-codes {
  display: none;
  padding: 0 16px 16px;
  border-top: 0.5px solid var(--border);
  padding-top: 12px;
  flex-direction: column;
  gap: 6px;
}
.history-card.expanded .history-codes { display: flex; }

.history-code-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.history-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

/* ══════════════════════════════════════════════════
   PROFILE VIEW
══════════════════════════════════════════════════ */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.profile-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.profile-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1.5px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-name {
  font-size: 16px;
  font-weight: 500;
}

.profile-id {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 14px;
  gap: 8px;
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label { color: var(--text-secondary); }
.profile-row-value { color: var(--text-primary); font-weight: 500; word-break: break-all; text-align: right; }
.profile-row-value.gold { color: var(--gold); }

.topup-code-block {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

/* ══════════════════════════════════════════════════
   ADMIN VIEW
══════════════════════════════════════════════════ */
.admin-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { background: var(--bg-elevated); color: var(--gold); font-weight: 500; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
}

.admin-card-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.field input, .field select, .field textarea {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  transition: border-color var(--transition);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--text-dim);
}
.field select option { background: var(--bg-surface); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Status toggle */
.status-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.awake { background: var(--success); box-shadow: 0 0 0 3px rgba(29,158,117,.2); }
.status-dot.sleep  { background: var(--danger);  box-shadow: 0 0 0 3px rgba(226,75,74,.2); }

.status-text {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

/* Admin table */
.admin-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 0.5px solid var(--border); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-hover); }

.badge-banned {
  display: inline-block;
  font-size: 11px;
  background: rgba(226,75,74,.15);
  color: var(--danger);
  border: 0.5px solid rgba(226,75,74,.3);
  border-radius: 4px;
  padding: 2px 7px;
}
.badge-gold {
  display: inline-block;
  font-size: 11px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 0.5px solid var(--border-gold);
  border-radius: 4px;
  padding: 2px 7px;
}
.badge-ok {
  display: inline-block;
  font-size: 11px;
  background: rgba(29,158,117,.12);
  color: var(--success);
  border: 0.5px solid rgba(29,158,117,.3);
  border-radius: 4px;
  padding: 2px 7px;
}

/* ══════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: calc(var(--navbar-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  width: min(360px, 90vw);
}

.toast {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  width: 100%;
  animation: toastIn 200ms cubic-bezier(0.22,1,0.36,1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { border-color: rgba(29,158,117,.4); }
.toast.error   { border-color: rgba(226,75,74,.4); }

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

/* ══════════════════════════════════════════════════
   SPINNER
══════════════════════════════════════════════════ */
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border-hover);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════ */
@keyframes fadeIn   { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp  { from { transform: translateY(32px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes toastIn  { from { transform: translateY(-8px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes spin     { to { transform: rotate(360deg) } }

/* ══════════════════════════════════════════════════
   RESPONSIVE — DESKTOP
══════════════════════════════════════════════════ */
@media (min-width: 700px) {
  .catalog-sidebar  { display: block; }
  .mobile-series-bar { display: none; }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  }

  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cart-pill {
    bottom: 28px;
  }
}

@media (min-width: 1000px) {
  .catalog-sidebar { width: 220px; }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }

  .cart-drawer {
    left: auto;
    right: 0;
    bottom: 0;
    top: var(--navbar-h);
    width: 360px;
    max-height: none;
    height: calc(100dvh - var(--navbar-h));
    border-radius: 0;
    border-left: 0.5px solid var(--border);
    border-top: none;
    animation: slideInRight 220ms cubic-bezier(0.22,1,0.36,1);
  }

  .handle-bar { display: none; }
  .cart-handle { cursor: default; }

  .catalog-layout.cart-open .catalog-main {
    padding-right: 376px;
  }
}

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0 }
  to   { transform: translateX(0);    opacity: 1 }
}