/* ============================================================
   OnlineInvoicesMaker.com — Premium Design System
   Ultra-modern SaaS design inspired by Stripe, Linear, Notion
   ============================================================ */

:root {
  /* Brand Colors */
  --brand-primary: #6366f1;
  --brand-primary-dark: #4f46e5;
  --brand-primary-light: #818cf8;
  --brand-primary-ultra-light: #eef2ff;
  --brand-secondary: #06b6d4;
  --brand-accent: #f59e0b;
  --brand-success: #10b981;
  --brand-danger: #ef4444;
  --brand-warning: #f59e0b;

  /* Gradient */
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  --gradient-cta: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);

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

  /* Light Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-overlay: rgba(255, 255, 255, 0.98);
  --bg-card: #ffffff;
  --bg-card-hover: #fafbff;
  --bg-input: #ffffff;
  --bg-input-focus: #fafaff;
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-modal: #ffffff;
  --bg-tooltip: #1f2937;

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;
  --text-placeholder: #d1d5db;
  --text-inverse: #ffffff;
  --text-link: #6366f1;
  --text-link-hover: #4f46e5;

  --border-primary: #e5e7eb;
  --border-secondary: #f3f4f6;
  --border-focus: #6366f1;
  --border-input: #d1d5db;
  --border-card: #e5e7eb;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.07), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.07), 0 10px 10px rgba(0,0,0,0.04);
  --shadow-2xl: 0 25px 50px rgba(0,0,0,0.12);
  --shadow-brand: 0 10px 30px rgba(99,102,241,0.25);
  --shadow-brand-lg: 0 20px 40px rgba(99,102,241,0.3);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.06);
  --shadow-header: 0 1px 0 rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.03);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

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

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  --text-6xl: 60px;
  --text-7xl: 72px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-header: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;

  /* Layout */
  --header-height: 64px;
  --toolbar-height: 56px;
  --sidebar-width: 420px;
  --max-width: 1400px;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #161b27;
  --bg-tertiary: #1c2333;
  --bg-overlay: rgba(15, 17, 23, 0.98);
  --bg-card: #161b27;
  --bg-card-hover: #1c2333;
  --bg-input: #1c2333;
  --bg-input-focus: #1f2840;
  --bg-header: rgba(15, 17, 23, 0.95);
  --bg-modal: #161b27;
  --bg-tooltip: #e5e7eb;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-placeholder: #334155;
  --text-inverse: #0f1117;
  --text-link: #818cf8;
  --text-link-hover: #a5b4fc;

  --border-primary: #1e293b;
  --border-secondary: #1c2333;
  --border-focus: #818cf8;
  --border-input: #2d3748;
  --border-card: #1e293b;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.4), 0 10px 10px rgba(0,0,0,0.3);
  --shadow-2xl: 0 25px 50px rgba(0,0,0,0.5);
  --shadow-brand: 0 10px 30px rgba(99,102,241,0.4);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.4), 0 16px 40px rgba(0,0,0,0.3);
  --shadow-header: 0 1px 0 rgba(255,255,255,0.04), 0 4px 16px rgba(0,0,0,0.2);

  --gradient-soft: linear-gradient(135deg, #0f1117 0%, #161b27 100%);
  --gradient-card: linear-gradient(135deg, #161b27 0%, #1c2333 100%);
  --brand-primary-ultra-light: #1e1b4b;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--text-link-hover); }

img, video { max-width: 100%; height: auto; }
button { font-family: var(--font-sans); cursor: pointer; }
input, textarea, select { font-family: var(--font-sans); }

/* ============================================================
   TYPOGRAPHY SYSTEM
   ============================================================ */
.text-display {
  font-size: clamp(40px, 6vw, var(--text-7xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.text-hero {
  font-size: clamp(32px, 5vw, var(--text-6xl));
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.text-h1 {
  font-size: clamp(28px, 4vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.text-h2 {
  font-size: clamp(24px, 3vw, var(--text-4xl));
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.text-h3 {
  font-size: clamp(20px, 2.5vw, var(--text-3xl));
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.text-h4 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.text-h5 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
}
.text-body-lg { font-size: var(--text-lg); line-height: 1.7; }
.text-body { font-size: var(--text-base); line-height: 1.65; }
.text-body-sm { font-size: var(--text-sm); line-height: 1.6; }
.text-caption { font-size: var(--text-xs); line-height: 1.5; }
.text-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   BUTTON SYSTEM
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background var(--transition-fast);
}
.btn:active::after { background: rgba(0,0,0,0.08); }

/* Primary */
.btn-primary {
  background: var(--gradient-cta);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(99,102,241,0.15), 0 4px 12px rgba(99,102,241,0.2);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(99,102,241,0.2), 0 8px 24px rgba(99,102,241,0.25);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary */
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-card);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-input);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Danger */
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(239,68,68,0.2);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(239,68,68,0.3);
}

/* Success */
.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16,185,129,0.2);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16,185,129,0.3);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-outline:hover {
  background: var(--brand-primary);
  color: #fff;
}

/* Sizes */
.btn-xs { padding: 5px 10px; font-size: var(--text-xs); border-radius: var(--radius-sm); gap: 5px; }
.btn-sm { padding: 7px 14px; font-size: var(--text-sm); border-radius: var(--radius-md); }
.btn-md { padding: 10px 20px; }
.btn-lg { padding: 13px 28px; font-size: var(--text-md); border-radius: var(--radius-xl); }
.btn-xl { padding: 16px 36px; font-size: var(--text-lg); border-radius: var(--radius-2xl); }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: var(--radius-md); }
.btn-icon-sm { padding: 6px; width: 30px; height: 30px; border-radius: var(--radius-sm); }
.btn-icon-lg { padding: 10px; width: 44px; height: 44px; border-radius: var(--radius-lg); }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.form-label.required::after {
  content: ' *';
  color: var(--brand-danger);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 13px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
  line-height: 1.5;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-primary);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-subtle);
}
.form-input.error {
  border-color: var(--brand-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 4px;
}
.form-error {
  font-size: var(--text-xs);
  color: var(--brand-danger);
  margin-top: 4px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--gray-300);
  border-radius: var(--radius-full);
  transition: var(--transition-base);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--brand-primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

/* ============================================================
   CARD SYSTEM
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-card-hover); }
.card-hover:hover { transform: translateY(-2px); }
.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-card);
  background: var(--bg-secondary);
}

/* ============================================================
   BADGE SYSTEM
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.badge-primary {
  background: var(--brand-primary-ultra-light);
  color: var(--brand-primary-dark);
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-blue { background: #dbeafe; color: #1d4ed8; }

[data-theme="dark"] .badge-success { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-warning { background: #78350f; color: #fde68a; }
[data-theme="dark"] .badge-danger { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .badge-gray { background: var(--gray-800); color: var(--gray-300); }
[data-theme="dark"] .badge-blue { background: #1e3a5f; color: #93c5fd; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-modal);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: all;
  animation: toastIn var(--transition-spring) forwards;
  max-width: 360px;
  min-width: 240px;
}
.toast.hiding { animation: toastOut var(--transition-slow) forwards; }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-success { border-left: 3px solid var(--brand-success); }
.toast-error { border-left: 3px solid var(--brand-danger); }
.toast-warning { border-left: 3px solid var(--brand-warning); }
.toast-info { border-left: 3px solid var(--brand-primary); }
.toast-close {
  margin-left: auto;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color var(--transition-fast);
}
.toast-close:hover { color: var(--text-primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(20px) scale(0.96); }
}

/* ============================================================
   MODAL SYSTEM
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.modal-backdrop.active { opacity: 1; }
.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.94) translateY(12px);
  transition: transform var(--transition-spring);
}
.modal-backdrop.active .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--bg-modal);
  z-index: 1;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}
.modal-title { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; }
.modal-close {
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

/* ============================================================
   DROPDOWN SYSTEM
   ============================================================ */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-modal);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-dropdown);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transition: all var(--transition-base);
  pointer-events: none;
}
.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.dropdown-item.danger { color: var(--brand-danger); }
.dropdown-item.danger:hover { background: #fee2e2; }
[data-theme="dark"] .dropdown-item.danger:hover { background: #7f1d1d; }
.dropdown-divider {
  height: 1px;
  background: var(--border-card);
  margin: 4px 0;
}
.dropdown-label {
  padding: 6px 12px 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 780px; }
.container-md { max-width: 1000px; }
.container-lg { max-width: 1200px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Spacing utilities */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; } .mb-12 { margin-bottom: 48px; }

/* ============================================================
   SECTION STYLES
   ============================================================ */
.section {
  padding: var(--space-24) 0;
}
.section-sm { padding: var(--space-16) 0; }
.section-lg { padding: 120px 0; }

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto var(--space-16);
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--brand-primary-ultra-light);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--gray-700); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: rgba(99,102,241,0.2);
  color: var(--text-primary);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse-brand {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.animate-scale-in { animation: scaleIn 0.4s ease forwards; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-brand { animation: pulse-brand 2s infinite; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ============================================================
   LOADING / SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-tertiary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-tertiary) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pricing-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-2xl);
  padding: 32px;
  position: relative;
  transition: all var(--transition-base);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.pricing-card.featured {
  background: var(--gradient-cta);
  border-color: transparent;
  color: white;
}
.pricing-card.featured .pricing-subtitle { color: rgba(255,255,255,0.8); }
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-accent);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.pricing-price { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.pricing-period { font-size: var(--text-sm); opacity: 0.7; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.pricing-features li { display: flex; align-items: center; gap: 10px; font-size: var(--text-sm); }
.pricing-features li .check { color: var(--brand-success); flex-shrink: 0; }
.pricing-card.featured .pricing-features li .check { color: #86efac; }

/* ============================================================
   FEATURE GRID
   ============================================================ */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-primary-ultra-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  font-size: 22px;
  margin-bottom: 16px;
  transition: all var(--transition-base);
}
.feature-card:hover .feature-icon {
  background: var(--brand-primary);
  color: white;
  transform: scale(1.08);
}
.feature-title { font-size: var(--text-base); font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-2xl);
  padding: 28px;
  transition: all var(--transition-base);
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.testimonial-stars { color: var(--brand-accent); font-size: 14px; margin-bottom: 14px; }
.testimonial-text { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: var(--text-sm); }
.testimonial-role { font-size: var(--text-xs); color: var(--text-muted); }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-item {
  border-bottom: 1px solid var(--border-card);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  transition: color var(--transition-fast);
  user-select: none;
}
.faq-question:hover { color: var(--brand-primary); }
.faq-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-input);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
  color: var(--text-muted);
}
.faq-item.open .faq-icon {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.faq-answer-inner {
  padding-bottom: 20px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: var(--text-base);
}
.faq-item.open .faq-answer { max-height: 400px; }

/* ============================================================
   HERO SECTION SPECIFIC
   ============================================================ */
.hero-section {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.2) 0%, transparent 70%);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
  top: -150px; left: -100px;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.3) 0%, transparent 70%);
  top: 100px; right: -100px;
  animation-delay: -3s;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow .badge { margin: -2px 0; }
.hero-title {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.hero-subtitle {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 40px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero-stat-label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.hero-stat-divider { width: 1px; height: 36px; background: var(--border-card); }

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
  padding: 20px 0;
}
.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
}
.trust-item-icon { color: var(--brand-success); font-size: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-lg { padding: 80px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .hero-stats { gap: 20px; }
  .hero-stat-divider { display: none; }
  .trust-bar-inner { gap: 20px; }
}
@media (max-width: 480px) {
  .btn-xl { padding: 13px 24px; font-size: var(--text-base); }
  .hero-cta-group { flex-direction: column; }
}
