:root {
 
            --accent-color: #003366;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --info-color: #17a2b8;
            --finance-color: #20c997;
        }
          .page-header {
            background: linear-gradient(135deg, rgba(51, 153, 255, 0.4) 0%, rgba(0, 51, 102, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(0, 102, 204, 0.2);
            position: relative;
            overflow: hidden;   color: var(--text-color);
        }
        .breadcrumb {
            background-color: transparent;
            padding: 0.5rem 0;
            margin-bottom: 0.5rem;
        }
        .breadcrumb-item a {
            color: var(--text-muted);
            text-decoration: none;
        }
        .breadcrumb-item.active {
            color: var(--text-color);
        }
        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
        }
        .input-error {
            border-color: var(--danger-color) !important;
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
        }
        .error-message {
            color: var(--danger-color);
            font-size: 0.875rem;
            margin-top: 0.25rem;
            display: none;
        }
        .slider-container {
            margin-bottom: 1.5rem;
        }
        .slider-value {
            font-weight: 600;
            color: var(--primary-color);
            font-size: 1.1rem;
        }
        .slider-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        .custom-slider {
            width: 100%;
            height: 8px;
            border-radius: 4px;
            background: #ddd;
            outline: none;
            -webkit-appearance: none;
        }
        .custom-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--primary-color);
            cursor: pointer;
            border: 3px solid white;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .summary-container {
            background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(51, 153, 255, 0.05) 100%);
            border-radius: 8px;
            padding: 1.5rem;
            margin-top: 1.5rem;
            border: 1px solid rgba(0, 102, 204, 0.2);
        }
        .summary-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
        .summary-row {
            display: flex;
            justify-content: space-between;
            padding: 0.75rem 0;
            border-bottom: 1px dashed rgba(0,0,0,0.1);
        }
        .summary-row:last-child {
            border-bottom: none;
            font-weight: 700;
            font-size: 1.2rem;
            color: var(--primary-color);
        }
        .virtual-scroll-container {
            max-height: 400px;
            overflow-y: auto;
            margin-top: 1.5rem;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            position: relative;
        }
        .amortization-table {
            width: 100%;
            border-collapse: collapse;
            margin: 0;
        }
        .amortization-table th {
            background-color: var(--light-gray);
            position: sticky;
            top: 0;
            z-index: 10;
            font-weight: 600;
            padding: 0.75rem;
            text-align: left;
            border-bottom: 2px solid var(--border-color);
        }
        .amortization-table td {
            padding: 0.75rem;
            border-bottom: 1px solid var(--border-color);
        }
        .amortization-table tr:nth-child(even) {
            background-color: rgba(0, 102, 204, 0.03);
        }
        .amortization-table tr:hover {
            background-color: rgba(0, 102, 204, 0.08);
        }
        .pagination-container {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 1rem;
            gap: 0.5rem;
        }
        .pagination-btn {
            padding: 0.5rem 1rem;
            border: 1px solid var(--border-color);
            background-color: white;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .pagination-btn:hover:not(:disabled) {
            background-color: var(--light-gray);
            border-color: var(--primary-color);
        }
        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .page-info {
            font-weight: 600;
            color: var(--primary-color);
        }
        .breakdown-container {
            display: flex;
            align-items: center;
            margin: 1.5rem 0;
        }
        .breakdown-chart {
            flex: 0 0 150px;
            height: 150px;
            margin-right: 1.5rem;
        }
        .breakdown-legend {
            flex: 1;
        }
        .legend-item {
            display: flex;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 4px;
            margin-right: 0.75rem;
        }
        .legend-label {
            flex: 1;
        }
        .legend-value {
            font-weight: 600;
            color: var(--text-color);
        }
        .comparison-card {
            background: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        .comparison-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
        .saved-scenario-card {
            background: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 1.25rem;
            margin-bottom: 1rem;
            transition: all 0.3s;
        }
        .saved-scenario-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .scenario-name {
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }
        .scenario-details {
            font-size: 0.9rem;
            color: var(--text-muted);
        }
        .scenario-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 1rem;
        }
        .affordability-container {
            background-color: rgba(32, 201, 151, 0.05);
            border-left: 4px solid var(--finance-color);
            padding: 1.5rem;
            border-radius: 0 8px 8px 0;
            margin: 1.5rem 0;
        }
        @media (max-width: 768px) {
            .breakdown-container {
                flex-direction: column;
                align-items: flex-start;
            }
            .breakdown-chart {
                margin-right: 0;
                margin-bottom: 1.5rem;
            }
        }
        .nav-tabs {
            border-bottom: 1px solid var(--border-color);
        }
        .nav-tabs .nav-tabs .preset-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin: 1rem 0;
        }
        .preset-btn {
            background-color: rgba(0, 102, 204, 0.1);
            border: 1px solid rgba(0, 102, 204, 0.2);
            border-radius: 4px;
            padding: 0.5rem 0.75rem;
            font-size: 0.9rem;
            color: var(--primary-color);
            cursor: pointer;
            transition: all 0.2s;
        }
        .preset-btn:hover {
            background-color: rgba(0, 102, 204, 0.2);
            transform: translateY(-2px);
        }
        .term-options {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin: 1rem 0;
        }
        .term-option {
            padding: 0.5rem 1rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .term-option:hover {
            background-color: rgba(0, 102, 204, 0.1);
        }
        .term-option.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        .currency {
            font-family: 'Courier New', monospace;
            font-weight: 600;
        }
        .offline-indicator {
            position: fixed;
            top: 80px;
            right: 20px;
            background-color: var(--warning-color);
            color: #000;
            padding: 0.5rem 1rem;
            border-radius: 4px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            z-index: 1000;
            display: none;
            animation: slideIn 0.3s ease-out;
        }
        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        .chart-error {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            text-align: center;
            padding: 2rem;
        }
        .chart-error i {
            font-size: 3rem;
            margin-bottom: 1rem;
            opacity: 0.5;
        }
        .skeleton {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
            border-radius: 4px;
        }
        @keyframes loading {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }