/* =========================================================
   Calculator Hero
========================================================= */

.calculator-hero {
    background: linear-gradient(135deg,#172033,#24324d);
    color: white;
    border-radius: 22px;
    padding: 28px 32px;
    margin-bottom: 25px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

    .calculator-hero h1 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .calculator-hero p {
        margin: 0;
        opacity: .92;
    }

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-badge {
    background: rgba(255,255,255,.15);
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 600;
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    color: #64748b;
    font-size: .95rem;
    font-weight: 500;
}

@media(max-width:768px) {
    .hero-content {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* =========================================================
   Summary Cards
========================================================= */

.summary-card {
    background: white;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    transition: .25s;
}

    .summary-card:hover {
        transform: translateY(-3px);
    }

    .summary-card h5 h6 {
        color: #6b7280;
        font-size: .85rem;
        margin-bottom: 6px;
    }

    .summary-card h3 {
        margin: 0;
        font-weight: 700;
    }

.summary-loan {
    border-left: 5px solid #2E8B57;
}

.summary-downpayment {
    border-left: 5px solid #4CAF50;
}

.summary-property {
    border-left: 5px solid #66BB6A;
}

.summary-emi {
    border-left: 5px solid #81C784;
}

/* =========================================================
   Affordability Score
========================================================= */

.score-card {
    background: white;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.score-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
}

.score-progress {
    height: 10px;
    border-radius: 999px;
    background: #edf2f7;
    overflow: hidden;
}

.score-progress-fill {
    height: 100%;
    transition: .4s;
    border-radius: 999px;
}

.score-text {
    margin-top: 12px;
    font-weight: 600;
}

/* =========================================================
   Doughnut Chart
========================================================= */

.chart-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: auto;
}

.chart-center-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.saved-label {
    color: #6b7280;
    font-size: .85rem;
}

.saved-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2E8B57;
}

/* =========================================================
   Knowledge Hub
========================================================= */

.knowledge-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

    .knowledge-card .card-body {
        padding: 30px;
    }

    .knowledge-card h2,
    .knowledge-card h3,
    .knowledge-card h4 {
        color: #2E8B57;
    }

    .knowledge-card ul li {
        margin-bottom: 8px;
    }

/* =========================================================
   FAQ
========================================================= */

.accordion-item {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.accordion-button {
    font-weight: 600;
}

    .accordion-button:not(.collapsed) {
        background: #E8F5E9;
        color: #2E8B57;
    }

.accordion-body {
    line-height: 1.8;
    color: #555;
}
/* =========================================================
   Related Calculators
========================================================= */

.related-card {
    display: block;
    text-decoration: none;
    background: white;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    transition: .25s;
    font-weight: 600;
    color: #2E8B57;
    box-shadow: 0 4px 10px rgba(0,0,0,.05);
}

    .related-card:hover {
        transform: translateY(-4px);
        background: #2E8B57;
        color: white;
    }
    .related-card h5 {
        color: #1F6F5F;
    }

/* =========================================================
   Responsive
========================================================= */

@media(max-width:768px) {

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .calculator-hero {
        padding: 22px;
    }

    .summary-card {
        margin-bottom: 12px;
    }

    .chart-wrapper {
        max-width: 200px;
    }

    .trust-strip {
        gap: 10px;
    }
}
/*==========================================
SMART BUYING TIPS
===========================================*/

.smart-tips-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    background: #fff;
}

.tips-title {
    color: #198754;
    font-weight: 700;
}

.tips-item {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.tips-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #E8F7EF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.tips-item strong {
    display: block;
    margin-bottom: 4px;
}

.tips-item p {
    margin: 0;
    color: #6c757d;
    font-size: .92rem;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 20px;
    align-items: start;
}



.calculator-controls {
    background: white;
    padding: 15px;
    border-radius: 18px;
}



.calculator-summary {
    position: sticky;
    top: 20px;
}



@media(max-width:992px) {

    .calculator-layout {
        grid-template-columns: 1fr;
    }


    .calculator-summary {
        position: relative;
    }
}

.saving-box {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,.06);
    border-left: 5px solid;
}



    .saving-box:nth-child(1) {
        border-color: #2563eb;
    }


    .saving-box:nth-child(2) {
        border-color: #16a34a;
    }


    .saving-box:nth-child(3) {
        border-color: #9333ea;
    }



    .saving-box h3 {
        font-weight: 700;
        margin-top: 8px;
    }



    .saving-box:nth-child(1) h3 {
        color: #2563eb;
    }



    .saving-box:nth-child(2) h3 {
        color: #16a34a;
    }



    .saving-box:nth-child(3) h3 {
        color: #9333ea;
    }

.chart-wrapper {
    max-width: 320px;
    margin: auto;
    position: relative;
}



.chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    text-align: center;
}


    .chart-center-text h4 {
        font-weight: 700;
    }

/* Loan tenure control */

.tenure-section {
    margin-top: 20px;
}



.tenure-input {
    height: 42px;
    text-align: right;
    font-weight: 600;
}



.tenure-section .input-group-text {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    min-width: 80px;
    justify-content: center;
}



@media(max-width:576px) {

    .tenure-section .input-group-text {
        min-width: 75px;
    }


    .tenure-input {
        height: 45px;
        font-size: 16px;
    }
}

/* Eligibility calculator controls */


.calculator-control {
    margin-bottom: 25px;
}



.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}



    .control-header label {
        font-weight: 600;
        color: #10243e;
    }



.slider-input {
    width: 150px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    text-align: right;
    padding-right: 12px;
    font-weight: 600;
    font-size: 15px;
}



.custom-range {
    width: 100%;
}



.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
    width: 100%;
    margin-top: 20px
}

.calculator-summary-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    overflow: hidden;

}


.summary-box {
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
    min-height: 110px;
}


    .summary-box.success {
        border-left: 5px solid #198754;
    }


    .summary-box.warning {
        border-left: 5px solid #ffc107;
    }


    .summary-box.primary {
        border-left: 5px solid #0d6efd;
    }

.not-eligible-card {
    background: #fff7ed;
    border-radius: 18px;
    padding: 30px;
    text-align: center;
    border-left: 6px solid #dc3545;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}



.not-eligible-icon {
    font-size: 45px;
    margin-bottom: 15px;
}



.not-eligible-card h3 {
    color: #b91c1c;
    font-weight: 700;
}



.not-eligible-card p {
    color: #475569;
    font-size: 16px;
}



.eligibility-tips {
    text-align: left;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}



    .eligibility-tips li {
        margin-bottom: 10px;
    }

/* ===============================
   Not Eligible State
================================ */


.not-eligible-card {
    background: #fff7ed;
    border-radius: 18px;
    padding: 35px;
    text-align: center;
    border-left: 6px solid #dc3545;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}



.not-eligible-icon {
    font-size: 45px;
    margin-bottom: 15px;
}



.not-eligible-card h3 {
    color: #b91c1c;
    font-weight: 700;
}



.not-eligible-card p {
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
}



.eligibility-tips {
    margin-top: 25px;
    background: white;
    padding: 20px;
    border-radius: 14px;
    text-align: left;
}



    .eligibility-tips h5 {
        font-weight: 600;
    }



    .eligibility-tips li {
        margin-bottom: 10px;
    }

@media(max-width:768px) {

    .chart-wrapper {
        width: 240px;
        height: 240px;
    }
}
/* Financial Health Advice */

.health-advice {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.6;
}

/* Eligibility Chart */

.eligibility-chart-wrapper {
    width: 100%;
    max-width: 320px;
    margin: 20px auto;
    text-align: center;
}


.chart-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
}



#eligibilityChart {
    max-height: 220px;
}



@media(max-width:768px) {

    .eligibility-chart-wrapper {
        max-width: 220px;
    }


    #eligibilityChart {
        max-height: 180px;
    }
}

@media(max-width:768px) {

    .summary-card {
        margin-left: 10px;
        margin-right: 10px;
    }
}



/* Eligibility Chart */

.eligibility-chart-container {
    max-width: 420px;
    margin: auto;
    padding: 20px;
}


.eligibility-chart-title {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #12345b;
    margin-bottom: 15px;
}



#emiCapacityChart {
    max-height: 320px;
}

.chart-insight {
    margin-top: 20px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* Eligibility Breakdown */

.eligibility-breakdown-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}



    .eligibility-breakdown-card h5 {
        color: #198754;
        margin-bottom: 15px;
        font-weight: 600;
    }



.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eeeeee;
    font-size: 14px;
}



    .breakdown-row strong {
        color: #12345b;
    }



    .breakdown-row.highlight {
        background: #f0faf5;
        padding: 12px;
        border-radius: 10px;
        margin-top: 10px;
    }



        .breakdown-row.highlight strong {
            color: #198754;
        }
/* =====================================
   Improve Eligibility Card
===================================== */


.improve-eligibility-card {
    background: linear-gradient( 135deg, #f2fbf6, #ffffff );
    border-radius: 16px;
    padding: 22px;
    border-left: 5px solid #198754;
    box-shadow: 0 5px 18px rgba(0,0,0,0.06);
}



.improve-header h5 {
    color: #198754;
    font-weight: 700;
    margin-bottom: 6px;
}



.improve-header p {
    color: #666;
    font-size: 14px;
    margin-bottom: 18px;
}



.eligibility-improvement-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
}



.improvement-item {
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    font-size: 14px;
    color: #23395d;
}



    .improvement-item span {
        margin-right: 8px;
    }




.eligibility-action-btn {
    display: inline-block;
    margin-top: 18px;
    background: #198754;
    color: white;
    padding: 10px 22px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}



    .eligibility-action-btn:hover {
        background: #146c43;
        color: white;
    }




@media(max-width:768px) {

    .eligibility-improvement-grid {
        grid-template-columns: 1fr;
    }
}

/* Compact calculator sizing, shared across calculator pages. */
.custom-card {
    border-radius: 16px;
}

.custom-card > .card-body {
    padding: 1.25rem !important;
}

.calculator-hero {
    padding: 22px 26px;
    margin-bottom: 18px;
    border-radius: 18px;
}

.calculator-hero h1 {
    font-size: 1.75rem;
}

.controls-panel,
.result-box {
    padding: 1rem;
}

.controls-panel .mb-3 {
    margin-bottom: .85rem !important;
}

.form-control,
.form-select {
    min-height: 44px;
}

.chart-container {
    height: 320px;
}

.table-responsive {
    padding: 10px;
    border-radius: 14px;
}

.table-responsive > .table:not(.table-light):not(.table-dark) > thead > tr > th {
    padding: 10px 12px;
}

.table-responsive > .table > tbody > tr > td {
    padding: 8px 12px;
}

.tax-result-item {
    height: 100%;
    padding: .7rem .8rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

@media (max-width: 767.98px) {
    .custom-card > .card-body {
        padding: 1rem !important;
    }

    .calculator-hero {
        padding: 18px;
    }

    .calculator-hero h1 {
        font-size: 1.5rem;
    }

    .form-control,
    .form-select {
        min-height: 46px;
    }

    .chart-container {
        height: 260px;
    }
}

.loan-comparison-panel {
    min-width: 0;
    padding: .85rem;
}

.loan-comparison-panel .form-label {
    margin-bottom: .25rem;
    font-size: .9rem;
}

.loan-provider-results {
    margin-top: .75rem;
    padding: .65rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.loan-provider-results p {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    margin-bottom: .4rem;
    overflow-wrap: anywhere;
}

.loan-comparison-table {
    min-width: 570px;
}

@media (max-width: 575.98px) {
    .loan-comparison-panel {
        padding: .55rem;
    }

    .loan-comparison-panel h2 {
        font-size: .95rem;
    }

    .loan-comparison-panel .form-label {
        font-size: .72rem;
        line-height: 1.2;
    }

    .loan-comparison-panel .form-control,
    .loan-comparison-panel .form-select {
        min-width: 0;
        min-height: 38px;
        padding: .35rem .3rem;
        font-size: .75rem;
    }

    .loan-provider-results {
        padding: .45rem;
        font-size: .72rem;
    }

    .loan-provider-results p strong {
        font-size: .68rem;
    }

    .loan-comparison .result-box {
        padding: .65rem;
    }
}

.savings-result-item {
    display: flex;
    min-height: 68px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.savings-result-item strong {
    color: #475569;
    font-size: .82rem;
    font-weight: 600;
}

.savings-result-item span {
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 700;
}

.savings-result-item small {
    color: #64748b;
    font-size: .74rem;
}

.business-result-item {
    display: flex;
    min-height: 68px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.business-result-item strong {
    color: #475569;
    font-size: .82rem;
    font-weight: 600;
}

.business-result-item span {
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 700;
}
