

/* =========================================================

   EXACTSUB — FUNDING HISTORY

   Professional Fintech UI

   Matches funding_transaction.html

   Brand: #022A7B / #29BA22

   ========================================================= */


:root {

    --es-primary: #022A7B;

    --es-primary-dark: #011E59;

    --es-primary-50: #F3F7FF;

    --es-primary-100: #E8F0FF;


    --es-green: #29BA22;

    --es-green-dark: #1E9419;

    --es-green-50: #EFFBED;

    --es-green-100: #E3F7E1;


    --es-danger: #D92D20;

    --es-danger-50: #FEF3F2;

    --es-danger-100: #FEE4E2;


    --es-warning: #B54708;

    --es-warning-50: #FFFAEB;

    --es-warning-100: #FEF0C7;


    --es-text: #101828;

    --es-text-2: #344054;

    --es-text-3: #667085;

    --es-text-4: #98A2B3;


    --es-border: #E4E7EC;

    --es-border-light: #EAECF0;


    --es-page: #F6F8FC;

    --es-white: #FFFFFF;


    --es-radius-sm: 8px;

    --es-radius-md: 12px;

    --es-radius-lg: 16px;


    --es-shadow-sm: 0 1px 3px rgba(16, 24, 40, .05);

    --es-shadow-md: 0 8px 24px rgba(16, 24, 40, .07);


    --es-transition: 180ms ease;

}


/* =========================================================

   PAGE SHELL

   ========================================================= */


#funding-history-page {

    width: 100%;

    min-width: 0;

    box-sizing: border-box;

    padding: 32px;

    background: var(--es-page);

    color: var(--es-text);

    font-family: inherit;

}


#funding-history-page *,

#funding-history-page *::before,

#funding-history-page *::after {

    box-sizing: border-box;

}


/* =========================================================

   PAGE HEADER

   ========================================================= */


#funding-history-page .funding-page-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;

    margin: 0 0 28px;

}


#funding-history-page .funding-header-content {

    display: flex;

    align-items: center;

    gap: 15px;

    min-width: 0;

}


#funding-history-page .funding-header-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 48px;

    width: 48px;

    height: 48px;

    border: 1px solid #DDE7FA;

    border-radius: 13px;

    background: var(--es-primary-100);

    color: var(--es-primary);

    font-size: 20px;

}


#funding-history-page .funding-eyebrow {

    display: block;

    margin: 0 0 5px;

    color: var(--es-primary);

    font-size: 11px;

    line-height: 16px;

    font-weight: 750;

    letter-spacing: .08em;

    text-transform: uppercase;

}


#funding-history-page .funding-header-content h1 {

    margin: 0;

    color: var(--es-text);

    font-size: clamp(28px, 3vw, 36px);

    line-height: 1.15;

    font-weight: 750;

    letter-spacing: -.03em;

}


#funding-history-page .funding-header-content p {

    margin: 7px 0 0;

    color: var(--es-text-3);

    font-size: 14px;

    line-height: 21px;

}


/* =========================================================

   SUMMARY

   ========================================================= */


#funding-history-page .funding-summary-card {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    min-height: 82px;

    margin-bottom: 18px;

    padding: 18px 22px;

    border: 1px solid var(--es-border);

    border-radius: var(--es-radius-lg);

    background: var(--es-white);

    box-shadow: var(--es-shadow-sm);

}


#funding-history-page .funding-summary-left {

    display: flex;

    align-items: center;

    gap: 13px;

    min-width: 0;

}


#funding-history-page .funding-summary-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 42px;

    width: 42px;

    height: 42px;

    border-radius: 11px;

    background: var(--es-primary-50);

    color: var(--es-primary);

    font-size: 17px;

}


#funding-history-page .funding-summary-left > div:last-child {

    min-width: 0;

}


#funding-history-page .funding-summary-left span {

    display: block;

    margin-bottom: 3px;

    color: var(--es-text-4);

    font-size: 10px;

    line-height: 15px;

    font-weight: 750;

    letter-spacing: .08em;

    text-transform: uppercase;

}


#funding-history-page .funding-summary-left strong {

    display: block;

    color: var(--es-text);

    font-size: 14px;

    line-height: 20px;

    font-weight: 650;

}


#funding-history-page .funding-summary-count {

    display: flex;

    align-items: baseline;

    gap: 8px;

    padding-left: 20px;

    border-left: 1px solid var(--es-border-light);

}


#funding-history-page .funding-summary-count span {

    color: var(--es-text-3);

    font-size: 12px;

}


#funding-history-page .funding-summary-count strong {

    color: var(--es-primary);

    font-size: 22px;

    line-height: 1;

    font-weight: 750;

}


/* =========================================================

   TRANSACTION LIST

   ========================================================= */


#funding-history-page .funding-transactions {

    display: flex;

    flex-direction: column;

    gap: 14px;

}


/* =========================================================

   TRANSACTION CARD

   ========================================================= */


#funding-history-page .funding-transaction-card {

    position: relative;

    overflow: hidden;

    border: 1px solid var(--es-border);

    border-radius: var(--es-radius-lg);

    background: var(--es-white);

    box-shadow: var(--es-shadow-sm);

    transition:

        transform var(--es-transition),

        box-shadow var(--es-transition),

        border-color var(--es-transition);

}


#funding-history-page .funding-transaction-card:hover {

    border-color: #D4DCEC;

    box-shadow: var(--es-shadow-md);

    transform: translateY(-1px);

}


/* =========================================================

   CARD TOP

   ========================================================= */


#funding-history-page .funding-card-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 20px 22px 18px;

    border-bottom: 1px solid var(--es-border-light);

}


#funding-history-page .funding-card-identity {

    display: flex;

    align-items: center;

    gap: 13px;

    min-width: 0;

}


#funding-history-page .funding-method-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 44px;

    width: 44px;

    height: 44px;

    border: 1px solid #DCE5F5;

    border-radius: 12px;

    background: var(--es-primary-50);

    color: var(--es-primary);

    font-size: 17px;

}


#funding-history-page .funding-method-details {

    min-width: 0;

}


#funding-history-page .funding-label {

    display: block;

    margin: 0 0 4px;

    color: var(--es-text-4);

    font-size: 9px;

    line-height: 14px;

    font-weight: 750;

    letter-spacing: .09em;

    text-transform: uppercase;

}


#funding-history-page .funding-method-details h2 {

    overflow: hidden;

    margin: 0;

    color: var(--es-text);

    font-size: 17px;

    line-height: 23px;

    font-weight: 700;

    letter-spacing: -.01em;

    text-overflow: ellipsis;

    white-space: nowrap;

}


/* =========================================================

   STATUS

   ========================================================= */


#funding-history-page .funding-card-status {

    flex: 0 0 auto;

}


#funding-history-page .funding-status {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    min-height: 29px;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 11px;

    line-height: 17px;

    font-weight: 650;

    white-space: nowrap;

}


#funding-history-page .funding-status-dot {

    width: 6px;

    height: 6px;

    border-radius: 50%;

}


#funding-history-page .funding-status-successful {

    background: var(--es-green-50);

    color: #187A14;

}


#funding-history-page .funding-status-successful .funding-status-dot {

    background: var(--es-green);

}


#funding-history-page .funding-status-unsuccessful {

    background: var(--es-danger-50);

    color: var(--es-danger);

}


#funding-history-page .funding-status-unsuccessful .funding-status-dot {

    background: var(--es-danger);

}


#funding-history-page .funding-status-pending {

    background: var(--es-warning-50);

    color: var(--es-warning);

}


#funding-history-page .funding-status-pending .funding-status-dot {

    background: #F79009;

}


#funding-history-page .funding-status-unknown {

    background: #F2F4F7;

    color: var(--es-text-2);

}


#funding-history-page .funding-status-unknown .funding-status-dot {

    background: var(--es-text-4);

}


/* =========================================================

   AMOUNT SECTION

   ========================================================= */


#funding-history-page .funding-amount-section {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 20px 22px;

    background: linear-gradient(90deg, #FBFCFF 0%, #FFFFFF 100%);

    border-bottom: 1px solid var(--es-border-light);

}


#funding-history-page .funding-main-amount {

    display: block;

    margin-top: 1px;

    color: var(--es-primary);

    font-size: 25px;

    line-height: 31px;

    font-weight: 750;

    letter-spacing: -.025em;

}


#funding-history-page .funding-receipt-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 38px;

    padding: 0 13px;

    border: 1px solid #C9D5EB;

    border-radius: 8px;

    background: #fff;

    color: var(--es-primary);

    font-size: 12px;

    line-height: 18px;

    font-weight: 650;

    text-decoration: none;

    transition: all var(--es-transition);

}


#funding-history-page .funding-receipt-button:hover {

    border-color: var(--es-primary);

    background: var(--es-primary-50);

}


/* =========================================================

   BALANCE GRID

   ========================================================= */


#funding-history-page .funding-balance-grid {

    display: grid;

    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);

    align-items: stretch;

    gap: 10px;

    margin: 18px 22px;

}


#funding-history-page .funding-info-box {

    min-width: 0;

    padding: 15px 16px;

    border: 1px solid var(--es-border-light);

    border-radius: 10px;

    background: #FAFBFD;

}


#funding-history-page .funding-info-box strong {

    display: block;

    color: var(--es-text);

    font-size: 16px;

    line-height: 22px;

    font-weight: 700;

}


#funding-history-page .funding-info-box.funding-new-balance {

    border-color: #D8EBD5;

    background: var(--es-green-50);

}


#funding-history-page .funding-new-balance strong {

    color: #187A14;

}


#funding-history-page .funding-balance-arrow {

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--es-text-4);

    font-size: 13px;

}


/* =========================================================

   DETAILS GRID

   ========================================================= */


#funding-history-page .funding-details-grid {

    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 0;

    margin: 0 22px;

    padding: 2px 0 20px;

}


#funding-history-page .funding-detail {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

    padding: 12px 16px;

    border-right: 1px solid var(--es-border-light);

}


#funding-history-page .funding-detail:first-child {

    padding-left: 0;

}


#funding-history-page .funding-detail:last-child {

    padding-right: 0;

    border-right: 0;

}


#funding-history-page .funding-detail-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 32px;

    width: 32px;

    height: 32px;

    border-radius: 8px;

    background: #F2F4F7;

    color: var(--es-text-3);

    font-size: 12px;

}


#funding-history-page .funding-detail > div:last-child {

    min-width: 0;

}


#funding-history-page .funding-detail > div:last-child > span {

    display: block;

    margin-bottom: 3px;

    color: var(--es-text-4);

    font-size: 9px;

    line-height: 13px;

    font-weight: 750;

    letter-spacing: .07em;

    text-transform: uppercase;

}


#funding-history-page .funding-detail strong {

    display: block;

    overflow: hidden;

    color: var(--es-text-2);

    font-size: 12px;

    line-height: 18px;

    font-weight: 600;

    text-overflow: ellipsis;

    white-space: nowrap;

}


#funding-history-page .funding-email {

    max-width: 170px;

}


#funding-history-page .funding-request-id {

    color: var(--es-primary) !important;

    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;

    font-size: 10px !important;

}


/* =========================================================

   DESCRIPTION

   ========================================================= */


#funding-history-page .funding-description-box {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    margin: 0 22px 18px;

    padding: 15px 16px;

    border: 1px solid var(--es-border-light);

    border-radius: 10px;

    background: #F8FAFC;

}


#funding-history-page .funding-description-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 32px;

    width: 32px;

    height: 32px;

    border-radius: 8px;

    background: var(--es-white);

    color: var(--es-primary);

    font-size: 12px;

}


#funding-history-page .funding-description-box > div:last-child {

    min-width: 0;

}


#funding-history-page .funding-description-box p {

    margin: 0;

    color: var(--es-text-2);

    font-size: 12px;

    line-height: 19px;

}


/* =========================================================

   CARD FOOTER

   ========================================================= */


#funding-history-page .funding-card-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    min-height: 48px;

    padding: 0 22px;

    border-top: 1px solid var(--es-border-light);

    background: #FCFDFE;

}


#funding-history-page .funding-serial {

    color: var(--es-text-4);

    font-size: 11px;

    font-weight: 500;

}


#funding-history-page .funding-footer-receipt {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: var(--es-primary);

    font-size: 11px;

    font-weight: 650;

    text-decoration: none;

}


#funding-history-page .funding-footer-receipt:hover {

    color: var(--es-primary-dark);

}


/* =========================================================

   PAGINATION

   ========================================================= */


#funding-history-page .funding-pagination {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    margin-top: 20px;

    padding: 8px 0 4px;

}


#funding-history-page .funding-pagination-pages {

    display: flex;

    align-items: center;

    gap: 5px;

}


#funding-history-page .funding-pagination-page,

#funding-history-page .funding-pagination-arrow {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 34px;

    height: 34px;

    padding: 0 9px;

    border: 1px solid var(--es-border);

    border-radius: 8px;

    background: #fff;

    color: var(--es-text-2);

    font-size: 12px;

    font-weight: 600;

    text-decoration: none;

    transition: all var(--es-transition);

}


#funding-history-page .funding-pagination-page:hover,

#funding-history-page .funding-pagination-arrow:hover {

    border-color: var(--es-primary);

    color: var(--es-primary);

    background: var(--es-primary-50);

}


#funding-history-page .funding-pagination-current {

    border-color: var(--es-primary);

    background: var(--es-primary);

    color: #fff;

}


#funding-history-page .funding-pagination-disabled {

    opacity: .45;

    cursor: default;

}


#funding-history-page .funding-pagination-dots {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 24px;

    color: var(--es-text-4);

    font-size: 12px;

}


/* =========================================================

   EMPTY STATE

   ========================================================= */


#funding-history-page .funding-empty-state {

    display: flex;

    align-items: center;

    flex-direction: column;

    justify-content: center;

    min-height: 360px;

    padding: 45px 25px;

    border: 1px solid var(--es-border);

    border-radius: var(--es-radius-lg);

    background: #fff;

    box-shadow: var(--es-shadow-sm);

    text-align: center;

}


#funding-history-page .funding-empty-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 62px;

    height: 62px;

    margin-bottom: 17px;

    border-radius: 17px;

    background: var(--es-primary-100);

    color: var(--es-primary);

    font-size: 24px;

}


#funding-history-page .funding-empty-state h2 {

    margin: 0;

    color: var(--es-text);

    font-size: 18px;

    line-height: 25px;

    font-weight: 700;

}


#funding-history-page .funding-empty-state p {

    max-width: 430px;

    margin: 7px 0 0;

    color: var(--es-text-3);

    font-size: 13px;

    line-height: 21px;

}


/* =========================================================

   TABLET

   ========================================================= */


@media (max-width: 1100px) {


    #funding-history-page {

        padding: 26px 22px;

    }


    #funding-history-page .funding-details-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));

    }


    #funding-history-page .funding-detail:nth-child(2) {

        border-right: 0;

    }


    #funding-history-page .funding-detail:nth-child(3),

    #funding-history-page .funding-detail:nth-child(4) {

        border-top: 1px solid var(--es-border-light);

    }


    #funding-history-page .funding-detail:nth-child(3) {

        padding-left: 0;

    }


    #funding-history-page .funding-detail:nth-child(4) {

        padding-right: 0;

    }

}


/* =========================================================

   MOBILE

   ========================================================= */


@media (max-width: 700px) {


    #funding-history-page {

        padding: 20px 14px 30px;

    }


    #funding-history-page .funding-page-header {

        margin-bottom: 20px;

    }


    #funding-history-page .funding-header-content {

        align-items: flex-start;

        gap: 11px;

    }


    #funding-history-page .funding-header-icon {

        flex-basis: 40px;

        width: 40px;

        height: 40px;

        border-radius: 10px;

        font-size: 16px;

    }


    #funding-history-page .funding-header-content h1 {

        font-size: 27px;

    }


    #funding-history-page .funding-header-content p {

        font-size: 13px;

        line-height: 19px;

    }


    #funding-history-page .funding-summary-card {

        align-items: flex-start;

        flex-direction: column;

        gap: 15px;

        padding: 17px;

    }


    #funding-history-page .funding-summary-count {

        width: 100%;

        padding: 12px 0 0;

        border-top: 1px solid var(--es-border-light);

        border-left: 0;

    }


    #funding-history-page .funding-card-top {

        align-items: flex-start;

        flex-direction: column;

        gap: 13px;

        padding: 17px;

    }


    #funding-history-page .funding-card-status {

        padding-left: 57px;

    }


    #funding-history-page .funding-amount-section {

        align-items: flex-start;

        flex-direction: column;

        gap: 13px;

        padding: 17px;

    }


    #funding-history-page .funding-receipt-button {

        width: 100%;

    }


    #funding-history-page .funding-balance-grid {

        grid-template-columns: 1fr;

        gap: 7px;

        margin: 14px 17px;

    }


    #funding-history-page .funding-balance-arrow {

        height: 16px;

        transform: rotate(90deg);

    }


    #funding-history-page .funding-details-grid {

        grid-template-columns: 1fr;

        margin: 0 17px;

        padding-bottom: 10px;

    }


    #funding-history-page .funding-detail,

    #funding-history-page .funding-detail:first-child,

    #funding-history-page .funding-detail:last-child {

        padding: 10px 0;

        border-right: 0;

        border-bottom: 1px solid var(--es-border-light);

    }


    #funding-history-page .funding-detail:last-child {

        border-bottom: 0;

    }


    #funding-history-page .funding-description-box {

        margin: 4px 17px 15px;

    }


    #funding-history-page .funding-card-footer {

        padding: 0 17px;

    }


    #funding-history-page .funding-email {

        max-width: 190px;

    }

}


/* =========================================================

   SMALL MOBILE

   ========================================================= */


@media (max-width: 420px) {


    #funding-history-page {

        padding: 16px 10px 25px;

    }


    #funding-history-page .funding-header-content h1 {

        font-size: 24px;

    }


    #funding-history-page .funding-main-amount {

        font-size: 23px;

    }


    #funding-history-page .funding-method-details h2 {

        font-size: 15px;

    }


    #funding-history-page .funding-detail strong {

        max-width: 190px;

    }

}


/* =========================================================
   EXACTSUB RESPONSIVE OVERRIDE
   No horizontal scrolling on tablet/mobile.
   ========================================================= */

.query-page,
.data-history-page,
.airtime-history-page,
#funding-history-page {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.query-page *,
.data-history-page *,
.airtime-history-page *,
#funding-history-page * {
    min-width: 0;
    max-width: 100%;
}

/* Keep the page itself inside the viewport. */
.query-header,
.data-history-header,
.airtime-history-header,
.funding-page-header {
    min-width: 0;
}

@media (max-width: 900px) {
    .query-table-wrapper,
    .data-history-table-wrapper,
    .airtime-history-table-wrapper {
        width: 100%;
        min-width: 0;
        overflow: visible;
    }

    .query-table,
    .data-history-table,
    .airtime-history-table {
        width: 100%;
        min-width: 0 !important;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
    }

    .query-table thead,
    .data-history-table thead,
    .airtime-history-table thead {
        display: none;
    }

    .query-table tbody,
    .data-history-table tbody,
    .airtime-history-table tbody {
        display: grid;
        gap: 14px;
    }

    .query-table tbody tr,
    .data-history-table tbody tr,
    .airtime-history-table tbody tr {
        display: block;
        width: 100%;
        overflow: hidden;
        border: 1px solid #E4E8EF;
        border-radius: 16px;
        background: #FFFFFF;
        box-shadow: 0 7px 22px rgba(2, 42, 123, .055);
    }

    .query-table tbody tr:hover,
    .data-history-table tbody tr:hover,
    .airtime-history-table tbody tr:hover {
        background: #FFFFFF;
    }

    .query-table td,
    .data-history-table td,
    .airtime-history-table td,
    .query-table td:nth-child(n),
    .data-history-table td:nth-child(n),
    .airtime-history-table td:nth-child(n) {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 10px 14px;
        border-bottom: 1px solid #EEF1F5;
        text-align: right !important;
        overflow-wrap: anywhere;
    }

    .query-table td::before,
    .data-history-table td::before,
    .airtime-history-table td::before {
        content: attr(data-label);
        float: left;
        max-width: 42%;
        margin-right: 12px;
        color: #8A93A3;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .45px;
        line-height: 1.4;
        text-align: left;
        text-transform: uppercase;
    }

    .query-table td:last-child,
    .data-history-table td:last-child,
    .airtime-history-table td:last-child {
        border-bottom: 0;
    }

    /* Serial number is useful on desktop but redundant in mobile cards. */
    .query-table td:first-child,
    .data-history-table td:first-child,
    .airtime-history-table td:first-child {
        display: none;
    }

    /* Receipt/action rows should read as action rows, not raw text. */
    .query-table td[data-label="Action"],
    .data-history-table td[data-label="Receipt"],
    .airtime-history-table td[data-label="Receipt"] {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .query-table td[data-label="Action"]::before,
    .data-history-table td[data-label="Receipt"]::before,
    .airtime-history-table td[data-label="Receipt"]::before {
        line-height: 34px;
    }

    .query-table td a,
    .data-history-table td a,
    .airtime-history-table td a {
        max-width: 100%;
    }

    /* Long values must never enlarge the viewport. */
    .query-table td *,
    .data-history-table td *,
    .airtime-history-table td * {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /* Keep statuses/buttons visually compact. */
    .query-table .query-status,
    .data-history-table .data-status,
    .airtime-history-table .airtime-status {
        display: inline-flex;
        vertical-align: middle;
    }

    /* Query search form: one clean column at tablet width. */
    .query-search-card,
    .query-results-section,
    .query-table-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .query-form-fields {
        width: 100%;
        min-width: 0;
    }

    .query-form-fields input,
    .query-form-fields select,
    .query-form-fields textarea {
        max-width: 100%;
    }

    #funding-history-page .funding-page-header,
    #funding-history-page .funding-summary-card,
    #funding-history-page .funding-transaction-card {
        min-width: 0;
        max-width: 100%;
    }

    #funding-history-page .funding-card-top,
    #funding-history-page .funding-amount-section,
    #funding-history-page .funding-balance-grid,
    #funding-history-page .funding-details-grid {
        min-width: 0;
        max-width: 100%;
    }

    #funding-history-page .funding-method-details,
    #funding-history-page .funding-detail > div:last-child,
    #funding-history-page .funding-summary-left > div:last-child {
        min-width: 0;
        max-width: 100%;
    }

    #funding-history-page .funding-method-details h2,
    #funding-history-page .funding-detail strong {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 600px) {
    .query-page,
    .data-history-page,
    .airtime-history-page,
    #funding-history-page {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .query-header,
    .data-history-header,
    .airtime-history-header,
    .funding-page-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .query-header > div:first-child,
    .data-history-header > div:first-child,
    .airtime-history-header > div:first-child,
    #funding-history-page .funding-header-content {
        min-width: 0;
    }

    .query-subtitle,
    .data-history-subtitle,
    .airtime-history-subtitle,
    #funding-history-page .funding-header-content p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .query-search-card {
        padding: 16px !important;
        border-radius: 14px;
    }

    .query-search-heading {
        gap: 10px;
        margin-bottom: 18px;
    }

    .query-form-actions {
        width: 100%;
    }

    .query-search-button {
        width: 100%;
        min-width: 0;
    }

    .query-table tbody,
    .data-history-table tbody,
    .airtime-history-table tbody {
        gap: 12px;
    }

    .query-table tbody tr,
    .data-history-table tbody tr,
    .airtime-history-table tbody tr {
        border-radius: 14px;
    }

    .query-table td,
    .data-history-table td,
    .airtime-history-table td,
    .query-table td:nth-child(n),
    .data-history-table td:nth-child(n),
    .airtime-history-table td:nth-child(n) {
        padding: 9px 12px;
    }

    .query-table td::before,
    .data-history-table td::before,
    .airtime-history-table td::before {
        max-width: 40%;
        margin-right: 8px;
        font-size: 8.5px;
    }

    #funding-history-page .funding-summary-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    #funding-history-page .funding-summary-count {
        width: 100%;
        padding: 10px 0 0;
        border-top: 1px solid var(--es-border-light);
        border-left: 0;
    }

    #funding-history-page .funding-card-top {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    #funding-history-page .funding-card-status {
        max-width: 100%;
    }

    #funding-history-page .funding-amount-section {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    #funding-history-page .funding-receipt-button {
        max-width: 100%;
    }

    #funding-history-page .funding-balance-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #funding-history-page .funding-balance-arrow {
        display: none;
    }

    #funding-history-page .funding-details-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #funding-history-page .funding-detail,
    #funding-history-page .funding-detail:nth-child(n) {
        padding: 12px 0;
        border: 0;
        border-top: 1px solid var(--es-border-light);
    }

    #funding-history-page .funding-detail:first-child {
        border-top: 0;
    }

    #funding-history-page .funding-detail > div:last-child {
        min-width: 0;
    }
}

@media (max-width: 380px) {
    .query-page,
    .data-history-page,
    .airtime-history-page,
    #funding-history-page {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }

    .query-table td,
    .data-history-table td,
    .airtime-history-table td {
        padding-left: 10px;
        padding-right: 10px;
    }

    #funding-history-page .funding-header-content h1 {
        font-size: 23px;
    }
}


/* Final viewport safety: never allow page descendants to create horizontal scroll. */
.query-page,
.data-history-page,
.airtime-history-page,
#funding-history-page {
    overflow-x: clip;
}

.query-page img,
.data-history-page img,
.airtime-history-page img,
#funding-history-page img,
.query-page svg,
.data-history-page svg,
.airtime-history-page svg,
#funding-history-page svg,
.query-page iframe,
.data-history-page iframe,
.airtime-history-page iframe,
#funding-history-page iframe {
    max-width: 100%;
}
