        :root { --rh-teal: #007696; --rh-light-blue: #e8f4f7; --rh-border: #ced4da; --rh-text: #333; }
        body { font-family: 'Helvetica Neue', Arial, sans-serif; background-color: #f4f7f9; color: var(--rh-text); margin: 0; }
        
        .rh-container { max-width: 1000px; margin: 0 auto; background: #fff; border: 1px solid var(--rh-border); border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding-bottom: 20px;}
        .rh-header { background: var(--rh-teal); color: white; padding: 12px; text-align: center; font-weight: bold; }

        .rh-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
        .rh-table td { padding: 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
        .label-cell { width: 200px; font-weight: bold; font-size: 13px; color: #555; }
        
        .input-box { width: 100%; padding: 10px; border: 1px solid var(--rh-border); border-radius: 4px; box-sizing: border-box; font-size: 14px; }
        .price-input { border: 2px solid var(--rh-teal); font-weight: bold; font-size: 16px; }
        .loc-box { background: #fff; border: 1px solid var(--rh-border); padding: 10px; border-radius: 4px; font-size: 14px; }
        
        .dp-container { display: flex; flex-direction: column; gap: 5px; }

        .col-val { text-align: center; font-weight: bold; font-size: 15px; color: var(--rh-teal); }
        .blue-bg { background-color: var(--rh-light-blue); color: var(--rh-teal); font-weight: bold; }

        .rate-card { border: 1px solid var(--rh-border); padding: 8px; text-align: center; border-radius: 4px; background: #fff; }
.rate-card-wrapper {
    border: 2px solid #0076a5; /* Ratehub Blue */
    padding: 8px;
    border-radius: 4px;
    background: #fff;
    min-height: 80px; /* Thora gap badha diya */
}

.lender-box {
    font-size: 11px;
    font-weight: bold; /* Bold lender name */
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 5px;
}

.rate-val {
    font-size: 18px;
    font-weight: 800;
    color: #333;
}

.rate-term {
    font-size: 11px;
    color: #666;
}

.lender-box {
    margin: 4px 0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.customize-btn {
    color: #007696;
    text-decoration: underline;
    font-size: 12px;
    cursor: pointer;
}
        .rate-val { font-size: 18px; font-weight: 800; display: block; }
        .customize { color: var(--rh-teal); font-size: 11px; text-decoration: underline; cursor: pointer; }

        .ltt-container { display: flex; padding: 20px; border-top: 5px solid #f0f0f0; gap: 40px; }
        .ltt-left { flex: 1; }
        .ltt-right { flex: 1.5; border-left: 1px solid #eee; padding-left: 40px; }
        .tgl-group { display: flex; width: 180px; margin-top: 10px; border: 1px solid var(--rh-teal); border-radius: 4px; overflow: hidden; }
        .tgl-btn { flex: 1; padding: 8px; border: none; background: #fff; color: var(--rh-teal); font-weight: bold; cursor: pointer; }
        .tgl-btn.active { background: var(--rh-light-blue); }
        .ltt-line { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed #ccc; font-size: 14px; }
        .ltt-final { font-weight: bold; font-size: 18px; border-bottom: 2px solid #000; margin-top: 10px; }

        .closing-section { border: 1px solid var(--rh-border); margin: 20px; border-radius: 4px; overflow: hidden; }
        .closing-header-bar { padding: 15px; background: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
        .closing-header-bar:hover { background: #fafafa; }
        .closing-content { display: none; padding: 20px; background: #fff; }
        .closing-content.open { display: block; }
        .closing-table { width: 100%; border-collapse: collapse; }
        .closing-table td { padding: 10px 0; border-bottom: 1px solid #f9f9f9; font-size: 14px; }
        .closing-total-row { font-weight: bold; font-size: 18px; color: var(--rh-teal); border-top: 2px solid #eee !important; }
        .small-input-fee { width: 100px; padding: 5px; border: 1px solid var(--rh-border); border-radius: 4px; text-align: right; }
        .disabled-section { opacity: 0.5; pointer-events: none; }
        
        /* Monthly Grid added for alignment */
        .closing-grid { display: flex; gap: 40px; }
        .closing-left { flex: 1; }
        .closing-right { flex: 1.5; }

        .graph-container {
        width: 100%;
        height: 300px;
        margin-top: 20px;
        position: relative;
    }

    .amort-chart-wrapper {
    position: relative;
    padding: 10px;
    background: #fff;
}

.amort-table-container {
    width: 100%;
    overflow-x: auto;
}

.amort-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

.amort-table th {
    border-bottom: 2px solid #eee;
    padding: 12px 8px;
    color: #666;
    font-weight: bold;
    text-align: right;
}

.amort-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: right;
    color: #333;
}

.amort-table td:first-child {
    text-align: left;
    font-weight: bold;
}

.amort-table tr:last-child {
    background-color: #f8fafc;
    font-weight: bold;
}


.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 10000; justify-content: center; align-items: flex-start;
    padding-top: 50px; overflow-y: auto;
}
.modal-container {
    background: #fff; width: 90%; max-width: 500px; border-radius: 8px; padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); font-family: sans-serif;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.modal-title { font-size: 18px; color: #333; margin: 0; text-align: center; width: 100%; }
.close-x { font-size: 28px; cursor: pointer; color: #999; }

.modal-filters { display: flex; gap: 10px; margin: 15px 0; background: #f8fafb; padding: 10px; border: 1px solid #dce4e8; border-radius: 4px; }
.filter-group { flex: 1; }
.filter-group label { display: block; font-size: 10px; color: #666; margin-bottom: 2px; }
.filter-group select { width: 100%; border: 1px solid #ccc; border-radius: 3px; padding: 4px; font-size: 12px; }

.rate-row { display: flex; align-items: center; padding: 12px 5px; border-bottom: 1px solid #eee; transition: background 0.2s; }
.rate-row:hover { background: #f4f9fb; }
.rate-col-val { flex: 1; font-size: 20px; font-weight: bold; color: #333; }
.rate-col-lender { flex: 2; font-size: 13px; color: #444; }
.rate-col-lender small { display: block; font-size: 9px; color: #888; text-transform: uppercase; }
.rate-col-btn button { background: #007696; color: white; border: none; padding: 6px 15px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; }

.custom-input-row { background: #fff; border: 1px solid #dce4e8; margin: 10px 0; border-radius: 4px; }
.custom-label { flex: 1; font-size: 11px; color: #555; }
.custom-field { flex: 2; }
.custom-field input { width: 80%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }

.modal-footer { text-align: center; margin-top: 15px; color: #007696; font-size: 12px; cursor: pointer; }

/* Mobile Responsive Fix */
@media screen and (max-width: 768px) {
    /* Main container ko screen ke mutabiq set karna */
    .rh-container {
        overflow: hidden !important;
    }

    /* Table ko blocks mein badal dena taake wo stack ho jayein */
    .rh-table, 
    .rh-table tbody, 
    .rh-table tr, 
    .rh-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Column spacing hatana */
    .rh-table tr {
        margin-bottom: 20px !important;
        border-bottom: 2px solid #eee !important;
    }

    .label-cell {
        text-align: left !important;
        background: #f8f9fa !important;
        padding: 10px !important;
        font-weight: bold !important;
    }

    /* Inputs ko full width karna */
    .input-box, .loc-box {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Mortgage Payment area ko center aur stack karna */
    .blue-bg {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 15px !important;
    }

    /* LTT aur Closing costs ko ek ke niche ek lana */
    .ltt-container, .closing-grid {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .ltt-right, .closing-right {
        padding-left: 0 !important;
        border-left: none !important;
        border-top: 1px solid #eee !important;
        padding-top: 15px !important;
    }
}