/* ============================================
   CSS VARIABLES - Design Tokens
   ============================================ */

:root {
    /* ---- Colors ---- */
    /* Background */
    --color-bg-primary: #0a0e17;
    --color-bg-secondary: #111827;
    --color-bg-tertiary: #1f2937;
    
    /* Surface (cards, modals, etc.) */
    --color-surface: rgba(17, 24, 39, 0.7);
    --color-surface-hover: rgba(31, 41, 55, 0.8);
    --color-surface-active: rgba(55, 65, 81, 0.6);
    
    /* Borders */
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-hover: rgba(255, 255, 255, 0.12);
    --color-border-focus: rgba(59, 130, 246, 0.5);
    
    /* Primary (Blue) */
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-300: #93c5fd;
    --color-primary-400: #60a5fa;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-800: #1e40af;
    --color-primary-900: #1e3a8a;
    --color-primary-glow: rgba(59, 130, 246, 0.25);
    
    /* Accent (Indigo) */
    --color-accent-400: #818cf8;
    --color-accent-500: #6366f1;
    --color-accent-600: #4f46e5;
    --color-accent-glow: rgba(99, 102, 241, 0.2);
    
    /* Text */
    --color-text-primary: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-text-disabled: #475569;
    
    /* Semantic Colors */
    --color-success: #10b981;
    --color-success-light: rgba(16, 185, 129, 0.15);
    --color-error: #ef4444;
    --color-error-light: rgba(239, 68, 68, 0.15);
    --color-warning: #f59e0b;
    --color-warning-light: rgba(245, 158, 11, 0.15);
    --color-info: #3b82f6;
    --color-info-light: rgba(59, 130, 246, 0.15);
    
    /* App Colors */
    --color-esign: #3b82f6;
    --color-ksign: #8b5cf6;
    --color-feather: #ec4899;
    --color-scarlet: #ef4444;
    --color-trollstore: #10b981;
    --color-certificate: #f59e0b;
    
    /* ---- Typography ---- */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    
    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    
    /* ---- Spacing ---- */
    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    
    /* ---- Border Radius ---- */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* ---- Shadows ---- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--color-primary-glow);
    --shadow-glow-sm: 0 0 20px var(--color-primary-glow);
    
    /* ---- Transitions ---- */
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;
    
    --ease-linear: linear;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.16, 1, 0.3, 1);
    
    --transition-fast: var(--duration-fast) var(--ease-out);
    --transition-base: var(--duration-base) var(--ease-in-out);
    --transition-smooth: var(--duration-slow) var(--ease-bounce);
    
    /* ---- Z-Index ---- */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-nav: 1000;
    
    /* ---- Layout ---- */
    --container-max: 960px;
    --header-height: 68px;
    --nav-height: 72px;
}

/* ---- Dark Mode Adjustments (if needed) ---- */
@media (prefers-color-scheme: dark) {
    :root {
        /* Already dark by default */
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    :root {
        --duration-fast: 0ms;
        --duration-base: 0ms;
        --duration-slow: 0ms;
        --duration-slower: 0ms;
    }
}
