﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
/* Modern color scheme */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #d8cec0 0%, #F5F5DC 100%);
    min-height: 100vh;
    margin: 0;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

    .page-header h2 {
        color: var(--primary-color);
        margin: 0;
        font-size: 2.5em;
        font-weight: 600;
    }

    .page-header p {
        color: #666;
        margin-top: 10px;
        font-size: 1.1em;
    }

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.form-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

    .form-card h3 {
        color: var(--primary-color);
        margin-bottom: 20px;
        font-size: 1.5em;
        font-weight: 600;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: var(--primary-color);
    }

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

    .form-input:focus {
        outline: none;
        border-color: var(--secondary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

.admin-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.results-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

    .results-card h3 {
        color: var(--primary-color);
        margin-bottom: 20px;
        font-size: 1.5em;
        font-weight: 600;
    }

.savings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

    .savings-table th {
        background: #F5F5DC;
        padding: 15px;
        text-align: left;
        font-weight: 600;
        color: var(--primary-color);
        border-bottom: 2px solid #e0e0e0;
    }

    .savings-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e0e0e0;
    }

    .savings-table .highlight {
        background: var(--success-color);
        color: white;
        font-weight: 600;
        padding: 8px 12px;
        border-radius: 6px;
        text-align: center;
        white-space: nowrap; /* Prevent text from breaking into two lines */
        display: inline-block; /* Keeps it sized properly within the table */
        min-width: 80px; /* Slightly wider to accommodate longer text like "12 Months" */
        vertical-align: middle;
    }


.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

    .chart-card h3 {
        color: var(--primary-color);
        margin-bottom: 20px;
        font-size: 1.3em;
        font-weight: 600;
        text-align: center;
    }

.chart-container {
    position: relative;
    height: 250px;
    margin-bottom: 20px;
}




/* Buttons Section - Side by Side and Smaller */
.buttons-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.btn-modern {
    background: linear-gradient(135deg, #DB7F67 0%, #c96f5a 100%);
    color: #f9f9f9;
    border: none;
    padding: 0.75rem 1.5rem; /* Reduced from 1rem 2rem */
    border-radius: 0.75rem;
    font-size: 1rem; /* Reduced from 1.1rem */
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(219, 127, 103, 0.3);
    position: relative;
    overflow: hidden;
    width: auto; /* Changed from 100% */
    min-width: 160px; /* Added minimum width */
    margin-top: 0; /* Removed top margin */
    flex: 0 0 auto; /* Don't grow or shrink */
}

    .btn-modern::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s ease;
    }

    .btn-modern:hover::before {
        left: 100%;
    }

    .btn-modern:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(219, 127, 103, 0.4);
    }

    .btn-modern:active {
        transform: translateY(-1px);
    }

/* Responsive Design for Buttons */
@media (max-width: 768px) {
    .buttons-section {
        flex-direction: column;
        gap: 15px;
    }

    .btn-modern {
        width: 100%;
        max-width: 250px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .btn-modern {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 200px;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(219, 127, 103, 0.3);
    }

    50% {
        box-shadow: 0 8px 25px rgba(219, 127, 103, 0.6);
    }

    100% {
        box-shadow: 0 8px 25px rgba(219, 127, 103, 0.3);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn {
        padding: 15px 30px;
        font-size: 14px;
        margin: 10px 5px;
        min-width: 150px;
    }

    .buttons-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .btn {
        display: block;
        width: 100%;
        max-width: 280px;
        margin: 10px auto;
    }
}

.monthly-payment-section {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--success-color);
}

    .monthly-payment-section h4 {
        color: var(--success-color);
        margin-bottom: 15px;
    }

.note-text {
    font-size: 14px;
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

.table-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

/* UPDATED MODERN AMORTIZATION TABLE STYLING - MATCHING ENROLL.ASPX */
.amortization-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

    .amortization-table th {
        background: linear-gradient(135deg, #DB7F67 0%, #c96f5a 100%);
        color: white;
        padding: 1rem;
        text-align: center;
        font-weight: 600;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .amortization-table td {
        padding: 0.75rem;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.9rem;
        color: #333;
    }

    .amortization-table tr:nth-child(even) {
        background: rgba(219, 127, 103, 0.02);
    }

    .amortization-table tr:hover {
        background: rgba(219, 127, 103, 0.05);
        transition: background-color 0.2s ease;
    }

    .amortization-table tr:last-child td {
        border-bottom: none;
    }

/* Amortization Table Container with Modern Styling */
.amortization-container {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-x: auto;
}

    .amortization-container h3 {
        color: var(--primary-color);
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        text-align: center;
        position: relative;
    }

        .amortization-container h3::after {
            content: '';
            position: absolute;
            bottom: -0.5rem;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 3px;
            background: linear-gradient(90deg, #DB7F67, #F4CFC6);
            border-radius: 2px;
        }

/* Special styling for different row types in amortization table */
.amortization-table .debit-row {
    background: rgba(52, 152, 219, 0.05);
    font-weight: 500;
}

.amortization-table .payment-row {
    background: rgba(39, 174, 96, 0.05);
    font-weight: 500;
}

.amortization-table .summary-row {
    background: rgba(219, 127, 103, 0.1);
    font-weight: 600;
    border-top: 2px solid #DB7F67;
}

/* Responsive design for amortization table */
@media (max-width: 1024px) {
    .amortization-table {
        font-size: 0.8rem;
    }

        .amortization-table th,
        .amortization-table td {
            padding: 0.5rem;
        }
}

@media (max-width: 768px) {
    .amortization-container {
        padding: 1rem;
        margin-top: 2rem;
    }

    .amortization-table {
        font-size: 0.75rem;
    }

        .amortization-table th,
        .amortization-table td {
            padding: 0.4rem 0.2rem;
        }
}

/* Enhanced table styling for better visual hierarchy */
.amortization-table .currency {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.amortization-table .date {
    font-weight: 500;
    color: #666;
}

.amortization-table .type {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.checkboxes-section {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 20px;
}

.checkbox-group {
    display: inline-flex;
    gap: 30px;
    align-items: center;
}

    .checkbox-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-weight: 600;
        color: var(--primary-color);
    }


.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Three equal columns */
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px; /* Ensures consistent height for proper centering */
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}


@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 15px;
    }
}
