/* ═══════════════════════════════════════════════════════
   SearchDialog — search-dialog.css
   الـ shell يملأ الـ dialog كاملاً بـ flex column
   header ثابت + body يسكرول + footer ثابت
   ═══════════════════════════════════════════════════════ */

.sp-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;
    --ln2: #c8d0de;
    --wh:  #ffffff;
    --bg:  #f8fafc;
    --rs:  6px;
    --fnt: 'Tajawal','Segoe UI',Tahoma,sans-serif;

    font-family: var(--fnt);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ══ HEADER ══ */
.sp-head {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px 10px;
    background: var(--orb);
    border-bottom: 1.5px solid var(--orl);
}

.sp-head-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--wh);
    border: 1px solid var(--orl);
    color: var(--mut);
    white-space: nowrap;
}

.sp-badge b           { color: var(--or2); font-weight: 800; }
.sp-badge-sel         { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.sp-badge-loading     { color: var(--or2); }

.sp-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid var(--orl);
    border-top-color: var(--or);
    border-radius: 50%;
    animation: sp-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes sp-spin { to { transform: rotate(360deg); } }

/* ── Search ── */
.sp-search-box {
    display: flex;
    align-items: center;
    background: var(--wh);
    border: 1.5px solid var(--orl);
    border-radius: var(--rs);
    height: 34px;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
}

.sp-search-box:focus-within {
    border-color: var(--or);
    box-shadow: 0 0 0 2.5px rgba(var(--fs-primary-rgb),.18);
}

.sp-search-ico {
    flex-shrink: 0;
    margin: 0 8px;
    color: var(--or);
}

.sp-search {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 12.5px;
    font-family: var(--fnt);
    color: var(--txt);
    height: 100%;
    padding: 0;
    min-width: 0;
}

.sp-search::placeholder { color: var(--fs-primary-soft-3); font-size: 12px; }

.sp-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--mut);
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background .13s, color .13s;
    margin-inline-end: 2px;
}

.sp-clear:hover { background: var(--orl); color: var(--or2); }

/* ══ BODY ══ */
.sp-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
    background: var(--wh);
}

/* ── Radzen grid overrides ── */
.sp-shell .rz-datatable,
.sp-shell .rz-data-grid {
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
}

.sp-shell .rz-datatable-thead th {
    background: linear-gradient(180deg,#f8fafc,#eef2f9) !important;
    border-bottom: 2px solid var(--orl) !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: .4px !important;
    padding: 7px 10px !important;
    position: sticky;
    top: 0;
    z-index: 5;
    white-space: nowrap;
}

.sp-shell .rz-data-row td {
    font-size: 12.5px !important;
    padding: 7px 10px !important;
    border-bottom: 1px solid #f0f4f9 !important;
    color: var(--txt) !important;
    vertical-align: middle !important;
    cursor: pointer;
    transition: background .1s;
}

.sp-shell .rz-data-row:nth-child(even) td { background: #fafbfe; }
.sp-shell .rz-data-row:hover td           { background: var(--orb) !important; }

.sp-shell .sp-sel-row td {
    background: var(--fs-tint-7) !important;
    border-bottom-color: var(--orl) !important;
    font-weight: 700 !important;
}

.sp-shell .sp-sel-row td:first-child {
    box-shadow: inset 3px 0 0 var(--or);
}

/* ── Scrollbar ── */
.sp-body ::-webkit-scrollbar       { width: 5px; height: 5px; }
.sp-body ::-webkit-scrollbar-thumb { background: var(--or); border-radius: 4px; }
.sp-body ::-webkit-scrollbar-track { background: var(--orb); }

/* ── Empty state ── */
.sp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 20px;
    color: var(--mut);
    font-size: 13px;
}

/* ══ FOOTER ══ */
.sp-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg);
    border-top: 1.5px solid var(--ln);
}

.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 16px;
    border-radius: var(--rs);
    font-size: 12.5px;
    font-weight: 700;
    font-family: var(--fnt);
    cursor: pointer;
    transition: all .15s;
    border: 1.5px solid;
    white-space: nowrap;
}

.sp-btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

.sp-btn-cancel { background: var(--wh); border-color: var(--ln2); color: var(--mut); }
.sp-btn-cancel:hover { background: #fde8e8; border-color: #fca5a5; color: #c81e1e; }

.sp-btn-ok {
    background: var(--or);
    border-color: var(--or2);
    color: #fff;
    min-width: 90px;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(var(--fs-primary-rgb),.3);
}

.sp-btn-ok:hover:not(:disabled) {
    background: var(--or2);
    box-shadow: 0 3px 10px rgba(var(--fs-primary-rgb),.45);
    transform: translateY(-1px);
}

/* ══ Mobile ══ */
@media (max-width: 600px) {
    .sp-foot { flex-wrap: wrap; }
    .sp-btn  { flex: 1; justify-content: center; }
}


/* ═══════════════════════════════════════════════════════
   order-search.css — يُضاف إلى App.razor بعد search-dialog.css
   يغطي فقط العناصر الإضافية الخاصة بـ OrderPageSearch
   ═══════════════════════════════════════════════════════ */

/* ── Toolbar row ── */
.op-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Date range input ── */
.op-date-wrap {
    display: flex;
    align-items: center;
    background: var(--wh);
    border: 1.5px solid var(--orl);
    border-radius: var(--rs);
    height: 34px;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
    flex-shrink: 0;
    min-width: 220px;
}

    .op-date-wrap:focus-within {
        border-color: var(--or);
        box-shadow: 0 0 0 2.5px rgba(var(--fs-primary-rgb),.18);
    }

.op-date-ico {
    flex-shrink: 0;
    margin: 0 8px;
    color: var(--or);
}

.op-date-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 12.5px;
    font-family: var(--fnt, 'Tajawal','Segoe UI',Tahoma,sans-serif);
    color: var(--txt);
    height: 100%;
    padding: 0 8px 0 0;
    min-width: 0;
    cursor: pointer;
}

/* ── Search button ── */
.op-search-btn {
    flex-shrink: 0;
    min-width: 100px;
}

/* ── Quick filter — يمتد لملء المساحة المتبقية ── */
.op-filter-wrap {
    flex: 1;
    min-width: 160px;
    max-width: 280px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .op-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .op-date-wrap,
    .op-filter-wrap,
    .op-search-btn {
        width: 100%;
        max-width: 100%;
        min-width: unset;
    }
}

/* ═══════════════════════════════════════════════════════
   account-page.css — أضفه بعد search-dialog.css في App.razor
   زر "Clear selection" الإضافي فقط
   ═══════════════════════════════════════════════════════ */

.sp-clear-sel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #fde8e8;
    border: 1px solid #fca5a5;
    color: #c81e1e;
    cursor: pointer;
    transition: background .13s, border-color .13s;
    white-space: nowrap;
    font-family: var(--fnt, 'Tajawal','Segoe UI',Tahoma,sans-serif);
}

    .sp-clear-sel:hover {
        background: #fbd5d5;
        border-color: #f87171;
    }

.rz-dialog-mask {
    z-index: 200000 !important;
}

.rz-dialog-wrapper {
    z-index: 200001 !important;
}

.rz-dialog {
    z-index: 200002 !important;
}

/* ═══════════════════════════════════════════════════════
   أضف في نهاية search-dialog.css
   يصلح ظهور الكالندر خلف الـ dialog
   ═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════
   أضف في نهاية search-dialog.css
   ═══════════════════════════════════════════════════════ */

/* الكالندر داخل الـ dialog wrapper */
.rz-dialog-wrapper .daterangepicker {
    z-index: 210000 !important;
    position: absolute !important;
}

/* fallback — لو مش شغال parentEl */
.daterangepicker {
    z-index: 210000 !important;
}


/* ═══════════════════════════════════════════════════════
   أضف في نهاية search-dialog.css
   ألوان الـ grid داخل sp-shell — header + rows + footer
   ═══════════════════════════════════════════════════════ */

/* ── Header ── */
.sp-shell .rz-datatable-thead th {
    background: linear-gradient(180deg, #f8fafc, #eef2f9) !important;
    border-bottom: 2px solid var(--orl) !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: .4px !important;
    padding: 7px 10px !important;
    white-space: nowrap;
}

/* ── Rows ── */
.sp-shell .rz-data-row td {
    font-size: 12.5px !important;
    padding: 7px 10px !important;
    border-bottom: 1px solid #f0f4f9 !important;
    color: var(--txt) !important;
    vertical-align: middle !important;
    cursor: pointer;
    transition: background .1s;
}

.sp-shell .rz-data-row:nth-child(even) td {
    background: #fafbfe;
}

.sp-shell .rz-data-row:hover td {
    background: var(--orb) !important;
}

/* ── Selected row ── */
.sp-shell .sp-sel-row td {
    background: var(--fs-tint-7) !important;
    border-bottom-color: var(--orl) !important;
    font-weight: 700 !important;
}

    .sp-shell .sp-sel-row td:first-child {
        box-shadow: inset 3px 0 0 var(--or);
    }

/* ── Footer totals row ── */
.sp-shell .rz-datatable-tfoot td,
.sp-shell .rz-grid-table tfoot td {
    background: linear-gradient(180deg, var(--fs-tint-7), var(--fs-tint-8)) !important;
    border-top: 2px solid var(--or) !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    color: #7c3900 !important;
    padding: 6px 10px !important;
}

/* ── Scrollbar ── */
.sp-body ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.sp-body ::-webkit-scrollbar-thumb {
    background: var(--or);
    border-radius: 4px;
}

.sp-body ::-webkit-scrollbar-track {
    background: var(--orb);
}

/* ── Radio items ── */
.price-radio-erp .dxbl-radiogroup-item,
.price-radio-erp .dxbl-radio-group-item {
    gap: 4px !important;
}

/* ── Label text ── */
.price-radio-erp label,
.price-radio-erp .dxbl-text {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: var(--fs-primary-ink-2) !important;
    font-family: 'Tajawal','Segoe UI',Tahoma,sans-serif !important;
    cursor: pointer !important;
    transition: color .15s !important;
}

/* ── Radio circle — unchecked ── */
.price-radio-erp .dxbl-radio input[type="radio"],
.price-radio-erp input[type="radio"] {
    accent-color: var(--fs-primary) !important;
    width: 15px !important;
    height: 15px !important;
    cursor: pointer !important;
}

/* ── Checked state — highlight label ── */
.price-radio-erp .dxbl-radiogroup-item:has(input:checked) label,
.price-radio-erp .dxbl-radio-group-item:has(input:checked) label,
.price-radio-erp .dxbl-radiogroup-item:has(input:checked) .dxbl-text,
.price-radio-erp input:checked + label {
    color: var(--fs-primary) !important;
}

/* ── ReadOnly ── */
.price-radio-erp.dxbl-disabled label,
.price-radio-erp.dxbl-disabled .dxbl-text {
    color: #c8d0de !important;
    cursor: not-allowed !important;
}



/* ══════════════════════════════════════════════════════════════════════
   اختيار العميل/المورد على الموبيل (CustSuppSearchDialog): كروت بدل الجدول
   ▸ ضغطة على الكارت = اختيار وقفل، فزرار «تأكيد» ملوش لازمة هنا
   ▸ الديسكتوب: الكروت مخفية والجدول زى ما هو
   ══════════════════════════════════════════════════════════════════════ */
.sp-cards { display: none; }
@media (max-width: 768px) {
    .sp-shell:has(.sp-cards) .sp-body > :not(.sp-cards) { display: none !important; }
    .sp-shell:has(.sp-cards) .sp-foot { display: none !important; }
    .sp-cards {
        display: block;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 2px 12px;
    }
    .sp-card {
        display: flex;
        align-items: center;
        gap: 12px;
        width: calc(100% - 8px);
        height: 62px;
        margin: 4px;
        padding: 0 12px;
        border: 1px solid var(--fs-tint-5);
        border-radius: 12px;
        background: #fff;
        text-align: start;
        font-family: inherit;
        cursor: pointer;
    }
    .sp-card:active { background: var(--fs-tint-1); border-color: rgba(var(--fs-primary-rgb), .5); }
    .sp-av {
        flex: 0 0 40px; height: 40px; border-radius: 50%;
        display: grid; place-items: center;
        background: rgba(var(--fs-primary-rgb), .1); color: var(--fs-primary);
        font-weight: 800; font-size: 15px;
    }
    .sp-cb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
    .sp-cn { font-weight: 700; font-size: 15px; color: #04252D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sp-cs { display: flex; gap: 12px; font-size: 12.5px; color: #6B8A91; white-space: nowrap; overflow: hidden; }
    .sp-cs i { color: #9AB3B9; margin-inline-end: 3px; }
    .sp-cbal { margin-inline-start: auto; font-weight: 700; color: #04252D; }
    .sp-cbal.neg { color: #C62828; }
    .sp-cchev { color: #9AB3B9; font-size: 18px; }
    [dir="ltr"] .sp-cchev { transform: scaleX(-1); }
}

/* قاعدة فاضية تمتص أى بقايا تعليق قبلها */
.mc-css-guard {}

/* ══════════════════════════════════════════════════════════════════════
   نوافذ الاختيار — الشكل الجديد (Cards=true، فاتورة المبيعات) 2026-11-08
   كمية الفروع · الوحدات · فتح فاتورة · مركز التكلفة
   ▸ موبيل: كروت (.mc-list) بدل الجدول — الجدول بيستخبى
   ▸ ديسكتوب: الجدول زى ما هو + ملخّص/فترات سريعة، والنافذة على قد المحتوى (CssClass mc-dialog)
   ══════════════════════════════════════════════════════════════════════ */
.mc-list { display: none; }
@media (max-width: 768px) {
    .sp-shell.mc-cards .sp-body { display: none !important; }
    .sp-shell.mc-cards .sp-foot .sp-btn-ok { display: none !important; }
    .sp-shell.mc-cards .sp-badge-sel { display: none !important; }
    .sp-shell.mc-cards .mc-list { display: block; flex: 1 1 auto; overflow-y: auto; padding: 4px 12px 8px; -webkit-overflow-scrolling: touch; }
}
.mc-row {
    display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 8px; padding: 11px 12px;
    border: 1px solid #E3ECEF; border-radius: 12px; background: #fff; font-family: inherit; text-align: start; color: #04252D;
}
button.mc-row { cursor: pointer; }
.mc-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); }
.mc-radio { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #C5D6DB; }
.mc-row.is-sel .mc-radio { border: 7px solid var(--fs-primary); }
.mc-ic { flex: 0 0 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--fs-tint-2); color: var(--fs-primary); font-size: 19px; }
.mc-ic-sn { flex-basis: 48px; font-size: 13px; font-weight: 800; }
.mc-b { flex: 1; min-width: 0; }
.mc-b b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-b small { display: block; font-size: 12px; color: #6B8A91; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-b small em { font-style: normal; }
.mc-num { flex: 0 0 auto; text-align: end; font-weight: 800; font-size: 15px; white-space: nowrap; }
.mc-num small { display: block; font-size: 10.5px; color: #6B8A91; font-weight: 600; }
.mc-num-2 { font-size: 13px; color: #6B8A91; }
.mc-num.is-ok { color: #0E7C66; font-size: 18px; }
.mc-num.is-bad { color: #B91C1C; font-size: 18px; }
.is-warn, .mc-b small .is-warn { color: #B45309; font-weight: 700; }
.mc-pill { display: inline-block; margin-inline-start: 4px; padding: 0 7px; border-radius: 20px; background: #ECFDF5; color: #0E7C66; font-size: 11px; font-weight: 800; }
.mc-pill.is-credit { background: #FEF2F2; color: #B91C1C; }
.mc-none { text-align: center; color: #8AA3AA; padding: 24px 0; }

/* ملخّص كمية الفروع (موبيل وديسكتوب) */
.mc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 12px 4px; }
.mc-kpis > div { background: #F7FAFB; border-radius: 12px; padding: 8px 10px; text-align: center; }
.mc-kpis span { display: block; font-size: 11.5px; color: #6B8A91; font-weight: 700; }
.mc-kpis b { display: block; font-size: 19px; color: #04252D; }
.mc-kpis .is-warn b { color: #B45309; }

/* فترات سريعة + الإجمالى (فتح فاتورة) */
.mc-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px 6px; }
.mc-presets button {
    border: 1px solid #E3ECEF; border-radius: 20px; background: #fff; color: #6B8A91;
    padding: 5px 12px; font-family: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.mc-presets button.on { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
.mc-presets-sum { margin-inline-start: auto; font-size: 12.5px; color: #6B8A91; }
.mc-presets-sum b { color: #04252D; font-size: 14px; }

/* ديسكتوب: النافذة على قد المحتوى بدل الطول الثابت */
@media (min-width: 769px) {
    .mc-dialog .sp-shell { height: auto !important; max-height: 72vh; }
    .mc-dialog .sp-body { height: auto !important; max-height: calc(72vh - 200px); min-height: 110px; }
}
/* الاسم والتفاصيل يلفّوا على سطرين بدل ما يتقصوا (أسماء مراكز التكلفة الطويلة، التكلفة فى الوحدات) */
.mc-b b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mc-b small { white-space: normal; }

/* ══════════════════════════════════════════════════════════════════════
   (2026-12-01) شاشة اختيار العميل/المورد — التصميم الجديد اللى المالك اعتمده (CustSuppSearchDialog .csd)
   ▸ شريط عنوان Radzen بيستخبى والنافذة بيرسم رأسها بنفسه (أيقونة + عنوان + عدد + جديد + قفل)
   ▸ بحث كبير + فلتر «عليهم رصيد» + صفوف: كود · اسم/جوال · رصيد ملوّن (مدين أخضر ، دائن أحمر)
   ▸ ارتفاع الصف 64 لازم يساوى RowH فى الكود (Virtualize + الأسهم)
   ══════════════════════════════════════════════════════════════════════ */
.rz-dialog:has(.csd) > .rz-dialog-titlebar { display: none !important; }
.rz-dialog:has(.csd) { border-radius: 16px !important; overflow: hidden !important; box-shadow: 0 24px 60px rgba(4, 37, 45, .28), 0 4px 12px rgba(4, 37, 45, .10) !important; }
.rz-dialog:has(.csd) > .rz-dialog-content { padding: 0 !important; overflow: hidden !important; height: 100%; }
.csd { --cs-ink: #0B2A33; --cs-mute: #5B7780; --cs-line: #E3ECEE; --cs-soft: #F3F7F8; --cs-dr: #0E7C66; --cs-cr: #B42318;
    display: flex; flex-direction: column; height: 100%; min-height: 0; background: #fff; color: var(--cs-ink); font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif; }
.csd-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--cs-line); flex: none; }
.csd-hic { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--fs-tint-2, #EEF7F9); color: var(--fs-primary); display: grid; place-items: center; font-size: 21px; }
.csd-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.csd-ht b { font-size: 17px; font-weight: 800; }
.csd-ht span { font-size: 13px; color: var(--cs-mute); font-variant-numeric: tabular-nums; }
.csd .csd-add:not(#_) { flex: none; display: inline-flex !important; align-items: center; gap: 6px; height: 36px !important; min-height: 0 !important; width: auto !important; padding: 0 12px !important; border: 1px solid var(--cs-line) !important; border-radius: 10px !important; background: #fff !important; color: var(--fs-primary) !important; font: inherit; font-size: 13.5px; font-weight: 800; box-shadow: none !important; cursor: pointer; }
.csd .csd-add:not(#_):hover { border-color: var(--fs-primary) !important; background: var(--fs-tint-1, #F4FAFB) !important; }
.csd .csd-x:not(#_) { flex: none; width: 36px !important; min-width: 36px !important; height: 36px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; color: var(--cs-mute) !important; display: inline-grid !important; place-items: center; font-size: 20px; box-shadow: none !important; cursor: pointer; }
.csd .csd-x:not(#_):hover { background: var(--cs-soft) !important; color: var(--cs-ink) !important; }
.csd-tools { padding: 12px 16px 6px; display: flex; flex-direction: column; gap: 10px; flex: none; }
.csd-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 1.5px solid var(--cs-line); border-radius: 12px; background: var(--cs-soft); color: var(--fs-primary); font-size: 18px; transition: border-color .12s, background .12s; }
.csd-search:focus-within { border-color: var(--fs-primary); background: #fff; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb, 0, 103, 128), .12); }
.csd-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--cs-ink); }
.csd-search input::-webkit-search-cancel-button { display: none; }
.csd .csd-clr:not(#_) { width: 28px !important; min-width: 28px !important; height: 28px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: var(--cs-mute) !important; display: inline-grid !important; place-items: center; font-size: 15px; box-shadow: none !important; }
.csd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.csd .csd-chip:not(#_) { height: 30px !important; min-height: 0 !important; width: auto !important; padding: 0 14px !important; border: 1px solid var(--cs-line) !important; border-radius: 15px !important; background: #fff !important; color: var(--cs-mute) !important; font: inherit; font-size: 13px; font-weight: 800; box-shadow: none !important; cursor: pointer; }
.csd .csd-chip.on:not(#_) { background: var(--fs-primary) !important; border-color: var(--fs-primary) !important; color: #fff !important; }
.csd-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.csd .csd-row:not(#_) { width: 100% !important; height: 64px !important; min-height: 0 !important; box-sizing: border-box; display: flex !important; align-items: center; gap: 12px; padding: 0 10px !important; border: 1px solid transparent !important; border-radius: 12px !important; background: transparent !important; color: inherit !important; font: inherit; text-align: start; box-shadow: none !important; cursor: pointer; }
.csd .csd-row.is-hi:not(#_) { background: var(--fs-tint-1, #F4FAFB) !important; border-color: rgba(var(--fs-primary-rgb, 0, 103, 128), .35) !important; }
.csd .csd-row:not(#_):active { background: var(--fs-tint-2, #EEF7F9) !important; }
.csd-code { flex: none; min-width: 44px; height: 42px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: var(--cs-soft); color: var(--fs-primary); font-weight: 800; font-size: 14px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.csd-row.is-hi .csd-code { background: #fff; }
.csd-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.csd-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csd-ph { font-size: 12.5px; color: var(--cs-mute); text-align: end; align-self: flex-start; font-variant-numeric: tabular-nums; }
.csd-bal { flex: none; display: flex; flex-direction: column; align-items: flex-end; min-width: 76px; font-variant-numeric: tabular-nums; }
.csd-bal b { font-size: 15px; font-weight: 800; }
.csd-bal small { font-size: 11px; font-weight: 700; }
.csd-bal.dr { color: var(--cs-dr); }
.csd-bal.cr { color: var(--cs-cr); }
.csd-bal.zero { color: #9AB0B6; }
.csd-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 12px; color: var(--cs-mute); font-size: 14px; }
.csd-empty i { font-size: 34px; color: #B7C8CD; }
.csd-keys { flex: none; display: flex; gap: 18px; padding: 8px 16px; border-top: 1px solid var(--cs-line); color: var(--cs-mute); font-size: 12px; }
.csd-keys kbd { display: inline-block; min-width: 18px; margin-inline-end: 4px; padding: 1px 5px; border: 1px solid var(--cs-line); border-bottom-width: 2px; border-radius: 5px; background: var(--cs-soft); font: inherit; font-size: 11px; text-align: center; }
@media (max-width: 768px) {
    /* الجوال: شيت من تحت بطول ثابت بدل الطول اللى الشاشة بتبعته (Height = 680px) — Radzen بيحط المكان inline فلازم !important */
    html body .rz-dialog-wrapper > .rz-dialog:has(.csd):not(#_) { position: fixed !important; inset: auto 0 0 0 !important; top: auto !important; left: 0 !important; right: 0 !important; bottom: 0 !important; transform: none !important;
        width: 100% !important; max-width: 100% !important; height: 88dvh !important; max-height: 88dvh !important; border-radius: 20px 20px 0 0 !important; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .csd::before { content: ""; display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: #D3DEE1; flex: none; }
    .csd-keys { display: none; }                 /* الجوال مالوش كيبورد */
    .csd-head { padding: 12px 14px 10px; }
    .csd-tools { padding: 10px 12px 4px; }
    .csd .csd-add:not(#_) { padding: 0 10px !important; }
    .csd-list { padding: 2px 4px 10px; }
}
/* ══ (2026-12-01) إضافات FsPickList (شاشات البحث عن مستند): سطر التفاصيل ، الفترة ، زرار البحث ══ */
.csd-sub { font-size: 12.5px; color: var(--cs-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.csd-bal.amt { color: var(--cs-ink); }
.csd-toolrow { display: flex; gap: 8px; align-items: stretch; }
.csd-date { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 1.5px solid var(--cs-line); border-radius: 12px; background: #fff; color: var(--fs-primary); font-size: 18px; cursor: pointer; }
.csd-date:focus-within { border-color: var(--fs-primary); }
.csd-date input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--cs-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.csd .csd-go:not(#_) { flex: none; display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; height: 46px !important; min-height: 0 !important; width: auto !important; padding: 0 20px !important; border: 0 !important; border-radius: 12px !important; background: var(--fs-primary) !important; color: #fff !important; font: inherit; font-size: 14.5px; font-weight: 800; box-shadow: none !important; cursor: pointer; }
.csd .csd-go:not(#_):disabled { opacity: .7; cursor: default; }
.csd .csd-go .sp-spinner { width: 14px; height: 14px; }
@media (max-width: 768px) {
    .csd .csd-go:not(#_) { padding: 0 14px !important; }
}
/* ══ (2026-12-01) إضافات FsPickList للفلاتر الزيادة: إجمالى جنب الشرايح ، وحقول السنة/رقم الفاتورة (فواتير سنة سابقة) ══ */
.csd-chips .csd-sum { margin-inline-start: auto; align-self: center; font-size: 13px; color: var(--cs-mute); font-variant-numeric: tabular-nums; }
.csd-chips .csd-sum b { color: var(--cs-ink); font-size: 14.5px; }
.csd-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 160px); gap: 8px; }
.csd-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.csd-flbl { font-size: 12.5px; font-weight: 700; color: var(--cs-mute); }
.csd-field .rz-dropdown, .csd-field .dxbl-text-edit { height: 42px !important; min-height: 42px !important; border-radius: 10px !important; border: 1.5px solid var(--cs-line) !important; box-shadow: none !important; }
@media (max-width: 768px) {
    .csd-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* (2026-12-01) النوافذ اللى بتتفتح بطول تلقائى (Height = null + CssClass mc-dialog) — من غير سقف القايمة كانت هتطوّل على قد كل الصفوف */
@media (min-width: 769px) {
    .mc-dialog .csd { height: auto; max-height: min(80vh, 760px); }
    .mc-dialog .csd-list { flex: 1 1 auto; min-height: 140px; max-height: calc(min(80vh, 760px) - 250px); }
}
/* (2026-12-01) سطر النوع فوق الاسم فى مستكشف السندات («مقبوض من عميل» / «مصروف لموظف») — الصف 3 سطور جوه نفس الـ 64px */
.csd-kick { font-size: 11.5px; font-weight: 800; color: var(--fs-primary); line-height: 1.2; }
.csd-b:has(.csd-kick) { gap: 1px; }
.csd-b:has(.csd-kick) .csd-name { font-size: 14.5px; line-height: 1.3; }
.csd-b:has(.csd-kick) .csd-sub { font-size: 12px; line-height: 1.25; }