/**
 * FSA Theme - Color Tokens & Typography
 * Master money. Master life.
 */

:root {
    /* Primary Colors - Green Palette */
    --fsa-green: #10b981;
    --fsa-green-light: #34d399;
    --fsa-green-dark: #059669;
    --fsa-green-hover: #0d9668;
    
    /* Background Colors */
    --fsa-bg-dark: #0a1f1a;
    --fsa-bg-secondary: #0f2922;
    --fsa-bg-card: #1a3a2e;
    --fsa-bg-hover: #234a3c;
    
    /* Text Colors */
    --fsa-text-primary: #e0e0e0;
    --fsa-text-secondary: #9ca3af;
    --fsa-text-accent: #6ee7b7;
    --fsa-text-dim: #6b7280;
    
    /* Status Colors */
    --fsa-success: #10b981;
    --fsa-warning: #f59e0b;
    --fsa-error: #ef4444;
    --fsa-info: #3b82f6;
    
    /* Border Colors */
    --fsa-border-subtle: rgba(16, 185, 129, 0.1);
    --fsa-border-medium: rgba(16, 185, 129, 0.3);
    --fsa-border-strong: rgba(16, 185, 129, 0.6);
    
    /* Gradients */
    --fsa-gradient-primary: linear-gradient(135deg, var(--fsa-green), var(--fsa-green-light));
    --fsa-gradient-bg: linear-gradient(135deg, var(--fsa-bg-dark) 0%, var(--fsa-bg-secondary) 100%);
    --fsa-gradient-card: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'Courier New', Courier, monospace;
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
    
    /* 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);
    
    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1100;
    --z-fixed: 1200;
    --z-modal-backdrop: 1300;
    --z-modal: 1400;
    --z-popover: 1500;
    --z-tooltip: 1600;
}

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

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

body {
    font-family: var(--font-family-base);
    background: var(--fsa-gradient-bg);
    color: var(--fsa-text-primary);
    line-height: var(--line-height-normal);
    min-height: 100vh;
}

/* Typography Utilities */
.text-primary { color: var(--fsa-text-primary); }
.text-secondary { color: var(--fsa-text-secondary); }
.text-accent { color: var(--fsa-text-accent); }
.text-green { color: var(--fsa-green); }
.text-success { color: var(--fsa-success); }
.text-warning { color: var(--fsa-warning); }
.text-error { color: var(--fsa-error); }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

/* Accessibility - WCAG AA Compliance */
/* Focus Indicators */
*:focus-visible {
    outline: 3px solid var(--fsa-green);
    outline-offset: 2px;
}

button:focus-visible, a:focus-visible {
    outline: 3px solid var(--fsa-green);
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Touch Targets (WCAG 2.5.5) - Minimum 44x44px */
button, a, [role="button"], input[type="button"], input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
}

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

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

/* Skip to Main Content */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--fsa-green);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Responsive Typography */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 18px;
    }
}

/* List Styling - Proper Indentation */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    line-height: var(--line-height-relaxed);
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 0.75rem;
    color: var(--fsa-text-primary);
    padding-left: 0.5rem;
}

/* Nested lists */
ul ul, ol ol, ul ol, ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
}

ul ul {
    list-style-type: circle;
}

ul ul ul {
    list-style-type: square;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .no-print {
        display: none !important;
    }
}
