/* ==================== CSS VARIABLES ==================== */
        :root {
            /* Primary Colors - Sophisticated Financial Theme */
            --primary-dark: #0a2540;
            --primary-blue: #1a73e8;
            --primary-light: #e8f4f8;
            --accent-gold: #f5a623;
            --accent-green: #10b981;
            --accent-red: #ef4444;
            
            /* Neutral Colors */
            --white: #ffffff;
            --bg-light: #f8fafc;
            --bg-card: #ffffff;
            --border-color: #e2e8f0;
            --text-dark: #0f172a;
            --text-gray: #64748b;
            --text-light: #94a3b8;
            
            /* Shadows */
            --shadow-sm: 0 2px 8px rgba(10, 37, 64, 0.08);
            --shadow-md: 0 4px 16px rgba(10, 37, 64, 0.12);
            --shadow-lg: 0 8px 32px rgba(10, 37, 64, 0.16);
            
            /* Typography */
            --font-display: 'Lato', sans-serif;
            --font-body: 'Lato', sans-serif;
        }

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

        body {
            font-family: var(--font-body);
            background: var(--bg-light);
            color: var(--text-dark);
            line-height: 1.6;
            overflow-x: hidden;
        }

        

        /* ==================== NAVIGATION TABS ==================== */
        .nav-tabs {
            background: var(--white);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow-sm);
        }

        .nav-tabs-container {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            overflow-x: auto;
            scrollbar-width: thin;
        }

        .nav-tab {
            flex: 1;
            min-width: 150px;
            padding: 1.2rem 1.5rem;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-family: var(--font-body);
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-gray);
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .nav-tab:hover {
            background: var(--bg-light);
            color: var(--primary-blue);
        }

        .nav-tab.active {
            color: var(--primary-blue);
            border-bottom-color: var(--primary-blue);
            background: var(--primary-light);
        }

        /* ==================== MAIN CONTAINER ==================== */
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding-top: 4rem;
        }

        .tab-content {
            display: none;
            animation: fadeIn 0.4s ease;
        }

        .tab-content.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ==================== GRID LAYOUT ==================== */
        .calculator-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin-bottom: 2rem;
        }

        /* ==================== CARDS ==================== */
        .card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 2rem;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-color);
        }

        .card-header {
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--border-color);
        }

        .card-title {
            font-family: var(--font-display);
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary-dark);
            margin-bottom: 0.5rem;
        }

        .card-subtitle {
            font-size: 0.9rem;
            color: var(--text-gray);
            font-weight: 400;
        }

        /* ==================== FORM ELEMENTS ==================== */
        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-label {
            display: block;
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-dark);
            margin-bottom: 0.5rem;
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-prefix {
            position: absolute;
            left: 1rem;
            color: var(--primary-blue);
            font-weight: 600;
            pointer-events: none;
        }

        .input-suffix {
            position: absolute;
            right: 1rem;
            color: var(--text-gray);
            font-size: 0.9rem;
            pointer-events: none;
        }

        .form-input {
            width: 100%;
            padding: 0.9rem 3rem 0.9rem 2.5rem;
            border: 2px solid var(--border-color);
            border-radius: 10px;
            font-size: 1rem;
            font-family: var(--font-body);
            transition: all 0.3s ease;
            background: var(--white);
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary-blue);
            box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
        }

        .form-input:disabled {
            background: var(--bg-light);
            cursor: not-allowed;
        }

        /* Range Slider */
        .range-slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 5px;
            background: var(--border-color);
            outline: none;
            padding: 0;
        }

        .range-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary-blue);
            cursor: pointer;
            box-shadow: var(--shadow-sm);
            transition: all 0.3s ease;
        }

        .range-slider::-webkit-slider-thumb:hover {
            transform: scale(1.2);
            box-shadow: var(--shadow-md);
        }

        .range-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary-blue);
            cursor: pointer;
            border: none;
            box-shadow: var(--shadow-sm);
        }

        .range-value {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--text-gray);
            margin-top: 0.5rem;
        }

        /* ==================== RESULTS ==================== */
        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .result-card {
            background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
            padding: 1.5rem;
            border-radius: 12px;
            border: 2px solid var(--border-color);
            text-align: center;
            transition: all 0.3s ease;
        }

        .result-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-md);
            border-color: var(--primary-blue);
        }

        .result-label {
            font-size: 0.85rem;
            color: var(--text-gray);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }

        .result-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary-dark);
            font-family: var(--font-display);
        }

        .result-value.primary { color: var(--primary-blue); }
        .result-value.success { color: var(--accent-green); }
        .result-value.warning { color: var(--accent-gold); }
        .result-value.danger { color: var(--accent-red); }

        /* ==================== CHART CONTAINER ==================== */
        .chart-container {
            background: var(--white);
            padding: 2rem;
            border-radius: 12px;
            margin-bottom: 2rem;
            box-shadow: var(--shadow-sm);
        }

        .chart-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary-dark);
            margin-bottom: 1.5rem;
        }

        /* ==================== TABLE ==================== */
        .table-wrapper {
            overflow-x: auto;
            border-radius: 12px;
            box-shadow: var(--shadow-sm);
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            background: var(--white);
        }

        .data-table thead {
            background: var(--primary-dark);
            color: var(--white);
        }

        .data-table th {
            padding: 1rem;
            text-align: left;
            font-weight: 600;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .data-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
            font-size: 0.95rem;
        }

        .data-table tbody tr:hover {
            background: var(--bg-light);
        }

        .data-table tbody tr:last-child td {
            border-bottom: none;
        }

        /* ==================== BUTTONS ==================== */
        .btn {
            padding: 0.9rem 2rem;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: var(--font-body);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary-blue) 0%, #1557b0 100%);
            color: var(--white);
            box-shadow: var(--shadow-sm);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .btn-secondary {
            background: var(--white);
            color: var(--primary-dark);
            border: 2px solid var(--border-color);
        }

        .btn-secondary:hover {
            background: var(--bg-light);
            border-color: var(--primary-blue);
        }

        .btn-group {
            display: flex;
            gap: 1rem;
            margin-top: 1.5rem;
        }

        /* ==================== COMPARISON CARDS ==================== */
        .comparison-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
        }

        .comparison-card {
            background: var(--white);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 1.5rem;
            position: relative;
            transition: all 0.3s ease;
        }

        .comparison-card:hover {
            border-color: var(--primary-blue);
            box-shadow: var(--shadow-md);
        }

        .comparison-badge {
            position: absolute;
            top: -12px;
            right: 1.5rem;
            background: var(--accent-green);
            color: var(--white);
            padding: 0.3rem 1rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
        }

        .comparison-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--primary-dark);
            margin-bottom: 1rem;
        }

        .comparison-detail {
            display: flex;
            justify-content: space-between;
            padding: 0.8rem 0;
            border-bottom: 1px solid var(--border-color);
        }

        .comparison-detail:last-child {
            border-bottom: none;
        }

        .comparison-label {
            font-size: 0.9rem;
            color: var(--text-gray);
        }

        .comparison-value {
            font-weight: 600;
            color: var(--primary-dark);
        }

        /* ==================== RESPONSIVE ==================== */
        @media (max-width: 1024px) {
            .calculator-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .header {
                padding: 2rem 1.5rem;
            }

            .container {
                padding: 1.5rem;
            }

            .nav-tab {
                padding: 1rem;
                font-size: 0.85rem;
            }

            .card {
                padding: 1.5rem;
            }

            .card-title {
                font-size: 1.5rem;
            }

            .result-value {
                font-size: 1.6rem;
            }

            .btn-group {
                flex-direction: column;
            }

            .btn {
                width: 100%;
            }
        }

        /* ==================== UTILITIES ==================== */
        .text-center { text-align: center; }
        .mt-2 { margin-top: 2rem; }
        .mb-2 { margin-bottom: 2rem; }
        .hidden { display: none; }

        /* ==================== DONUT CHART ==================== */
        .donut-chart {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3rem;
            flex-wrap: wrap;
        }

        .donut-svg {
            transform: rotate(-90deg);
        }

        .donut-legend {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
        }

        .legend-label {
            font-size: 0.9rem;
            color: var(--text-gray);
        }

        .legend-value {
            font-weight: 600;
            color: var(--primary-dark);
            margin-left: auto;
        }