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

:root {
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --secondary: #4ecdc4;
  --accent: #ff6b6b;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --dark-3: #0f3460;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #6b7280;
  --gray-800: #374151;
  --white: #ffffff;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --transition: 0.2s ease;
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { color: var(--gray-600); }

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

/* ── Utilities ──────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 16px; }
.gap-8 { gap: 32px; }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108, 99, 255, 0.45); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-danger {
  background: var(--error);
  color: var(--white);
}
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius); }
.btn-full { width: 100%; }

.btn-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-800);
}

.form-input, .form-select, .form-textarea {
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.form-input.error, .form-select.error, .form-textarea.error {
  border-color: var(--error);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-error {
  font-size: 0.82rem;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-hint { font-size: 0.82rem; color: var(--gray-400); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.card-lg { padding: 40px; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: slideDown 0.2s ease;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.navbar-links a {
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.navbar-links a:hover { color: var(--primary); background: var(--gray-100); }
.navbar-links a.active { color: var(--primary); }

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gray-600);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  background: linear-gradient(180deg, #f0f0ff 0%, var(--gray-50) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(108,99,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108,99,255,0.1);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(108,99,255,0.2);
}

.hero h1 { margin-bottom: 24px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 40px; }

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

.hero-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--gray-400);
  flex-wrap: wrap;
}

.hero-social-proof span { display: flex; align-items: center; gap: 4px; }

/* ── Features ───────────────────────────────────────────────────────────── */
.section { padding: 80px 24px; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header .badge {
  display: inline-block;
  background: rgba(108,99,255,0.1);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.section-header p { font-size: 1.1rem; max-width: 600px; margin: 12px auto 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(78,205,196,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.feature-card h3 { margin-bottom: 8px; }

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

.pricing-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition);
}

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

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(108,99,255,0.03), rgba(78,205,196,0.03));
}

.pricing-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price { margin: 16px 0; }
.pricing-price .amount { font-size: 3rem; font-weight: 800; color: var(--dark); }
.pricing-price .period { font-size: 1rem; color: var(--gray-400); }
.pricing-desc { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 20px; }

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
  flex: 1;
}
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-panel-left {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
  color: var(--white);
  flex-direction: column;
  text-align: center;
  gap: 32px;
}

.auth-panel-left h2 { color: var(--white); font-size: 2rem; }
.auth-panel-left p { color: rgba(255,255,255,0.75); font-size: 1.05rem; }

.auth-features { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.07);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
}
.auth-feature-icon { font-size: 20px; flex-shrink: 0; }

.auth-form-container {
  width: 100%;
  max-width: 440px;
}

.auth-form-header { margin-bottom: 32px; }
.auth-form-header a {
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-bottom: 24px;
}
.auth-form-header h1 { font-size: 1.75rem; color: var(--dark); margin-bottom: 8px; }
.auth-form-header p { font-size: 0.95rem; }

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.password-toggle-wrap { position: relative; }
.password-toggle-wrap .form-input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  font-size: 18px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.password-toggle:hover { color: var(--gray-600); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gray-400);
  font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-footer-link {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.auth-footer-link a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer-link a:hover { text-decoration: underline; }

/* ── Dashboard ──────────────────────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--gray-50);
}

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-logo {
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  padding: 0 12px;
  margin: 16px 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--gray-100); color: var(--gray-800); }
.nav-item.active { background: rgba(108,99,255,0.1); color: var(--primary); }
.nav-item-icon { font-size: 18px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--gray-200);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-info { min-width: 0; }
.user-name { font-weight: 600; font-size: 0.88rem; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 0.75rem; color: var(--gray-400); text-transform: capitalize; }

.plan-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.plan-badge.free { background: var(--gray-100); color: var(--gray-600); }
.plan-badge.pro { background: rgba(108,99,255,0.12); color: var(--primary); }
.plan-badge.enterprise { background: rgba(255,107,107,0.12); color: var(--accent); }

/* ── Dashboard Main ─────────────────────────────────────────────────────── */
.main-content { overflow-y: auto; }

.dashboard-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.dashboard-section { padding: 32px; }

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

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-label { font-size: 0.82rem; color: var(--gray-400); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--dark); }
.stat-sub { font-size: 0.8rem; color: var(--gray-400); margin-top: 4px; }

/* Generator */
.generator-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.generator-toolbar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--gray-50);
}

.generator-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 24px; }

.generator-input { padding: 0 24px 24px; }

.generator-output {
  border-top: 1px solid var(--gray-200);
  padding: 24px;
  background: var(--white);
}

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

.output-content {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 20px;
  min-height: 200px;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 0.95rem;
  color: var(--gray-800);
  position: relative;
}

.output-placeholder {
  color: var(--gray-400);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 8px;
  font-size: 0.9rem;
}

.output-placeholder .icon { font-size: 2.5rem; }

.copy-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Usage bar */
.usage-bar-wrap { margin-bottom: 8px; }
.usage-bar-track {
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.usage-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.usage-bar-fill.danger { background: linear-gradient(135deg, var(--error), var(--warning)); }
.usage-bar-label { font-size: 0.78rem; color: var(--gray-400); }

/* History table */
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-400);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
  vertical-align: middle;
}
.history-table tr:hover td { background: var(--gray-50); }
.history-table .prompt-cell { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.type-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(108,99,255,0.1);
  color: var(--primary);
  white-space: nowrap;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { color: var(--dark); }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-400);
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--gray-800); }

.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 12px; justify-content: flex-end; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark);
  color: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--warning); color: var(--dark); }

/* Loader */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(108,99,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  padding: 60px 24px 32px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p { margin-top: 12px; font-size: 0.9rem; max-width: 280px; }

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100%;
    z-index: 50;
    transition: left 0.3s ease;
    width: 260px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 49;
    display: none;
  }
  .sidebar-overlay.visible { display: block; }
  .dashboard-header { padding: 16px 20px; }
  .dashboard-section { padding: 20px; }
  .navbar-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: white; padding: 16px; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow); }
  .navbar-links.open { display: flex; }
  .navbar-toggle { display: flex; }
  .hero { padding: 60px 20px 50px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .generator-controls { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: 100%; }
}
