/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6D28D9;
  --primary-light: #8B5CF6;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --text: #1E1B4B;
  --text-light: #6366F1;
  --bg: #FAF5FF;
  --white: #ffffff;
  --border: #E9D5FF;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(109, 40, 217, 0.06);
  --shadow: 0 8px 24px rgba(109, 40, 217, 0.1);
  --shadow-lg: 0 16px 48px rgba(109, 40, 217, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

/* === Layout === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  flex: 1;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #FB923C 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.45);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

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

.btn-outline:hover {
  background: rgba(109, 40, 217, 0.06);
  color: var(--primary);
  border-color: var(--primary-light);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* === Header / Nav === */
.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(109, 40, 217, 0.08);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-logo {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--accent);
  font-weight: 800;
}

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

/* === Hero === */
.hero {
  background: linear-gradient(135deg, #7C3AED 0%, #EC4899 40%, #F97316 80%, #FBBF24 100%);
  position: relative;
  overflow: hidden;
  color: var(--white);
  padding: 120px 0 140px;
  text-align: center;
  border-bottom: none;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -2px;
  color: var(--white);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 580px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero .btn-primary:hover {
  background: #F3E8FF;
  color: var(--primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hero .btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
  color: var(--white);
}

/* === Features === */
.features {
  padding: 90px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 50px;
  font-size: 1.1rem;
}

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

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  border-radius: 12px;
  letter-spacing: 1px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.feature-card p {
  color: #64748B;
  font-size: 0.95rem;
}

/* === Auth Forms === */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: var(--primary);
}

.auth-card .subtitle {
  color: #64748B;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}

.form-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: none;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.alert.visible {
  display: block;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #64748B;
}

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

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

/* === Dashboard === */
.dashboard {
  padding: 50px 0;
}

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

.dashboard-header h1 {
  font-size: 1.8rem;
  color: var(--primary);
}

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

.dash-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.dash-card:hover {
  box-shadow: var(--shadow);
}

.dash-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.dash-card p {
  color: #64748B;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

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

.badge-inactive {
  background: #fef3c7;
  color: #92400e;
}

.badge-active {
  background: #dcfce7;
  color: #166534;
}

/* === Success Page === */
.success-page {
  text-align: center;
  padding: 100px 20px;
}

.success-icon {
  font-size: 3rem;
  font-weight: 300;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
  margin-bottom: 24px;
}

.success-page h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.success-page p {
  color: #64748B;
  font-size: 1.1rem;
  margin-bottom: 32px;
}

/* === Legal Pages === */
.legal-page {
  padding: 60px 0;
}

.container-narrow {
  max-width: 780px;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.legal-updated {
  color: #64748B;
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--primary);
}

.legal-page h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-page p {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 14px;
}

.legal-page ul li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--text);
}

.legal-page a {
  color: var(--primary);
  font-weight: 600;
}

.legal-page a:hover {
  text-decoration: underline;
}

/* === How It Works === */
.how-it-works {
  padding: 90px 0;
  background: var(--white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  counter-reset: step;
}

.step-card {
  text-align: center;
  padding: 24px 20px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.step-card p {
  color: #64748B;
  font-size: 0.9rem;
}

/* === Footer === */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 40px 0;
  font-size: 0.85rem;
  margin-top: auto;
  border-top: none;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 12px;
  font-size: 0.85rem;
}

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

/* === Responsive === */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0 80px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .features {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .nav-links .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}