﻿/* ════════════════════════════════════════════════════════
   payment-popup.css
   أضف في App.razor: <link rel="stylesheet" href="css/payment-popup.css" />
   ════════════════════════════════════════════════════════ */

.pay-popup .dxbl-popup-content {
    padding: 0 !important;
}

.pay-popup .dxbl-popup {
    max-width: 980px;
    width: min(980px, calc(100vw - 24px)) !important;
}

/* ══ Card ══ */
.pay-card {
    --or: var(--fs-primary);
    --or2: var(--fs-primary-hover-3);
    --orb: var(--fs-tint-1);
    --orl: var(--fs-tint-4);
    --txt: #1c2434;
    --mut: #64748b;
    --ln: #e4e8f0;
    --wh: #ffffff;
    --bg: #f8fafc;
    --rs: 8px;
    --fnt: 'Tajawal','Segoe UI',Tahoma,sans-serif;
    font-family: var(--fnt);
    display: flex;
    flex-direction: column;
    background: var(--wh);
    border-top: 3px solid var(--or);
    overflow: hidden;
}

    .pay-card.rtl {
        direction: rtl;
    }

    .pay-card.ltr {
        direction: ltr;
    }

/* ══ Header ══ */
.pay-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--orb);
    border-bottom: 1.5px solid var(--orl);
    flex-shrink: 0;
}

.pay-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pay-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--wh);
    border: 1.5px solid var(--orl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--or);
    font-size: 20px;
    flex-shrink: 0;
}

.pay-title {
    font-weight: 800;
    font-size: 15px;
    color: var(--txt);
}

.pay-sub {
    font-size: 11.5px;
    color: var(--mut);
    font-weight: 500;
}

.pay-close-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    border: 1px solid var(--ln) !important;
    background: var(--wh) !important;
    color: var(--mut) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    transition: all .15s !important;
}

    .pay-close-btn:hover {
        background: #fde8e8 !important;
        border-color: #fca5a5 !important;
        color: #c81e1e !important;
    }

/* ══ Amount ══ */
.pay-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--wh);
    border-bottom: 1px solid var(--ln);
    flex-shrink: 0;
}

.pay-amount-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    font-size: 13px;
    color: var(--txt);
}

    .pay-amount-label i {
        color: var(--or);
        font-size: 16px;
    }

.pay-amount-box {
    min-width: 220px;
    max-width: 320px;
}

.spin-center input {
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 20px !important;
    letter-spacing: 1px !important;
}

/* ══ Body ══ */
.pay-body {
    padding: 12px 16px;
    background: var(--bg);
    flex: 1;
    overflow-y: auto;
}

/* ══ Method buttons ══ */
.method-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.method-btn {
    height: 42px;
    border-radius: var(--rs);
    border: 1.5px solid var(--orl);
    background: var(--wh);
    font-weight: 700;
    font-size: 12.5px;
    font-family: var(--fnt);
    color: var(--fs-primary-ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all .15s;
}

    .method-btn i {
        font-size: 16px;
        color: var(--or);
    }

    .method-btn:hover {
        background: var(--orb);
        border-color: var(--or);
        transform: translateY(-1px);
    }

    .method-btn.method-active {
        background: var(--or);
        border-color: var(--or2);
        color: #fff;
        box-shadow: 0 4px 12px rgba(var(--fs-primary-rgb),.35);
    }

        .method-btn.method-active i {
            color: #fff;
        }

    .method-btn:disabled,
    .method-btn.method-disabled {
        opacity: .4;
        cursor: not-allowed !important;
        transform: none !important;
        box-shadow: none !important;
        pointer-events: none;
    }

    /* ✦ Pay-field disabled state (للـ Mada فى المرتجع) ✦ */
    .pay-field.pay-field-disabled {
        opacity: .5;
        pointer-events: none;
        background: #f8fafc !important;
        filter: grayscale(40%);
    }
    .pay-field.pay-field-disabled .pay-field-title {
        color: #94a3b8 !important;
    }

/* ══ Pay grid ══ */
.pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pay-field {
    background: var(--wh);
    border: 1.5px solid var(--orl);
    border-radius: var(--rs);
    padding: 10px;
}

.pay-field-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 800;
    font-size: 12.5px;
    color: var(--fs-primary-ink-2);
}

.pay-visa-lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--or2);
}

/* ══ Tafqeet ══ */
.pay-tafqeet {
    margin-top: 10px;
    background: var(--orb);
    border: 1.5px solid var(--orl);
    border-radius: var(--rs);
    padding: 10px 14px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    color: #7c3900;
}

/* ══ Footer ══ */
.pay-footer {
    padding: 10px 16px;
    background: var(--wh);
    border-top: 1.5px solid var(--ln);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.pay-btn {
    height: 38px !important;
    min-width: 130px !important;
    border-radius: var(--rs) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    font-family: var(--fnt) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all .15s !important;
    border: 1.5px solid !important;
}

.pay-btn-cancel {
    background: var(--wh) !important;
    border-color: var(--ln) !important;
    color: var(--mut) !important;
}

    .pay-btn-cancel:hover {
        background: #fde8e8 !important;
        border-color: #fca5a5 !important;
        color: #c81e1e !important;
    }

.pay-btn-save {
    background: var(--or) !important;
    border-color: var(--or2) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(var(--fs-primary-rgb),.3) !important;
}

    .pay-btn-save:hover {
        background: var(--or2) !important;
        box-shadow: 0 4px 14px rgba(var(--fs-primary-rgb),.45) !important;
        transform: translateY(-1px) !important;
    }

/* ══ Input text ══ */
.mt-2 input,
.mt-2 .dxbl-input {
    font-size: 13px !important;
    color: var(--fs-primary-ink-2) !important;
    font-weight: 600 !important;
}

/* ══ Responsive ══ */
@media (max-width: 768px) {
    .method-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pay-grid {
        grid-template-columns: 1fr;
    }

    .pay-amount-box {
        min-width: 160px;
        max-width: 100%;
    }

    .pay-footer {
        justify-content: center;
    }

    .pay-btn {
        flex: 1;
        min-width: 0 !important;
    }
}

@media (max-width: 576px) {
    .pay-body,
    .pay-head,
    .pay-amount,
    .pay-footer {
        padding: 10px;
    }
}

/* ── Radzen dialog z-index ── */
.rz-dialog-mask {
    z-index: 200000 !important;
}

.rz-dialog-wrapper {
    z-index: 200001 !important;
}

.rz-dialog {
    z-index: 200002 !important;
}

/* ══ Shell ══ */
.cpd-shell {
    --or: var(--fs-primary);
    --or2: var(--fs-primary-hover-3);
    --orb: var(--fs-tint-1);
    --orl: var(--fs-tint-4);
    --txt: #1c2434;
    --mut: #64748b;
    --ln: #e4e8f0;
    --wh: #ffffff;
    --bg: #f8fafc;
    --rs: 8px;
    --fnt: 'Tajawal','Segoe UI',Tahoma,sans-serif;
    font-family: var(--fnt);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    min-width: 460px;
    background: var(--wh);
    border-radius: 14px;
    border-top: 3px solid var(--or);
}

/* ── Header ── */
.cpd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cpd-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 17px;
    color: var(--txt);
}

.cpd-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--orb);
    border: 1.5px solid var(--orl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--or);
    font-size: 18px;
    flex-shrink: 0;
}

.cpd-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--ln);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--mut);
    transition: all .15s;
    flex-shrink: 0;
}

    .cpd-close:hover {
        background: #fde8e8;
        border-color: #fca5a5;
        color: #c81e1e;
    }

.cpd-sub {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mut);
    margin-top: -4px;
}

/* ── Card ── */
.cpd-card {
    background: var(--wh);
    border: 1.5px solid var(--orl);
    border-radius: var(--rs);
    overflow: hidden;
}

.cpd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid #f0f4f9;
    transition: background .1s;
}

    .cpd-row:hover {
        background: var(--orb);
    }

.cpd-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--orb);
    border-top: 1.5px solid var(--orl);
}

.cpd-name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* ── Badge ── */
.cpd-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    border: 1px solid var(--orl);
    background: var(--orb);
    color: var(--or2);
}

    .cpd-badge.cash {
        border-color: #bbf7d0;
        background: #f0fdf4;
        color: #16a34a;
    }

    .cpd-badge.mada {
        border-color: #bae6fd;
        background: #f0f9ff;
        color: #0284c7;
    }

    .cpd-badge.transfer {
        border-color: #ddd6fe;
        background: #f5f3ff;
        color: #7c3aed;
    }

    .cpd-badge.cheque {
        border-color: #fecaca;
        background: #fff1f2;
        color: #e11d48;
    }

    .cpd-badge.wallet {
        border-color: var(--fs-tint-5);
        background: var(--fs-tint-2);
        color: var(--fs-primary-deeper);
    }

.cpd-badge-total {
    border-color: var(--orl);
    background: var(--orb);
    color: var(--or2);
}

.cpd-label {
    font-weight: 700;
    color: var(--txt);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.cpd-val {
    font-weight: 800;
    color: var(--txt);
    font-size: 13px;
    white-space: nowrap;
}

.cpd-val-total {
    font-size: 15px;
    color: #7c3900;
}

/* ── Footer ── */
.cpd-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}

.cpd-btn {
    height: 38px;
    min-width: 110px;
    border-radius: var(--rs);
    font-weight: 700;
    font-size: 13px;
    font-family: var(--fnt);
    border: 1.5px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all .15s;
}

.cpd-btn-cancel {
    background: var(--wh);
    border-color: var(--ln);
    color: var(--mut);
}

    .cpd-btn-cancel:hover {
        background: #fde8e8;
        border-color: #fca5a5;
        color: #c81e1e;
    }

.cpd-btn-ok {
    background: var(--or);
    border-color: var(--or2);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--fs-primary-rgb),.3);
}

    .cpd-btn-ok:hover {
        background: var(--or2);
        box-shadow: 0 4px 14px rgba(var(--fs-primary-rgb),.45);
        transform: translateY(-1px);
    }

/* ── Mobile ── */
@media (max-width: 576px) {
    .cpd-shell {
        min-width: auto;
        width: 92vw;
        padding: 14px;
    }

    .cpd-foot {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cpd-btn {
        flex: 1;
    }

    .cpd-label {
        max-width: 180px;
    }
}


/* ══════════════════════════════════════════════════════════════════════
   شاشة السداد pay2 (PaymentPopup) — الشكل المعتمد 2026-11-08
   المبيعات والمشتريات والمرتجع ونقطة البيع
   رأس غامق والمبلغ ذهبى · متبقى أحمر/أخضر · الحساب المختار بلون واضح · الحفظ مقفول لحد ما البيانات تكمل
   ══════════════════════════════════════════════════════════════════════ */
/* الـ class بيتحط على عنصر الـ popup نفسه (dxbl-modal-dialog.dxbl-popup.pay2-popup) */
html body .dxbl-popup.pay2-popup { max-width: 900px !important; width: min(900px, calc(100vw - 24px)) !important; border-radius: 20px !important; overflow: hidden; }
html body .pay2-popup .dxbl-modal-body { padding: 0 !important; }
html body .pay2-popup .dxbl-modal-content { border: 0 !important; border-radius: 20px !important; overflow: hidden; }
.pay2 { display: flex; flex-direction: column; max-height: calc(100vh - 40px); outline: none; font-family: inherit; color: #0B2A33; background: #fff; }

.pay2-top {
    position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 20px 26px 22px; color: #fff; background: color-mix(in srgb, var(--fs-primary) 70%, #000);
}
.pay2-lbl { font-size: 14px; font-weight: 700; color: #CFE6EC; }
.pay2-due { font-size: 44px; font-weight: 900; line-height: 1.15; letter-spacing: -.5px; color: #FFD27A; font-variant-numeric: tabular-nums; }
.pay2-due small { font-size: 16px; font-weight: 700; color: #FFD27A; }
.pay2-words { font-size: 13.5px; color: #CFE6EC; }
.pay2-stats { display: flex; gap: 10px; margin-inline-end: 44px; }
.pay2-st { min-width: 150px; padding: 9px 14px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.pay2-st small { display: block; font-size: 13px; font-weight: 700; color: #CFE6EC; }
.pay2-st b { font-size: 21px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pay2-st.is-rem { background: #FDE3DE; color: #8E1F12; }
.pay2-st.is-rem small { color: #8E1F12; }
.pay2-st.is-rem.is-ok { background: #D8F5E2; color: #0B5D2E; }
.pay2-st.is-rem.is-ok small { color: #0B5D2E; }
.pay2-x {
    position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; padding: 0;
    display: grid; place-items: center; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; cursor: pointer;
}
.pay2-x:hover { background: rgba(255, 255, 255, .22); }
.pay2-bar { flex: 0 0 6px; background: var(--fs-tint-3); }
.pay2-bar i { display: block; height: 100%; background: #137A3F; transition: width .2s; }

.pay2-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 26px 20px; }
.pay2-ttl { margin-bottom: 10px; font-size: 15px; font-weight: 800; }
.pay2-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pay2-chip {
    position: relative; height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 1.5px solid #DCE6E9; border-radius: 14px; background: #fff; color: #3F5C64;
    font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; transition: border-color .15s, background .15s;
}
.pay2-chip > i { font-size: 26px; color: var(--fs-primary); }
.pay2-chip:hover:not(:disabled):not(.on) { border-color: var(--fs-primary); }
.pay2-chip.on { border-color: var(--fs-primary); background: var(--fs-primary); color: #fff; }
.pay2-chip.on > i { color: #fff; }
.pay2-chip:disabled { opacity: .45; cursor: not-allowed; }
.pay2-ck { position: absolute; top: 6px; inset-inline-start: 6px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--fs-primary); font-size: 12px; }
.pay2-row { margin-top: 12px; padding: 12px 14px; border: 1px solid #DCE6E9; border-radius: 14px; }
.pay2-row-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.pay2-row-hd > b { display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 800; }
.pay2-row-hd > b i { color: var(--fs-primary); font-size: 19px; }
.pay2-visa { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: #3F5C64; }

/* الحساب: المختار بلون واضح، والناقص بتنبيه */
.pay2-acc {
    margin-inline-start: auto; max-width: 62%; height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px;
    border: 1.5px solid var(--fs-primary); border-radius: 9px; background: var(--fs-tint-3); color: color-mix(in srgb, var(--fs-primary) 70%, #000);
    font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
}
.pay2-visa + .pay2-acc { margin-inline-start: 0; }
.pay2-acc i { flex: 0 0 auto; font-size: 17px; }
.pay2-acc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay2-acc:not(:disabled):hover { filter: brightness(.96); }
.pay2-acc:disabled { cursor: default; }
.pay2-acc:disabled .pay2-acc-go { display: none; }
.pay2-acc.is-empty {
    border: 1.5px dashed var(--fs-action, #C7660E); background: color-mix(in srgb, var(--fs-action, #C7660E) 12%, #fff);
    color: color-mix(in srgb, var(--fs-action, #C7660E) 62%, #000);
}

.pay2-row-in { display: flex; gap: 8px; align-items: stretch; }
.pay2-row-in .pay2-amt { flex: 1; min-width: 0; }
/* (2026-11-18) رقم الشيك جنب المبلغ — PaymentPopup (AllowCheque) */
.pay2-row-in .pay2-chqno { flex: 0 0 34%; min-width: 0; }
html body .pay2 .pay2-chqno.dxbl-text-edit { height: 52px !important; border: 1px solid var(--fs-tint-5) !important; border-radius: 10px !important; background: #fff !important; box-shadow: none !important; }
html body .pay2 .pay2-chqno input { font-size: 16px !important; font-weight: 700 !important; text-align: center !important; }
html body .pay2 .pay2-amt.dxbl-text-edit {
    height: 52px !important; border: 1px solid var(--fs-tint-5) !important; border-radius: 10px !important; background: #fff !important; box-shadow: none !important;
    transition: border-color .15s, box-shadow .15s;
}
html body .pay2 .pay2-amt.dxbl-text-edit::before, html body .pay2 .pay2-amt.dxbl-text-edit::after { display: none !important; }
html body .pay2 .pay2-amt.dxbl-text-edit:focus-within { border-color: var(--fs-primary) !important; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .16) !important; }
html body .pay2 .pay2-amt input { font-size: 24px !important; font-weight: 900 !important; text-align: center !important; color: #0B2A33 !important; -webkit-text-fill-color: #0B2A33 !important; font-variant-numeric: tabular-nums; }
.pay2-rest, .pay2-del { flex: 0 0 auto; height: 52px; border-radius: 10px; font-family: inherit; cursor: pointer; }
.pay2-rest { padding: 0 16px; border: 1px solid var(--fs-primary); background: #fff; color: var(--fs-primary); font-size: 14px; font-weight: 800; }
.pay2-rest:hover:not(:disabled) { background: var(--fs-tint-1); }
.pay2-rest:disabled { border-color: #DCE6E9; color: #8AA3AA; cursor: default; }
.pay2-del { width: 44px; padding: 0; border: 1px solid #DCE6E9; background: #fff; color: #8AA3AA; font-size: 19px; }
.pay2-del:hover { border-color: #F3D0D0; background: #FFF6F6; color: #B91C1C; }

.pay2-ft { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 14px 26px; border-top: 1px solid #DCE6E9; background: #F6F9FA; }
.pay2-kbd { margin-inline-end: auto; font-size: 12.5px; color: #3F5C64; }
.pay2-kbd kbd { font-family: inherit; font-size: 11.5px; font-weight: 800; color: #0B2A33; background: #fff; border: 1px solid #DCE6E9; border-radius: 5px; padding: 1px 6px; box-shadow: none; }
.pay2-warn { margin-inline-end: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; background: #FDE3DE; color: #8E1F12; font-size: 13.5px; font-weight: 800; }
.pay2-warn i { font-size: 17px; }
.pay2-cancel, .pay2-save { height: 56px; border-radius: 12px; font-family: inherit; cursor: pointer; }
.pay2-cancel { padding: 0 24px; border: 1px solid #DCE6E9; background: #fff; color: #3F5C64; font-size: 15px; font-weight: 800; }
.pay2-save {
    min-width: 300px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0;
    background: var(--fs-action, var(--fs-primary)); color: #fff; font-size: 20px; font-weight: 900; box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.pay2-save i { font-size: 23px; }
.pay2-save:hover:not(:disabled) { filter: brightness(.95); }
.pay2-save:disabled { background: #C9D5D9; color: #5A7077; box-shadow: none; cursor: not-allowed; }

@media (max-width: 768px) {
    html body .dxbl-modal-root:has(.pay2-popup) { align-items: end !important; padding: 0 !important; }
    html body .dxbl-popup.pay2-popup {
        position: fixed !important; inset: auto 0 0 0 !important; top: auto !important;
        width: 100% !important; max-width: none !important; max-height: 94dvh !important; margin: 0 !important;
        border-radius: 22px 22px 0 0 !important; transform: none !important;
    }
    html body .pay2-popup .dxbl-modal-content { border-radius: 22px 22px 0 0 !important; max-height: 94dvh; }
    .pay2 { max-height: 94dvh; }
    .pay2-top { display: block; padding: 16px 18px 18px; }
    .pay2-due { font-size: 36px; }
    .pay2-stats { margin: 12px 0 0; }
    .pay2-st { flex: 1; min-width: 0; }
    .pay2-st b { font-size: 19px; }
    .pay2-body { padding: 14px 14px 12px; }
    .pay2-chips { gap: 7px; }
    .pay2-row { padding: 11px 12px; }
    .pay2-ft { flex-wrap: wrap; padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
    .pay2-kbd { display: none; }
    .pay2-warn { flex: 0 0 100%; margin: 0; }
    /* :not(#_) = وزن ID — قاعدة الأزرار العامة فى mobile-ui-pack.css فيها سلسلة :not طويلة */
    html body .pay2 .pay2-x:not(#_) { width: 34px !important; height: 34px !important; min-height: 0 !important; padding: 0 !important; }
    html body .pay2 .pay2-chip:not(#_) { height: 70px !important; min-height: 0 !important; padding: 0 !important; font-size: 14px !important; }
    html body .pay2 .pay2-acc:not(#_) { height: 36px !important; min-height: 0 !important; padding: 0 10px !important; font-size: 13.5px !important; }
    html body .pay2 .pay2-rest:not(#_) { height: 52px !important; min-height: 0 !important; padding: 0 14px !important; font-size: 14px !important; }
    html body .pay2 .pay2-del:not(#_) { width: 44px !important; height: 52px !important; min-height: 0 !important; padding: 0 !important; }
    html body .pay2 .pay2-cancel:not(#_) { flex: 0 0 92px; height: 56px !important; min-height: 0 !important; padding: 0 !important; font-size: 15px !important; }
    html body .pay2 .pay2-save:not(#_) { flex: 1 1 0; min-width: 0; height: 56px !important; min-height: 0 !important; padding: 0 8px !important; font-size: 18px !important; }
}

/* ══ اختيار الحساب من شاشة السداد الجديدة (AccountsFlagSearchDialog Cards=true) ══ */
.afs-list { display: none; }
@media (max-width: 768px) {
    .sp-shell.afs-cards .sp-body { display: none !important; }
    .sp-shell.afs-cards .sp-foot .sp-btn-ok { display: none !important; }
    .sp-shell.afs-cards .afs-list { display: block; flex: 1 1 auto; overflow-y: auto; padding: 4px 12px 8px; -webkit-overflow-scrolling: touch; }
}
.afs-row {
    display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 8px; padding: 12px;
    border: 1px solid #E3ECEF; border-radius: 12px; background: #fff; font-family: inherit; text-align: start; cursor: pointer;
}
.afs-row.is-sel { border-color: var(--fs-primary); background: var(--fs-tint-1); box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .08); }
.afs-radio { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #C5D6DB; }
.afs-row.is-sel .afs-radio { border: 7px solid var(--fs-primary); }
.afs-b { flex: 1; min-width: 0; }
.afs-b b { display: block; font-size: 14.5px; color: #04252D; }
.afs-b small { display: block; font-size: 12px; color: #6B8A91; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afs-none { text-align: center; color: #8AA3AA; padding: 24px 0; }
/* ديسكتوب: النافذة على قد الحسابات بدل 680 ثابت */
.afs-dialog .sp-shell { height: auto !important; max-height: 70vh; }
.afs-dialog .sp-body { height: auto !important; max-height: calc(70vh - 170px); min-height: 120px; }
.sp-shell.afs-cards .sp-badge-sel { display: none !important; }
