/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Lighter background for minimalism */
    color: #212529; /* Darker text for better contrast */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 20px;
    padding-bottom: 40px; /* More space at bottom */
}

.container {
    width: 90%;
    max-width: 800px; /* Slightly reduced for a more focused view */
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px; /* Softer radius */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softer shadow */
    overflow: hidden;
}

header {
    background-color: #007bff; /* Primary blue */
    color: #ffffff;
    padding: 20px 25px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2em;
    font-weight: 600;
}

header p {
    margin: 4px 0 0;
    font-size: 0.9em;
    opacity: 0.85;
}

main {
    padding: 20px 25px;
}

.card {
    background-color: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6; /* Standard border */
}

.input-section h2, .results-section h2 {
    color: #343a40; /* Darker heading */
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.4em;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.input-section h3 {
    color: #495057;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
    font-size: 0.95em;
}

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="number"]:focus,
.form-group select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group input[readonly] {
    background-color: #e9ecef;
    cursor: default;
}

.info-text {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 12px;
    padding-left: 5px;
}

button#calculateBtnMain {
    display: block;
    width: 100%;
    padding: 12px 15px;
    background-color: #28a745; /* Green for primary action */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 15px;
}

button#calculateBtnMain:hover {
    background-color: #218838;
}

/* Results Section Specifics */
.results-section p {
    margin: 6px 0;
    font-size: 0.95em;
}

.comparison-table-container {
    overflow-x: auto; /* For smaller screens if table is wide */
    margin-top: 15px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em; /* Slightly smaller for more content */
}

.comparison-table th, .comparison-table td {
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.comparison-table thead th {
    background-color: #e9ecef; /* Light grey for table header */
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-table .highlight-row td {
    font-weight: 500;
}

.comparison-table .total-payable-row td {
    font-weight: bold;
    color: #007bff; /* Blue for total tax */
}

.lease-col.hidden, #leaseColumnHeader.hidden, #leaseDeductionRow.hidden {
    display: none;
}

.recommendation {
    margin-top: 20px;
    padding: 15px;
    background-color: #e6f7ff; /* Light blue for recommendation */
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.recommendation h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0056b3;
    font-size: 1.15em;
}

.savings-amount {
    font-weight: bold;
    color: #218838; /* Green for savings */
}

.savings-subsection {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px dashed #ced4da;
}

.savings-subsection h3 {
    font-size: 1.1em;
    color: #343a40;
    margin-bottom: 8px;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    padding: 18px 25px;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 0.85em;
    border-top: 1px solid #dee2e6;
}

footer p {
    margin: 4px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    .container {
        width: 95%;
    }
    main {
        padding: 15px;
    }
    .card {
        padding: 15px;
    }
    .comparison-table th, .comparison-table td {
        padding: 6px 8px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    header p {
        font-size: 0.8em;
    }
    .form-group input[type="number"],
    .form-group select {
        padding: 8px 10px;
        font-size: 0.9em;
    }
    button#calculateBtnMain {
        padding: 10px 12px;
        font-size: 1em;
    }
    .results-section p {
        font-size: 0.9em;
    }
    .comparison-table {
        font-size: 0.8em;
    }
}

