/**
 * ╔═══════════════════════════════════════════════════════════════════════════╗
 * ║                        NUVOLUT DESIGN SYSTEM                              ║
 * ║                     Apple-Inspired Modern Finance                         ║
 * ╠═══════════════════════════════════════════════════════════════════════════╣
 * ║  TRUSTPAY SP ZOO | KRS 0000882514 | NIP 5272948997                        ║
 * ║  ul. HOŻA 86/210, 00-682, WARSZAWA                                        ║
 * ║  info@nuvolut.com | +48 780 044 735                                       ║
 * ╚═══════════════════════════════════════════════════════════════════════════╝
 *
 * Version: 1.0.0
 * Last Update: January 2026
 * Domain: nuvolut.com
 * 
 * Table of Contents:
 * 1. CSS Custom Properties (Variables)
 * 2. Reset & Base Styles
 * 3. Typography
 * 4. Layout & Grid
 * 5. Buttons
 * 6. Forms & Inputs
 * 7. Cards
 * 8. Navigation
 * 9. Animations
 * 10. Utilities
 */

/* ═══════════════════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

:root {
  /* ─────────────────────────────────────────────────────────────────────────
     Colors - Primary Brand
     ───────────────────────────────────────────────────────────────────────── */
  --color-primary: #0071E3;
  --color-primary-hover: #0077ED;
  --color-primary-active: #005BBB;
  --color-primary-light: #E1F0FF;
  --color-primary-subtle: #F5F9FF;
  
  /* Secondary - Deep Navy */
  --color-secondary: #1D1D1F;
  --color-secondary-hover: #2D2D2F;
  --color-secondary-light: #424245;
  
  /* ─────────────────────────────────────────────────────────────────────────
     Colors - Status/Accent
     ───────────────────────────────────────────────────────────────────────── */
  --color-success: #30D158;
  --color-success-hover: #28C350;
  --color-success-light: #E8FAF0;
  
  --color-warning: #FF9F0A;
  --color-warning-hover: #F59608;
  --color-warning-light: #FFF4E0;
  
  --color-error: #FF3B30;
  --color-error-hover: #E5352B;
  --color-error-light: #FFE5E3;
  
  --color-info: #5AC8FA;
  --color-info-light: #E5F7FF;
  
  /* ─────────────────────────────────────────────────────────────────────────
     Colors - Neutrals (Apple Gray Spectrum)
     ───────────────────────────────────────────────────────────────────────── */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F5F5F7;
  --color-bg-tertiary: #FBFBFD;
  --color-bg-elevated: #FFFFFF;
  
  --color-text-primary: #1D1D1F;
  --color-text-secondary: #6E6E73;
  --color-text-tertiary: #86868B;
  --color-text-quaternary: #AEAEB2;
  --color-text-placeholder: #C7C7CC;
  --color-text-inverse: #FFFFFF;
  
  --color-border-primary: #D2D2D7;
  --color-border-secondary: #E5E5EA;
  --color-border-tertiary: #F2F2F7;
  --color-border-focus: var(--color-primary);
  
  --color-separator: rgba(60, 60, 67, 0.12);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Gradients
     ───────────────────────────────────────────────────────────────────────── */
  --gradient-primary: linear-gradient(135deg, #0071E3 0%, #00C7BE 100%);
  --gradient-primary-hover: linear-gradient(135deg, #0077ED 0%, #00D4C9 100%);
  --gradient-dark: linear-gradient(180deg, #1D1D1F 0%, #000000 100%);
  --gradient-bg-subtle: linear-gradient(180deg, #FFFFFF 0%, #F5F5F7 100%);
  --gradient-bg-hero: linear-gradient(180deg, #FBFBFD 0%, #FFFFFF 50%, #F5F5F7 100%);
  --gradient-mesh: 
    radial-gradient(at 40% 20%, rgba(0, 113, 227, 0.08) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(48, 209, 88, 0.05) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(90, 200, 250, 0.05) 0px, transparent 50%);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Typography
     ───────────────────────────────────────────────────────────────────────── */
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 
                  'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 
                  'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  
  /* Font Sizes - Fluid */
  --text-display-1: clamp(48px, 8vw, 96px);
  --text-display-2: clamp(40px, 6vw, 80px);
  --text-display-3: clamp(32px, 5vw, 64px);
  
  --text-headline-1: clamp(28px, 4vw, 48px);
  --text-headline-2: clamp(24px, 3.5vw, 40px);
  --text-headline-3: clamp(20px, 3vw, 32px);
  --text-headline-4: clamp(18px, 2.5vw, 28px);
  --text-headline-5: clamp(16px, 2vw, 24px);
  --text-headline-6: clamp(14px, 1.5vw, 20px);
  
  --text-body-xl: 21px;
  --text-body-lg: 19px;
  --text-body-md: 17px;
  --text-body-sm: 15px;
  --text-body-xs: 13px;
  --text-caption: 12px;
  --text-overline: 11px;
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 800;
  
  /* Line Heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.47;
  --line-height-relaxed: 1.6;
  
  /* Letter Spacing */
  --letter-spacing-tighter: -0.03em;
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: -0.01em;
  --letter-spacing-wide: 0.02em;
  --letter-spacing-widest: 0.1em;
  
  /* ─────────────────────────────────────────────────────────────────────────
     Spacing (8px base grid)
     ───────────────────────────────────────────────────────────────────────── */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  --space-40: 160px;
  
  /* Container Widths */
  --container-xs: 520px;
  --container-sm: 680px;
  --container-md: 920px;
  --container-lg: 1120px;
  --container-xl: 1320px;
  --container-2xl: 1440px;
  
  /* Section Padding */
  --section-padding-sm: var(--space-16);
  --section-padding-md: var(--space-24);
  --section-padding-lg: var(--space-32);
  --section-padding-xl: var(--space-40);
  
  /* Grid */
  --grid-gutter: var(--space-6);
  --grid-margin: var(--space-6);
  --grid-margin-lg: var(--space-16);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Border Radius
     ───────────────────────────────────────────────────────────────────────── */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;
  
  --radius-button: var(--radius-full);
  --radius-button-rect: var(--radius-md);
  --radius-card: var(--radius-2xl);
  --radius-input: var(--radius-md);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Shadows
     ───────────────────────────────────────────────────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  
  --shadow-primary: 0 8px 24px rgba(0, 113, 227, 0.25);
  --shadow-success: 0 8px 24px rgba(48, 209, 88, 0.25);
  --shadow-error: 0 8px 24px rgba(255, 59, 48, 0.25);
  
  --shadow-focus: 0 0 0 4px rgba(0, 113, 227, 0.3);
  --shadow-focus-error: 0 0 0 4px rgba(255, 59, 48, 0.3);
  
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04), 0 16px 32px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.06), 0 24px 48px rgba(0, 0, 0, 0.06);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Transitions & Easing
     ───────────────────────────────────────────────────────────────────────── */
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-moderate: 300ms;
  --duration-slow: 400ms;
  
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  
  --transition-fast: all var(--duration-fast) var(--ease-apple);
  --transition-normal: all var(--duration-normal) var(--ease-apple);
  --transition-moderate: all var(--duration-moderate) var(--ease-apple);
  --transition-slow: all var(--duration-slow) var(--ease-out-expo);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Header
     ───────────────────────────────────────────────────────────────────────── */
  --header-height: 72px;
  --header-height-scrolled: 64px;
  
  /* ─────────────────────────────────────────────────────────────────────────
     Icons
     ───────────────────────────────────────────────────────────────────────── */
  --icon-xs: 12px;
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
  --icon-xl: 32px;
  --icon-2xl: 40px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Dark Mode
   ───────────────────────────────────────────────────────────────────────────── */
.dark-mode,
[data-theme="dark"] {
  --color-primary: #0A84FF;
  --color-primary-hover: #409CFF;
  --color-primary-light: #1C3A5E;
  --color-primary-subtle: #0D1D30;
  
  --color-bg-primary: #000000;
  --color-bg-secondary: #1C1C1E;
  --color-bg-tertiary: #2C2C2E;
  --color-bg-elevated: #1C1C1E;
  
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #EBEBF5;
  --color-text-tertiary: rgba(235, 235, 245, 0.6);
  --color-text-quaternary: rgba(235, 235, 245, 0.3);
  --color-text-placeholder: rgba(235, 235, 245, 0.2);
  
  --color-border-primary: #38383A;
  --color-border-secondary: #2C2C2E;
  --color-border-tertiary: #1C1C1E;
  
  --color-separator: rgba(84, 84, 88, 0.65);
  
  --gradient-bg-subtle: linear-gradient(180deg, #1C1C1E 0%, #000000 100%);
  --gradient-mesh: 
    radial-gradient(at 40% 20%, rgba(10, 132, 255, 0.15) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(48, 209, 88, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(90, 200, 250, 0.08) 0px, transparent 50%);
    
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.3), 0 16px 32px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.4), 0 24px 48px rgba(0, 0, 0, 0.35);
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-primary);
  font-size: var(--text-body-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

main {
  overflow: clip;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
}

ul,
ol {
  list-style: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Display Headlines */
.ds-text-display-1 {
  font-family: var(--font-primary);
  font-size: var(--text-display-1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tighter);
  color: var(--color-text-primary);
}

.ds-text-display-2 {
  font-family: var(--font-primary);
  font-size: var(--text-display-2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tighter);
}

.ds-text-display-3 {
  font-family: var(--font-primary);
  font-size: var(--text-display-3);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-tight);
}

/* Headlines */
.ds-text-headline-1 {
  font-size: var(--text-headline-1);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-tight);
}

.ds-text-headline-2 {
  font-size: var(--text-headline-2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-normal);
}

.ds-text-headline-3 {
  font-size: var(--text-headline-3);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}

.ds-text-headline-4 {
  font-size: var(--text-headline-4);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}

.ds-text-headline-5 {
  font-size: var(--text-headline-5);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}

.ds-text-headline-6 {
  font-size: var(--text-headline-6);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}

/* Body Text */
.ds-text-body-xl {
  font-size: var(--text-body-xl);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.ds-text-body-lg {
  font-size: var(--text-body-lg);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
}

.ds-text-body {
  font-size: var(--text-body-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
}

.ds-text-body-sm {
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
}

.ds-text-body-xs {
  font-size: var(--text-body-xs);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
}

/* Utility Text */
.ds-text-caption {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-tertiary);
}

.ds-text-overline {
  font-size: var(--text-overline);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* Eyebrow - Pre-headline label */
.ds-text-eyebrow {
  display: inline-block;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. LAYOUT & GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.ds-container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--grid-margin);
  padding-right: var(--grid-margin);
}

.ds-container--narrow {
  max-width: var(--container-md);
}

.ds-container--wide {
  max-width: var(--container-2xl);
}

@media (min-width: 1024px) {
  .ds-container {
    padding-left: var(--grid-margin-lg);
    padding-right: var(--grid-margin-lg);
  }
}

/* Sections */
.ds-section {
  padding-top: var(--section-padding-md);
  padding-bottom: var(--section-padding-md);
}

.ds-section--sm {
  padding-top: var(--section-padding-sm);
  padding-bottom: var(--section-padding-sm);
}

.ds-section--lg {
  padding-top: var(--section-padding-lg);
  padding-bottom: var(--section-padding-lg);
}

.ds-section--xl {
  padding-top: var(--section-padding-xl);
  padding-bottom: var(--section-padding-xl);
}

/* Grid */
.ds-grid {
  display: grid;
  gap: var(--grid-gutter);
}

.ds-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.ds-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.ds-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {
  .ds-grid--3,
  .ds-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .ds-grid--2,
  .ds-grid--3,
  .ds-grid--4 {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  
  font-family: var(--font-primary);
  font-size: var(--text-body-md);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  
  padding: var(--space-4) var(--space-8);
  border: none;
  border-radius: var(--radius-button);
  
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  
  transition: var(--transition-normal),
              box-shadow var(--duration-moderate) var(--ease-apple),
              transform var(--duration-moderate) var(--ease-out-expo);
}

/* Primary Button */
.ds-btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.ds-btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

.ds-btn--primary:active {
  background: var(--color-primary-active);
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary Button (Outline) */
.ds-btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.ds-btn--secondary:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* Ghost Button */
.ds-btn--ghost {
  background: transparent;
  color: var(--color-primary);
}

.ds-btn--ghost:hover {
  background: var(--color-primary-subtle);
}

/* Dark Button */
.ds-btn--dark {
  background: var(--color-secondary);
  color: var(--color-text-inverse);
}

.ds-btn--dark:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xl);
}

/* White Button */
.ds-btn--white {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-md);
}

.ds-btn--white:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* Gradient Button */
.ds-btn--gradient {
  background: var(--gradient-primary);
  color: var(--color-text-inverse);
  border: none;
}

.ds-btn--gradient:hover {
  background: var(--gradient-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

/* Success Button */
.ds-btn--success {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.ds-btn--success:hover {
  background: var(--color-success-hover);
  box-shadow: var(--shadow-success);
}

/* Error Button */
.ds-btn--error {
  background: var(--color-error);
  color: var(--color-text-inverse);
}

.ds-btn--error:hover {
  background: var(--color-error-hover);
  box-shadow: var(--shadow-error);
}

/* Button Sizes */
.ds-btn--xs {
  font-size: var(--text-caption);
  padding: var(--space-2) var(--space-4);
}

.ds-btn--sm {
  font-size: var(--text-body-sm);
  padding: var(--space-3) var(--space-6);
}

.ds-btn--lg {
  font-size: var(--text-body-lg);
  padding: var(--space-5) var(--space-10);
}

.ds-btn--xl {
  font-size: var(--text-body-xl);
  padding: var(--space-6) var(--space-12);
}

/* Full Width */
.ds-btn--full {
  width: 100%;
}

/* Icon Only */
.ds-btn--icon {
  padding: var(--space-4);
}

.ds-btn--icon.ds-btn--sm {
  padding: var(--space-3);
}

.ds-btn--icon.ds-btn--lg {
  padding: var(--space-5);
}

/* Rectangular */
.ds-btn--rect {
  border-radius: var(--radius-button-rect);
}

/* Disabled State */
.ds-btn:disabled,
.ds-btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading State */
.ds-btn--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.ds-btn--loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ds-spin 0.6s linear infinite;
}

.ds-btn--primary.ds-btn--loading::after {
  border-color: var(--color-text-inverse);
  border-right-color: transparent;
}

/* Link Style Button */
.ds-btn--link {
  background: none;
  padding: 0;
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  border-radius: 0;
}

.ds-btn--link:hover {
  text-decoration: underline;
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. FORMS & INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */

.ds-input {
  display: block;
  width: 100%;
  
  font-family: var(--font-primary);
  font-size: var(--text-body-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-primary);
  border: 1.5px solid var(--color-border-primary);
  border-radius: var(--radius-input);
  
  transition: var(--transition-normal),
              box-shadow var(--duration-moderate) var(--ease-apple);
  
  outline: none;
}

.ds-input::placeholder {
  color: var(--color-text-placeholder);
}

.ds-input:hover {
  border-color: var(--color-border-focus);
}

.ds-input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}

/* Input with background */
.ds-input--filled {
  background: var(--color-bg-secondary);
  border-color: transparent;
}

.ds-input--filled:hover,
.ds-input--filled:focus {
  background: var(--color-bg-primary);
}

/* Input Sizes */
.ds-input--sm {
  font-size: var(--text-body-sm);
  padding: var(--space-3) var(--space-4);
}

.ds-input--lg {
  font-size: var(--text-body-lg);
  padding: var(--space-5) var(--space-6);
}

/* Input States */
.ds-input--error {
  border-color: var(--color-error);
}

.ds-input--error:focus {
  box-shadow: var(--shadow-focus-error);
}

.ds-input--success {
  border-color: var(--color-success);
}

/* Textarea */
.ds-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Select */
.ds-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-12);
  cursor: pointer;
}

/* Label */
.ds-label {
  display: block;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

/* Helper Text */
.ds-helper-text {
  font-size: var(--text-body-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-2);
}

.ds-helper-text--error {
  color: var(--color-error);
}

/* Form Group */
.ds-form-group {
  margin-bottom: var(--space-6);
}

/* Checkbox & Radio */
.ds-checkbox,
.ds-radio {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.ds-checkbox input,
.ds-radio input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  cursor: pointer;
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.ds-card {
  background: var(--color-bg-primary);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  transition: var(--transition-moderate),
              box-shadow var(--duration-moderate) var(--ease-apple);
}

/* Card with shadow */
.ds-card--elevated {
  box-shadow: var(--shadow-card);
}

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

/* Card with border */
.ds-card--outlined {
  border: 1px solid var(--color-border-secondary);
}

.ds-card--outlined:hover {
  border-color: var(--color-border-primary);
}

/* Glass Card (Frosted glass effect) */
.ds-card--glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.dark-mode .ds-card--glass {
  background: rgba(28, 28, 30, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Feature Card */
.ds-card--feature {
  padding: var(--space-10);
  text-align: center;
}

.ds-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
}

.ds-card__icon svg {
  width: var(--icon-lg);
  height: var(--icon-lg);
}

/* Stats Card */
.ds-card--stats {
  padding: var(--space-6);
}

.ds-card__value {
  font-size: var(--text-display-3);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1;
}

.ds-card__label {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

/* Clickable Card */
.ds-card--clickable {
  cursor: pointer;
}

.ds-card--clickable:hover {
  transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.ds-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  
  height: var(--header-height);
  padding: 0 var(--grid-margin);
  
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  
  transition: var(--transition-moderate);
}

.ds-header--scrolled {
  height: var(--header-height-scrolled);
  box-shadow: var(--shadow-sm);
}

.ds-header--transparent {
  background: transparent;
  backdrop-filter: none;
}

.ds-header--dark {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
}

.dark-mode .ds-header {
  background: rgba(0, 0, 0, 0.72);
}

/* Logo */
.ds-header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ds-header__logo img {
  height: 32px;
  width: auto;
}

/* Navigation */
.ds-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.ds-nav__link {
  font-size: var(--text-body-md);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  
  transition: var(--transition-fast);
}

.ds-nav__link:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
}

.ds-nav__link--active {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

/* Header Actions */
.ds-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Mobile Menu Button */
.ds-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ds-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

@media (max-width: 1023px) {
  .ds-nav {
    display: none;
  }
  
  .ds-menu-toggle {
    display: flex;
  }
}

/* Mobile button adjustments */
@media (max-width: 767px) {
  .ds-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-body-sm);
    gap: var(--space-1);
  }
  
  .ds-btn--sm {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-caption);
  }
  
  .ds-btn--lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-body-md);
  }
  
  .ds-btn--xl {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-body-md);
  }
  
  .ds-header {
    padding: 0 var(--space-4);
  }
  
  .ds-header__actions {
    gap: var(--space-2);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Keyframes */
@keyframes ds-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ds-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ds-fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ds-scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ds-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ds-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ds-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes ds-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes ds-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes ds-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Animation Classes */
.ds-animate-fade-in {
  animation: ds-fade-in var(--duration-moderate) var(--ease-out-expo) forwards;
}

.ds-animate-fade-in-up {
  animation: ds-fade-in-up var(--duration-slow) var(--ease-out-expo) forwards;
}

.ds-animate-fade-in-down {
  animation: ds-fade-in-down var(--duration-slow) var(--ease-out-expo) forwards;
}

.ds-animate-scale-in {
  animation: ds-scale-in var(--duration-moderate) var(--ease-spring) forwards;
}

.ds-animate-slide-in-right {
  animation: ds-slide-in-right var(--duration-slow) var(--ease-out-expo) forwards;
}

.ds-animate-slide-in-left {
  animation: ds-slide-in-left var(--duration-slow) var(--ease-out-expo) forwards;
}

.ds-animate-float {
  animation: ds-float 3s ease-in-out infinite;
}

.ds-animate-pulse {
  animation: ds-pulse 2s ease-in-out infinite;
}

/* Stagger delays */
.ds-stagger-1 { animation-delay: 100ms; }
.ds-stagger-2 { animation-delay: 200ms; }
.ds-stagger-3 { animation-delay: 300ms; }
.ds-stagger-4 { animation-delay: 400ms; }
.ds-stagger-5 { animation-delay: 500ms; }
.ds-stagger-6 { animation-delay: 600ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   10. UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Display */
.ds-block { display: block; }
.ds-inline-block { display: inline-block; }
.ds-inline { display: inline; }
.ds-flex { display: flex; }
.ds-inline-flex { display: inline-flex; }
.ds-grid { display: grid; }
.ds-hidden { display: none; }

/* Flexbox */
.ds-flex-row { flex-direction: row; }
.ds-flex-col { flex-direction: column; }
.ds-flex-wrap { flex-wrap: wrap; }
.ds-items-start { align-items: flex-start; }
.ds-items-center { align-items: center; }
.ds-items-end { align-items: flex-end; }
.ds-justify-start { justify-content: flex-start; }
.ds-justify-center { justify-content: center; }
.ds-justify-end { justify-content: flex-end; }
.ds-justify-between { justify-content: space-between; }

/* Gap */
.ds-gap-1 { gap: var(--space-1); }
.ds-gap-2 { gap: var(--space-2); }
.ds-gap-3 { gap: var(--space-3); }
.ds-gap-4 { gap: var(--space-4); }
.ds-gap-5 { gap: var(--space-5); }
.ds-gap-6 { gap: var(--space-6); }
.ds-gap-8 { gap: var(--space-8); }
.ds-gap-10 { gap: var(--space-10); }
.ds-gap-12 { gap: var(--space-12); }

/* Text alignment */
.ds-text-left { text-align: left; }
.ds-text-center { text-align: center; }
.ds-text-right { text-align: right; }

/* Text colors */
.ds-text-primary { color: var(--color-text-primary); }
.ds-text-secondary { color: var(--color-text-secondary); }
.ds-text-tertiary { color: var(--color-text-tertiary); }
.ds-text-accent { color: var(--color-primary); }
.ds-text-success { color: var(--color-success); }
.ds-text-warning { color: var(--color-warning); }
.ds-text-error { color: var(--color-error); }
.ds-text-inverse { color: var(--color-text-inverse); }

/* Backgrounds */
.ds-bg-primary { background-color: var(--color-bg-primary); }
.ds-bg-secondary { background-color: var(--color-bg-secondary); }
.ds-bg-tertiary { background-color: var(--color-bg-tertiary); }
.ds-bg-accent { background-color: var(--color-primary); }
.ds-bg-accent-subtle { background-color: var(--color-primary-subtle); }
.ds-bg-dark { background-color: var(--color-secondary); }

/* Gradient backgrounds */
.ds-bg-gradient-primary { background: var(--gradient-primary); }
.ds-bg-gradient-dark { background: var(--gradient-dark); }
.ds-bg-gradient-subtle { background: var(--gradient-bg-subtle); }
.ds-bg-gradient-mesh { background: var(--gradient-mesh); }
.ds-bg-gradient-hero { background: var(--gradient-bg-hero); }

/* Background patterns */
.ds-bg-dots {
  background-image: radial-gradient(
    circle at 1px 1px,
    var(--color-border-secondary) 1px,
    transparent 0
  );
  background-size: 24px 24px;
}

.ds-bg-grid {
  background-image: 
    linear-gradient(var(--color-border-tertiary) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border-tertiary) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Glass effect */
.ds-bg-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.dark-mode .ds-bg-glass {
  background: rgba(28, 28, 30, 0.7);
}

/* Position */
.ds-relative { position: relative; }
.ds-absolute { position: absolute; }
.ds-fixed { position: fixed; }
.ds-sticky { position: sticky; }

/* Overflow */
.ds-overflow-hidden { overflow: hidden; }
.ds-overflow-auto { overflow: auto; }
.ds-overflow-visible { overflow: visible; }

/* Width/Height */
.ds-w-full { width: 100%; }
.ds-h-full { height: 100%; }
.ds-min-h-screen { min-height: 100vh; }

/* Margin utilities */
.ds-m-auto { margin: auto; }
.ds-mx-auto { margin-left: auto; margin-right: auto; }
.ds-my-auto { margin-top: auto; margin-bottom: auto; }

.ds-mt-0 { margin-top: 0; }
.ds-mt-2 { margin-top: var(--space-2); }
.ds-mt-4 { margin-top: var(--space-4); }
.ds-mt-6 { margin-top: var(--space-6); }
.ds-mt-8 { margin-top: var(--space-8); }
.ds-mt-10 { margin-top: var(--space-10); }
.ds-mt-12 { margin-top: var(--space-12); }
.ds-mt-16 { margin-top: var(--space-16); }

.ds-mb-0 { margin-bottom: 0; }
.ds-mb-2 { margin-bottom: var(--space-2); }
.ds-mb-4 { margin-bottom: var(--space-4); }
.ds-mb-6 { margin-bottom: var(--space-6); }
.ds-mb-8 { margin-bottom: var(--space-8); }
.ds-mb-10 { margin-bottom: var(--space-10); }
.ds-mb-12 { margin-bottom: var(--space-12); }
.ds-mb-16 { margin-bottom: var(--space-16); }

/* Padding utilities */
.ds-p-0 { padding: 0; }
.ds-p-2 { padding: var(--space-2); }
.ds-p-4 { padding: var(--space-4); }
.ds-p-6 { padding: var(--space-6); }
.ds-p-8 { padding: var(--space-8); }
.ds-p-10 { padding: var(--space-10); }
.ds-p-12 { padding: var(--space-12); }

.ds-px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.ds-px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.ds-px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

.ds-py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.ds-py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.ds-py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

/* Z-index */
.ds-z-0 { z-index: 0; }
.ds-z-10 { z-index: 10; }
.ds-z-20 { z-index: 20; }
.ds-z-30 { z-index: 30; }
.ds-z-40 { z-index: 40; }
.ds-z-50 { z-index: 50; }

/* Border radius */
.ds-rounded-none { border-radius: 0; }
.ds-rounded-sm { border-radius: var(--radius-sm); }
.ds-rounded-md { border-radius: var(--radius-md); }
.ds-rounded-lg { border-radius: var(--radius-lg); }
.ds-rounded-xl { border-radius: var(--radius-xl); }
.ds-rounded-2xl { border-radius: var(--radius-2xl); }
.ds-rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.ds-shadow-none { box-shadow: none; }
.ds-shadow-sm { box-shadow: var(--shadow-sm); }
.ds-shadow-md { box-shadow: var(--shadow-md); }
.ds-shadow-lg { box-shadow: var(--shadow-lg); }
.ds-shadow-xl { box-shadow: var(--shadow-xl); }
.ds-shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Borders */
.ds-border { border: 1px solid var(--color-border-primary); }
.ds-border-secondary { border: 1px solid var(--color-border-secondary); }
.ds-border-none { border: none; }

/* Opacity */
.ds-opacity-0 { opacity: 0; }
.ds-opacity-50 { opacity: 0.5; }
.ds-opacity-75 { opacity: 0.75; }
.ds-opacity-100 { opacity: 1; }

/* Cursor */
.ds-cursor-pointer { cursor: pointer; }
.ds-cursor-not-allowed { cursor: not-allowed; }

/* User select */
.ds-select-none { user-select: none; }
.ds-select-text { user-select: text; }
.ds-select-all { user-select: all; }

/* Responsive utilities */
.ds-hide-mobile { display: block; }
.ds-show-mobile { display: none; }

@media (max-width: 1023px) {
  .ds-hide-mobile { display: none !important; }
  .ds-show-mobile { display: block !important; }
}

@media (max-width: 767px) {
  .ds-hide-tablet { display: none !important; }
  .ds-show-tablet { display: block !important; }
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ds-skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: var(--transition-fast);
}

.ds-skip-link:focus {
  top: var(--space-4);
}

/* Minimum touch target */
.ds-touch-target {
  min-width: 44px;
  min-height: 44px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ADDITIONAL COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Badge */
.ds-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-caption);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.ds-badge--success {
  background: var(--color-success-light);
  color: var(--color-success);
}

.ds-badge--warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.ds-badge--error {
  background: var(--color-error-light);
  color: var(--color-error);
}

/* Divider */
.ds-divider {
  height: 1px;
  background: var(--color-separator);
  border: none;
  margin: var(--space-8) 0;
}

.ds-divider--vertical {
  width: 1px;
  height: auto;
  margin: 0 var(--space-4);
}

/* Avatar */
.ds-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  overflow: hidden;
}

.ds-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ds-avatar--sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-body-sm);
}

.ds-avatar--lg {
  width: 56px;
  height: 56px;
  font-size: var(--text-body-lg);
}

.ds-avatar--xl {
  width: 80px;
  height: 80px;
  font-size: var(--text-headline-5);
}

/* Skeleton loader */
.ds-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-secondary) 25%,
    var(--color-bg-tertiary) 50%,
    var(--color-bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: ds-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.ds-skeleton--text {
  height: 1em;
  width: 100%;
}

.ds-skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.ds-skeleton--card {
  height: 200px;
  border-radius: var(--radius-card);
}

/* Tooltip */
.ds-tooltip {
  position: relative;
}

.ds-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  
  padding: var(--space-2) var(--space-3);
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  font-size: var(--text-body-xs);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  pointer-events: none;
}

.ds-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}
