/* ═══════════════════════════════════════════════════════════════
   Panel Bazaar BD — Layout Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Splash Screen ── */
.splash-screen {
  position: fixed; inset: 0; z-index: var(--z-splash);
  background: var(--bg-base); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 28px;
  transition: opacity 400ms ease, transform 400ms ease;
}
.splash-screen.hiding { opacity: 0; transform: scale(1.05); pointer-events: none; }
.splash-logo { width: 80px; height: 80px; animation: splashPulse 2s ease-in-out infinite; }
.splash-wordmark { font-weight: 800; font-size: 24px; letter-spacing: -0.04em; color: var(--text-primary); }
.splash-bar-wrap { width: 280px; height: 2px; background: rgba(255,255,255,0.06); border-radius: 1px; overflow: hidden; }
.splash-bar-fill {
  height: 100%; width: 0; border-radius: 1px;
  background: linear-gradient(90deg, var(--violet), var(--indigo));
  animation: splashFill 2.2s var(--ease-out) forwards;
}
@keyframes splashFill { to { width: 100%; } }
@keyframes splashPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

/* ── Top Navbar ── */
.top-nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  height: var(--nav-height); padding: 0 var(--page-padding);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(6,6,15,0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(139,92,246,0.06);
}
.top-nav .nav-brand { display: flex; align-items: center; gap: 10px; }
.top-nav .nav-brand svg { width: 28px; height: 28px; color: var(--violet); }
.top-nav .nav-brand span { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.wallet-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-surface); border: 1px solid var(--violet-border);
  border-radius: var(--pill-radius); padding: 6px 12px;
  cursor: pointer; transition: all var(--transition-standard);
}
.wallet-pill:hover { border-color: var(--violet-border-active); background: rgba(124,58,237,0.08); }
.wallet-pill svg { width: 16px; height: 16px; color: var(--lavender); }
.wallet-pill .amount { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--text-price); }

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--bottom-nav-height);
  background: rgba(6,6,15,0.92); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(139,92,246,0.1);
  display: flex; align-items: center; justify-content: space-around;
  z-index: var(--z-sticky); padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 12px; cursor: pointer; color: var(--text-muted);
  transition: color var(--transition-standard); min-width: 52px;
  position: relative;
}
.nav-item.active { color: var(--lavender); }
.nav-item.active::after {
  content: ''; position: absolute; top: -1px;
  width: 20px; height: 2px; background: var(--gradient-primary); border-radius: 1px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item span { font-size: 10px; font-weight: 600; }

/* ── Hero Banner ── */
.hero-banner {
  position: relative; margin: 0 var(--page-padding); border-radius: var(--card-radius);
  background: var(--gradient-hero); overflow: hidden; padding: 24px 20px;
  min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-banner::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
}
.hero-banner .hero-orb {
  position: absolute; bottom: -40px; right: -30px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
  filter: blur(40px);
}
.hero-banner .hero-badge { margin-bottom: 12px; position: relative; }
.hero-banner .hero-title {
  font-weight: 800; font-size: 22px; letter-spacing: -0.04em;
  line-height: 1.2; position: relative; max-width: 260px;
}
.hero-banner .hero-subtitle {
  font-size: 13px; color: var(--text-secondary); margin-top: 8px; position: relative;
}

/* ── Product Grid ── */
.product-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 14px; padding: 0 var(--page-padding);
}
@media (min-width: 420px) { .product-grid { grid-template-columns: 1fr 1fr; } }

.product-card { cursor: pointer; }
.product-card .product-image-wrap {
  width: 100%; aspect-ratio: 16/9; border-radius: 12px;
  overflow: hidden; margin-bottom: 12px; position: relative;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(79,70,229,0.05));
}
.product-card .product-image-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.product-card .product-image-wrap .img-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 48px; color: rgba(124,58,237,0.3);
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(79,70,229,0.04));
}
.product-card .product-info { display: flex; flex-direction: column; gap: 6px; }
.product-card .product-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.product-card .product-price-row {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
}
.product-card .product-price-row .from-text { color: var(--text-muted); }

/* ── Package Chips ── */
.package-chips { display: flex; gap: 10px; overflow-x: auto; padding: 0 var(--page-padding); }
.package-chip {
  min-width: 72px; height: 80px; border-radius: 16px; padding: 10px;
  background: var(--bg-surface); border: 1px solid var(--violet-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; flex-shrink: 0;
  transition: all var(--transition-standard);
}
.package-chip .pkg-days { font-weight: 800; font-size: 18px; line-height: 1; }
.package-chip .pkg-label { font-size: 10px; color: var(--text-muted); }
.package-chip .pkg-price { font-size: 12px; font-weight: 700; color: var(--text-price); }
.package-chip.active {
  border-color: var(--violet); background: rgba(124,58,237,0.1);
  box-shadow: 0 0 16px rgba(124,58,237,0.15);
}
.package-chip.out-of-stock {
  opacity: 0.4; pointer-events: none;
}
.package-chip .oos-label {
  font-size: 9px; font-weight: 700; color: var(--danger);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Purchase Bar ── */
.purchase-bar {
  position: fixed; bottom: var(--bottom-nav-height); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: var(--bg-elevated);
  border-top: 1px solid rgba(139,92,246,0.12); border-radius: 24px 24px 0 0;
  padding: 16px 20px; z-index: 8; backdrop-filter: blur(20px);
}

/* ── Profile Header ── */
.profile-header {
  position: relative; padding: 32px 20px 24px; overflow: hidden;
  background: linear-gradient(180deg, rgba(124,58,237,0.12) 0%, transparent 100%);
}
.profile-header::before {
  content: ''; position: absolute; top: -80px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  filter: blur(50px);
}
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gradient-primary); display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px; color: #fff;
  border: 2px solid rgba(255,255,255,0.1); position: relative;
}
.profile-header .profile-info { margin-top: 12px; position: relative; }
.profile-header .profile-welcome { font-size: 12px; color: var(--text-muted); }
.profile-header .profile-name { font-weight: 700; font-size: 18px; margin-top: 2px; }
.profile-header .profile-balance {
  font-weight: 900; font-size: 36px; color: var(--text-price);
  font-variant-numeric: tabular-nums; margin-top: 8px; letter-spacing: -0.02em;
}

/* ── Admin Stats ── */
.stats-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--page-padding); }
.stat-card {
  min-width: 140px; flex-shrink: 0; padding: 16px;
}
.stat-card .stat-value { font-weight: 900; font-size: 24px; line-height: 1; }
.stat-card .stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.stat-card .stat-trend {
  font-size: 11px; font-weight: 700; margin-top: 4px;
  display: flex; align-items: center; gap: 3px;
}
.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }

/* ── Quick Amount Grid ── */
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 var(--page-padding); }
.amount-card {
  position: relative; height: 80px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.amount-card .taka-bg {
  position: absolute; right: -5px; bottom: -10px;
  font-size: 60px; font-weight: 900; color: rgba(255,255,255,0.03);
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.amount-card .amount-value {
  font-weight: 800; font-size: 22px; color: var(--text-primary);
  position: relative; font-variant-numeric: tabular-nums;
}
.amount-card.active {
  border-color: var(--violet); background: rgba(124,58,237,0.1);
  box-shadow: 0 0 16px rgba(124,58,237,0.15);
}

/* ── MFS Method Badges ── */
.mfs-methods { display: flex; gap: 8px; flex-wrap: wrap; }
.mfs-badge {
  padding: 8px 14px; border-radius: 10px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; transition: all var(--transition-standard);
}
.mfs-badge.bkash { color: var(--bkash); border-color: rgba(226,19,110,0.2); }
.mfs-badge.bkash.active { background: rgba(226,19,110,0.12); border-color: var(--bkash); }
.mfs-badge.nagad { color: var(--nagad); border-color: rgba(242,101,34,0.2); }
.mfs-badge.nagad.active { background: rgba(242,101,34,0.12); border-color: var(--nagad); }
.mfs-badge.rocket { color: var(--rocket); border-color: rgba(139,47,135,0.2); }
.mfs-badge.rocket.active { background: rgba(139,47,135,0.12); border-color: var(--rocket); }

/* ── Payment Processing ── */
.payment-processing {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60dvh; gap: 24px; padding: 40px;
}
.processing-rings {
  position: relative; width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.processing-rings .ring {
  position: absolute; border-radius: 50%; border: 1.5px solid var(--violet);
  animation: ringPulse 2s ease-out infinite;
}
.processing-rings .ring:nth-child(1) { width: 60px; height: 60px; animation-delay: 0s; }
.processing-rings .ring:nth-child(2) { width: 80px; height: 80px; animation-delay: 0.4s; }
.processing-rings .ring:nth-child(3) { width: 100px; height: 100px; animation-delay: 0.8s; }
.processing-rings .ring-icon {
  position: relative; z-index: 2; color: var(--lavender);
}
.processing-rings .ring-icon svg { width: 32px; height: 32px; }

/* ── Payment Result ── */
.payment-result {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60dvh; gap: 20px; padding: 40px;
}
.result-icon { animation: successCheck 500ms var(--ease-out) forwards; }
.result-icon svg { width: 64px; height: 64px; }
.result-icon.success svg { color: var(--success); }
.result-icon.error svg { color: var(--danger); }

/* ── Order Timeline ── */
.timeline { padding: 0 var(--page-padding); }
.timeline-item {
  display: flex; gap: 12px; padding-bottom: 20px; position: relative;
}
.timeline-item::before {
  content: ''; position: absolute; left: 5px; top: 14px; bottom: 0;
  width: 1px; background: rgba(139,92,246,0.1);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
  position: relative; z-index: 1;
}
.timeline-dot.topup { background: var(--success); box-shadow: 0 0 8px rgba(16,185,129,0.4); }
.timeline-dot.purchase { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,0.3); }

/* ── Admin List Items ── */
.admin-list-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
}
.admin-list-item + .admin-list-item {
  border-top: 1px solid rgba(139,92,246,0.06);
}

/* ── FAB ── */
.fab {
  position: fixed; bottom: calc(var(--bottom-nav-height) + 20px); right: 20px;
  width: 52px; height: 52px; border-radius: 50%; z-index: 9;
  background: var(--gradient-primary); box-shadow: 0 6px 24px rgba(124,58,237,0.4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; color: #fff;
  transition: transform var(--transition-press), box-shadow var(--transition-standard);
}
.fab:active { transform: scale(0.9); }
.fab:hover { box-shadow: 0 8px 32px rgba(124,58,237,0.5); }
.fab svg { width: 24px; height: 24px; }

/* ── Stock Request Modal ── */
.request-form { display: flex; flex-direction: column; gap: 16px; }

/* ── Auth Screen ── */
.auth-screen {
  min-height: 100dvh; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-screen .auth-orb-1 {
  position: absolute; top: -100px; right: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 60%);
  filter: blur(120px); pointer-events: none;
}
.auth-screen .auth-orb-2 {
  position: absolute; bottom: -50px; left: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.12) 0%, transparent 60%);
  filter: blur(80px); pointer-events: none;
}
.auth-brand {
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 0 40px; position: relative;
}
.auth-brand .auth-logo { width: 80px; height: 80px; margin-bottom: 16px; }
.auth-brand .auth-wordmark { font-weight: 800; font-size: 28px; letter-spacing: -0.04em; }
.auth-brand .auth-tagline { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.auth-form {
  flex: 1; padding: 0 24px; display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.auth-tabs {
  display: flex; gap: 0; background: var(--bg-surface); border-radius: 12px;
  padding: 3px; border: 1px solid var(--violet-border);
}
.auth-tab {
  flex: 1; padding: 10px 0; text-align: center; font-weight: 600; font-size: 13px;
  border-radius: 10px; cursor: pointer; color: var(--text-muted);
  transition: all var(--transition-standard);
}
.auth-tab.active {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}
.auth-forgot { text-align: center; color: var(--lavender); font-size: 13px; cursor: pointer; margin-top: 4px; }
