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

:root {
  --bg: #0a0e17;
  --surface: #111827;
  --card: #1a2035;
  --card-hover: #1f2740;
  --border: #252d47;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --baby: #64B5F6;
  --baby-light: #90CAF9;
  --baby-dark: #42A5F5;
  --baby-glow: rgba(100, 181, 246, 0.15);
  --green: #4ade80;
  --red: #f87171;
  --orange: #fb923c;
  --radius: 14px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--baby); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, .85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--baby), var(--baby-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }

.nav-links a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--baby); }

.nav-cta {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--baby-dark), var(--baby));
  color: #fff !important;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--baby-glow); }

/* ── Hero ── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--baby-glow) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(100, 181, 246, .08) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 720px; }

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--baby), var(--baby-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .25s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--baby-dark), var(--baby));
  color: #fff;
  box-shadow: 0 4px 24px var(--baby-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--baby-glow); }

.btn-outline {
  background: transparent;
  color: var(--baby);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--baby); background: var(--baby-glow); }

.btn-sm { padding: 10px 20px; font-size: .85rem; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(1.15); }

/* ── Sections ── */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all .3s;
}

.feature-card:hover {
  background: var(--card-hover);
  border-color: var(--baby);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--baby-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.feature-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: .9rem; }

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: all .3s;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--baby);
  box-shadow: 0 0 40px var(--baby-glow);
}

.pricing-card.featured::before {
  content: 'BEST SELLER';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--baby-dark), var(--baby));
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 20px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.pricing-card:hover { transform: translateY(-4px); }

.pricing-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.pricing-desc { color: var(--text-muted); font-size: .85rem; margin-bottom: 20px; }
.pricing-price { font-size: 2.6rem; font-weight: 800; margin-bottom: 24px; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }

.pricing-features { list-style: none; margin-bottom: 28px; text-align: left; }
.pricing-features li {
  padding: 8px 0;
  font-size: .9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-features li::before { content: '✓'; color: var(--baby); font-weight: 700; }

/* ── Forms ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
}

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

.auth-card h2 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card .subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: .9rem; }

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

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

.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  transition: border-color .2s;
  outline: none;
  font-family: inherit;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--baby);
  box-shadow: 0 0 0 3px var(--baby-glow);
}

.btn-block { width: 100%; justify-content: center; }

.form-footer { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--text-muted); }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: 18px;
  display: none;
}
.alert.error { display: block; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: var(--red); }
.alert.success { display: block; background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.3); color: var(--green); }

.tab-bar {
  display: flex;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  font-family: inherit;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--baby); border-bottom-color: var(--baby); }

/* ── Dashboard ── */
.dashboard {
  min-height: 100vh;
  padding: 100px 24px 40px;
}

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

.dash-header h1 { font-size: 1.8rem; }
.dash-header p { color: var(--text-muted); font-size: .9rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--baby);
}

.stat-card .stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.dash-card h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

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

td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(37, 45, 71, .5);
}

tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

.status-unused { background: rgba(100,181,246,.12); color: var(--baby); }
.status-active { background: rgba(74,222,128,.12); color: var(--green); }
.status-expired { background: rgba(251,146,60,.12); color: var(--orange); }
.status-banned { background: rgba(248,113,113,.12); color: var(--red); }

.placeholder-card {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
}

.placeholder-card h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn .6s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.fade-in:nth-child(2) { animation-delay: .1s; }
.fade-in:nth-child(3) { animation-delay: .2s; }
.fade-in:nth-child(4) { animation-delay: .3s; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: .8rem; }
  .dash-header { flex-direction: column; align-items: flex-start; }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: .9rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s;
  z-index: 200;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

/* ── Loading spinner ── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--baby);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.d-none { display: none !important; }
.mb-4 { margin-bottom: 24px; }
