/* ================================
   FastReply - Modern Design System
   ================================ */

/* CSS Variables */
:root {
  /* Primary Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;

  /* Accent Colors */
  --accent: #8b5cf6;
  --accent-dark: #7c3aed;
  --accent-light: #a78bfa;
  --secondary-accent: #ec4899;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Dark Theme Backgrounds */
  --bg-dark: #0a0e1a;
  --bg-dark-secondary: #111827;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-card-border: rgba(255, 255, 255, 0.06);

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
  --gradient-dark: linear-gradient(135deg, #0a0e1a 0%, #1e1b4b 100%);
  --gradient-glow: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

  /* Mesh Gradient */
  --gradient-mesh:
      radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
      radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
      radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
      radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.08) 0px, transparent 50%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 5rem;
  --spacing-section: 7rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.5);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   Semantic Theme Tokens
   ================================ */
:root {
  --theme-bg: #f9fafb;
  --theme-bg-secondary: #fff;
  --theme-surface: #fff;
  --theme-surface-hover: #f9fafb;
  --theme-border: #e5e7eb;
  --theme-border-subtle: #f3f4f6;
  --theme-text-primary: #111827;
  --theme-text-secondary: #4b5563;
  --theme-text-tertiary: #6b7280;
  --theme-text-muted: #9ca3af;
  --theme-input-bg: #fff;
  --theme-input-border: #d1d5db;
  --theme-input-border-hover: #9ca3af;
  --theme-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --theme-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --theme-alert-success-bg: #d1fae5;
  --theme-alert-success-border: #a7f3d0;
  --theme-alert-success-text: #065f46;
  --theme-alert-error-bg: #fee2e2;
  --theme-alert-error-border: #fecaca;
  --theme-alert-error-text: #991b1b;
  --theme-alert-warning-bg: #fef3c7;
  --theme-alert-warning-border: #fde68a;
  --theme-alert-warning-text: #92400e;
  --theme-alert-info-bg: #dbeafe;
  --theme-alert-info-border: #bfdbfe;
  --theme-alert-info-text: #1e40af;
}

[data-theme="dark"] {
  --theme-bg: #0f1219;
  --theme-bg-secondary: #161b26;
  --theme-surface: #1a2030;
  --theme-surface-hover: #212838;
  --theme-border: rgba(255, 255, 255, 0.08);
  --theme-border-subtle: rgba(255, 255, 255, 0.05);
  --theme-text-primary: #e2e8f0;
  --theme-text-secondary: #94a3b8;
  --theme-text-tertiary: #64748b;
  --theme-text-muted: #475569;
  --theme-input-bg: #1a2030;
  --theme-input-border: rgba(255, 255, 255, 0.1);
  --theme-input-border-hover: rgba(255, 255, 255, 0.18);
  --theme-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --theme-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --theme-alert-success-bg: rgba(16, 185, 129, 0.12);
  --theme-alert-success-border: rgba(16, 185, 129, 0.2);
  --theme-alert-success-text: #6ee7b7;
  --theme-alert-error-bg: rgba(239, 68, 68, 0.12);
  --theme-alert-error-border: rgba(239, 68, 68, 0.2);
  --theme-alert-error-text: #fca5a5;
  --theme-alert-warning-bg: rgba(245, 158, 11, 0.12);
  --theme-alert-warning-border: rgba(245, 158, 11, 0.2);
  --theme-alert-warning-text: #fcd34d;
  --theme-alert-info-bg: rgba(59, 130, 246, 0.12);
  --theme-alert-info-border: rgba(59, 130, 246, 0.2);
  --theme-alert-info-text: #93c5fd;

  /* Override primary/accent for dark bg legibility */
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --primary-light: #a5b4fc;
  --accent: #a78bfa;
  --accent-dark: #8b5cf6;
  --accent-light: #c4b5fd;
}

/* Smooth theme transitions (added via JS only during toggle, not page load) */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================================
   Typography
   ================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  color: var(--gray-900);
  letter-spacing: -0.025em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

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

p.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--gray-500);
}

/* ================================
   Animations
   ================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.features-grid .fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.features-grid .fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.steps-grid .fade-in-up:nth-child(2) { transition-delay: 0.15s; }
.steps-grid .fade-in-up:nth-child(3) { transition-delay: 0.3s; }
.testimonials-grid .fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.testimonials-grid .fade-in-up:nth-child(3) { transition-delay: 0.2s; }

/* ================================
   Buttons
   ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.btn-primary {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
  filter: brightness(1.1);
  color: #fff;
}

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

.btn-secondary {
  color: var(--gray-700);
  background: #fff;
  border: 1px solid var(--gray-200);
}

.landing-page .btn-secondary {
    color: var(--gray-300);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-2px);
}

.landing-page .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

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

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

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

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--gray-900);
}

.landing-page .btn-ghost {
    color: var(--gray-400);
}

.landing-page .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

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

/* ================================
   Form Elements
   ================================ */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--gray-900);
  background-color: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
  border-color: var(--gray-400);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
  color: var(--gray-400);
}

.form-group input.error {
  border-color: var(--error);
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--gray-600);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Password Rules */
.password-rules {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.password-rules li {
    padding: 0.125rem 0 0.125rem 1.25rem;
    position: relative;
}

.password-rules li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-300);
    transition: background var(--transition-fast);
}

.password-rules li.valid {
    color: var(--success);
}

.password-rules li.valid::before {
    background: var(--success);
}

.password-rules li.invalid {
    color: var(--error);
}

.password-rules li.invalid::before {
    background: var(--error);
}

/* Checkbox Group */
.checkbox-group {
    margin-bottom: var(--spacing-md);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--gray-600);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-top: 1px;
    position: relative;
}

.checkbox-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 2px;
    transform: scale(0);
    transition: transform var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    transform: scale(1);
}

.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.checkbox-group.error .checkbox-custom {
    border-color: var(--error);
}

.checkbox-text a {
    color: var(--primary);
    font-weight: 500;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Help Text */
.help-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

/* ================================
   Alerts & Messages
   ================================ */
.messages {
  position: fixed;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-width: 400px;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

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

.alert-success {
  color: var(--theme-alert-success-text);
  background-color: var(--theme-alert-success-bg);
  border: 1px solid var(--theme-alert-success-border);
}

.alert-error {
  color: var(--theme-alert-error-text);
  background-color: var(--theme-alert-error-bg);
  border: 1px solid var(--theme-alert-error-border);
}

.alert-warning {
  color: var(--theme-alert-warning-text);
  background-color: var(--theme-alert-warning-bg);
  border: 1px solid var(--theme-alert-warning-border);
}

.alert-info {
  color: var(--theme-alert-info-text);
  background-color: var(--theme-alert-info-bg);
  border: 1px solid var(--theme-alert-info-border);
}

/* ================================
   Auth Pages
   ================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: #0c1222;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 40%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 70%, rgba(167, 139, 250, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Grain Effect */
.bg-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Auth Split Layout */
.auth-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.auth-brand {
  flex: 1;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 4rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .auth-brand {
    display: flex;
  }
}

/* Decorative grid pattern on brand side */
.auth-brand-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}

.auth-brand-content {
  max-width: 520px;
  text-align: left;
  position: relative;
}

.auth-brand-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a5b4fc;
  letter-spacing: 0.01em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease both;
}

.auth-brand h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.15;
  color: #f1f5f9;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
  animation: fadeInUp 0.6s ease 0.05s both;
}

.auth-brand h2 em {
  font-style: italic;
  color: #a5b4fc;
}

.auth-brand p {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  max-width: 420px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.auth-brand .feature-list {
  margin-top: 2.5rem;
  text-align: left;
}

.auth-brand .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  animation: fadeInUp 0.6s ease both;
}

.auth-brand .feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  flex-shrink: 0;
  color: #a5b4fc;
  transition: all 0.3s ease;
}

.auth-brand .feature-item:hover .feature-icon {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.auth-brand .feature-icon svg {
  width: 20px;
  height: 20px;
}

.auth-brand .feature-text h4 {
  color: #e2e8f0;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.auth-brand .feature-text p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  line-height: 1.5;
  animation: none;
}

/* Social Proof */
.auth-brand-social-proof {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.social-proof-avatars {
  display: flex;
}

.sp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-left: -8px;
  border: 2px solid #0c1222;
  position: relative;
}

.sp-avatar:first-child {
  margin-left: 0;
}

.auth-brand-social-proof p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  animation: none;
}

.auth-brand-social-proof strong {
  color: rgba(255, 255, 255, 0.75);
}

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

/* Auth Form Side */
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

@media (min-width: 1024px) {
  .auth-form-side {
    background: #faf9f7;
    max-width: 560px;
  }
}

@media (max-width: 1023px) {
  .auth-page {
    background: #faf9f7;
  }
  .auth-page::before {
    display: none;
  }
  .auth-form-side {
    background: #faf9f7;
    min-height: 100vh;
    width: 100%;
  }
  .bg-grain {
    display: none;
  }
}

.auth-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  background: #fff;
  padding: 2.5rem 2.25rem;
  border-radius: 20px;
  border: 1px solid #e8e5e0;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 16px rgba(0,0,0,0.04);
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  animation: cardAppear 0.5s ease both;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}

.auth-card .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.auth-card .logo-icon svg {
  width: 20px;
  height: 20px;
}

.auth-card .logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.auth-card h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.625rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 0.375rem;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.auth-card .subtitle {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 1.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-links {
  margin-top: var(--spacing-xl);
  text-align: center;
}

.auth-links a {
  display: inline-block;
  color: var(--gray-500);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.auth-links a:hover {
  color: var(--primary);
}

.auth-card .form-row {
  margin-bottom: 0;
}

/* Auth Form Overrides */
.auth-card .form-group {
  margin-bottom: 1.125rem;
}

.auth-card .form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.375rem;
}

.auth-card .form-group input[type="text"],
.auth-card .form-group input[type="email"],
.auth-card .form-group input[type="password"] {
  padding: 0.75rem 0.875rem;
  font-size: 0.9375rem;
  border: 1px solid #e2e0db;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-group input::placeholder {
  color: #c4c1bb;
}

.auth-card .form-group input:hover {
  border-color: #cbd5e1;
}

.auth-card .form-group input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.auth-card .form-group.focused label {
  color: #6366f1;
}

/* Auth-specific buttons */
.auth-card .btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 0.25rem;
  position: relative;
  overflow: hidden;
}

.auth-card .btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.auth-card .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.auth-card .btn-primary .btn-arrow {
  transition: transform 0.25s ease;
  opacity: 0.8;
}

.auth-card .btn-primary:hover .btn-arrow {
  transform: translateX(3px);
  opacity: 1;
}

.auth-card .btn-secondary {
  color: var(--gray-700);
  background: #fff;
  border: 1px solid var(--gray-200);
  text-decoration: none;
}

.auth-card .btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

/* Password Rules - Redesigned */
.auth-card .password-rules {
  list-style: none;
  padding: 0;
  margin: 0.625rem 0 0;
  display: flex;
  gap: 0.125rem;
  flex-wrap: wrap;
}

.auth-card .password-rules li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 0.25rem 0.625rem 0.25rem 0.375rem;
  border-radius: 100px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  transition: all 0.25s ease;
}

.auth-card .password-rules li::before {
  display: none;
}

.auth-card .password-rules .rule-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.auth-card .password-rules li.valid {
  color: #059669;
  background: #ecfdf5;
  border-color: #d1fae5;
}

.auth-card .password-rules li.valid .rule-indicator {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.auth-card .password-rules li.invalid {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.auth-card .password-rules li.invalid .rule-indicator {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

/* Checkbox styling refinements */
.auth-card .checkbox-group {
  margin-bottom: 0.75rem;
}

.auth-card .checkbox-label .checkbox-text {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
}

.auth-card .checkbox-label .checkbox-text a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
}

.auth-card .checkbox-label .checkbox-text a:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1eeea;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.auth-footer a {
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #4f46e5;
}

/* ================================
   Landing Page
   ================================ */
.landing-page {
  background-color: var(--bg-dark);
  color: #fff;
  overflow-x: hidden;
  position: relative;
}

/* Landing Layout */
.landing-layout {
  display: flex;
  min-height: 100vh;
}

.landing-main {
  flex: 1;
  margin-left: 260px;
  position: relative;
  overflow-x: hidden;
}

/* Landing Sidebar */
.landing-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-xl) var(--spacing-lg);
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-sidebar-header {
  margin-bottom: var(--spacing-2xl);
}

.landing-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  flex: 1;
}

.landing-sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  color: var(--gray-400);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.landing-sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.landing-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

/* Legacy top nav (kept for non-landing pages) */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.landing-page .nav-logo {
    color: #fff;
}

.dashboard-page .nav-logo {
    color: var(--gray-900);
}

.nav-links-center {
  display: flex;
  gap: var(--spacing-2xl);
}

.nav-links-center a {
  color: var(--gray-400);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links-center a:hover {
  color: #fff;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

/* Hero Section */
.hero {
  padding-top: var(--spacing-3xl);
  padding-bottom: var(--spacing-3xl);
  position: relative;
  z-index: 1;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--spacing-xl);
  transition: all var(--transition-fast);
  cursor: default;
}

.hero-badge:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-badge svg {
  opacity: 0.5;
}

.hero h1 {
  font-size: 4.25rem;
  line-height: 1.05;
  margin-bottom: var(--spacing-lg);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--spacing-xl);
  max-width: 90%;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
}

/* Social Proof - Hero */
.hero-proof {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.avatar-stack {
  display: flex;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--bg-dark);
  margin-right: -8px;
  position: relative;
}

.avatar-circle:last-child {
  margin-right: 0;
}

.avatar-more {
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  border-color: var(--bg-dark);
}

.proof-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

.proof-highlight {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

/* Mockup Component */
.hero-visual {
  position: relative;
}

.mockup-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.mockup-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  transition: all 0.4s ease;
  position: relative;
}

.mockup-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 25px 60px -12px rgba(0, 0, 0, 0.6);
  transform: translateY(-4px);
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
  color: white;
}

.mockup-user h4 {
  font-size: 0.9375rem;
  color: #fff;
  margin-bottom: 2px;
}

.mockup-user span {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.mockup-content p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.mockup-reply-box {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  position: relative;
  margin-bottom: var(--spacing-md);
}

.reply-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.6875rem;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.reply-text {
  color: rgba(255, 255, 255, 0.85) !important;
  margin-bottom: 0 !important;
  font-size: 0.9375rem !important;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background-color: var(--primary-light);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.mockup-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.mockup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: default;
  border: none;
  transition: all var(--transition-fast);
}

.mockup-btn-primary {
  background: var(--gradient-primary);
  color: #fff;
}

.mockup-btn-ghost {
  background: transparent;
  color: var(--gray-400);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Trust Bar */
.trust-bar {
  position: relative;
  z-index: 1;
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.trust-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-3xl);
}

.trust-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  white-space: nowrap;
}

.trust-logos {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xl);
}

.trust-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.trust-logo:hover {
  color: rgba(255, 255, 255, 0.5);
}

.trust-logo svg {
  width: 22px;
  height: 22px;
}

/* Section Tags */
.section-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-md);
}

/* Features Grid */
.features {
  padding: var(--spacing-section) 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--spacing-3xl);
  padding: 0 var(--spacing-xl);
}

.section-header h2 {
  font-size: 2.75rem;
  margin-bottom: var(--spacing-md);
  color: #fff;
  letter-spacing: -0.03em;
}

.section-header p {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-highlight {
  border-color: rgba(99, 102, 241, 0.15);
  background: rgba(99, 102, 241, 0.04);
}

.feature-card-highlight:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-icon-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.feature-icon-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.feature-icon-pink {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.feature-card h3 {
  font-size: 1.1875rem;
  color: #fff;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.feature-card p {
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.65;
  font-size: 0.9375rem;
  margin-bottom: var(--spacing-lg);
}

.feature-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

/* How It Works Steps */
.steps-section {
  padding: var(--spacing-section) 0;
  position: relative;
}

.steps-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.01) 100%);
  pointer-events: none;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  position: relative;
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-icon-wrap {
  position: relative;
  display: inline-flex;
  margin-bottom: var(--spacing-xl);
}

.step-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  transition: all var(--transition-normal);
}

.step-card:hover .step-icon {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.step-icon svg {
  width: 28px;
  height: 28px;
}

.step-number-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.step-connector {
  display: none;
}

.step-content h3 {
  font-size: 1.1875rem;
  color: #fff;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.step-content p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 260px;
  margin: 0 auto;
}

/* Testimonials */
.testimonials-section {
  padding: var(--spacing-section) 0;
  position: relative;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl);
  transition: all var(--transition-normal);
}

.testimonial-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--spacing-md);
}

.testimonial-stars svg {
  width: 16px;
  height: 16px;
  color: #fbbf24;
}

.testimonial-card blockquote {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--spacing-xl);
  font-style: normal;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.testimonial-author strong {
  display: block;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

.testimonial-author span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

/* CTA Section */
.cta-section {
  padding: var(--spacing-section) 0;
}

.cta-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-3xl) var(--spacing-xl);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-box h2 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.03em;
}

.cta-box p {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--spacing-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

.cta-buttons {
  margin-bottom: var(--spacing-md);
}

.cta-subtext {
  font-size: 0.8125rem !important;
  color: rgba(255, 255, 255, 0.3) !important;
  margin-bottom: 0 !important;
}

/* Footer */
.site-footer {
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-brand p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.3);
  margin-left: var(--spacing-xl);
  font-size: 0.8125rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ================================
   Legal Pages
   ================================ */
.legal-page {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.85);
  min-height: 100vh;
}

.legal-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.legal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-xl);
}

.legal-content {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-3xl);
}

.legal-header {
  margin-bottom: var(--spacing-3xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: var(--spacing-sm);
}

.legal-effective {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.legal-body section {
  margin-bottom: var(--spacing-2xl);
}

.legal-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--spacing-md);
  padding-top: var(--spacing-sm);
}

.legal-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.legal-body p {
  line-height: 1.75;
  margin-bottom: var(--spacing-md);
  color: rgba(255, 255, 255, 0.7);
}

.legal-body ul {
  margin: var(--spacing-sm) 0 var(--spacing-md) var(--spacing-xl);
  list-style: disc;
}

.legal-body li {
  line-height: 1.75;
  margin-bottom: var(--spacing-xs);
  color: rgba(255, 255, 255, 0.7);
}

.legal-body li strong {
  color: rgba(255, 255, 255, 0.9);
}

.legal-body a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body a:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .legal-header h1 {
    font-size: 1.75rem;
  }

  .legal-content {
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-2xl);
  }

  .legal-nav {
    padding: var(--spacing-md) var(--spacing-md);
  }
}

/* ================================
   Dashboard & App Layout
   ================================ */
.dashboard-page {
    background-color: var(--theme-bg);
    min-height: 100vh;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--theme-surface);
    border-right: 1px solid var(--theme-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}

.sidebar-header {
    padding: var(--spacing-xl) var(--spacing-lg);
    border-bottom: 1px solid var(--theme-border-subtle);
}

.sidebar-header .nav-logo {
    color: var(--theme-text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--theme-text-muted);
    padding: 0.75rem var(--spacing-md) 0.25rem;
    margin-top: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.625rem var(--spacing-md);
    color: var(--theme-text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.sidebar-link:hover {
    color: var(--theme-text-primary);
    background: var(--theme-surface-hover);
}

.sidebar-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--theme-border-subtle);
}

.sidebar-footer .sidebar-link {
    color: var(--theme-text-tertiary);
}

.sidebar-footer .sidebar-link.theme-toggle:hover {
    color: var(--theme-text-primary);
    background: var(--theme-surface-hover);
}

.sidebar-footer a.sidebar-link:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.06);
}

/* Main content area */
.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: var(--spacing-xl) var(--spacing-2xl);
    max-width: 1200px;
}

/* Legacy support */
.dashboard-nav {
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: var(--spacing-md) var(--spacing-xl);
}

.dashboard-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-nav .nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.dashboard-nav .nav-links a {
    color: var(--theme-text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dashboard-nav .nav-links a:hover,
.dashboard-nav .nav-links a.active {
    color: var(--primary);
    background: var(--theme-surface-hover);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Cards */
.card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--theme-shadow-sm);
    margin-bottom: var(--spacing-lg);
}

/* Dashboard-scoped form inputs (outside .form-group) */
.dashboard-main input[type="text"],
.dashboard-main input[type="email"],
.dashboard-main input[type="number"],
.dashboard-main textarea,
.dashboard-main select {
    padding: 0.875rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--theme-text-primary);
    background-color: var(--theme-input-bg);
    border: 1px solid var(--theme-input-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.dashboard-main input[type="text"]:hover,
.dashboard-main input[type="email"]:hover,
.dashboard-main input[type="number"]:hover,
.dashboard-main textarea:hover,
.dashboard-main select:hover {
    border-color: var(--theme-input-border-hover);
}

.dashboard-main input[type="text"]:focus,
.dashboard-main input[type="email"]:focus,
.dashboard-main input[type="number"]:focus,
.dashboard-main textarea:focus,
.dashboard-main select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dashboard-main input::placeholder,
.dashboard-main textarea::placeholder {
    color: var(--theme-text-muted);
}

.dashboard-main textarea {
    resize: vertical;
    line-height: 1.5;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.card-header h2, .card-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

/* Stat Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--theme-shadow-sm);
    transition: all var(--transition-fast);
}

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

.stat-card .label {
    font-size: 0.875rem;
    color: var(--theme-text-tertiary);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .label.info { color: var(--info); }
.stat-card .label.success { color: var(--success); }
.stat-card .label.danger { color: var(--error); }
.stat-card .label.primary { color: var(--primary); }

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    word-break: break-all;
}

/* API Key Box */
.api-key-box {
    background: var(--theme-bg);
    border: 1px dashed var(--theme-input-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    color: var(--theme-text-secondary);
    position: relative;
}

.api-key-box code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    background: var(--theme-surface);
    border: 1px solid var(--theme-input-border);
    border-radius: var(--radius-md);
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    color: var(--theme-text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Page Header */
.page-header {
    margin-bottom: var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--theme-text-primary);
}

.page-header p {
    color: var(--theme-text-tertiary);
    font-size: 1.125rem;
    margin-top: 0.5rem;
}

.page-header-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

/* Profile Page */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
}

.profile-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.profile-meta {
    display: flex;
    gap: var(--spacing-lg);
    color: var(--theme-text-tertiary);
    font-size: 0.9375rem;
    margin-top: var(--spacing-sm);
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.profile-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Form Grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--theme-border-subtle);
}

/* Utility */
.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: flex;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-2xl);
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-proof {
    justify-content: center;
  }

  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    gap: var(--spacing-2xl);
  }

  .trust-container {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }

  .hero {
    padding-bottom: var(--spacing-2xl);
  }

  .form-row {
      grid-template-columns: 1fr;
  }

  .dashboard-nav .nav-links {
      display: none;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-lg);
  }

  .footer-links a {
    margin-left: var(--spacing-md);
    margin-right: var(--spacing-md);
  }

  .footer-links a:first-child {
    margin-left: 0;
  }
}

/* ================================
   Pricing Cards
   ================================ */

.pricing-section {
  padding: var(--spacing-section) var(--spacing-xl);
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl) var(--spacing-xl);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.pricing-card-popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-card) 40%);
}

.pricing-card-popular:hover {
  border-color: var(--primary-light);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pricing-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--bg-card-border);
}

.pricing-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-200);
  margin: 0 0 var(--spacing-md);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.pricing-currency {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gray-400);
  align-self: flex-start;
  margin-top: 0.5rem;
}

.pricing-amount {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.pricing-period {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-left: 2px;
}

.pricing-credits {
  margin: var(--spacing-sm) 0 0;
  font-size: 0.85rem;
  color: var(--gray-400);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.9rem;
  color: var(--gray-300);
}

.pricing-features li svg {
  flex-shrink: 0;
  color: var(--success);
}

.pricing-cta {
  margin-top: auto;
}

.pricing-card-current {
  border-color: var(--success);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.06) 0%, var(--bg-card) 40%);
}

.pricing-card-current:hover {
  border-color: var(--success);
}

.pricing-badge-current {
  background: var(--success);
}

.btn-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--success);
  color: var(--success);
  cursor: default;
  opacity: 0.85;
}

.pricing-trial-note {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-top: var(--spacing-xl);
}

.pricing-trial-note a {
  color: var(--primary-light);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* ================================
   Dashboard Pricing Overrides
   ================================ */

.dashboard-page .pricing-grid {
  gap: var(--spacing-lg);
}

.dashboard-page .pricing-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow-sm);
}

.dashboard-page .pricing-card:hover {
  border-color: var(--theme-input-border);
  box-shadow: var(--theme-shadow-md);
}

.dashboard-page .pricing-card-popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 0%, var(--theme-surface) 40%);
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.1);
}

.dashboard-page .pricing-card-popular:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.dashboard-page .pricing-card-current {
  border-color: var(--success);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, var(--theme-surface) 40%);
}

.dashboard-page .pricing-card-current:hover {
  border-color: var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.dashboard-page .pricing-header {
  border-bottom: 1px solid var(--theme-border-subtle);
}

.dashboard-page .pricing-name {
  color: var(--theme-text-primary);
}

.dashboard-page .pricing-amount {
  color: var(--theme-text-primary);
}

.dashboard-page .pricing-currency {
  color: var(--theme-text-tertiary);
}

.dashboard-page .pricing-period {
  color: var(--theme-text-tertiary);
}

.dashboard-page .pricing-credits {
  color: var(--theme-text-tertiary);
}

.dashboard-page .pricing-features li {
  color: var(--theme-text-secondary);
}

.dashboard-page .pricing-features li svg {
  color: var(--success);
}

/* ================================
   Subscriptions Page
   ================================ */

.subscriptions-page {
  max-width: 960px;
}

/* Status Card */
.sub-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sub-status-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xl);
}

.sub-status-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-text-muted);
}

.sub-status-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--theme-text-primary);
  margin: 0.125rem 0 0;
}

.sub-status-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.sub-status-detail {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--theme-text-secondary);
}

.sub-status-detail svg {
  color: var(--primary);
  flex-shrink: 0;
}

.sub-status-actions {
  flex-shrink: 0;
}

/* Usage Bar */
.sub-usage-bar-wrap {
  margin-bottom: var(--spacing-2xl);
}

.sub-usage-bar {
  height: 6px;
  background: var(--theme-border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--spacing-xs);
}

.sub-usage-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
  min-width: 2px;
}

.sub-usage-text {
  font-size: 0.8rem;
  color: var(--theme-text-tertiary);
}

/* Section Header */
.sub-section-header {
  margin-bottom: var(--spacing-xl);
}

.sub-section-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--theme-text-primary);
  margin: 0 0 0.375rem;
}

.sub-section-header p {
  font-size: 1rem;
  color: var(--theme-text-tertiary);
  margin: 0;
}

/* Trust Signals */
.sub-trust-row {
  display: flex;
  justify-content: center;
  gap: var(--spacing-2xl);
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg) 0;
}

.sub-trust-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.85rem;
  color: var(--theme-text-tertiary);
}

.sub-trust-item svg {
  color: var(--theme-text-muted);
  flex-shrink: 0;
}

/* Footnote */
.sub-footnote {
  text-align: center;
  color: var(--theme-text-tertiary);
  font-size: 0.85rem;
  margin-top: var(--spacing-sm);
}

.sub-footnote a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sub-footnote a:hover {
  color: var(--primary-dark);
}

/* FAQ */
.sub-faq {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--theme-border);
}

.sub-faq-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--theme-text-primary);
  margin: 0 0 var(--spacing-lg);
}

.sub-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.sub-faq-item {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.sub-faq-item h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--theme-text-primary);
  margin: 0 0 var(--spacing-xs);
}

.sub-faq-item p {
  font-size: 0.85rem;
  color: var(--theme-text-tertiary);
  margin: 0;
  line-height: 1.5;
}

/* Mobile */
@media (max-width: 768px) {
  .sub-status-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .sub-status-left {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .sub-trust-row {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
  }

  .sub-faq-grid {
    grid-template-columns: 1fr;
  }

  .sub-section-header h1 {
    font-size: 1.375rem;
  }
}

/* ================================
   Mobile Header & Navigation
   ================================ */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 60px;
  padding: 0 var(--spacing-lg);
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px) saturate(180%);
}

.landing-mobile-header {
  background: rgba(10, 14, 26, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-mobile-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--theme-border);
}

.dashboard-mobile-header .nav-logo {
  color: var(--theme-text-primary);
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: inherit;
  transition: background var(--transition-fast);
}

.landing-mobile-header .mobile-menu-toggle {
  color: var(--gray-300);
}

.landing-mobile-header .mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-mobile-header .mobile-menu-toggle {
  color: var(--theme-text-secondary);
}

.dashboard-mobile-header .mobile-menu-toggle:hover {
  background: var(--theme-surface-hover);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  /* Landing page mobile sidebar as slide-out */
  .landing-sidebar {
    display: flex;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    z-index: 300;
  }

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

  .landing-main {
    margin-left: 0;
    padding-top: 60px;
  }

  /* Dashboard mobile sidebar as slide-out */
  .sidebar {
    display: flex;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    z-index: 300;
  }

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

  .dashboard-main {
    margin-left: 0;
    padding: var(--spacing-lg);
    padding-top: calc(60px + var(--spacing-lg));
  }

  /* Hero adjustments for mobile */
  .hero {
    padding-top: calc(60px + var(--spacing-2xl));
  }

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

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

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero-proof {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  /* Page header stacking on mobile */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  /* API key box wrapping */
  .api-key-box {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }

  .api-key-box code {
    white-space: normal;
    word-break: break-all;
    text-align: center;
  }

  .copy-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Stat cards single column on very small screens */
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  /* Section padding reduction */
  .features,
  .steps-section,
  .testimonials-section,
  .cta-section {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
  }

  .pricing-section {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
  }

  /* CTA box padding */
  .cta-box {
    padding: var(--spacing-xl);
  }

  .cta-box h2 {
    font-size: 1.5rem;
  }

  /* Profile page fixes */
  .profile-header {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .profile-meta {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  /* Card padding reduction */
  .card {
    padding: var(--spacing-lg);
  }

  /* Form actions stacking */
  .form-actions {
    flex-direction: column;
  }

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

  /* Trust bar */
  .trust-logos {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Step connector hide on mobile */
  .step-connector {
    display: none;
  }

  /* Section headers */
  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 0.9375rem;
  }

  /* Mockup card scale down */
  .hero-visual {
    max-width: 100%;
  }

  .mockup-card {
    font-size: 0.875rem;
  }

  /* Footer */
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Admin tables horizontal scroll */
  .card-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  /* Credit history table */
  table {
    min-width: 500px;
  }
}

/* ================================
   Dark Mode Overrides
   ================================ */

/* Remap raw gray palette inside dashboard so inline styles auto-adapt */
[data-theme="dark"] .dashboard-page {
  --gray-50: #161b26;
  --gray-100: #1a2030;
  --gray-200: rgba(255, 255, 255, 0.08);
  --gray-300: rgba(255, 255, 255, 0.12);
  --gray-400: #475569;
  --gray-500: #64748b;
  --gray-600: #94a3b8;
  --gray-700: #cbd5e1;
  --gray-800: #e2e8f0;
  --gray-900: #e2e8f0;
}

[data-theme="dark"] .dashboard-mobile-header {
  background: rgba(15, 18, 25, 0.92);
}

[data-theme="dark"] .sidebar-link.active {
  background: rgba(129, 140, 248, 0.12);
}

[data-theme="dark"] .sidebar-footer a.sidebar-link:hover {
  background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .stat-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--theme-shadow-md);
}

[data-theme="dark"] .dashboard-main input[type="text"]:focus,
[data-theme="dark"] .dashboard-main input[type="email"]:focus,
[data-theme="dark"] .dashboard-main input[type="number"]:focus,
[data-theme="dark"] .dashboard-main textarea:focus,
[data-theme="dark"] .dashboard-main select:focus {
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

[data-theme="dark"] ::selection {
  background: rgba(129, 140, 248, 0.3);
  color: #e2e8f0;
}

[data-theme="dark"] .mobile-overlay {
  background: rgba(0, 0, 0, 0.7);
}

/* Status badges */
.badge-platform-twitter,
.badge-platform-linkedin,
.badge-negative,
.badge-success,
.badge-warning {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-platform-twitter {
  color: var(--gray-500);
  background: var(--gray-100);
}

.badge-platform-linkedin {
  color: #0a66c2;
  background: #e8f0fe;
}

.badge-negative {
  color: #ef4444;
  background: #fef2f2;
}

.badge-success {
  color: #059669;
  background: #ecfdf5;
}

.badge-warning {
  color: #d97706;
  background: #fffbeb;
}

[data-theme="dark"] .badge-platform-linkedin,
[data-theme="dark"] .platform-badge.linkedin {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
}

[data-theme="dark"] .badge-negative {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

[data-theme="dark"] .badge-success {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .badge-warning {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
}

/* Theme toggle - reuses .sidebar-link styles, only overrides button resets */
button.sidebar-link.theme-toggle {
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: var(--font-sans);
  text-align: left;
}

button.sidebar-link.theme-toggle:hover {
  color: var(--theme-text-primary);
  background: var(--theme-surface-hover);
}

/* Scrollbar dark mode */
[data-theme="dark"] .sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

[data-theme="dark"] .sidebar-nav {
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
