@import url('open.iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════════
   FINTECH DESIGN SYSTEM v2.0
   Premium Banking Dashboard • Mobile-First • WCAG AA Compliant
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────
   🎨 DESIGN TOKENS
   8px Grid System • Modern Typography • Refined Color Palette
   ───────────────────────────────────────────────────────────────────── */
:root {
    /* ═══ SPACING SCALE (8px base) ═══ */
    --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 */
    --space-24: 6rem;      /* 96px */

    /* ═══ BRAND COLORS - Refined Emerald Gradient ═══ */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
    --emerald-950: #022c22;

    /* ═══ ACCENT PALETTE - Financial Grade ═══ */
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --purple-500: #a855f7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --cyan-500: #06b6d4;
    --teal-500: #14b8a6;

    /* ═══ SEMANTIC COLORS ═══ */
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.12);
    --success-dark: #16a34a;
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);
    --warning-dark: #d97706;
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.12);
    --danger-dark: #dc2626;
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.12);
    --info-dark: #2563eb;

    /* ═══ TYPOGRAPHY ═══ */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;

    --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 */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */

    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* ═══ ANIMATION CURVES ═══ */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --duration-instant: 75ms;
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;

    /* ═══ BORDER RADIUS ═══ */
    --radius-none: 0;
    --radius-xs: 0.25rem;    /* 4px */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.25rem;   /* 20px */
    --radius-3xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;

    /* ═══ SHADOWS - Multi-layer for depth ═══ */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    
    /* Colored shadows for KPIs */
    --shadow-emerald: 0 8px 24px rgba(16, 185, 129, 0.20);
    --shadow-blue: 0 8px 24px rgba(59, 130, 246, 0.20);
    --shadow-orange: 0 8px 24px rgba(249, 115, 22, 0.20);
    --shadow-purple: 0 8px 24px rgba(139, 92, 246, 0.20);

    /* ═══ FOCUS RING ═══ */
    --ring-width: 2px;
    --ring-offset: 2px;
    --ring-color: rgba(16, 185, 129, 0.5);

    /* ═══ Z-INDEX SCALE ═══ */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;

    /* ═══ LAYOUT ═══ */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 72px;
    --mobile-nav-height: 72px;
    --content-max-width: 1440px;
}

/* ─────────────────────────────────────────────────────────────────────
   ☀️ LIGHT THEME
   Clean, professional, high contrast
   ───────────────────────────────────────────────────────────────────── */
:root, [data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-subtle: #e2e8f0;
    --bg-inset: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.80);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --text-link: var(--emerald-600);
    --text-link-hover: var(--emerald-700);

    --border-default: #e2e8f0;
    --border-muted: #f1f5f9;
    --border-emphasis: #cbd5e1;
    --border-focus: var(--emerald-500);

    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.03);
    --card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    --card-active-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-border-hover: #9ca3af;
    --input-border-focus: var(--emerald-500);
    --input-placeholder: #9ca3af;

    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --sidebar-surface: rgba(255, 255, 255, 0.04);
    --sidebar-text: #e2e8f0;
    --sidebar-text-muted: #94a3b8;
    --sidebar-active-bg: rgba(16, 185, 129, 0.12);
    --sidebar-active-text: var(--emerald-400);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-border: rgba(255, 255, 255, 0.08);

    --overlay-bg: rgba(15, 23, 42, 0.5);
    --backdrop-blur: blur(12px);

    --gradient-income: linear-gradient(135deg, var(--emerald-400) 0%, var(--emerald-600) 100%);
    --gradient-expense: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
    --gradient-savings: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
    --gradient-budget: linear-gradient(135deg, var(--violet-500) 0%, var(--violet-600) 100%);
    --gradient-danger: linear-gradient(135deg, var(--rose-500) 0%, var(--rose-600) 100%);
}

/* ─────────────────────────────────────────────────────────────────────
   🌙 DARK THEME
   Rich, immersive, OLED-friendly
   ───────────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
    --bg-base: #0a0c10;
    --bg-surface: #12151c;
    --bg-elevated: #181c26;
    --bg-muted: #1e232f;
    --bg-subtle: #262d3d;
    --bg-inset: #0d0f14;
    --bg-glass: rgba(18, 21, 28, 0.85);

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;
    --text-link: var(--emerald-400);
    --text-link-hover: var(--emerald-300);

    --border-default: #2d3748;
    --border-muted: #1e232f;
    --border-emphasis: #4a5568;
    --border-focus: var(--emerald-400);

    --card-bg: #12151c;
    --card-border: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.2);
    --card-hover-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    --card-active-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);

    --input-bg: #181c26;
    --input-border: #374151;
    --input-border-hover: #4b5563;
    --input-border-focus: var(--emerald-400);
    --input-placeholder: #6b7280;

    --sidebar-bg: linear-gradient(180deg, #0a0c10 0%, #12151c 50%, #0a0c10 100%);
    --sidebar-surface: rgba(255, 255, 255, 0.03);
    --sidebar-text: #e2e8f0;
    --sidebar-text-muted: #64748b;
    --sidebar-active-bg: rgba(16, 185, 129, 0.10);
    --sidebar-active-text: var(--emerald-400);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.04);
    --sidebar-border: rgba(255, 255, 255, 0.05);

    --overlay-bg: rgba(0, 0, 0, 0.75);
    --backdrop-blur: blur(16px);

    /* Dark mode semantic color adjustments */
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
}

/* ─────────────────────────────────────────────────────────────────────
   🔧 BASE RESET & GLOBAL STYLES
   ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

html, body {
    height: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-muted);
}

::-webkit-scrollbar-thumb {
    background: var(--border-emphasis);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Focus Styles - Accessibility */
:focus-visible {
    outline: var(--ring-width) solid var(--ring-color);
    outline-offset: var(--ring-offset);
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Selection */
::selection {
    background-color: var(--emerald-200);
    color: var(--emerald-900);
}

[data-theme="dark"] ::selection {
    background-color: var(--emerald-800);
    color: var(--emerald-100);
}

/* ─────────────────────────────────────────────────────────────────────
   📝 TYPOGRAPHY SYSTEM
   ───────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--text-primary);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin: 0;
}

h1 {
    font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
    font-weight: 800;
    letter-spacing: var(--tracking-tighter);
}

h2 {
    font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
    letter-spacing: -0.02em;
}

h3 {
    font-size: var(--text-xl);
    letter-spacing: -0.015em;
}

h4 {
    font-size: var(--text-lg);
    font-weight: 600;
}

h5 {
    font-size: var(--text-base);
    font-weight: 600;
}

h6 {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

p {
    line-height: var(--leading-relaxed);
}

/* Text Utilities */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

.font-mono { font-family: var(--font-mono); }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.uppercase {
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────────────
   💰 FINANCIAL TYPOGRAPHY
   Tabular figures for aligned numbers
   ───────────────────────────────────────────────────────────────────── */
.currency-display {
    font-family: var(--font-mono);
    font-weight: 600;
    font-feature-settings: 'tnum' on, 'lnum' on, 'cv01' on;
    letter-spacing: -0.015em;
}

.currency-positive { color: var(--success); }
.currency-negative { color: var(--danger); }

.currency-xl {
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: var(--leading-none);
}

.currency-large {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: var(--leading-tight);
}

.currency-medium {
    font-size: var(--text-xl);
    font-weight: 600;
}

.currency-small {
    font-size: var(--text-base);
}

/* Percentage Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    white-space: nowrap;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info);
}

.badge-neutral {
    background-color: var(--bg-muted);
    color: var(--text-tertiary);
}

.percentage-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
}

.percentage-badge.positive {
    background-color: var(--success-light);
    color: var(--success);
}

.percentage-badge.negative {
    background-color: var(--danger-light);
    color: var(--danger);
}

.percentage-badge.neutral {
    background-color: var(--bg-muted);
    color: var(--text-tertiary);
}

/* ─────────────────────────────────────────────────────────────────────
   📐 LAYOUT SYSTEM
   ───────────────────────────────────────────────────────────────────── */
.app-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content-area {
    flex: 1;
    padding: var(--space-6);
    background: var(--bg-base);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.content-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
}

/* Grid Layouts */
.dashboard-grid {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .dashboard-grid {
        gap: var(--space-6);
    }
}

.grid-2 {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-3 {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─────────────────────────────────────────────────────────────────────
   🃏 PREMIUM KPI CARDS
   Glass morphism with gradient accents
   ───────────────────────────────────────────────────────────────────── */
.kpi-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--card-shadow);
    transition: 
        transform var(--duration-normal) var(--ease-out-expo),
        box-shadow var(--duration-normal) var(--ease-out-expo),
        border-color var(--duration-fast);
    overflow: hidden;
    isolation: isolate;
}

.kpi-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(16, 185, 129, 0.02));
    opacity: 0;
    transition: opacity var(--duration-normal);
    pointer-events: none;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--border-emphasis);
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity var(--duration-normal);
}

.kpi-card:hover .kpi-card-accent {
    opacity: 1;
}

.kpi-card-accent.income { background: var(--gradient-income); }
.kpi-card-accent.expense { background: var(--gradient-expense); }
.kpi-card-accent.savings { background: var(--gradient-savings); }
.kpi-card-accent.budget { background: var(--gradient-budget); }

.kpi-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.kpi-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    flex-shrink: 0;
    transition: transform var(--duration-normal) var(--ease-spring);
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.05);
}

.kpi-icon.income {
    background: var(--gradient-income);
    color: white;
    box-shadow: var(--shadow-emerald);
}

.kpi-icon.expense {
    background: var(--gradient-expense);
    color: white;
    box-shadow: var(--shadow-orange);
}

.kpi-icon.savings {
    background: var(--gradient-savings);
    color: white;
    box-shadow: var(--shadow-blue);
}

.kpi-icon.budget {
    background: var(--gradient-budget);
    color: white;
    box-shadow: var(--shadow-purple);
}

.kpi-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-bottom: var(--space-1);
}

.kpi-value {
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
    margin-bottom: var(--space-1);
}

.kpi-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Legacy stat-card support */
.stat-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--card-shadow);
    transition: 
        transform var(--duration-normal) var(--ease-out-expo),
        box-shadow var(--duration-normal) var(--ease-out-expo);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-income);
    opacity: 0;
    transition: opacity var(--duration-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.stat-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    flex-shrink: 0;
}

.stat-card-icon.income {
    background: var(--gradient-income);
    color: white;
    box-shadow: var(--shadow-emerald);
}

.stat-card-icon.expense {
    background: var(--gradient-expense);
    color: white;
    box-shadow: var(--shadow-orange);
}

.stat-card-icon.savings {
    background: var(--gradient-savings);
    color: white;
    box-shadow: var(--shadow-blue);
}

.stat-card-icon.budget {
    background: var(--gradient-budget);
    color: white;
    box-shadow: var(--shadow-purple);
}

.stat-card-title {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.stat-card-value {
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-2) 0;
    letter-spacing: -0.02em;
}

.stat-card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ─────────────────────────────────────────────────────────────────────
   📊 PROGRESS BARS
   ───────────────────────────────────────────────────────────────────── */
.progress-container {
    margin-top: var(--space-4);
}

.progress-bar {
    height: 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out-expo);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-fill.safe { background: var(--gradient-income); }
.progress-fill.warning { background: linear-gradient(90deg, var(--warning), var(--warning-dark)); }
.progress-fill.danger { background: var(--gradient-danger); }

/* Budget Progress */
.budget-progress-container {
    margin-top: var(--space-4);
}

.budget-progress-bar {
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.budget-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out-expo);
}

.budget-progress-fill.safe {
    background: var(--gradient-income);
}

.budget-progress-fill.warning {
    background: linear-gradient(90deg, var(--warning), var(--warning-dark));
}

.budget-progress-fill.danger {
    background: var(--gradient-danger);
}

/* ─────────────────────────────────────────────────────────────────────
   📋 BUDGET CATEGORY ITEMS
   ───────────────────────────────────────────────────────────────────── */
.budget-category-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.budget-category-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    transition: 
        border-color var(--duration-fast),
        box-shadow var(--duration-fast),
        transform var(--duration-fast) var(--ease-out-expo);
}

.budget-category-item:hover {
    border-color: var(--border-emphasis);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.budget-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.budget-category-name {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
    color: var(--text-primary);
}

.budget-category-icon {
    font-size: 1.25rem;
}

.budget-category-amounts {
    text-align: right;
}

.budget-spent {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--text-primary);
}

.budget-planned {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────────
   📜 TRANSACTION LIST
   ───────────────────────────────────────────────────────────────────── */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-surface);
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    transition: 
        background-color var(--duration-fast),
        border-color var(--duration-fast),
        transform var(--duration-fast) var(--ease-out-expo),
        box-shadow var(--duration-fast);
    cursor: pointer;
}

.transaction-item:hover {
    background: var(--bg-muted);
    border-color: var(--border-default);
    transform: translateX(6px);
    box-shadow: var(--shadow-sm);
}

.transaction-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: var(--bg-muted);
    transition: transform var(--duration-fast) var(--ease-spring);
}

.transaction-item:hover .transaction-icon {
    transform: scale(1.05);
}

.transaction-details {
    flex: 1;
    min-width: 0;
}

.transaction-name {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: 2px;
}

.transaction-amount {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: var(--text-sm);
    text-align: right;
}

.transaction-amount.income { color: var(--success); }
.transaction-amount.expense { color: var(--danger); }

/* ─────────────────────────────────────────────────────────────────────
   🎯 SAVINGS GOALS
   ───────────────────────────────────────────────────────────────────── */
.savings-goal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--card-shadow);
    transition: 
        box-shadow var(--duration-normal),
        transform var(--duration-normal) var(--ease-out-expo);
}

.savings-goal-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.savings-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.savings-goal-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.savings-goal-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-lg);
    background: var(--gradient-income);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-emerald);
}

.savings-goal-title {
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--text-primary);
}

.savings-goal-target {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

.savings-goal-progress {
    margin: var(--space-4) 0;
}

.savings-goal-bar {
    height: 12px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.savings-goal-fill {
    height: 100%;
    background: var(--gradient-income);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.savings-goal-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2.5s ease-in-out infinite;
}

.savings-goal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-3);
}

.savings-goal-current {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--emerald-500);
}

.savings-goal-remaining {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────
   📊 CHART CONTAINERS
   ───────────────────────────────────────────────────────────────────── */
.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--card-shadow);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.chart-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: var(--tracking-tight);
}

.chart-legend {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

/* ─────────────────────────────────────────────────────────────────────
   📝 FORMS & INPUTS
   ───────────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    transition: 
        border-color var(--duration-fast),
        box-shadow var(--duration-fast),
        background-color var(--duration-fast);
}

.form-input::placeholder {
    color: var(--input-placeholder);
}

.form-input:hover,
.form-select:hover {
    border-color: var(--input-border-hover);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--input-border-focus);
    box-shadow: 
        0 0 0 4px rgba(16, 185, 129, 0.1),
        var(--shadow-sm);
}

.form-input.currency {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    font-weight: 600;
    text-align: right;
}

.form-select {
    cursor: pointer;
    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='%2364748b' 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);
}

.form-input.valid {
    border-color: var(--success);
}

.form-input.invalid {
    border-color: var(--danger);
}

.validation-message {
    color: var(--danger);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
}

/* ─────────────────────────────────────────────────────────────────────
   🔘 BUTTONS
   ───────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: 
        background-color var(--duration-fast),
        box-shadow var(--duration-fast),
        transform var(--duration-fast) var(--ease-out-expo),
        opacity var(--duration-fast);
    user-select: none;
}

.btn:focus-visible {
    outline: var(--ring-width) solid var(--ring-color);
    outline-offset: var(--ring-offset);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gradient-income);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-700) 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
    background: var(--bg-muted);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-subtle);
    border-color: var(--border-emphasis);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-muted);
    color: var(--text-primary);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-lg);
}

.btn-icon-lg {
    width: 3rem;
    height: 3rem;
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: var(--radius-xl);
}

/* ─────────────────────────────────────────────────────────────────────
   ⚠️ ALERTS & NOTIFICATIONS
   ───────────────────────────────────────────────────────────────────── */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.alert-success {
    background: var(--success-light);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success-dark);
}

.alert-warning {
    background: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning-dark);
}

.alert-danger {
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-dark);
}

.alert-info {
    background: var(--info-light);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--info-dark);
}

[data-theme="dark"] .alert-warning { color: var(--warning); }
[data-theme="dark"] .alert-danger { color: var(--danger); }
[data-theme="dark"] .alert-success { color: var(--success); }
[data-theme="dark"] .alert-info { color: var(--info); }

.budget-alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.budget-alert.over-budget {
    background: var(--danger-light);
    border-left: 4px solid var(--danger);
}

.budget-alert.near-limit {
    background: var(--warning-light);
    border-left: 4px solid var(--warning);
}

/* ─────────────────────────────────────────────────────────────────────
   🫥 EMPTY STATES
   ───────────────────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    text-align: center;
}

.empty-state-icon {
    font-size: 4.5rem;
    margin-bottom: var(--space-6);
    opacity: 0.6;
    filter: grayscale(0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.empty-state-description {
    color: var(--text-muted);
    margin-bottom: var(--space-8);
    max-width: 360px;
    line-height: var(--leading-relaxed);
}

/* ─────────────────────────────────────────────────────────────────────
   🖼️ MODALS & DRAWERS
   ───────────────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: var(--backdrop-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    padding: var(--space-4);
    animation: fadeIn var(--duration-normal) var(--ease-out-expo);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - var(--space-8));
    max-height: calc(100dvh - var(--space-8));
    overflow: auto;
    animation: slideUp var(--duration-slow) var(--ease-out-expo);
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(32px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-default);
    background: var(--bg-muted);
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    position: sticky;
    bottom: 0;
}

/* ─────────────────────────────────────────────────────────────────────
   🔖 TABS
   ───────────────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-muted);
    padding: var(--space-1);
    border-radius: var(--radius-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    white-space: nowrap;
    transition: 
        color var(--duration-fast),
        background-color var(--duration-fast),
        box-shadow var(--duration-fast);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ─────────────────────────────────────────────────────────────────────
   📄 PAGE LAYOUT
   ───────────────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.page-title {
    font-size: clamp(var(--text-xl), 4vw, var(--text-2xl));
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin-top: var(--space-1);
    font-weight: 400;
}

.page-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

.content-section {
    margin-bottom: var(--space-8);
}

.section-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ─────────────────────────────────────────────────────────────────────
   📅 MONTH SELECTOR
   ───────────────────────────────────────────────────────────────────── */
.month-selector {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-1);
}

.month-selector-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    transition: 
        background-color var(--duration-fast),
        color var(--duration-fast),
        transform var(--duration-fast);
}

.month-selector-btn:hover:not(:disabled) {
    background: var(--bg-muted);
    color: var(--text-primary);
}

.month-selector-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.month-selector-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.month-selector-display {
    padding: 0 var(--space-4);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    min-width: 140px;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────────────
   💀 SKELETON LOADERS
   ───────────────────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-muted) 25%,
        var(--bg-subtle) 50%,
        var(--bg-muted) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-wave 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-2);
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-2xl);
}

/* ─────────────────────────────────────────────────────────────────────
   📱 MOBILE NAVIGATION
   ───────────────────────────────────────────────────────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: var(--backdrop-blur);
    border-top: 1px solid var(--border-default);
    padding: var(--space-2) var(--space-3);
    padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
    z-index: var(--z-fixed);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: 
        color var(--duration-fast),
        background-color var(--duration-fast);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: var(--text-primary);
    background: var(--bg-muted);
}

.mobile-nav-item.active {
    color: var(--emerald-500);
}

.mobile-nav-icon {
    font-size: 1.375rem;
    line-height: 1;
}

.mobile-nav-label {
    font-size: var(--text-xs);
    font-weight: 500;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }
    
    .content-area {
        padding-bottom: calc(var(--mobile-nav-height) + var(--space-4));
    }
}

/* ─────────────────────────────────────────────────────────────────────
   📱 RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions {
        width: 100%;
        justify-content: space-between;
    }

    .stat-card-value,
    .kpi-value {
        font-size: var(--text-xl);
    }

    .chart-container {
        padding: var(--space-4);
    }

    .modal-content {
        margin: var(--space-4);
        max-height: calc(100vh - var(--space-8));
        max-height: calc(100dvh - var(--space-8));
        border-radius: var(--radius-xl);
    }

    .page-title {
        font-size: var(--text-xl);
    }
    
    .content-area {
        padding: var(--space-4);
    }
}

@media (max-width: 480px) {
    .month-selector-display {
        min-width: 100px;
        font-size: var(--text-xs);
    }

    .btn {
        padding: var(--space-3) var(--space-4);
    }

    .stat-card,
    .kpi-card {
        padding: var(--space-4);
    }
    
    .kpi-value {
        font-size: var(--text-lg);
    }
    
    .transaction-item {
        padding: var(--space-3);
        gap: var(--space-3);
    }
    
    .transaction-icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────
   🎭 ANIMATIONS
   ───────────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp var(--duration-slow) var(--ease-out-expo) forwards;
}

.animate-delay-1 { animation-delay: 50ms; }
.animate-delay-2 { animation-delay: 100ms; }
.animate-delay-3 { animation-delay: 150ms; }
.animate-delay-4 { animation-delay: 200ms; }

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp var(--duration-slow) var(--ease-out-expo) forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 50ms; }
.stagger-children > *:nth-child(3) { animation-delay: 100ms; }
.stagger-children > *:nth-child(4) { animation-delay: 150ms; }
.stagger-children > *:nth-child(5) { animation-delay: 200ms; }
.stagger-children > *:nth-child(6) { animation-delay: 250ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────
   🔧 UTILITY CLASSES
   ───────────────────────────────────────────────────────────────────── */
.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;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ─────────────────────────────────────────────────────────────────────
   🏛️ LEGACY STYLES PRESERVED
   ───────────────────────────────────────────────────────────────────── */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid var(--success);
    outline-offset: 0;
}

.invalid {
    outline: 2px solid var(--danger);
    outline-offset: 0;
}

.button-link {
    text-decoration: none;
}

#blazor-error-ui {
    background: var(--warning-light);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: var(--space-4) var(--space-5);
    position: fixed;
    width: 100%;
    z-index: var(--z-toast);
    color: var(--warning-dark);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: var(--space-4);
    top: var(--space-3);
}

.title {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-bottom: var(--space-3);
}

.title.title-secondary {
    padding-top: var(--space-2);
    padding-bottom: 0;
    color: var(--text-secondary);
}

.title-header-text {
    font-size: var(--text-4xl);
    line-height: var(--leading-tight);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    padding: var(--space-2) 0;
}

.title-content-text {
    font-size: var(--text-2xl);
    font-weight: 400;
    line-height: var(--leading-snug);
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: var(--space-6);
}

.block-content {
    width: 31.25rem;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 100%;
}

.or {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.or .or-line {
    border-bottom: 1px solid var(--border-default);
    width: 100%;
}

.or .or-text {
    padding: 0 var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.links-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-top: var(--space-3);
}

.links-container {
    display: flex;
    gap: var(--space-1);
    justify-content: center;
    align-items: center;
}

.links-container .dot {
    height: 5px;
    width: 5px;
    margin: 0 3px;
    border-radius: var(--radius-full);
    background-color: var(--text-muted);
}

.manage-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.info-message {
    padding: var(--space-3) var(--space-4);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--info-light);
    border-radius: var(--radius-lg);
    color: var(--info);
}

.info-message.info-panel {
    margin-bottom: var(--space-3);
}

.manage-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.large-input {
    height: 4.3125rem;
    font-size: var(--text-3xl);
}

.title-content-text-secondary {
    font-size: var(--text-xl);
    line-height: var(--leading-snug);
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: var(--space-3);
}

.confirm-button {
    margin-top: var(--space-2);
}

.display-desktop {
    display: block;
}

.display-mobile {
    display: none;
}

.hidden {
    display: none !important;
}

.icon-external-provider {
    width: 1rem;
    height: 1rem;
}

.icon-google {
    background-image: url("/images/account/providers/google-logo.svg");
}

.icon-facebook {
    background-image: url("/images/account/providers/facebook-logo.svg");
}

.icon-microsoft {
    background-image: url("/images/account/providers/microsoft-logo.svg");
}

.icon-twitter {
    background-image: url("/images/account/providers/x-logo.svg");
}

@media (max-width: 768px) {
    .display-desktop {
        display: none;
    }

    .display-mobile {
        display: block;
    }
}

/* DevExpress Grid Overrides */
.budget-grid {
    border-radius: var(--radius-xl);
    overflow: hidden;
}
