/* Modern wallet dashboard for account.php.
 * Scoped to #wallet-section so the rest of the account page keeps its current presentation.
 */

#wallet-section.wallet-dashboard {
    --wallet-brand: #078b54;
    --wallet-brand-dark: #056b41;
    --wallet-brand-soft: #eef9f4;
    --wallet-ink: #15231c;
    --wallet-muted: #718078;
    --wallet-border: #e2ebe6;
    --wallet-surface: #ffffff;
    --wallet-bg: #f6faf8;
    --wallet-shadow: 0 12px 32px rgba(26, 61, 43, .07);
    color: var(--wallet-ink);
}

#wallet-section .wallet-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 26px 28px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(255,255,255,.18), transparent 28%),
        linear-gradient(135deg, #057447 0%, #07945a 58%, #12a86b 100%);
    box-shadow: 0 18px 42px rgba(7, 139, 84, .18);
}

#wallet-section .wallet-hero::after {
    content: '';
    position: absolute;
    right: -55px;
    bottom: -95px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 42px solid rgba(255,255,255,.08);
    pointer-events: none;
}

#wallet-section .wallet-hero-copy,
#wallet-section .wallet-refresh-btn {
    position: relative;
    z-index: 1;
}

#wallet-section .wallet-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding: 5px 9px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .65px;
    text-transform: uppercase;
}

#wallet-section .wallet-title {
    margin: 0 0 6px;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -.6px;
}

#wallet-section .wallet-subtitle {
    max-width: 640px;
    color: rgba(255,255,255,.82);
    font-size: 14px;
    line-height: 1.55;
}

#wallet-section .wallet-refresh-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.12);
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

#wallet-section .wallet-refresh-btn:hover,
#wallet-section .wallet-refresh-btn:focus {
    color: #fff;
    border-color: rgba(255,255,255,.42);
    background: rgba(255,255,255,.19);
    transform: translateY(-1px);
}

#wallet-section .wallet-refresh-btn:disabled {
    opacity: .62;
    transform: none;
}

#wallet-section .wallet-alert-slot:empty {
    display: none;
}

#wallet-section .wallet-alert-slot .alert {
    margin-bottom: 18px;
    border: 0;
    border-radius: 14px;
}

#wallet-section .wallet-section-card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--wallet-border);
    border-radius: 20px;
    background: var(--wallet-surface);
    box-shadow: var(--wallet-shadow);
}

#wallet-section .wallet-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

#wallet-section .wallet-section-heading h5 {
    margin: 2px 0 0;
    color: var(--wallet-ink);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.2px;
}

#wallet-section .wallet-section-kicker {
    color: var(--wallet-brand);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
}

#wallet-section .wallet-section-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--wallet-brand);
    background: var(--wallet-brand-soft);
    font-size: 17px;
}

#wallet-section .wallet-balance-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 178px;
    padding: 18px;
    border: 1px solid var(--wallet-border);
    border-radius: 18px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

#wallet-section .wallet-balance-card:hover {
    transform: translateY(-3px);
    border-color: #cfe1d8;
    box-shadow: 0 13px 28px rgba(28, 64, 45, .09);
}

#wallet-section .wallet-balance-card::after {
    content: '';
    position: absolute;
    right: -28px;
    top: -34px;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: currentColor;
    opacity: .055;
}

#wallet-section .wallet-balance-card--pending { color: #aa6b05; }
#wallet-section .wallet-balance-card--points { color: #2563eb; }
#wallet-section .wallet-balance-card--consumer { color: #078b54; }
#wallet-section .wallet-balance-card--savings { color: #7c3aed; }

#wallet-section .wallet-balance-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

#wallet-section .wallet-balance-name {
    color: var(--wallet-ink);
    font-size: 14px;
    font-weight: 750;
}

#wallet-section .wallet-balance-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: currentColor;
    background: color-mix(in srgb, currentColor 10%, white);
}

#wallet-section .wallet-balance-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--wallet-ink);
}

#wallet-section .wallet-balance-value strong {
    font-size: clamp(24px, 2.4vw, 30px);
    line-height: 1;
    letter-spacing: -.7px;
}

#wallet-section .wallet-balance-unit {
    color: var(--wallet-muted);
    font-size: 11px;
    font-weight: 700;
}

#wallet-section .wallet-balance-note {
    color: var(--wallet-muted);
    font-size: 12px;
    line-height: 1.45;
}

#wallet-section .wallet-transfer-section {
    padding: 0;
    overflow: hidden;
}

#wallet-section .wallet-transfer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
    min-height: 310px;
}

#wallet-section .wallet-transfer-copy {
    padding: 24px;
}

#wallet-section .wallet-section-heading-compact {
    margin-bottom: 12px;
}

#wallet-section .wallet-section-icon-transfer {
    color: #fff;
    background: var(--wallet-brand);
}

#wallet-section .wallet-transfer-description {
    max-width: 650px;
    margin-bottom: 16px;
    color: var(--wallet-muted);
    font-size: 13px;
    line-height: 1.6;
}

#wallet-section .wallet-policy-box {
    margin-bottom: 14px;
    padding: 14px 15px;
    border: 1px solid #cfe8dc;
    border-radius: 14px;
    color: #24533d;
    background: #f0faf5;
    font-size: 13px;
    line-height: 1.55;
}

#wallet-section .wallet-rate-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
}

#wallet-section .wallet-rate-label {
    color: #5e7569;
    font-size: 12px;
    font-weight: 700;
}

#wallet-section .wallet-rate-badge {
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: var(--wallet-brand);
    font-size: 12px;
    font-weight: 800;
}

#wallet-section .wallet-policy-example {
    color: #607168;
    font-size: 12px;
}

#wallet-section .wallet-policy-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #7d7160;
    font-size: 11px;
    line-height: 1.55;
}

#wallet-section .wallet-policy-note i {
    margin-top: 2px;
    color: #c78a22;
}

#wallet-section .wallet-transfer-panel {
    display: flex;
    align-items: center;
    padding: 24px;
    border-left: 1px solid var(--wallet-border);
    background: linear-gradient(160deg, #f6fbf8 0%, #edf8f2 100%);
}

#wallet-section .wallet-transfer-panel form {
    width: 100%;
}

#wallet-section .wallet-field-label {
    display: block;
    margin-bottom: 8px;
    color: #42544b;
    font-size: 12px;
    font-weight: 750;
}

#wallet-section .wallet-amount-input {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 4px;
    padding: 5px 10px 5px 6px;
    border: 1px solid #cfe0d7;
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#wallet-section .wallet-amount-input:focus-within {
    border-color: #39a879;
    box-shadow: 0 0 0 3px rgba(7, 139, 84, .10);
}

#wallet-section .wallet-amount-input > i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--wallet-brand);
    background: var(--wallet-brand-soft);
}

#wallet-section .wallet-amount-input .form-control {
    min-width: 0;
    padding: 9px 7px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 17px;
    font-weight: 750;
}

#wallet-section .wallet-amount-input > span {
    color: var(--wallet-muted);
    font-size: 11px;
    font-weight: 700;
}

#wallet-section .wallet-transfer-preview {
    min-height: 40px;
    margin: 11px 2px 14px;
    color: #67766e;
    font-size: 12px;
    line-height: 1.55;
}

#wallet-section .wallet-transfer-preview.is-ready {
    color: #24533d;
    font-weight: 650;
}

#wallet-section .wallet-transfer-submit {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #078b54, #10a366);
    font-weight: 800;
    box-shadow: 0 9px 20px rgba(7, 139, 84, .18);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

#wallet-section .wallet-transfer-submit:hover,
#wallet-section .wallet-transfer-submit:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(7, 139, 84, .24);
}

#wallet-section .wallet-transfer-submit:disabled {
    opacity: .65;
    transform: none;
}

#wallet-section .wallet-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--wallet-border);
    border-radius: 15px;
    background: #fff;
}

#wallet-section .wallet-table {
    min-width: 690px;
    margin: 0;
}

#wallet-section .wallet-table thead th {
    padding: 11px 13px;
    border-bottom: 1px solid var(--wallet-border);
    color: #6d7d74;
    background: #f7faf8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .45px;
    text-transform: uppercase;
    white-space: nowrap;
}

#wallet-section .wallet-table tbody td {
    padding: 13px;
    border-color: #eef3f0;
    color: #31433a;
    font-size: 12px;
    vertical-align: middle;
}

#wallet-section .wallet-table tbody tr:last-child td {
    border-bottom: 0;
}

#wallet-section .wallet-table tbody tr:hover td {
    background: #fbfdfc;
}

#wallet-section .wallet-status-badge,
#wallet-section .wallet-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

#wallet-section .wallet-status-badge {
    color: #087448;
    background: #eaf8f1;
}

#wallet-section .wallet-status-badge.is-muted {
    color: #69766f;
    background: #eef1ef;
}

#wallet-section .wallet-status-badge.is-warning {
    color: #95620c;
    background: #fff4d9;
}

#wallet-section .wallet-type-badge {
    color: #3d5569;
    background: #edf3f7;
}

#wallet-section .wallet-transaction-change {
    font-weight: 800;
    white-space: nowrap;
}

#wallet-section .wallet-transaction-change.is-positive { color: #078b54; }
#wallet-section .wallet-transaction-change.is-negative { color: #c23c3c; }

#wallet-section .wallet-empty-state {
    padding: 32px 16px;
    text-align: center;
    color: var(--wallet-muted);
}

#wallet-section .wallet-empty-state i {
    display: block;
    margin-bottom: 10px;
    color: #afc0b7;
    font-size: 28px;
}

@media (max-width: 991.98px) {
    #wallet-section .wallet-transfer-layout {
        grid-template-columns: 1fr;
    }

    #wallet-section .wallet-transfer-panel {
        border-top: 1px solid var(--wallet-border);
        border-left: 0;
    }
}

@media (max-width: 600px) {
    #wallet-section .wallet-hero {
        align-items: flex-start;
        margin: 0 -2px 14px;
        padding: 20px 18px;
        border-radius: 18px;
    }

    #wallet-section .wallet-subtitle {
        font-size: 12px;
    }

    #wallet-section .wallet-refresh-btn {
        width: 42px;
        min-height: 42px;
        justify-content: center;
        padding: 0;
        border-radius: 12px;
    }

    #wallet-section .wallet-refresh-btn span {
        display: none;
    }

    #wallet-section .wallet-section-card {
        padding: 17px;
        border-radius: 17px;
    }

    #wallet-section .wallet-transfer-section {
        padding: 0;
    }

    #wallet-section .wallet-transfer-copy,
    #wallet-section .wallet-transfer-panel {
        padding: 18px;
    }

    #wallet-section .wallet-section-heading {
        margin-bottom: 14px;
    }

    #wallet-section .wallet-section-heading h5 {
        font-size: 16px;
    }

    #wallet-section .wallet-balance-card {
        min-height: 156px;
        padding: 15px;
    }

    #wallet-section .wallet-balance-value strong {
        font-size: 25px;
    }

    #wallet-section .wallet-table-wrap {
        overflow: visible;
        margin-left: 0;
        margin-right: 0;
        border: 0;
        background: transparent;
    }

    #wallet-section .wallet-table {
        display: block;
        min-width: 0;
        width: 100%;
    }

    #wallet-section .wallet-table thead {
        display: none;
    }

    #wallet-section .wallet-table tbody {
        display: grid;
        gap: 10px;
    }

    #wallet-section .wallet-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        overflow: hidden;
        border: 1px solid var(--wallet-border);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 5px 14px rgba(28, 64, 45, .04);
    }

    #wallet-section .wallet-table tbody td {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: flex-start;
        gap: 4px;
        padding: 10px 12px !important;
        border: 0 !important;
        border-bottom: 1px solid #eef3f0 !important;
        background: #fff !important;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    #wallet-section .wallet-table tbody td:nth-last-child(-n+2) {
        border-bottom: 0 !important;
    }

    #wallet-section .wallet-table tbody td:nth-child(odd) {
        border-right: 1px solid #eef3f0 !important;
    }

    #wallet-section .wallet-table tbody td::before {
        content: attr(data-label);
        color: #7a8981;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .45px;
        line-height: 1.2;
        text-transform: uppercase;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-change {
        align-items: flex-end !important;
        text-align: right !important;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-change::before {
        align-self: flex-end;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-received,
    #wallet-section .wallet-table tbody td.wallet-cell-remaining,
    #wallet-section .wallet-table tbody td.wallet-cell-balance {
        align-items: flex-end !important;
        text-align: right !important;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-received::before,
    #wallet-section .wallet-table tbody td.wallet-cell-remaining::before,
    #wallet-section .wallet-table tbody td.wallet-cell-balance::before {
        align-self: flex-end;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-note,
    #wallet-section .wallet-table tbody td.wallet-cell-expiry,
    #wallet-section .wallet-table tbody td.wallet-cell-status,
    #wallet-section .wallet-table tbody td.wallet-cell-balance {
        grid-column: span 2;
        border-right: 0 !important;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-note {
        color: #5f6f66;
        line-height: 1.5;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-time {
        color: #53655c;
    }

    #wallet-section .wallet-table tbody td.wallet-cell-wallet strong {
        color: var(--wallet-ink);
    }

    #wallet-section .wallet-type-badge,
    #wallet-section .wallet-status-badge {
        max-width: 100%;
        white-space: normal;
        line-height: 1.35;
    }

    #wallet-section .wallet-transaction-change {
        font-size: 14px;
    }
}

@supports not (color: color-mix(in srgb, black, white)) {
    #wallet-section .wallet-balance-icon {
        background: #f1f6f3;
    }
}
