/* =========================
   AZIEL WALLET V2.5
   Shared Theme Compatible
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;

    color: var(--text);
    font-family: Inter, Arial, sans-serif;

    background:
        radial-gradient(circle at 50% 12%, rgba(124, 58, 237, .16), transparent 28%),
        radial-gradient(circle at 88% 42%, rgba(168, 85, 247, .10), transparent 30%),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
}

/* =========================
   PAGE
========================= */

.wallet-page {
    margin: 46px auto 110px;
}

/* =========================
   TITLE
========================= */

.wallet-title-row {
    margin-bottom: 34px;
}

.wallet-badge {
    display: inline-flex;
    align-items: center;

    height: 34px;
    padding: 0 13px;

    border-radius: 999px;

    background: rgba(124, 58, 237, .12);
    color: var(--primary);

    font-size: 12px;
    font-weight: 950;
}

.wallet-title-row h1 {
    margin: 18px 0 0;

    color: var(--text);
    font-size: clamp(48px, 6vw, 76px);
    line-height: .94;
    font-weight: 950;
    letter-spacing: -3.4px;
}

.wallet-title-row p {
    max-width: 560px;
    margin: 18px 0 0;

    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 650;
}

/* =========================
   BALANCE
========================= */

.wallet-balance-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;

    padding: 0 0 34px !important;
    margin-bottom: 34px !important;

    border-bottom: 1px solid var(--border) !important;
}

.wallet-balance-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.wallet-balance-top span {
    display: block;
    margin-bottom: 10px;

    color: var(--text-muted);
    font-size: 13px;
    font-weight: 950;
}

.wallet-balance-top h1 {
    margin: 0;

    color: var(--warning);
    font-size: clamp(44px, 6vw, 84px);
    line-height: .9;
    font-weight: 950;
    letter-spacing: -3px;
}

.wallet-balance-note {
    margin: 16px 0 0;

    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.wallet-icon {
    width: 62px;
    height: 62px;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: rgba(124, 58, 237, .12);
    color: var(--primary);

    font-size: 24px;
    flex-shrink: 0;
}

/* =========================
   GRID
========================= */

.wallet-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 58px;
    align-items: start;
}

/* =========================
   WALLET CARD
========================= */

.wallet-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;

    padding: 0 0 34px !important;

    border-bottom: 1px solid var(--border) !important;
}

.wallet-card-head {
    margin-bottom: 24px;
}

.wallet-card-head h2 {
    margin: 0;

    color: var(--text);
    font-size: 30px;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -1.2px;
}

.wallet-card-head span {
    display: block;
    margin-top: 8px;

    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 650;
}

/* =========================
   FORM
========================= */

.wallet-card label {
    display: block;

    margin: 22px 0 8px;

    color: var(--text-muted);
    font-size: 13px;
    font-weight: 950;
}

.wallet-card input[type="number"],
.wallet-card input[type="file"],
.wallet-card select {
    width: 100%;
    height: 56px;

    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;

    background: transparent;
    color: var(--text);

    padding: 0;
    outline: none;

    font-size: 18px;
    font-weight: 850;
}

.wallet-card input::placeholder {
    color: var(--text-muted);
}

.wallet-card input:focus,
.wallet-card select:focus {
    border-bottom-color: var(--primary);
    box-shadow: none;
}

.wallet-card select option {
    color: #111827;
    background: #ffffff;
}

/* =========================
   QUICK AMOUNTS
========================= */

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

    margin: 14px 0 22px;
}

.quick-amounts button {
    height: 44px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: transparent;
    color: var(--text);

    font-size: 14px;
    font-weight: 950;

    cursor: pointer;
    transition:
        transform var(--motion-duration-fast, .2s) var(--motion-ease-standard, ease),
        border-color var(--motion-duration-fast, .2s) var(--motion-ease-standard, ease),
        background-color var(--motion-duration-fast, .2s) var(--motion-ease-standard, ease),
        box-shadow var(--motion-duration-fast, .2s) var(--motion-ease-standard, ease);
}

.quick-amounts button:hover,
.quick-amounts button.active {
    border-color: rgba(124, 58, 237, .35);
    background: rgba(124, 58, 237, .12);
    color: var(--primary);
}

/* =========================
   PAYMENT GRID
========================= */

.payment-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;

    margin: 14px 0 18px !important;
}

.pay-card,
.payment-option,
.payment-card,
.payment-method,
.payment-item {
    min-width: 120px !important;
    min-height: 54px !important;
    height: 54px !important;

    padding: 0 14px !important;

    border-radius: 999px !important;
    border: 1px solid var(--border) !important;

    background: var(--surface) !important;
    color: var(--text) !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;

    text-align: center !important;
    cursor: pointer !important;

    box-shadow: none !important;
    transition: .2s ease !important;
}

.pay-card:hover,
.payment-option:hover,
.payment-card:hover,
.payment-method:hover,
.payment-item:hover,
.pay-card.active,
.payment-option.active,
.payment-card.active,
.payment-method.active,
.payment-item.active {
    border-color: rgba(124, 58, 237, .35) !important;
    background: rgba(124, 58, 237, .12) !important;
    color: var(--primary) !important;
}

.pay-logo,
.pay-card img,
.payment-option img,
.payment-card img,
.payment-method img,
.payment-item img {
    width: 36px !important;
    height: 24px !important;
    max-width: 36px !important;
    max-height: 24px !important;
    object-fit: contain !important;
}

.pay-info {
    display: contents !important;
}

.pay-info span,
.pay-card span,
.payment-option span,
.payment-card span,
.payment-method span,
.payment-item span,
.pay-info p,
.pay-card p,
.payment-option p,
.payment-card p,
.payment-method p,
.payment-item p {
    margin: 0 !important;

    color: inherit !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
}

.pay-info small,
.pay-card small,
.payment-option small,
.payment-card small,
.payment-method small,
.payment-item small {
    display: none !important;
}

/* =========================
   QR BOX
========================= */

.wallet-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin: 16px 0 20px !important;
    padding: 22px 0 !important;

    border: none !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;

    background: transparent !important;
    text-align: center !important;
}

.wallet-qr-box h3 {
    margin: 0 0 14px !important;

    color: var(--text) !important;
    font-size: 20px !important;
    font-weight: 950 !important;
    letter-spacing: -.5px;
}

.wallet-qr-box img {
    width: 180px !important;
    height: 180px !important;

    object-fit: contain !important;
    border-radius: 22px !important;

    background: #fff !important;
    padding: 10px !important;

    display: block;
    margin: auto;
}

.wallet-qr-box p {
    max-width: 360px;
    margin: 16px 0 0 !important;

    color: var(--text-muted) !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    text-align: center !important;
}

/* =========================
   SUBMIT
========================= */

.wallet-submit-btn,
#submitTopupBtn {
    width: 100%;
    height: 54px;

    margin-top: 18px !important;

    border: none;
    border-radius: 999px;

    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;

    font-size: 15px;
    font-weight: 950;

    cursor: pointer;
    box-shadow: 0 14px 28px rgba(124, 58, 237, .26);
    transition: .2s ease;
}

.wallet-submit-btn:hover,
#submitTopupBtn:hover {
    transform: translateY(-2px);
}

.wallet-submit-btn:disabled,
#submitTopupBtn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.wallet-note {
    margin: 14px 0 0;

    color: var(--text-muted);
    text-align: left !important;
    font-size: 13px;
    line-height: 1.5;
}

/* =========================
   HISTORY
========================= */

#walletHistory {
    display: grid;
    gap: 0;
}

.wallet-history-item {
    min-height: 72px;

    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;

    padding: 18px 0;

    border-bottom: 1px solid var(--border);
    background: transparent !important;
    border-radius: 0 !important;
}

.wallet-history-item strong {
    display: block;

    color: var(--text);
    font-size: 17px;
    font-weight: 950;
}

.wallet-history-item p {
    margin: 5px 0 0;

    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.wallet-load-more {
    width: 100%;
    min-height: 44px;
    margin-top: 16px;

    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.wallet-load-more:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.wallet-empty {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    text-align: left;
    padding: 24px 0;

    background: transparent !important;
    border: none !important;
}

.wallet-empty i {
    display: none;
}

.wallet-empty h3 {
    margin: 0 0 8px;

    color: var(--text);
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -.5px;
}

.wallet-empty p {
    margin: 0;

    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* =========================
   STATUS
========================= */

.wallet-status,
.status-pending,
.status-approved,
.status-paid,
.status-completed,
.status-rejected,
.status-cancelled {
    min-width: 90px;
    min-height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 11px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 950;
    text-transform: capitalize;
    white-space: nowrap;
}

.wallet-status.pending,
.status-pending {
    background: rgba(245, 158, 11, .16);
    color: var(--warning);
}

.wallet-status.approved,
.wallet-status.paid,
.wallet-status.completed,
.status-approved,
.status-paid,
.status-completed {
    background: rgba(34, 197, 94, .16);
    color: var(--success);
}

.wallet-status.rejected,
.wallet-status.cancelled,
.status-rejected,
.status-cancelled {
    background: rgba(239, 68, 68, .15);
    color: var(--danger);
}

/* =========================
   LIVE POPUP
========================= */

#walletLivePopup {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;

    padding: 14px 18px;

    border-radius: 18px;

    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;

    font-size: 14px;
    font-weight: 950;

    box-shadow: 0 18px 38px rgba(124, 58, 237, .36);

    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;

    transition:
        opacity var(--motion-duration-normal, .25s) var(--motion-ease-enter, ease),
        transform var(--motion-duration-normal, .25s) var(--motion-ease-enter, ease);
}

#walletLivePopup.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   MODALS
========================= */

.order-loading-overlay,
.success-modal,
.qr-modal {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 999999;

    background: rgba(0, 0, 0, .50);
    backdrop-filter: blur(12px);

    align-items: center;
    justify-content: center;
}

.order-loading-overlay.show,
.success-modal.show,
.qr-modal.show {
    display: flex !important;
}

.order-loading-box,
.success-modal-box,
.qr-modal-box {
    width: min(420px, calc(100% - 32px));

    padding: 30px;

    border-radius: 28px;
    background: var(--surface-strong);
    color: var(--text);

    border: 1px solid var(--border);
    backdrop-filter: blur(18px);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.success-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 14px;

    border-radius: 50%;

    background: linear-gradient(135deg, var(--success), #16a34a);
    color: #fff;

    display: grid;
    place-items: center;

    font-size: 28px;
    font-weight: 950;
}

.success-modal-box h2,
.order-loading-box h3 {
    margin: 0 0 8px;

    color: var(--text);
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -.7px;
}

.success-modal-box p,
.order-loading-box p {
    margin: 0;

    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.success-actions button {
    flex: 1;
    height: 46px;

    border: none;
    border-radius: 999px;

    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

#viewHistoryBtn {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
}

#backHomeBtn {
    background: rgba(124, 58, 237, .12);
    color: var(--primary);
}

/* =========================
   LOADING DOTS
========================= */

.order-loading-dots {
    height: 34px;
    margin-bottom: 14px;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
}

.order-loading-dots span {
    width: 8px;
    height: 8px;

    border-radius: 50%;
    background: var(--primary);

    animation: az-motion-wallet-dot 1s var(--motion-ease-standard, ease-in-out) infinite;
}

.order-loading-dots span:nth-child(2) {
    animation-delay: .12s;
}

.order-loading-dots span:nth-child(3) {
    animation-delay: .24s;
}

.order-loading-dots span:nth-child(4) {
    animation-delay: .36s;
}

@keyframes az-motion-wallet-dot {

    0%,
    100% {
        transform: translateY(0);
        opacity: .45;
    }

    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* =========================
   WALLET QR MODAL
========================= */

.wallet-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(10px);
}

.wallet-qr-modal.show {
    display: flex !important;
}

.wallet-qr-modal-box {
    width: min(420px, 100%);
    max-height: 92vh;
    overflow-y: auto;

    position: relative;

    padding: 24px;

    border-radius: 28px;
    border: 1px solid rgba(124, 58, 237, .35);

    background: var(--surface-strong);
    color: var(--text);

    box-shadow: var(--shadow-lg);
}

.wallet-qr-close,
#closeQrModal {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 36px;
    height: 36px;

    border: none;
    border-radius: 50%;

    background: var(--danger);
    color: #fff;

    cursor: pointer;
    font-size: 20px;
}

.wallet-qr-modal-box h2 {
    margin: 0 0 18px;

    color: var(--primary);
    font-size: 26px;
    font-weight: 950;
}

.wallet-pay-summary {
    display: grid;
    gap: 10px;

    padding: 16px;
    margin-bottom: 18px;

    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.wallet-pay-summary div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.wallet-pay-summary span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 850;
}

.wallet-pay-summary strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 950;
    text-align: right;
}

.wallet-modal-qr {
    display: grid;
    place-items: center;
    margin: 18px 0 12px;
}

.wallet-modal-qr img,
.qr-modal-box img {
    width: 190px;
    height: 190px;

    object-fit: contain;

    padding: 10px;

    border-radius: 18px;
    background: #fff;
}

#modalAmountText {
    margin: 12px 0 6px;

    text-align: center;
    color: var(--warning);
    font-size: 28px;
    font-weight: 950;
}

.wallet-qr-modal-box p {
    text-align: center;
    margin: 0;

    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.wallet-manual-box {
    width: min(520px, 100%);
    max-height: 92vh;
    overflow-y: auto;
}

.wallet-provider-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.wallet-manual-qr {
    display: grid;
    place-items: center;
    margin: 18px 0;
}

.wallet-manual-qr[hidden] {
    display: none !important;
}

.wallet-manual-qr img {
    width: min(220px, 100%);
    aspect-ratio: 1;
    object-fit: contain;
    padding: 10px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
}

.wallet-manual-instructions {
    margin: 14px 0;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    overflow-wrap: anywhere;
}

.manual-payment-note[hidden],
.manual-slip-upload[hidden],
.wallet-submit-slip-btn[hidden],
#walletOpenPaymentAppBtn[hidden] {
    display: none !important;
}

.wallet-countdown {
    margin-top: 6px;

    text-align: center;
    color: var(--danger);
    font-size: 22px;
    font-weight: 950;
}

.wallet-waiting-btn {
    width: 100%;
    height: 52px;

    margin-top: 18px;

    border: none;
    border-radius: 16px;

    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;

    font-size: 14px;
    font-weight: 950;
}

/* =========================
   CLEANUP OLD UI
========================= */

.upload-slip-box,
#topupSlip,
.az-bottom-nav {
    display: none !important;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .wallet-page {
        width: 100% !important;
        max-width: 100% !important;

        margin: 0 auto 70px !important;
        padding: 28px 16px 80px !important;
    }

    .wallet-title-row {
        margin-bottom: 30px !important;
    }

    .wallet-title-row h1 {
        font-size: 42px !important;
        line-height: .95 !important;
        letter-spacing: -2px !important;
    }

    .wallet-title-row p {
        font-size: 14px !important;
        line-height: 1.55 !important;
    }

    .wallet-balance-top {
        align-items: flex-start !important;
    }

    .wallet-balance-top h1 {
        font-size: 46px !important;
        letter-spacing: -2px !important;
    }

    .wallet-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }

    .wallet-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .wallet-card-head h2 {
        font-size: 26px !important;
    }

    .wallet-card-head span {
        font-size: 14px !important;
    }

    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .pay-card,
    .payment-option,
    .payment-card,
    .payment-method,
    .payment-item {
        width: 100% !important;
        min-width: 0 !important;
    }

    .wallet-qr-box img {
        width: 170px !important;
        height: 170px !important;
    }
}

@media (max-width: 520px) {
    .wallet-title-row h1 {
        font-size: 38px !important;
    }

    .wallet-balance-top {
        flex-direction: column !important;
        gap: 18px !important;
    }

    .wallet-balance-top h1 {
        font-size: 42px !important;
    }

    .wallet-card-head h2 {
        font-size: 24px !important;
    }

    .payment-grid {
        grid-template-columns: 1fr !important;
    }

    .success-actions {
        flex-direction: column !important;
    }

    .wallet-qr-modal-box {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .wallet-modal-qr img {
        width: 180px;
        height: 180px;
    }
}

.wallet-status.status-completed {
    color: #22c55e;
}

.wallet-status.status-pending {
    color: #f59e0b;
}

.wallet-status.status-paid {
    color: #3b82f6;
}

.wallet-status.status-failed {
    color: #ef4444;
}

.wallet-status.status-rejected {
    color: #ef4444;
}

/* Wallet Manual Payment Modal */
#walletManualModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(10px);
}

#walletManualModal.show {
    display: flex;
}

.wallet-manual-box {
    position: relative;
    width: min(440px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px;
    border-radius: 28px;
    background: rgba(13, 18, 42, .96);
    border: 1px solid rgba(139, 92, 246, .45);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
    color: #fff;
}

.wallet-manual-box h3 {
    margin: 0 0 18px;
    font-size: 28px;
    color: #a855f7;
}

.wallet-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.wallet-manual-info {
    display: grid;
    gap: 12px;
}

.transfer-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
}

.transfer-card h4 {
    margin: 0 0 8px;
    color: #9ca3af;
    font-size: 13px;
}

.transfer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.transfer-row strong {
    color: #fff;
    font-size: 15px;
    word-break: break-all;
}

.transfer-row button,
.payment-open-bank,
.wallet-submit-slip-btn {
    border: 0;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
}

.transfer-row button {
    background: rgba(139, 92, 246, .2);
    color: #c4b5fd;
}

.payment-open-bank,
.wallet-submit-slip-btn {
    width: 100%;
    margin-top: 14px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
}

.manual-payment-note {
    margin: 16px 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(245, 158, 11, .1);
    color: #fbbf24;
    line-height: 1.5;
}

.manual-payment-note span {
    display: block;
    color: #d1d5db;
}

.manual-slip-upload {
    display: block;
    padding: 16px;
    border-radius: 18px;
    border: 1px dashed rgba(139, 92, 246, .5);
    background: rgba(255, 255, 255, .05);
    color: #fff;
}

.manual-slip-upload span {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
}

.manual-slip-preview {
    margin-top: 14px;
    text-align: center;
}

.manual-slip-preview img {
    max-width: 100%;
    max-height: 260px;
    border-radius: 16px;
}

#walletManualMsg {
    margin-top: 12px;
    font-weight: 700;
}

.wallet-msg.success {
    color: #22c55e;
}

.wallet-msg.error {
    color: #ef4444;
}

/* FIX: Wallet manual modal center + clean spacing */
#walletManualModal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    background: rgba(0, 0, 0, .72) !important;
    backdrop-filter: blur(12px);
}

#walletManualModal.show {
    display: flex !important;
}

#walletManualModal .wallet-manual-box {
    width: min(440px, calc(100vw - 32px)) !important;
    max-height: 86vh !important;
    overflow-y: auto !important;
    margin: auto !important;
    padding: 30px 26px !important;
    border-radius: 28px !important;
    background: rgba(13, 18, 42, .96) !important;
    border: 1px solid rgba(139, 92, 246, .45) !important;
    color: #fff !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6) !important;
}

#walletManualModal .wallet-manual-box::-webkit-scrollbar {
    width: 0;
}

#walletManualModal .wallet-manual-box h3 {
    text-align: center;
    margin-bottom: 18px;
}

#walletManualModal .wallet-modal-close {
    top: 16px !important;
    right: 16px !important;
}

#walletManualModal .wallet-manual-info,
#walletManualModal .transfer-card,
#walletManualModal .payment-open-bank,
#walletManualModal .manual-payment-note,
#walletManualModal .manual-slip-upload,
#walletManualModal .wallet-submit-slip-btn {
    width: 100% !important;
    box-sizing: border-box !important;
}

#walletManualModal .transfer-card {
    margin-bottom: 12px !important;
}

#walletManualModal .transfer-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#walletManualModal .payment-open-bank {
    margin-top: 8px !important;
    height: 48px !important;
}

/* FINAL FIX: Wallet manual modal content alignment */
#walletManualModal .wallet-manual-box {
    width: min(420px, calc(100vw - 32px)) !important;
    padding: 28px !important;
}

#walletManualModal .wallet-manual-info {
    gap: 14px !important;
}

#walletManualModal .transfer-card {
    min-height: 74px !important;
    padding: 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

#walletManualModal .transfer-card h4 {
    text-align: left !important;
    margin: 0 0 10px !important;
    font-size: 13px !important;
    color: rgba(255, 255, 255, .58) !important;
}

#walletManualModal .transfer-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 12px !important;
}

#walletManualModal .transfer-row strong {
    text-align: left !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
}

#walletManualModal .transfer-row button {
    min-width: 64px !important;
    height: 38px !important;
    padding: 0 14px !important;
}

#walletManualModal .payment-open-bank {
    height: 46px !important;
    margin: 8px 0 14px !important;
}

#walletManualModal .manual-payment-note {
    text-align: center !important;
    margin: 0 0 14px !important;
}

#walletManualModal .manual-slip-upload {
    margin-top: 0 !important;
}

#walletManualModal .wallet-submit-slip-btn {
    height: 46px !important;
    margin-top: 14px !important;
}

/* Wallet manual checkout sheet: one surface, typography-first */
#walletManualModal {
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
}

#walletManualModal .wallet-manual-box {
    width: min(452px, calc(100vw - 32px)) !important;
    max-height: min(760px, calc(100dvh - 32px)) !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 22px !important;
    border: 1px solid var(--border) !important;
    background: var(--card-bg) !important;
    color: var(--text) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28) !important;
}

#walletManualModal .wallet-manual-box::before {
    content: none !important;
}

#walletManualModal .wallet-modal-close {
    top: 14px !important;
    right: 14px !important;
    z-index: 2;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid var(--border) !important;
    border-radius: 999px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    font-size: 20px !important;
}

#walletManualModal .wallet-manual-heading {
    padding: 30px 28px 20px;
    border-bottom: 1px solid var(--border);
}

#walletManualModal .wallet-manual-heading h3 {
    margin: 0 42px 8px 0 !important;
    text-align: left !important;
    color: var(--text) !important;
    font-size: 25px !important;
    line-height: 1.15 !important;
}

#walletManualModal .wallet-manual-heading strong {
    display: block;
    color: var(--text) !important;
    font-size: 31px;
    line-height: 1.1;
    font-weight: 950;
}

#walletManualModal .wallet-manual-heading span,
#walletManualModal .wallet-manual-row span,
#walletManualModal .manual-payment-note span,
#walletManualModal .wallet-manual-instructions {
    color: var(--text-muted) !important;
}

#walletManualModal .wallet-manual-info {
    display: grid !important;
    gap: 0 !important;
    padding: 8px 28px 0;
    overflow-y: auto;
}

#walletManualModal .wallet-manual-row {
    display: grid;
    grid-template-columns: minmax(92px, .7fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

#walletManualModal .wallet-manual-row strong {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

#walletManualModal .wallet-manual-row button,
#walletManualModal .payment-open-bank {
    border: 0;
    border-radius: 999px;
    background: var(--surface);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

#walletManualModal .wallet-manual-row button {
    padding: 7px 10px;
}

#walletManualModal .wallet-manual-qr {
    margin: 18px 28px 10px;
}

#walletManualModal .wallet-manual-qr img {
    width: min(210px, 100%) !important;
    height: auto !important;
    border-radius: 16px;
    border: 1px solid var(--border);
}

#walletManualModal .wallet-manual-instructions {
    margin: 0 28px 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 13px;
    line-height: 1.6;
}

#walletManualModal .payment-open-bank {
    width: calc(100% - 56px) !important;
    height: 42px !important;
    margin: 0 28px 16px !important;
}

#walletManualModal .manual-payment-note {
    margin: 0 28px 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    color: var(--text) !important;
}

#walletManualModal .manual-payment-note strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
    font-size: 14px;
}

#walletManualModal .manual-slip-upload {
    margin: 0 28px 12px !important;
    padding: 15px 16px !important;
    border: 1px dashed var(--border) !important;
    border-radius: 14px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    text-align: center;
    cursor: pointer;
}

#walletManualModal .manual-slip-upload span {
    margin: 0 !important;
    color: var(--primary);
}

#walletManualModal .manual-slip-upload input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

#walletManualModal .manual-slip-preview {
    margin: 0 28px 12px !important;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
}

#walletManualModal .manual-slip-preview span {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

#walletManualModal .manual-slip-preview img {
    max-height: 170px;
    object-fit: contain;
    border-radius: 12px;
}

#walletManualModal .manual-slip-preview button {
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-weight: 900;
    cursor: pointer;
}

#walletManualModal #walletManualMsg {
    min-height: 20px;
    margin: 0 28px 12px !important;
    font-size: 13px;
}

#walletManualModal .wallet-submit-slip-btn {
    position: sticky;
    bottom: 0;
    width: 100% !important;
    height: 58px !important;
    margin: auto 0 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
}

@media (max-width: 520px) {
    #walletManualModal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    #walletManualModal .wallet-manual-box {
        width: 100vw !important;
        max-height: 100dvh !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        border-left: 0 !important;
        border-radius: 22px 22px 0 0 !important;
    }

    #walletManualModal .wallet-manual-heading,
    #walletManualModal .wallet-manual-info {
        padding-right: 20px;
        padding-left: 20px;
    }

    #walletManualModal .wallet-manual-row {
        grid-template-columns: 1fr auto;
    }

    #walletManualModal .wallet-manual-row span {
        grid-column: 1 / -1;
    }

    #walletManualModal .wallet-manual-qr,
    #walletManualModal .wallet-manual-instructions,
    #walletManualModal .manual-payment-note,
    #walletManualModal .manual-slip-upload,
    #walletManualModal .manual-slip-preview,
    #walletManualModal #walletManualMsg {
        margin-right: 20px !important;
        margin-left: 20px !important;
    }

    #walletManualModal .payment-open-bank {
        width: calc(100% - 40px) !important;
        margin-right: 20px !important;
        margin-left: 20px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #walletManualModal,
    #walletManualModal .wallet-manual-box {
        transition: none !important;
        animation: none !important;
    }
}

/* Wallet manual checkout contrast ownership */
body.theme-dark #walletManualModal,
body.dark #walletManualModal {
    --wallet-sheet-bg: #10162b;
    --wallet-sheet-bg-soft: rgba(255, 255, 255, .075);
    --wallet-sheet-bg-strong: rgba(255, 255, 255, .115);
    --wallet-sheet-border: rgba(203, 213, 225, .18);
    --wallet-sheet-border-strong: rgba(216, 180, 254, .34);
    --wallet-sheet-title: #ffffff;
    --wallet-sheet-amount: #ffffff;
    --wallet-sheet-subtitle: #dbe4f5;
    --wallet-sheet-label: #b9c4d8;
    --wallet-sheet-value: #f8fafc;
    --wallet-sheet-instruction: #d1dbef;
    --wallet-sheet-accent: #d8b4fe;
    --wallet-sheet-accent-strong: #f3e8ff;
    --wallet-sheet-danger: #fca5a5;
    --wallet-sheet-shadow: 0 24px 76px rgba(0, 0, 0, .58);
}

body.theme-light #walletManualModal,
body.light #walletManualModal {
    --wallet-sheet-bg: #ffffff;
    --wallet-sheet-bg-soft: #f4f0ff;
    --wallet-sheet-bg-strong: #eee7ff;
    --wallet-sheet-border: rgba(88, 72, 133, .18);
    --wallet-sheet-border-strong: rgba(124, 58, 237, .28);
    --wallet-sheet-title: #111827;
    --wallet-sheet-amount: #111827;
    --wallet-sheet-subtitle: #4b5563;
    --wallet-sheet-label: #5b6474;
    --wallet-sheet-value: #172033;
    --wallet-sheet-instruction: #465366;
    --wallet-sheet-accent: #6d28d9;
    --wallet-sheet-accent-strong: #4c1d95;
    --wallet-sheet-danger: #b91c1c;
    --wallet-sheet-shadow: 0 24px 64px rgba(17, 24, 39, .22);
}

#walletManualModal:not(.show) {
    pointer-events: none;
}

#walletManualModal .wallet-manual-box {
    scrollbar-gutter: stable;
    background: var(--wallet-sheet-bg, #10162b) !important;
    border-color: var(--wallet-sheet-border-strong, rgba(216, 180, 254, .34)) !important;
    color: var(--wallet-sheet-title, #ffffff) !important;
    box-shadow: var(--wallet-sheet-shadow, 0 24px 76px rgba(0, 0, 0, .58)) !important;
}

#walletManualModal .wallet-manual-heading {
    border-bottom-color: var(--wallet-sheet-border, rgba(203, 213, 225, .18));
}

#walletManualModal .wallet-manual-heading h3 {
    color: var(--wallet-sheet-title, #ffffff) !important;
    font-size: 24px !important;
    font-weight: 900;
}

#walletManualModal .wallet-manual-heading strong {
    color: var(--wallet-sheet-amount, #ffffff) !important;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: 0;
}

#walletManualModal .wallet-manual-heading span {
    color: var(--wallet-sheet-subtitle, #dbe4f5) !important;
    font-size: 14px;
    font-weight: 750;
}

#walletManualModal .wallet-manual-info {
    padding-right: 24px;
}

#walletManualModal .wallet-manual-row {
    border-bottom-color: var(--wallet-sheet-border, rgba(203, 213, 225, .18));
}

#walletManualModal .wallet-manual-row span {
    color: var(--wallet-sheet-label, #b9c4d8) !important;
    font-size: 12px;
    font-weight: 850;
}

#walletManualModal .wallet-manual-row strong {
    color: var(--wallet-sheet-value, #f8fafc) !important;
    font-size: 15px;
    font-weight: 900;
}

#walletManualModal .wallet-manual-row button,
#walletManualModal .payment-open-bank,
#walletManualModal .manual-slip-preview button {
    background: var(--wallet-sheet-bg-soft, rgba(255, 255, 255, .075));
    color: var(--wallet-sheet-accent-strong, #f3e8ff);
    border: 1px solid var(--wallet-sheet-border, rgba(203, 213, 225, .18));
}

#walletManualModal .wallet-modal-close {
    background: var(--wallet-sheet-bg-soft, rgba(255, 255, 255, .075)) !important;
    color: var(--wallet-sheet-title, #ffffff) !important;
    border-color: var(--wallet-sheet-border, rgba(203, 213, 225, .18)) !important;
}

#walletManualModal .wallet-modal-close:focus-visible,
#walletManualModal .wallet-manual-row button:focus-visible,
#walletManualModal .payment-open-bank:focus-visible,
#walletManualModal .manual-slip-upload:focus-within,
#walletManualModal .manual-slip-preview button:focus-visible,
#walletManualModal .wallet-submit-slip-btn:focus-visible {
    outline: 3px solid var(--wallet-sheet-accent, #d8b4fe);
    outline-offset: 3px;
}

#walletManualModal .wallet-manual-qr img {
    background: #ffffff;
    border-color: var(--wallet-sheet-border, rgba(203, 213, 225, .18));
}

#walletManualModal .wallet-manual-instructions {
    color: var(--wallet-sheet-instruction, #d1dbef) !important;
    font-weight: 720;
}

#walletManualModal .manual-payment-note strong {
    color: var(--wallet-sheet-title, #ffffff) !important;
    font-size: 15px;
    font-weight: 900;
}

#walletManualModal .manual-payment-note span {
    color: var(--wallet-sheet-instruction, #d1dbef) !important;
    font-size: 13px;
    font-weight: 700;
}

#walletManualModal .manual-slip-upload {
    background: var(--wallet-sheet-bg-soft, rgba(255, 255, 255, .075)) !important;
    border-color: var(--wallet-sheet-border-strong, rgba(216, 180, 254, .34)) !important;
    color: var(--wallet-sheet-title, #ffffff) !important;
}

#walletManualModal .manual-slip-upload span {
    color: var(--wallet-sheet-accent-strong, #f3e8ff) !important;
    font-weight: 900;
}

#walletManualModal .manual-slip-preview {
    background: var(--wallet-sheet-bg-soft, rgba(255, 255, 255, .075));
    border-color: var(--wallet-sheet-border, rgba(203, 213, 225, .18));
}

#walletManualModal .manual-slip-preview span {
    color: var(--wallet-sheet-value, #f8fafc) !important;
    font-weight: 850;
}

#walletManualModal .manual-slip-preview button {
    color: var(--wallet-sheet-danger, #fca5a5);
}

#walletManualModal #walletManualMsg {
    color: var(--wallet-sheet-instruction, #d1dbef);
}

#walletManualModal .wallet-msg.success {
    color: #86efac;
}

#walletManualModal .wallet-msg.error {
    color: var(--wallet-sheet-danger, #fca5a5);
}

#walletManualModal .wallet-submit-slip-btn {
    color: #ffffff !important;
    font-weight: 950;
    box-shadow: 0 -1px 0 var(--wallet-sheet-border, rgba(203, 213, 225, .18));
}

#walletManualModal .wallet-submit-slip-btn:disabled,
#walletManualModal .wallet-submit-slip-btn[aria-disabled="true"] {
    opacity: .78;
    color: rgba(255, 255, 255, .92) !important;
    cursor: progress;
}
