/* ═══════════════════════════════════════════
   NEXUS — White Edition
   Clean · Bright · Product First
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #f4f5fb;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text-primary: #0f0f1a;
  --text-secondary: #5b5b7a;
  --text-muted: #9494b8;
  --border: #e8e8f0;
  --border-light: #f0f0f6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.02);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.03);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.06);
  --primary: #7c3aed;
  --primary-light: #ede9fe;
  --secondary: #06b6d4;
  --accent: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899);
  --gradient-subtle: linear-gradient(135deg, #ede9fe, #fdf2f8);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.page-wrap { flex: 1; }

/* ═══ DECORATIVE BACKGROUND ═══ */

#deco, #bg-layer {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}

.deco-blob, .bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
}

.deco-blob:nth-child(1), .bg-blob:nth-child(1) {
  width: 500px; height: 500px;
  background: #7c3aed;
  top: -15%; right: -10%;
  animation: float 25s ease-in-out infinite;
}

.deco-blob:nth-child(2), .bg-blob:nth-child(2) {
  width: 400px; height: 400px;
  background: #ec4899;
  bottom: -10%; left: -10%;
  animation: float 30s ease-in-out infinite reverse;
}

.deco-blob:nth-child(3), .bg-blob:nth-child(3) {
  width: 300px; height: 300px;
  background: #06b6d4;
  top: 40%; left: 50%;
  transform: translate(-50%,-50%);
  animation: float 20s ease-in-out infinite;
  opacity: 0.08;
}

@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-30px) scale(1.05); }
  66% { transform: translate(-20px,20px) scale(0.95); }
}

/* ═══ DECORATIVE DOTS ═══ */

.deco-dots, .bg-grid {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(124,58,237,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ═══ SCANLINE ═══ */

.bg-scanline {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(124,58,237,0.015) 2px, rgba(124,58,237,0.015) 4px);
}

/* ═══ CURSOR GLOW ═══ */

.cursor-glow {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.06), transparent 70%);
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ═══ PARTICLES ═══ */

.particle-field {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: var(--s, 6px);
  height: var(--s, 6px);
  background: rgba(124,58,237,0.08);
  border-radius: 50%;
  animation: particleFloat var(--dur, 20s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.particle.tri { border-radius: 0; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }
.particle.sq { border-radius: 0; }

@keyframes particleFloat {
  0%,100% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  0% { transform: translateY(100vh) rotate(0deg); }
  100% { transform: translateY(-10vh) rotate(720deg); }
}

/* ═══ NAVBAR ═══ */

.navbar {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.5px;
  margin-right: auto;
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--text-primary); background: var(--border-light); }

.nav-link.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.register-link {
  background: var(--gradient) !important;
  color: #fff !important;
  font-weight: 600;
}

.register-link:hover { opacity: 0.9; transform: translateY(-1px); }

.admin-link {
  border: 1px solid var(--border);
  color: var(--secondary) !important;
}

.cart-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.cart-btn:hover { background: var(--border); color: var(--text-primary); }

.cart-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.cart-badge.show { transform: scale(1); }

.menu-btn { display: none; background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; }

/* ═══ HERO — MINIMAL ═══ */

.hero {
  position: relative;
  z-index: 1;
  padding: 60px 24px 40px;
  text-align: center;
}

/* Decorative line under hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 400px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-title .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.search-box {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 60px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

.search-box button {
  padding: 0 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.search-box button:hover { color: var(--primary); }

/* ═══ CONTAINER ═══ */

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ═══ SECTION ═══ */

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

.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-tab {
  padding: 7px 18px;
  border-radius: 60px;
  background: var(--border-light);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.cat-tab:hover { background: var(--border); color: var(--text-primary); }

.cat-tab.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

/* ═══ PRODUCT GRID ═══ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ═══ PRODUCT CARD ═══ */

.product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
  cursor: default;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

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

/* Top gradient stripe decoration */
.product-card::after {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 3px;
  background: var(--gradient);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover::after { opacity: 1; }

.product-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.product-card-img {
  width: 100%;
  height: 140px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--border-light);
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.product-badge {
  display: inline-flex;
  padding: 3px 12px;
  border-radius: 60px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.product-badge.free {
  background: #fef3c7;
  color: #b45309;
}

.product-badge.discount {
  background: #fce4ec;
  color: #c62828;
}

.product-category {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.product-price { display: flex; align-items: baseline; gap: 6px; }

.price-free {
  font-size: 20px;
  font-weight: 800;
  color: #b45309;
}

.price-current {
  font-size: 22px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-stock {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--border-light);
}

.product-stock.sold-out { color: var(--danger); background: #fce4ec; }

.countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
}

.countdown-label { color: #b45309; font-weight: 500; }

.countdown-time { color: #b45309; font-weight: 700; font-variant-numeric: tabular-nums; }

.product-actions {
  display: flex;
  gap: 8px;
}

.btn-buy {
  flex: 1;
  padding: 11px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124,58,237,0.15);
}

.btn-buy.sold-out-btn {
  background: var(--border-light);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-cart {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cart:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ═══ EMPTY STATE ═══ */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}

.empty-state-icon { font-size: 56px; margin-bottom: 12px; opacity: 0.4; }

.empty-state h3 { font-size: 20px; color: var(--text-secondary); margin-bottom: 8px; }

.empty-state p { color: var(--text-muted); }

/* ═══ FOOTER ═══ */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand h3 {
  font-size: 18px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.footer-brand p { font-size: 13px; color: var(--text-muted); }

.footer-links { display: flex; gap: 16px; }

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ═══════════════════════
   CART SIDEBAR
   ═══════════════════════ */

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed;
  top: 0; right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.06);
}

.cart-sidebar.open { transform: translateX(0); }

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

.cart-header h3 { font-size: 17px; font-weight: 700; }

.cart-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.cart-close:hover { background: var(--border-light); color: var(--text-primary); }

.cart-items { flex: 1; overflow-y: auto; padding: 8px 24px; }

.cart-empty { text-align: center; padding: 60px 20px; }

.cart-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }

.cart-empty p { color: var(--text-muted); }

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-info { flex: 1; }

.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }

.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.qty-btn {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.qty-btn:hover { background: var(--border); color: var(--text-primary); }

.qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }

.cart-item-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; transition: color 0.2s; }

.cart-item-remove:hover { color: var(--danger); }

.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); }

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--text-secondary);
}

.cart-total-price {
  font-size: 22px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,0.15); }

/* ═══════════════════════
   AUTH PAGES
   ═══════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-xl);
}

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

.auth-header h1 {
  font-size: 24px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

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

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: var(--font);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
  background: #fff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary {
  width: 100%;
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,0.15); }

.btn-secondary {
  background: var(--border-light);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); }

.btn-danger {
  background: #fce4ec;
  color: var(--danger);
  border: 1px solid #f8bbd0;
}

.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: var(--radius-sm); }

.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }

.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }

.auth-footer a:hover { text-decoration: underline; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error { background: #fce4ec; border: 1px solid #f8bbd0; color: #c62828; }
.alert-success { background: #d1fae5; border: 1px solid #a7f3d0; color: #065f46; }

/* ═══════════════════════
   CHECKIN PAGE
   ═══════════════════════ */

.checkin-page { padding: 40px 24px; position: relative; z-index: 1; }
.checkin-grid { max-width: 800px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.checkin-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; text-align: center; box-shadow: var(--shadow-sm); }
.checkin-card.full { grid-column: 1 / -1; }
.checkin-circle { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: var(--border-light); border: 2px solid var(--border); transition: all 0.3s; }
.checkin-circle.can-checkin { border-color: var(--primary); background: var(--primary-light); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.15); } 50% { box-shadow: 0 0 0 12px rgba(124,58,237,0); } }
.checkin-circle.done { background: #d1fae5; border-color: var(--success); }
.checkin-btn { padding: 14px 44px; border: none; border-radius: var(--radius-md); background: var(--gradient); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: var(--font); }
.checkin-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,0.15); }
.checkin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.streak-display { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.streak-num { font-size: 44px; font-weight: 900; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.streak-label { color: var(--text-muted); font-size: 14px; }
.checkin-calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; margin-top: 16px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; background: var(--border-light); color: var(--text-muted); }
.cal-day.today { border: 2px solid var(--primary); color: var(--text-primary); font-weight: 700; }
.cal-day.checked { background: var(--primary-light); color: var(--primary); }
.cal-day.empty { background: none; }

/* ═══════════════════════
   PROFILE PAGE
   ═══════════════════════ */

.profile-page { padding: 40px 24px; position: relative; z-index: 1; }
.profile-grid { max-width: 800px; margin: 0 auto; display: grid; gap: 20px; }
.profile-header-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; display: flex; align-items: center; gap: 24px; box-shadow: var(--shadow-sm); }
.profile-avatar { width: 68px; height: 68px; border-radius: 50%; background: var(--gradient); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; flex-shrink: 0; }
.profile-info h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.profile-info p { color: var(--text-muted); font-size: 14px; }
.member-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 14px; border-radius: 60px; font-size: 12px; font-weight: 600; margin-top: 6px; }
.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-value { font-size: 30px; font-weight: 900; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ═══════════════════════
   ORDERS PAGE
   ═══════════════════════ */

.orders-page { padding: 40px 24px; position: relative; z-index: 1; }
.orders-list { max-width: 700px; margin: 0 auto; display: grid; gap: 12px; }
.order-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; transition: all 0.2s; display: block; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); }
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.order-no { font-size: 13px; color: var(--text-muted); font-family: 'SF Mono','Fira Code',monospace; }
.order-status { padding: 3px 12px; border-radius: 60px; font-size: 12px; font-weight: 600; }
.order-status.pending { background: #fef3c7; color: #b45309; }
.order-status.paid { background: #d1fae5; color: #065f46; }
.order-status.completed { background: var(--primary-light); color: var(--primary); }
.order-status.refunded { background: #fce4ec; color: #c62828; }
.order-body { display: flex; justify-content: space-between; align-items: center; }
.order-product { font-weight: 600; margin-bottom: 2px; }
.order-meta { font-size: 13px; color: var(--text-muted); }
.order-amount { font-size: 20px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ═══════════════════════
   CHECKOUT & CART PAGES
   ═══════════════════════ */

.checkout-page, .cart-page { padding: 40px 24px; position: relative; z-index: 1; }
.checkout-content, .cart-content { max-width: 640px; margin: 0 auto; }

.payment-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 24px; }
.payment-method { padding: 20px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow-sm); }
.payment-method:hover { border-color: var(--primary); }
.payment-method.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 2px rgba(124,58,237,0.1); }
.payment-method-icon { font-size: 28px; margin-bottom: 6px; display: block; }
.payment-method-name { font-size: 13px; font-weight: 600; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 12px 16px; font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.cart-table td { padding: 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.cart-summary { margin-top: 24px; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* ═══════════════════════
   ADMIN PANEL
   ═══════════════════════ */

.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: #fff; border-right: 1px solid var(--border); padding: 20px 0; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 50; }
.admin-sidebar-logo { font-size: 18px; font-weight: 900; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; padding: 0 20px 20px; display: block; text-decoration: none; }
.admin-nav { display: grid; gap: 2px; padding: 0 12px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.admin-nav a:hover { background: var(--border-light); color: var(--text-primary); }
.admin-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.admin-main { flex: 1; margin-left: 220px; padding: 32px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-header h1 { font-size: 24px; font-weight: 800; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 16px; margin-bottom: 28px; }
.admin-stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.admin-stat-value { font-size: 30px; font-weight: 900; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 4px; }
.admin-stat-label { font-size: 13px; color: var(--text-muted); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.admin-table th { text-align: left; padding: 12px 18px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 12px 18px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.admin-table tr:hover td { background: var(--border-light); }
.admin-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.admin-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.admin-form { display: grid; gap: 16px; max-width: 600px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-badge { display: inline-flex; padding: 2px 10px; border-radius: 60px; font-size: 12px; font-weight: 600; }
.admin-badge.on { background: #d1fae5; color: #065f46; }
.admin-badge.off { background: #fce4ec; color: #c62828; }

/* ═══ DASHBOARD CHARTS ═══ */

.dashboard-grid {
  display: grid;
  gap: 20px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.dashboard-card.full {
  grid-column: 1 / -1;
}

.dashboard-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-card h3 .badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 60px;
}

/* ═══ TODAY STATS ROW ═══ */

.today-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.today-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.today-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.today-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.today-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.today-stat-icon.purple { background: var(--primary-light); }
.today-stat-icon.green { background: #d1fae5; }
.today-stat-icon.orange { background: #fef3c7; }
.today-stat-icon.blue { background: #e0f2fe; }

.today-stat-change {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 60px;
}

.today-stat-change.up { background: #d1fae5; color: #065f46; }
.today-stat-change.down { background: #fce4ec; color: #c62828; }

.today-stat-value {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2px;
}

.today-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ═══ BAR CHART ═══ */

.chart-bar-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding-top: 8px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 40px;
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  cursor: pointer;
}

.chart-bar:hover {
  opacity: 0.8;
}

.chart-bar-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
}

.chart-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}

/* ═══ DONUT CHART ═══ */

.donut-container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.donut-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.donut-legend {
  display: grid;
  gap: 8px;
  flex: 1;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend-label {
  color: var(--text-secondary);
  flex: 1;
}

.donut-legend-value {
  font-weight: 700;
  color: var(--text-primary);
}

/* ═══ TOP PRODUCTS LIST ═══ */

.top-list {
  display: grid;
  gap: 10px;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: all 0.2s;
}

.top-item:hover {
  background: var(--border-light);
}

.top-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.top-rank.gold { background: #fef3c7; color: #b45309; }
.top-rank.silver { background: #f1f5f9; color: #64748b; }
.top-rank.bronze { background: #fce4ec; color: #c62828; }
.top-rank.normal { background: var(--border-light); color: var(--text-muted); }

.top-info { flex: 1; min-width: 0; }

.top-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.top-revenue {
  font-size: 14px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ═══ STOCK ALERTS ═══ */

.stock-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: all 0.2s;
}

.stock-alert.danger { background: #fce4ec; }
.stock-alert.warning { background: #fef3c7; }

.stock-alert-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.stock-info { flex: 1; }

.stock-name {
  font-size: 13px;
  font-weight: 600;
}

.stock-count {
  font-size: 11px;
  color: var(--text-muted);
}

.stock-bar {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.stock-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}

.stock-bar-fill.danger { background: #ef4444; }
.stock-bar-fill.warning { background: #f59e0b; }

/* ═══ MINI TABLE ═══ */

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mini-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}

.mini-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}

.mini-table tr:hover td {
  background: var(--border-light);
}

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

@media (max-width: 1024px) {
  .dashboard-row { grid-template-columns: 1fr; }
  .today-stats { grid-template-columns: repeat(2, 1fr); }
  .donut-container { flex-direction: column; }
}

/* ═══ TOAST ═══ */

.toast-container { position: fixed; top: 76px; right: 20px; z-index: 999; display: grid; gap: 8px; }
.toast { padding: 14px 20px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--border); color: var(--text-primary); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toastIn 0.3s ease-out; min-width: 280px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.toast-out { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }

/* ═══ RESPONSIVE ═══ */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px; box-shadow: var(--shadow-md); }
  .menu-btn { display: block; }
  .hero { padding: 40px 16px 32px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .checkin-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr; }
  .profile-header-card { flex-direction: column; text-align: center; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 20px 16px; }
  .cart-sidebar { width: 100vw; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .payment-methods { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 24px; }
}

/* ═══ MODAL ═══ */

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.2); backdrop-filter: blur(4px); z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); animation: modalIn 0.3s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { font-size: 20px; font-weight: 700; }

.toggle { position: relative; width: 42px; height: 24px; background: var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.toggle.on { background: var(--primary); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle.on::after { transform: translateX(18px); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
