/* ============================================================
   Shop2TopUp — Premium UI 2026
   Glassmorphism · Smooth animations · Mobile-perfect
   ============================================================ */
:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --accent: #8b5cf6;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
  --gradient-btn: linear-gradient(135deg, #7c3aed, #6d28d9);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #f1f5f9;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-soft: #f1f5f9;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
  --shadow-lg: 0 12px 40px rgba(124, 58, 237, 0.14);
  --shadow-xl: 0 20px 60px rgba(124, 58, 237, 0.18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bottom-h: 72px;
  --topbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bottom-h) + var(--safe-bottom));
}

/* ========== TOPBAR ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.logo-text .accent { color: var(--primary); }

.btn-icon {
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover, .btn-icon:active {
  background: var(--border-soft);
  transform: scale(0.96);
}

.balance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 7px 14px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.875rem;
  color: #92400e;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.avatar-btn .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  border: 2px solid #fff;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.5);
}

.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-sm { padding: 9px 18px; font-size: 0.85rem; border-radius: 12px; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-block { width: 100%; }

.btn-ghost {
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary);
}

.btn-social {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: #fff;
}

.btn-social:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 85vw);
  z-index: 200;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-xl);
  transform: translateX(-105%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-radius: 0 24px 24px 0;
}

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

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

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

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s;
  margin-bottom: 4px;
}

.nav-item:hover, .nav-item.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.08));
  color: var(--primary);
}

.nav-item.active {
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.nav-item.danger { color: var(--danger); }

.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg, .nav-item:hover svg { opacity: 1; }

.lang-switcher {
  padding: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-btn {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
  font-weight: 500;
}

.lang-btn.active {
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ========== SEARCH ========== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
}

.search-overlay.show {
  display: block;
  transform: translateY(0);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: 16px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--text);
}

/* ========== MAIN ========== */
.main {
  flex: 1;
  padding: 20px 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, #ede9fe 0%, #f5f3ff 40%, #faf5ff 100%);
  padding: 32px 24px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient);
  color: #fff;
  padding: 5px 14px;
  border-radius: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 8px;
  letter-spacing: -0.03em;
}

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

.hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.floating-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-icons span {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  animation: float 5s ease-in-out infinite;
}

.floating-icons span:nth-child(1) { top: 8%; left: 4%; animation-delay: 0s; }
.floating-icons span:nth-child(2) { top: 18%; right: 8%; animation-delay: 0.7s; }
.floating-icons span:nth-child(3) { bottom: 22%; left: 12%; animation-delay: 1.4s; }
.floating-icons span:nth-child(4) { bottom: 8%; right: 4%; animation-delay: 2.1s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(124, 58, 237, 0); }
}

/* ========== SECTION ========== */
.section {
  margin-bottom: 32px;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.section:nth-child(2) { animation-delay: 0.08s; }
.section:nth-child(3) { animation-delay: 0.16s; }
.section:nth-child(4) { animation-delay: 0.24s; }

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title .icon { font-size: 1.25rem; }

.link-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.link-more:hover { opacity: 0.7; }

/* ========== CATEGORY GRID ========== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 12px;
}

.cat-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.04), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, 0.2);
}

.cat-card:hover::before { opacity: 1; }
.cat-card:active { transform: translateY(-2px) scale(0.97); }

.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.cat-card:hover .cat-icon { transform: scale(1.1); }

.cat-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
.cat-icon.pink { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #db2777; }
.cat-icon.orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #ea580c; }
.cat-icon.purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
.cat-icon.green { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #16a34a; }

.cat-card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.cat-card .arrow {
  margin-top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.3s;
}

.cat-card:hover .arrow {
  background: var(--gradient-btn);
  color: #fff;
  transform: translateX(2px);
}

/* ========== GAME CARDS ========== */
.game-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.game-scroll::-webkit-scrollbar { display: none; }

.game-card {
  flex: 0 0 148px;
  scroll-snap-align: start;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, 0.15);
}

.game-card img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}

.game-card-body { padding: 12px; }

.game-card-body h3 {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-body .arrow {
  margin-top: 6px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ========== PARTNERS ========== */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.partner-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 22px;
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s;
  border: 1.5px solid transparent;
}

.partner-card:hover {
  transform: scale(1.04);
  border-color: rgba(124, 58, 237, 0.15);
  box-shadow: var(--shadow-lg);
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--bottom-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-left: 4px;
  padding-right: 4px;
}

.bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-light);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 14px;
  transition: all 0.25s;
  position: relative;
  min-width: 56px;
}

.bottom-item svg { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

.bottom-item.active { color: var(--primary); }

.bottom-item.active svg {
  stroke: var(--primary);
  transform: scale(1.1);
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, 0.35));
}

.bottom-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

/* ========== PROFILE / CARDS ========== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  animation: fadeUp 0.4s ease;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.25s;
}

.tab.active {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  animation: fadeUp 0.45s ease;
  border: 1px solid rgba(226, 232, 240, 0.5);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.info-row:last-child { border-bottom: none; }

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1.1rem;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.info-value {
  font-weight: 600;
  font-size: 0.95rem;
}

.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #059669;
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-glow 2s infinite;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.toggle {
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
  flex-shrink: 0;
}

.toggle.on { background: var(--primary); }

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.toggle.on::after { transform: translateX(22px); }

/* ========== FORMS ========== */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 8px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 1rem;
  outline: none;
  transition: all 0.25s;
  background: var(--card);
  color: var(--text);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.form-control::placeholder { color: var(--text-light); }

/* ========== AUTH PAGES (Dark Premium) ========== */
.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse at 30% 20%, #4c1d95 0%, #1e1b4b 40%, #0f0a1a 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
  top: -100px;
  right: -80px;
  animation: float 8s ease-in-out infinite;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
  bottom: -60px;
  left: -60px;
  animation: float 10s ease-in-out infinite reverse;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(15, 10, 30, 0.7);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border-radius: 28px;
  padding: 36px 28px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
  color: #fff;
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.auth-card .subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.auth-card .form-group label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.auth-card .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 14px;
  padding: 15px 16px 15px 48px;
}

.auth-card .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25);
  background: rgba(255, 255, 255, 0.09);
}

.auth-card .form-control::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.input-wrap { position: relative; }

.input-wrap .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.input-wrap .input-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
}

.auth-card .btn-primary {
  margin-top: 8px;
  padding: 16px;
  font-size: 1rem;
  border-radius: 14px;
  background: var(--gradient);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
}

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

.auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 0.875rem;
  text-align: center;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.auth-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.auth-links a { color: rgba(255, 255, 255, 0.5); }
.auth-links a:hover { color: var(--primary-light); }

.phone-row {
  display: flex;
  gap: 10px;
}

.phone-row select {
  width: 100px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 14px;
  padding: 15px 10px;
  outline: none;
}

.phone-row select option {
  background: #1e1b4b;
  color: #fff;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-tab.active {
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* ========== PRODUCT / ORDER ========== */
.product-list { display: grid; gap: 10px; }

.product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.25s;
  border: 2px solid transparent;
}

.product-item:hover, .product-item.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.product-name { font-weight: 600; }
.product-price { color: var(--primary); font-weight: 700; font-size: 1.05rem; }

.order-summary {
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
}

/* ========== ADMIN ========== */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}

.admin-sidebar {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 80px;
  border: 1px solid var(--border-soft);
}

.admin-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
}

.admin-nav a:hover, .admin-nav a.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.08));
  color: var(--primary);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  transition: all 0.25s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card .label { font-size: 0.8rem; color: var(--text-muted); }
.stat-card .value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }

.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.9rem;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 24px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: #d1fae5; color: #059669; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #dbeafe; color: #2563eb; }

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: 14px;
  color: #fff;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 320px;
  backdrop-filter: blur(12px);
}

.toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ========== RESPONSIVE ========== */
@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    padding: 40px 36px;
  }
  .hero h1 { font-size: 2.1rem; }
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
  .main { padding: 28px 24px; }
  .bottom-nav { display: none; }
  .app { padding-bottom: 0; }
}

@media (max-width: 767px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .hero h1 { font-size: 1.5rem; }
  .main { padding: 16px 14px; }
}

body.auth-mode .bottom-nav,
body.auth-mode .topbar { display: none !important; }
body.auth-mode .app { padding-bottom: 0; }
