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

:root {
  --bg: #0c0c0e;
  --bg2: #111114;
  --bg3: #17171b;
  --card: #1a1a1f;
  --card2: #1f1f25;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.1);
  --white: #f0f0f0;
  --muted: rgba(240,240,240,0.4);
  --muted2: rgba(240,240,240,0.2);
  --accent: #7c6dfa;
  --accent2: #a695ff;
  --accent-glow: rgba(124,109,250,0.15);
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --font: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  overflow: hidden;
}

/* PARTICLES */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* AUTH */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.auth-glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(120px);
  opacity: 0.08;
  pointer-events: none;
}
.auth-box {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
}
.auth-logo span { color: var(--accent); }
.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}
.auth-sub {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.8rem;
}
.auth-tabs {
  display: flex;
  background: var(--bg2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--card2);
  color: var(--white);
}
.auth-form { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-input {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.auth-input::placeholder { color: var(--muted); }
.auth-input:focus { border-color: var(--accent); }
.btn-auth {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.85rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.25rem;
}
.btn-auth:hover { background: var(--accent2); transform: translateY(-1px); }
.hidden { display: none !important; }

/* VERIFY */
.verify-msg {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.verify-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.code-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.code-input {
  width: 48px; height: 52px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--white);
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.code-input:focus { border-color: var(--accent); }
.resend {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.resend a { color: var(--accent); text-decoration: none; }

/* DASHBOARD */
.dashboard {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 5;
}

/* SIDEBAR */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 0.25rem;
}
.sidebar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
  padding-left: 0.5rem;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}
.nav-item:hover { background: var(--card); color: var(--white); }
.nav-item.active { background: var(--accent-glow); color: var(--accent2); border: 1px solid rgba(124,109,250,0.2); }
.nav-icon { font-size: 1rem; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 1rem;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(124,109,250,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent2);
  flex-shrink: 0;
}
.user-name { font-size: 0.8rem; font-weight: 600; }
.user-role { font-size: 0.7rem; color: var(--muted); font-family: var(--mono); }

/* MAIN */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: var(--bg);
}
.tab { display: none; animation: fadeUp 0.3s ease; }
.tab.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.page-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.header-badge {
  font-size: 0.75rem;
  font-family: var(--mono);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52,211,153,0.1);
  color: var(--green);
  border: 1px solid rgba(52,211,153,0.2);
}
.search-bar input {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  width: 220px;
}
.search-bar input::placeholder { color: var(--muted); }

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border2); }
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}
.stat-change { font-size: 0.75rem; color: var(--muted); }

.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  font-family: var(--mono);
}

/* QUICK ACTIONS */
.quick-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}
.action-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 600;
}
.action-card:hover { background: var(--card2); border-color: var(--border2); transform: translateY(-1px); }
.action-icon { font-size: 1.2rem; }

.empty-state {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

/* PRODUCTS */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.2s;
}
.product-card:hover { border-color: rgba(124,109,250,0.3); transform: translateY(-2px); }
.product-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52,211,153,0.12);
  color: var(--green);
  border: 1px solid rgba(52,211,153,0.25);
  text-transform: uppercase;
}
.product-badge.pro {
  background: rgba(124,109,250,0.12);
  color: var(--accent2);
  border-color: rgba(124,109,250,0.25);
}
.product-badge.elite {
  background: rgba(251,191,36,0.12);
  color: var(--amber);
  border-color: rgba(251,191,36,0.25);
}
.product-icon { font-size: 2rem; margin-bottom: 1rem; }
.product-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.product-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.25rem; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 1.2rem; font-weight: 700; }
.product-price span { font-size: 0.75rem; color: var(--muted); font-weight: 400; }
.btn-buy {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-buy:hover { background: var(--accent2); }

/* TOP UP */
.topup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.topup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.topup-card:hover, .topup-card.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.topup-badge {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.topup-amount { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 0.25rem; }
.topup-label { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); }
.topup-form { max-width: 400px; display: flex; flex-direction: column; gap: 0.75rem; }
.card-row { display: flex; gap: 0.75rem; }

/* TABLE */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.tx-table { width: 100%; border-collapse: collapse; }
.tx-table th {
  font-size: 0.72rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.tx-table td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.tx-empty td { text-align: center; padding: 3rem; }

/* SCROLLBAR */
.main::-webkit-scrollbar { width: 4px; }
.main::-webkit-scrollbar-track { background: transparent; }
.main::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
