﻿/* ══════════════════════════════════════════════════════════════════════
   fs-invoice.css — تحسينات شاشات الفواتير الخمس
   (المبيعات، عرض السعر، نقاط البيع، المشتريات، مرتجع المبيعات)
   ▸ بيتحمّل آخر حاجة (بعد invoice.css و returninvoice.css وملفات الموبيل)
   ▸ كل الألوان من متغيرات الثيم (fs-theme.css) فبتشتغل فى الهوية والبرتقالى
   ▸ مقصود يفضل زى ما هو: مجاميع أعمدة الجدول بالأحمر، ومكان أزرار الحفظ/جديد
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1) أزرار جوّه الحقول (بحث، فتح، السابق/التالى، إضافة، حذف) ──
   الزرار اللى بيعمل حاجة يبان إنه زرار؛ أسهم القوايم والتقويم تفضل هادية */
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn {
    color: var(--fs-primary) !important;
    background: rgba(var(--fs-primary-rgb), .09) !important;
    border: 0 !important;
    border-radius: 7px !important;
    margin: 3px 2px !important;
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    min-height: 0 !important;
    padding: 0 !important;
    transition: background .15s;
}
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn .dxbl-image { color: var(--fs-primary) !important; font-size: 15px !important; }
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn:hover { background: rgba(var(--fs-primary-rgb), .18) !important; }
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn:has(.ti-trash) { background: #FDECEC !important; }
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn:has(.ti-trash) .dxbl-image { color: #C62828 !important; }
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn:has(.ti-trash):hover { background: #F9D5D5 !important; }
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn:has(.ti-circle-plus) { background: rgba(var(--fs-action-rgb), .12) !important; }
:is(.inv-form, .rinv-form) .dxbl-text-edit-btn:has(.ti-circle-plus) .dxbl-image { color: var(--fs-action) !important; }
:is(.inv-form, .rinv-form) .dxbl-edit-btn-dropdown,
:is(.inv-form, .rinv-form) .dxbl-edit-btn-dropdown .dxbl-image { color: #8AA3AA !important; }

/* ── 2) اسم العميل/المورد: أهم حقل فى الفاتورة ── */
:is(.inv-form, .rinv-form) .f-cu {
    border: 1.5px solid rgba(var(--fs-primary-rgb), .45) !important;
    background: var(--fs-tint-1) !important;
    border-radius: 8px !important;
}
:is(.inv-form, .rinv-form) .f-cu input { font-size: 15px !important; font-weight: 700 !important; color: var(--fs-primary-ink) !important; }

/* ── 3) الجدول: السطر المحدد بلون الهوية بدل الأزرق ── */
:is(.inv-dg, .rinv-dg) .dxbl-grid-focused-row > td,
:is(.inv-dg, .rinv-dg) .dxbl-grid-selected-row > td { background: rgba(var(--fs-primary-rgb), .10) !important; }

/* ── 4) شريط المجاميع (ديسكتوب): معادلة  المجموع − الخصم − ... + الضريبة = الصافى ── */
@media (min-width: 769px) {
    .inv-footer-right,
    .rinv-footer-right {
        display: flex !important;
        align-items: stretch;
        min-width: 0;
    }
    .inv-footer-right > .inv-tot-cell,
    .rinv-footer-right > .rinv-tot-cell { flex: 1 1 0; min-width: 0; }
    .inv-footer-right > .tc-disc,
    .rinv-footer-right > :is(.tc-disc, .tc-fine) { flex: 1.45 1 0; }

    /* علامات العملية: دايرة صغيرة على الفاصل بين خانتين */
    .inv-tot-op {
        flex: 0 0 24px;
        align-self: center;
        width: 24px;
        height: 24px;
        margin: 0 -12px;
        position: relative;
        z-index: 1;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #fff;
        border: 1px solid var(--fs-tint-5);
        color: #6B8A91;
        font-size: 15px;
        font-weight: 700;
        line-height: 1;
        user-select: none;
    }
    .inv-tot-op.is-eq { color: var(--fs-primary); border-color: rgba(var(--fs-primary-rgb), .45); }

    /* العناوين كلها بلون واحد هادى (كانت أحمر/أزرق/بنفسجى) */
    .inv-tot-cell .inv-tot-lbl,
    .rinv-tot-cell .rinv-tot-lbl { color: #5B7178 !important; font-size: 11px !important; font-weight: 700 !important; }

    /* الصافى (ومرتجع: صافى المرتجع) = كارت بلون الهوية */
    .inv-tot-cell.tc-net,
    .rinv-tot-cell.tc-netret {
        background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep)) !important;
        border: 0 !important;
        border-radius: 12px !important;
        margin: 6px 6px 6px 0;
        box-shadow: 0 4px 12px rgba(var(--fs-primary-rgb), .28);
        flex: 1.25 1 0 !important;
        max-width: 250px;
    }
    /* فى البرتقالى: الصافى كان برتقالى زى زرار الحفظ بالظبط — بقى أخضر (لونه الأصلى فى البرنامج) */
    html[data-fs-theme="orange"] .inv-tot-cell.tc-net,
    html[data-fs-theme="orange"] .rinv-tot-cell.tc-netret {
        background: linear-gradient(135deg, #1F9D55, #15803D) !important;
        box-shadow: 0 4px 12px rgba(21, 128, 61, .3);
    }
    .inv-tot-cell.tc-net .inv-tot-lbl,
    .rinv-tot-cell.tc-netret .rinv-tot-lbl { color: rgba(255, 255, 255, .82) !important; }
    .inv-tot-cell.tc-net .inv-tot-val,
    .rinv-tot-cell.tc-netret .rinv-tot-val { color: #fff !important; }

    /* الأزرار جنب الصافى وفى صف واحد (جديد، حفظ، تعديل، طباعة، طباعة ٢، حذف)
       — الترتيب بالـ order بس، الـ markup زى ما هو؛ «حفظ» أول واحد جنب الصافى */
    .inv-footer-right, .rinv-footer-right { order: 1; }
    .inv-footer-left, .rinv-footer-left, .inv-footer-btns {
        order: 2;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }
    .inv-footer-left, .rinv-footer-left { border-inline-start: 1px solid var(--fs-tint-5) !important; }
    :is(.inv-abtn, .rinv-abtn) { white-space: nowrap; flex-shrink: 0; height: 38px !important; }
    :is(.inv-abtn, .rinv-abtn).a-save { order: -1; min-width: 104px; font-size: 14px !important; }
}
/* نقاط البيع: عمود السلة ضيق (~500px) — المعادلة فى سطر، والصافى كارت بعرض كامل تحتها */
@media (min-width: 769px) {
    .pos-order-section .inv-footer-right { flex-wrap: wrap; row-gap: 0; }
    .pos-order-section .inv-footer-right > .tc-disc { flex: 1.7 1 0; }
    .pos-order-section .inv-footer-right > .inv-tot-op.is-eq { display: none; }
    .pos-order-section .inv-tot-cell.tc-net {
        flex: 1 1 100% !important;
        max-width: none;
        margin: 4px 6px 6px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        min-height: 48px;
        padding: 6px 16px !important;
    }
    .pos-order-section .inv-tot-cell.tc-net .inv-tot-val { font-size: 22px !important; }
    .pos-order-section .fs-disc-seg button { padding: 0 6px; }
}
/* شاشة أضيق: الأزرار التانوية أصغر عشان الصف يفضل واحد */
@media (min-width: 769px) and (max-width: 1400px) {
    :is(.inv-abtn, .rinv-abtn):not(.a-save) { padding: 0 9px !important; font-size: 12px !important; }
    .inv-tot-cell .inv-tot-val, .rinv-tot-cell .rinv-tot-val { font-size: 14px !important; }
    .inv-tot-cell.tc-net .inv-tot-val, .rinv-tot-cell.tc-netret .rinv-tot-val { font-size: 20px !important; }
}

/* ── 5) FsDiscountBox: خانة الخصم بمبلغ أو نسبة ── */
.fs-disc { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; }
.fs-disc-box {
    display: flex;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: 190px;
    height: 32px;
}
/* الخانة نفسها: تكست عادى بإطار واحد متساوى من كل ناحية — زى باقى الخانات */
html body .fs-disc .fs-disc-box .fs-disc-input.dxbl-text-edit {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 1px solid var(--fs-tint-5) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    background: #fff !important;
    transition: border-color .15s, box-shadow .15s;
}
html body .fs-disc .fs-disc-box .fs-disc-input.dxbl-text-edit::before,
html body .fs-disc .fs-disc-box .fs-disc-input.dxbl-text-edit::after { display: none !important; }
html body .fs-disc .fs-disc-box .fs-disc-input.dxbl-text-edit:focus-within {
    border-color: var(--fs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .15) !important;
}
:is(.inv-tot-cell, .rinv-tot-cell, .fs-disc) .fs-disc-box .dxbl-text-edit-input {
    color: #04252D !important;
    -webkit-text-fill-color: #04252D !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center !important;
}
.fs-disc-seg { display: flex; flex: 0 0 auto; align-self: stretch; border: 1px solid var(--fs-tint-5); border-radius: 8px; overflow: hidden; background: var(--fs-tint-1); }
.fs-disc-seg button {
    border: 0;
    background: transparent;
    padding: 0 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #6B8A91;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}
.fs-disc-seg button.on { background: var(--fs-primary); color: #fff; }
.fs-disc-seg button:not(.on):hover { background: rgba(var(--fs-primary-rgb), .1); color: var(--fs-primary); }
.fs-disc-seg button:disabled { cursor: not-allowed; }
.fs-disc-hint { font-size: 11px; font-weight: 600; color: #6B8A91; white-space: nowrap; }
.fs-disc-hint b { color: var(--fs-action); }
.fs-disc.is-disabled { opacity: .6; }


/* ══════════════════════════════════════════════════════════════════════
   الموبيل (≤768px) — نفس لغة الديسكتوب
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── المجاميع: شبكة عمودين، بألوان هادية، والصافى كارت بعرض كامل ── */
    html body :is(.inv-mob-totals, .rinv-mob-totals) {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 6px 0 !important;
    }
    html body :is(.inv-mob-tot-row, .rinv-mob-tot-row) { display: contents !important; }
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell),
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell):is(.mob-edit-cell, .mob-vat-cell) {
        background: #fff !important;
        border: 1px solid var(--fs-tint-5) !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        min-height: 58px;
        padding: 6px 8px !important;
        gap: 4px !important;
    }
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell) :is(.inv-mob-lbl, .rinv-mob-lbl) {
        color: #5B7178 !important; font-size: 11px !important; font-weight: 700 !important;
    }
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell) :is(.inv-mob-val, .rinv-mob-val),
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell) :is(.inv-mob-val, .rinv-mob-val).red {
        color: #04252D !important; font-size: 15px !important; font-weight: 800 !important;
    }
    /* الضريبة كانت أصفر/بنى بقاعدة أدق — نفس شكل باقى الخانات */
    html body .inv-mob-tot-cell.mob-vat-cell .inv-mob-lbl,
    html body .rinv-mob-tot-cell.mob-vat-cell .rinv-mob-lbl { color: #5B7178 !important; font-size: 11px !important; font-weight: 700 !important; }
    html body .inv-mob-tot-cell.mob-vat-cell .inv-mob-val,
    html body .rinv-mob-tot-cell.mob-vat-cell .rinv-mob-val { color: #04252D !important; font-size: 15px !important; font-weight: 800 !important; }
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell).mob-edit-cell .dxbl-text-edit-input {
        color: #04252D !important; -webkit-text-fill-color: #04252D !important;
    }
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell).mob-disc-cell .fs-disc-box { max-width: none; height: 34px; }

    /* الصافى (وفى المرتجع: صافى المرتجع) */
    html body .inv-mob-tot-cell.mob-net-cell,
    html body .rinv-mob-tot-cell.mob-final-cell {
        grid-column: 1 / -1;
        flex-direction: row !important;
        justify-content: space-between !important;
        min-height: 54px;
        padding: 8px 16px !important;
        border: 0 !important;
        background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep)) !important;
        box-shadow: 0 4px 12px rgba(var(--fs-primary-rgb), .28) !important;
    }
    html[data-fs-theme="orange"] body .inv-mob-tot-cell.mob-net-cell,
    html[data-fs-theme="orange"] body .rinv-mob-tot-cell.mob-final-cell {
        background: linear-gradient(135deg, #1F9D55, #15803D) !important;
        box-shadow: 0 4px 12px rgba(21, 128, 61, .3) !important;
    }
    html body .inv-mob-tot-cell.mob-net-cell :is(.inv-mob-lbl),
    html body .rinv-mob-tot-cell.mob-final-cell .rinv-mob-lbl { color: rgba(255, 255, 255, .85) !important; font-size: 13px !important; }
    html body .inv-mob-tot-cell.mob-net-cell .inv-mob-val,
    html body .rinv-mob-tot-cell.mob-final-cell .rinv-mob-val { color: #fff !important; font-size: 22px !important; font-weight: 900 !important; }
    /* (2026-11-24 طلب المالك) مرتجع المبيعات: «قيمة المرتجع» جنب «الضريبة» (كان شريط بعرض الشاشة تحت ومكان فاضى جنب الضريبة)
       ← الخانات قبلها دايمًا 5 (المجموع ، الخصم ، الغرامة ، الصافى ، الضريبة) فهى بتملا المكان الفاضى ، والعنوان فوق والرقم تحت علشان الأرقام الكبيرة تكفى */
    html body .rinv-mob-tot-cell.mob-final-cell {
        grid-column: auto;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2px;
        padding: 8px 10px !important;
    }
    html body .rinv-mob-tot-cell.mob-final-cell .rinv-mob-val { font-size: 19px !important; white-space: nowrap; }
    /* نفس الفكرة لأى شاشة: الصافى بياخد المكان الفاضى جنب آخر خانة لما عدد الخانات قبله فردى — الشاشة بتحط mob-net-half (المشتريات ، مرتجع المشتريات) */
    html body .inv-mob-tot-cell.mob-net-cell.mob-net-half { grid-column: auto; flex-direction: column !important; justify-content: center !important; align-items: center !important; gap: 2px; padding: 8px 10px !important; }
    html body .inv-mob-tot-cell.mob-net-cell.mob-net-half .inv-mob-val { font-size: 19px !important; white-space: nowrap; }

    /* ── أزرار الفاتورة: شريط ثابت تحت زى التطبيقات، بألوان الهوية ──
       (مش فى نقاط البيع — ليها تصميمها) */
    html body .inv-page .inv-footer-left,
    html body .rinv-page .rinv-footer-left {
        position: fixed !important;
        left: 0 !important; right: 0 !important; bottom: 0 !important;
        z-index: 1040;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        width: auto !important;
        margin: 0 !important;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        background: #fff !important;
        border: 0 !important;
        border-top: 1px solid var(--fs-tint-5) !important;
        box-shadow: 0 -6px 16px rgba(4, 37, 45, .08) !important;
    }
    html body :is(.inv-page, .rinv-page) { padding-bottom: 78px !important; }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn) {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
        height: 50px !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 3px !important;
        padding: 0 2px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        white-space: nowrap;
        overflow: hidden;
        background: #fff !important;
        color: #33535B !important;
        border: 1px solid var(--fs-tint-5) !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        order: 0 !important;
        grid-column: auto !important;
    }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn) i { font-size: 16px !important; margin: 0 !important; color: var(--fs-primary); }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn).a-save {
        flex: 2 1 0 !important;
        order: -1 !important;
        flex-direction: row !important;
        gap: 8px !important;
        font-size: 15px !important;
        background: var(--fs-action) !important;
        color: #fff !important;
        border-color: transparent !important;
        box-shadow: 0 3px 10px rgba(var(--fs-action-rgb), .35) !important;
    }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn).a-save i { color: #fff !important; }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn).a-del { color: #C62828 !important; border-color: #F5C2C2 !important; background: #FFF6F6 !important; }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn).a-del i { color: #C62828 !important; }

    /* ── أزرار سعر١/٢/٣: كانت آخرها مقصوص — تتلف فى سطرين لو المساحة مش كفاية ── */
    html body :is(.inv-form, .rinv-form) .inv-cell-extra:has(.price-seg) { flex-wrap: wrap !important; overflow: visible !important; row-gap: 6px; }
    /* (2026-11-24 طلب المالك) خانة «الضريبة» كانت بتاخد سطر لوحدها فوق سعر١/٢/٣ (السعر كان 100% من العرض)
       ← دلوقتى الاتنين فى سطر واحد: الضريبة صغيرة على الطرف والأسعار تاخد الباقى ، ولو الشاشة ضيقة جدًا (أقل من 210px للأسعار) بس تنزل سطر */
    html body :is(.inv-form, .rinv-form) .price-seg { flex: 1 1 210px !important; min-width: 0 !important; }
    html body :is(.inv-form, .rinv-form) .inv-cell-extra:has(.price-seg) .inv-vat-row { flex: 0 0 auto !important; white-space: nowrap; }
    /* عرض السعر فيه 4 أسعار (سعر1/2/3 + سعر التكلفة) — مايكفوش جنب الضريبة («سعر التكلفة» كان راكب على «سعر3») ← سطر لوحدهم زى الأول */
    html body :is(.inv-form, .rinv-form) .price-seg:has(> .price-seg-btn:nth-child(4)) { flex: 1 1 100% !important; }
    html body :is(.inv-form, .rinv-form) .price-seg .price-seg-btn { flex: 1 1 0 !important; min-width: 0 !important; justify-content: center; }
}

/* ══ «تفاصيل إضافية» فى رأس الفاتورة (FsMoreFields) — موبيل بس ══ */
.fs-more-tog { display: none; }
@media (max-width: 768px) {
    .fs-more-tog {
        display: flex; align-items: center; justify-content: space-between; gap: 8px;
        width: 100%; margin: 8px 0 2px; padding: 10px 14px;
        border: 1px dashed rgba(var(--fs-primary-rgb), .45); border-radius: 10px;
        background: var(--fs-tint-1); color: var(--fs-primary);
        font-family: inherit; font-size: 13.5px; font-weight: 700;
    }
    .fs-more-tog.is-open { border-style: solid; background: #fff; }
    body:not(.fs-more-open) .inv-form-body .inv-cell:not(.fs-keep),
    body:not(.fs-more-open) .rinv-form-body .rinv-cell:not(.fs-keep),
    body:not(.fs-more-open) :is(.inv-form-body, .rinv-form-body) :is(.inv-form-sep, .rinv-form-sep) { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   أصناف الفاتورة ككروت (فاتورة المبيعات) — موبيل بس
   الـ markup فى FrmOrders.razor (.fs-mcards / .fs-msheet) والدوال فى FrmOrders.MobileItems.razor.cs
   ══════════════════════════════════════════════════════════════════════ */
.fs-mcards { display: none; }
@media (max-width: 768px) {
    /* الجدول وأزرار «أدرج سطر/الأعمدة/حذف التحديد» مخفيين — الكروت بدالهم، وشريط الباركود فاضل */
    html body .inv-grid-card:has(.fs-mcards) .inv-grid-body,
    html body .inv-grid-card:has(.fs-mcards) .inv-gtb-actions,
    html body .inv-grid-card:has(.fs-mcards) .inv-gtb-sep { display: none !important; }
    html body .inv-grid-card:has(.fs-mcards) {
        height: auto !important; min-height: 0 !important; max-height: none !important;
        flex: none !important; overflow: visible !important;
        background: transparent !important; border: 0 !important; box-shadow: none !important;
    }
    .fs-mcards { display: block; padding: 6px 0 4px; }
}
/* شكل الكروت وشاشة التعديل: عام — بيظهر بس لما الـ markup يترسم (موبيل، أو سلة نقطة البيع ديسكتوب) */
@media all {

    .fs-mc {
        position: relative; overflow: hidden;
        display: flex; flex-direction: column; gap: 7px;
        margin: 0 0 8px; padding: 10px 12px;
        background: #fff; border: 1px solid #DCEBEF; border-radius: 12px;
    }
    .fs-mc.is-offer { border-color: #A7F3D0; }
    .fs-mc.is-offer::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: #10B981; }
    .fs-mc.is-free { border-color: #FCD9A8; background: #FFFCF7; }
    .fs-mc.is-free::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--fs-action); }

    .fs-mc-top { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
    .fs-mc-no {
        flex: 0 0 26px; height: 26px; border-radius: 7px; border: 0; padding: 0;
        display: grid; place-items: center;
        background: rgba(var(--fs-primary-rgb), .1); color: var(--fs-primary);
        font-weight: 800; font-size: 12px; font-family: inherit;
    }
    .fs-mc-no.is-alt { background: var(--fs-primary); color: #fff; font-size: 14px; }
    .fs-mc-nm { flex: 1; min-width: 0; }
    .fs-mc-nm b {
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        font-size: 14.5px; line-height: 1.35; color: #04252D;
    }
    .fs-mc-nm small { color: #6B8A91; font-size: 12px; }
    .fs-mc-chev { color: #9AB3B9; font-size: 18px; margin-top: 2px; }
    [dir="ltr"] .fs-mc-chev { transform: scaleX(-1); }

    .fs-mc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
    .fs-mc-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; }
    .fs-mc-tag.t-offer { background: #ECFDF5; color: #047857; }
    .fs-mc-tag.t-free { background: #FFF1E0; color: #B45309; }
    .fs-mc-tag.t-alt { background: #EEF2FF; color: #4338CA; }
    .fs-mc-tag.t-warn { background: #FEF2F2; color: #B91C1C; }
    .fs-mc-tag.t-batch { background: var(--fs-tint-1); color: var(--fs-primary); }

    .fs-mc-bot { display: flex; align-items: center; gap: 10px; }
    .fs-mc-step { display: flex; align-items: center; height: 36px; border: 1px solid var(--fs-tint-5); border-radius: 9px; overflow: hidden; }
    .fs-mc-step button {
        width: 36px; height: 36px; border: 0; background: var(--fs-tint-1);
        color: var(--fs-primary); font-size: 18px; font-weight: 700; font-family: inherit;
    }
    .fs-mc-step button:disabled { color: #B7C9CE; }
    .fs-mc-step span { min-width: 36px; text-align: center; font-weight: 800; color: #04252D; }
    .fs-mc-qty { font-weight: 800; color: #04252D; }
    .fs-mc-pr { display: inline-flex; align-items: center; gap: 4px; color: #6B8A91; font-size: 12.5px; cursor: pointer; }
    .fs-mc-pr .ti-pencil { color: var(--fs-primary); }
    .fs-mc-pr .ti-lock { color: #9AB3B9; }
    .fs-mc-tot { margin-inline-start: auto; text-align: end; }
    .fs-mc-tot b { display: block; font-size: 16px; color: #04252D; }
    .fs-mc-tot b.is-zero { color: #B45309; }
    .fs-mc-tot small { color: #8AA3AA; font-size: 11px; }

    .fs-mc-add {
        width: 100%; height: 46px; margin-bottom: 6px;
        display: flex; align-items: center; justify-content: center; gap: 8px;
        border: 1.5px dashed rgba(var(--fs-primary-rgb), .45); border-radius: 12px;
        background: var(--fs-tint-1); color: var(--fs-primary);
        font-family: inherit; font-size: 14px; font-weight: 700;
    }
    .fs-mc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 10px; color: #8AA3AA; font-size: 13px; }
    .fs-mc-empty i { font-size: 30px; color: var(--fs-tint-5); }

    /* شاشة تعديل الصنف — من تحت */
    .fs-msheet-shade { position: fixed; inset: 0; z-index: 1055; background: rgba(4, 37, 45, .45); }
    .fs-msheet {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1060;
        max-height: 88vh; overflow-y: auto;
        padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        background: #fff; border-radius: 18px 18px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, .2);
    }
    .fs-msheet-grab { width: 42px; height: 5px; border-radius: 3px; background: #D5E2E6; margin: 4px auto 12px; }
    .fs-msheet-t b { display: block; font-size: 15.5px; color: #04252D; }
    .fs-msheet-t small { color: #6B8A91; font-size: 12px; }
    .fs-msheet-fl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
    .fs-msf label { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: #5B7178; }
    .fs-msf .fs-msf-in, .fs-msf-btn {
        width: 100% !important; height: 44px !important;
        border: 1px solid var(--fs-tint-5) !important; border-radius: 10px !important; background: #fff !important;
    }
    .fs-msf .fs-msf-in .dxbl-text-edit-input { text-align: center !important; font-size: 16px !important; font-weight: 700 !important; color: #04252D !important; }
    .fs-msf-btn { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; font-size: 15px; font-weight: 700; color: #04252D; }
    .fs-msf-chk { height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--fs-tint-5); border-radius: 10px; }
    .fs-msf.is-ro .fs-msf-in { background: #F4F7F8 !important; border-style: dashed !important; }
    .fs-msf.is-ro .fs-msf-in .dxbl-text-edit-input { color: #7D9399 !important; }
    .fs-msheet-note { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; }
    .fs-msheet-note.n-offer { background: #ECFDF5; color: #047857; }
    .fs-msheet-note.n-lock { background: #F4F7F8; color: #5B7178; }
    .fs-msheet-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
    .fs-msheet-acts button {
        height: 46px; border: 1px solid var(--fs-tint-5); border-radius: 10px; background: #fff;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        font-family: inherit; font-size: 11.5px; font-weight: 700; color: #33535B;
    }
    .fs-msheet-acts button i { font-size: 16px; color: var(--fs-primary); }
    .fs-msheet-acts button.is-del { color: #C62828; border-color: #F5C2C2; background: #FFF6F6; }
    .fs-msheet-acts button.is-del i { color: #C62828; }
    .fs-msheet-sum { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 10px 14px; border-radius: 10px; background: var(--fs-tint-1); color: #6B8A91; font-size: 13px; }
    .fs-msheet-sum b { color: #04252D; font-size: 16px; }
    .fs-msheet-ok { width: 100%; height: 48px; border: 0; border-radius: 12px; background: var(--fs-primary); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; }
}
/* خصم الصنف فى شاشة التعديل بعرض كامل (مبلغ أو نسبة) */
@media all {
    .fs-msf.fs-msf-wide { grid-column: 1 / -1; }
    .fs-msf.fs-msf-wide .fs-disc { align-items: stretch; }
    .fs-msf.fs-msf-wide .fs-disc-box { max-width: none; height: 44px; }
    html body .fs-msf.fs-msf-wide .fs-disc .fs-disc-box .fs-disc-input.dxbl-text-edit, .fs-msf.fs-msf-wide .fs-disc-seg { border-radius: 10px !important; }
    .fs-msf.fs-msf-wide .fs-disc-box .dxbl-text-edit-input { font-size: 16px !important; }
    .fs-msf.fs-msf-wide .fs-disc-hint { text-align: center; }
}


/* ══ «إضافة صنف»: شاشة بحث بتبدأ فاضية (موبيل من تحت، ونقطة البيع ديسكتوب فى النص) ══ */
@media all {
    .fs-msearch {
        position: fixed; left: 0; right: 0; bottom: 0; top: 36px; z-index: 1060;
        display: flex; flex-direction: column;
        background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
    }
    .fs-msearch-hd { display: flex; align-items: center; justify-content: space-between; padding: 2px 16px 10px; }
    .fs-msearch-hd b { font-size: 17px; color: #04252D; }
    .fs-msearch-x { border: 0; background: transparent; color: #6B8A91; font-size: 22px; }
    .fs-msearch-bar { display: flex; gap: 6px; padding: 0 12px 8px; }
    .fs-msearch-in {
        flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
        border: 2px solid var(--fs-primary); border-radius: 12px; box-shadow: 0 0 0 4px rgba(var(--fs-primary-rgb), .1);
    }
    .fs-msearch-in i { color: var(--fs-primary); font-size: 20px; }
    .fs-msearch-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 16px; font-weight: 600; color: #04252D; }
    .fs-msearch-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fs-tint-5); border-top-color: var(--fs-primary); animation: fs-spin .7s linear infinite; }
    @keyframes fs-spin { to { transform: rotate(360deg); } }
    .fs-msearch-go, .fs-msearch-cam { flex: 0 0 48px; height: 48px; border: 0; border-radius: 12px; font-size: 20px; }
    .fs-msearch-go { background: var(--fs-tint-1); color: var(--fs-primary); border: 1px solid var(--fs-tint-5); }
    [dir="ltr"] .fs-msearch-go i { transform: scaleX(-1); display: inline-block; }
    .fs-msearch-cam { background: var(--fs-primary); color: #fff; }
    .fs-msearch-empty { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px 0; text-align: center; color: #6B8A91; font-size: 13.5px; }
    .fs-msearch-empty i { font-size: 44px; color: var(--fs-tint-5); }
    .fs-msearch-empty b { color: #04252D; font-size: 15px; }
    .fs-msearch-hint { background: #FFF7ED; color: #B45309; border-radius: 8px; padding: 6px 12px; font-weight: 600; }
    .fs-msearch-meta { display: flex; justify-content: space-between; padding: 2px 16px 8px; font-size: 12.5px; color: #6B8A91; }
    .fs-msearch-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 10px 8px; }
    .fs-msearch-none { text-align: center; color: #8AA3AA; padding: 24px 0; }
    .fs-msr { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; padding: 10px; border: 1px solid #E3ECEF; border-radius: 12px; }
    .fs-msr.is-added { border-color: rgba(var(--fs-primary-rgb), .4); background: var(--fs-tint-1); }
    .fs-msr-b { flex: 1; min-width: 0; }
    .fs-msr-b b { display: block; font-size: 14px; color: #04252D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fs-msr-b small { display: flex; gap: 10px; color: #6B8A91; font-size: 12px; }
    .fs-msr-b small .is-zero { color: #B91C1C; }
    .fs-msr-pr { font-weight: 800; font-size: 14px; color: #04252D; white-space: nowrap; }
    .fs-msr-add {
        position: relative; flex: 0 0 40px; height: 40px; border: 0; border-radius: 10px;
        background: var(--fs-action); color: #fff; font-size: 22px; line-height: 1; font-family: inherit;
    }
    .fs-msr-cnt {
        position: absolute; top: -7px; inset-inline-end: -7px; min-width: 20px; height: 20px; padding: 0 5px;
        border: 2px solid #fff; border-radius: 10px; background: var(--fs-primary);
        font-size: 11px; font-weight: 800; line-height: 16px;
    }
    .fs-msearch-more { text-align: center; color: #6B8A91; font-size: 12.5px; padding: 6px 0 10px; }
    .fs-msearch-ft { padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #E3ECEF; }
}
/* أزرار شاشة البحث: قواعد الأزرار العامة كانت بتصغّر الأيقونات وعلامة + */
@media all {
    html body .fs-msearch .fs-msr-add { font-size: 26px !important; font-weight: 500; padding: 0; }  /* mobile-ui-pack.css بيفرض 13.5px !important على كل الأزرار */
    html body .fs-msearch .fs-msearch-go i,
    html body .fs-msearch .fs-msearch-cam i { font-size: 21px; }
    html body .fs-msearch .fs-msearch-x { font-size: 22px !important; padding: 4px; }
    html body .fs-msearch .fs-msr-cnt { font-size: 11px !important; line-height: 16px; }
    html body .fs-msearch .fs-msr-b small bdi { direction: ltr; }
    /* الأيقونات جوه الأزرار مش متأثرة بقاعدة الأزرار العامة */
    html body .fs-msearch .fs-msr-add i { font-size: 22px; }
    html body .fs-msearch .fs-msearch-x i { font-size: 22px; }
    .fs-msearch-list { scrollbar-width: thin; }
}

/* ══ بدائل الصنف: سطر فى الكارت + علامة فى البحث + شاشة البدائل ══ */
@media all {
    html body .fs-mc .fs-mc-alt {
        display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; padding: 7px 10px;
        border: 1px dashed #6CC9AF; border-radius: 10px; background: #ECFDF5; color: #0E7C66;
        font-family: inherit; font-size: 13px !important; font-weight: 700; text-align: start;
    }
    html body .fs-mc .fs-mc-alt i { font-size: 18px; }
    html body .fs-mc .fs-mc-alt span { flex: 1; }
    html body .fs-mc .fs-mc-alt em { font-style: normal; font-size: 12px; background: #0E7C66; color: #fff; border-radius: 8px; padding: 5px 10px; white-space: nowrap; }
    html body .fs-mc .fs-mc-alt.is-out { border-color: #F3B27A; background: #FFF7ED; color: #B45309; }
    html body .fs-mc .fs-mc-alt.is-out em { background: var(--fs-action); }

    .fs-msr-alt { display: inline-flex; align-items: center; gap: 3px; background: #ECFDF5; color: #0E7C66; border-radius: 6px; padding: 0 6px; font-weight: 700; font-size: 11px; }

    .fs-malt {
        position: fixed; left: 0; right: 0; bottom: 0; top: 60px; z-index: 1060;
        display: flex; flex-direction: column;
        background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
    }
    .fs-malt-orig { margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; background: var(--fs-tint-1); color: #33535B; font-size: 12.5px; }
    .fs-malt-orig b { display: block; margin-bottom: 2px; color: #04252D; font-size: 14px; }
    .fs-malt-orig em { font-style: normal; }
    .fs-malt-orig em.is-zero { color: #B91C1C; font-weight: 700; }
    .fs-malt-note { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; padding: 6px 10px; border-radius: 8px; background: #FFF7ED; color: #B45309; font-size: 11.5px; }
    .fs-malt-c { margin-bottom: 8px; padding: 10px 12px; border: 1px solid #E3ECEF; border-radius: 12px; }
    .fs-malt-c.is-avail { border-color: #6CC9AF; box-shadow: 0 0 0 3px rgba(14, 124, 102, .08); }
    .fs-malt-h { display: flex; justify-content: space-between; gap: 8px; }
    .fs-malt-h b { display: block; font-size: 14.5px; color: #04252D; }
    .fs-malt-h small { color: #6B8A91; font-size: 12px; }
    .fs-malt-pr { font-weight: 800; font-size: 15px; color: #04252D; white-space: nowrap; text-align: end; }
    .fs-malt-pr small { display: block; font-size: 10.5px; font-weight: 600; }
    .fs-malt-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
    .fs-malt-g div { padding: 5px 6px; border-radius: 8px; background: #F7FAFB; color: #6B8A91; font-size: 11px; text-align: center; }
    .fs-malt-g b { display: block; color: #04252D; font-size: 13.5px; }
    .fs-malt-g .ok b { color: #0E7C66; }
    .fs-malt-g .no b { color: #B91C1C; }
    html body .fs-malt .fs-malt-go {
        display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 42px; margin-top: 9px;
        border: 0; border-radius: 10px; background: var(--fs-primary); color: #fff; font-family: inherit; font-weight: 700;
    }
    html body .fs-malt .fs-malt-go i { font-size: 18px; }
    html body .fs-malt .fs-malt-cancel {
        width: 100%; height: 46px; border: 1px solid #DCE7EA; border-radius: 12px; background: #fff; color: #6B8A91; font-family: inherit; font-weight: 700;
    }
}

/* ══ رأس فاتورة المبيعات على الموبيل: ترتيب الحقول + مجموعات «تفاصيل إضافية» (2026-11-07) ══
   ▸ FrmOrders.razor: .inv-form-body.fs-hdr-groups + class fs-o-* على كل خانة + عناوين .fs-mgrp
   ▸ الصفين (inv-row / inv-row-b) بيبقوا display:contents فكل الخانات بتترتب فى grid واحد بالـ order
   ▸ الأساسى فوق (الرقم، النوع، التاريخ، الضريبة والأسعار، العميل) ثم الزرار، وبعده 3 مجموعات */
.fs-mgrp, .fs-more-sum { display: none; }
@media (max-width: 768px) {
    html body .inv-form-body.fs-hdr-groups {
        display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 8px; row-gap: 8px; align-items: end;
    }
    html body .fs-hdr-groups > .inv-row,
    html body .fs-hdr-groups > .inv-row-b { display: contents !important; }
    html body .fs-hdr-groups :is(.inv-cell, .inv-cell-extra) { margin: 0 !important; min-width: 0; }

    html body .fs-hdr-groups .fs-o-sn     { order: 1;  grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups .fs-o-type   { order: 2;  grid-column: span 1 !important; }
    html body .fs-hdr-groups .fs-o-date   { order: 3;  grid-column: span 1 !important; }
    html body .fs-hdr-groups .fs-o-extra  { order: 4;  grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups .fs-o-cust   { order: 5;  grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups > .fs-more-tog { order: 6; grid-column: 1 / -1; margin: 2px 0 0; }
    html body .fs-hdr-groups > .fs-more-sum { order: 7; grid-column: 1 / -1; }

    html body .fs-hdr-groups .fs-mgrp-1   { order: 10; }
    html body .fs-hdr-groups .fs-o-due    { order: 11; grid-column: span 1 !important; }
    html body .fs-hdr-groups .fs-o-doc    { order: 12; grid-column: span 1 !important; }
    html body .fs-hdr-groups .fs-o-cc     { order: 13; grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups .fs-o-search { order: 14; grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups .fs-mgrp-2   { order: 20; }
    html body .fs-hdr-groups .fs-o-sm1    { order: 21; grid-column: span 1 !important; }
    html body .fs-hdr-groups .fs-o-sm2    { order: 22; grid-column: span 1 !important; }
    html body .fs-hdr-groups .fs-o-store  { order: 23; grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups .fs-mgrp-3   { order: 30; }
    html body .fs-hdr-groups .fs-o-mob    { order: 31; grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups .fs-o-note   { order: 32; grid-column: 1 / -1 !important; }
    html body .fs-hdr-groups .fs-o-note2  { order: 33; grid-column: 1 / -1 !important; }

    /* عناوين المجموعات — بتظهر بس والتفاصيل مفتوحة */
    body.fs-more-open .fs-hdr-groups .fs-mgrp {
        display: flex; align-items: center; gap: 6px; grid-column: 1 / -1;
        margin-top: 6px; padding-top: 10px; border-top: 1px solid rgba(var(--fs-primary-rgb), .14);
        color: var(--fs-primary); font-size: 12.5px; font-weight: 800;
    }
    body.fs-more-open .fs-hdr-groups .fs-mgrp i { font-size: 16px; }

    /* ملخّص المليان جوّه «تفاصيل إضافية» وهى مقفولة (FsMoreFields) */
    body:not(.fs-more-open) .fs-more-sum { display: flex; flex-wrap: wrap; gap: 6px; }
    .fs-more-sum span {
        display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
        padding: 3px 10px; border-radius: 20px; background: #EEF3F5; color: #33535B;
        font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .fs-more-sum span b { color: var(--fs-primary); font-weight: 700; }
    .fs-more-tog .fs-more-cnt {
        display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: 6px;
        border-radius: 10px; background: var(--fs-primary); color: #fff; font-size: 11px; font-weight: 800;
    }
}

/* ══ شاشة تعديل الصنف: المخزن / مركز التكلفة / التشغيلة ══ */
@media all {
    .fs-mpick { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
    html body .fs-mpick .fs-mpick-row {
        display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px;
        border: 1px solid #DCE7EA; border-radius: 12px; background: #fff; text-align: start; font-family: inherit; font-size: 13px !important;
    }
    .fs-mpick-row > i:first-child { font-size: 19px; color: var(--fs-primary); }
    .fs-mpick-row span { flex: 1; min-width: 0; }
    .fs-mpick-row small { display: block; font-size: 11.5px; color: #6B8A91; font-weight: 700; }
    .fs-mpick-row b { display: block; font-size: 14px; color: #04252D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fs-mpick-go { color: #A8BEC4; font-size: 16px; }
    .fs-mpick-row:disabled { opacity: .7; }
    .fs-mpick-row:disabled .fs-mpick-go { display: none; }
}

/* المرتجع: نفس إخفاء الجدول لما الكروت موجودة (rinv-*) */
@media (max-width: 768px) {
    html body .rinv-grid-card:has(.fs-mcards) .rinv-grid-body,
    html body .rinv-grid-card:has(.fs-mcards) .rinv-gtb-actions,
    html body .rinv-grid-card:has(.fs-mcards) .rinv-gtb-sep { display: none !important; }
    html body .rinv-grid-card:has(.fs-mcards) {
        height: auto !important; min-height: 0 !important; max-height: none !important;
        flex: none !important; overflow: visible !important;
        background: transparent !important; border: 0 !important; box-shadow: none !important;
    }
}

/* ══ المشتريات على الموبيل: نفس المبيعات — الإجماليات جوه الصفحة، وشريط الأزرار بس ثابت تحت ══
   FrmPurchases.razor.css بيثبّت الفوتر كله (158px) على كل المقاسات وكان بيغطى كروت الأصناف.
   الديسكتوب زى ما هو. (specificity أعلى من الـ scoped CSS: .frm-purchases-page .inv-footer[b-…]) */
@media (max-width: 768px) {
    html body .frm-purchases-page .inv-page .inv-footer {
        position: static !important; height: auto !important; max-height: none !important;
        overflow: visible !important; box-shadow: none !important; z-index: auto !important;
    }
    html body .frm-purchases-page .inv-page .inv-footer .inv-footer-inner,
    html body .frm-purchases-page .inv-page .inv-footer .inv-footer-bottom {
        height: auto !important; min-height: 0 !important; overflow: visible !important;
    }
    html body .frm-purchases-page .inv-page { padding-bottom: 90px !important; min-height: 0 !important; }
}
/* تبويبات المشتريات (الأصناف / القيد / المرفق) على الموبيل: كانت متكبّسة فى 29px والنص مستخبى تحت شريط التمرير */
@media (max-width: 768px) {
    html body .frm-purchases-page .inv-page .inv-grid-card .pur-tabs-head {
        height: auto !important; min-height: 44px !important; overflow-x: auto !important; overflow-y: hidden !important;
        scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 6px; padding: 6px !important; align-items: center;
    }
    html body .frm-purchases-page .inv-page .inv-grid-card .pur-tabs-head::-webkit-scrollbar { display: none; }
    html body .frm-purchases-page .inv-page .inv-grid-card .pur-tabs-head > * { flex: 0 0 auto !important; white-space: nowrap !important; height: auto !important; }
}

/* ══ رأس المرتجع والمشتريات على الموبيل: نفس مجموعات المبيعات (2026-11-08) ══ */
@media (max-width: 768px) {
    /* المرتجع: rinv-* */
    html body .rinv-form-body.fs-hdr-groups {
        display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 8px; row-gap: 8px; align-items: end;
    }
    html body .fs-hdr-groups > .rinv-row,
    html body .fs-hdr-groups > .rinv-row-b { display: contents !important; }
    html body .fs-hdr-groups :is(.rinv-cell, .rinv-cell-extra) { margin: 0 !important; min-width: 0; width: auto !important; }
    html body .rinv-form-body.fs-hdr-groups .fs-o-inv     { order: 1;  grid-column: 1 / -1 !important; }   /* الفاتورة الأصلية تحت رقم المرتجع */
    html body .rinv-form-body.fs-hdr-groups .fs-o-prev    { order: 11; grid-column: span 1 !important; }
    html body .rinv-form-body.fs-hdr-groups .fs-o-doc     { order: 12; grid-column: span 1 !important; }
    html body .rinv-form-body.fs-hdr-groups .fs-o-cc      { order: 13; grid-column: 1 / -1 !important; }
    html body .rinv-form-body.fs-hdr-groups .fs-o-search  { order: 14; grid-column: span 1 !important; }
    html body .rinv-form-body.fs-hdr-groups .fs-o-search2 { order: 15; grid-column: span 1 !important; }
    html body .rinv-form-body.fs-hdr-groups .fs-o-year    { order: 16; grid-column: 1 / -1 !important; }

    /* المشتريات: الخانات عليها hdr-* أصلاً */
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-invoice        { order: 1;  grid-column: 1 / -1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-type           { order: 2;  grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-date           { order: 3;  grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-vat            { order: 4;  grid-column: 1 / -1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-supplier       { order: 5;  grid-column: 1 / -1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-due            { order: 11; grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-alert          { order: 12; grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-doc            { order: 13; grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-supplier-ref   { order: 14; grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-cost           { order: 15; grid-column: 1 / -1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-search         { order: 16; grid-column: 1 / -1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-taxno          { order: 21; grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-salesman       { order: 22; grid-column: span 1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-expense        { order: 31; grid-column: 1 / -1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-attachment     { order: 32; grid-column: 1 / -1 !important; }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-excel          { order: 33; grid-column: 1 / -1 !important; }
}
/* المشتريات: الـ scoped CSS بيفرض display:grid على الصفوف بـ #invForm — لازم نفس الـ ID عشان تبقى contents */
@media (max-width: 768px) {
    html body .frm-purchases-page #invForm .inv-form-body.fs-hdr-pur > .inv-row,
    html body .frm-purchases-page #invForm .inv-form-body.fs-hdr-pur > .inv-row-b { display: contents !important; }
    html body .frm-purchases-page #invForm .inv-form-body.fs-hdr-pur :is(.inv-cell, .inv-cell-extra) { margin: 0 !important; min-width: 0 !important; width: auto !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   نقطة البيع (FrmPOS) — 2026-11-08
   ▸ البلاطات (كل المقاسات): أول حرفين على لون للصنف اللى ملوش صورة + رقم الكمية لو فى السلة
   ▸ موبيل: شريط مختصر فوق، بحث بيفتح «إضافة صنف»، بلاطات عمودين، شريط سلة ثابت، السلة من تحت
   ══════════════════════════════════════════════════════════════════════ */
.pos-mhead, .pos-msearch, .pos-mcartbar, .pos-mcart, .pos-mcart-shade { display: none; }

html body .pos-container .prod-card { position: relative; }
html body .pos-container .prod-card.is-in { border-color: var(--fs-primary) !important; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .1) !important; }
html body .pos-container .prod-img.is-av { display: flex !important; align-items: center; justify-content: center; background: #F7FAFB !important; }
html body .pos-container .prod-av {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .3px;
}
html body .pos-container .prod-qty {
    position: absolute; top: -7px; inset-inline-end: -7px; z-index: 2; min-width: 22px; height: 22px; padding: 0 5px;
    border-radius: 11px; border: 2px solid #fff; background: var(--fs-primary); color: #fff;
    font-size: 11.5px; font-weight: 800; display: grid; place-items: center;
}
html body .pos-container .prod-step {
    display: flex; align-items: center; justify-content: space-between; margin-top: 6px;
    border: 1px solid var(--fs-tint-5); border-radius: 10px; background: var(--fs-tint-1); overflow: hidden;
}
html body .pos-container .prod-step button {
    width: 34px; height: 30px; border: 0; background: transparent; color: var(--fs-primary);
    font-size: 18px !important; font-weight: 800; padding: 0; line-height: 1;
}
html body .pos-container .prod-step b { font-size: 14px; color: #04252D; }

@media (max-width: 768px) {
    /* شريط مختصر فوق */
    html body .pos-container .pos-mhead {
        display: flex; gap: 6px; align-items: center; padding: 8px 10px; background: #fff;
        border-bottom: 1px solid #E3ECEF; overflow-x: auto; scrollbar-width: none;
    }
    .pos-mhead::-webkit-scrollbar { display: none; }
    html body .pos-container .pos-mchip {
        flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; max-width: 60vw;
        padding: 6px 11px; border: 1px solid #E3ECEF; border-radius: 20px; background: #fff;
        color: #33535B; font-family: inherit; font-size: 12.5px !important; font-weight: 700; white-space: nowrap;
    }
    html body .pos-container .pos-mchip span { overflow: hidden; text-overflow: ellipsis; }
    html body .pos-container .pos-mchip.is-p { background: var(--fs-tint-1); border-color: var(--fs-tint-5); color: var(--fs-primary); }
    html body .pos-container .pos-mchip-more { margin-inline-start: auto; }
    html body .pos-container .pos-mchip-more.on { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
    html body .pos-container .pos-mchip i { font-size: 15px; }
    /* رأس الفاتورة الكامل: مقفول إلا لو «تفاصيل» مفتوحة */
    html body .pos-container:not(.pos-m-details) .pos-search-filters { display: none !important; }

    /* البحث + الكاميرا */
    html body .pos-container .prods-header { display: flex !important; align-items: center; gap: 8px; padding: 8px 10px !important; height: auto !important; }
    html body .pos-container .prods-header-right,
    html body .pos-container .prods-header-left,
    html body .pos-container .header-barcode > i,
    html body .pos-container .header-barcode .inv-bc-field { display: none !important; }
    html body .pos-container .header-barcode { order: 2; flex: 0 0 auto !important; width: auto !important; border: 0 !important; background: none !important; padding: 0 !important; }
    html body .pos-container .header-barcode-btn {
        width: 44px !important; height: 44px !important; border-radius: 12px !important; border: 0 !important;
        background: var(--fs-primary) !important; color: #fff !important; font-size: 19px !important;
    }
    html body .pos-container .pos-msearch {
        order: 1; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 44px; padding: 0 12px;
        border: 1.5px solid var(--fs-tint-5); border-radius: 12px; background: #fff; color: #8AA3AA;
        font-family: inherit; font-size: 13.5px !important; text-align: start;
    }
    html body .pos-container .pos-msearch i { color: var(--fs-primary); font-size: 19px; }
    html body .pos-container .pos-msearch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* بلاطات عمودين */
    html body .pos-container .prods-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; padding: 4px 10px 100px !important; height: auto !important; max-height: none !important; overflow: visible !important; }
    html body .pos-container .prod-card { width: auto !important; min-width: 0 !important; height: auto !important; border-radius: 14px !important; }
    html body .pos-container .prod-img { height: 70px !important; min-height: 0 !important; }
    html body .pos-container .prod-img img { max-height: 64px; object-fit: contain; }
    html body .pos-container .prod-name { font-size: 13px !important; line-height: 1.35 !important; -webkit-line-clamp: 2; display: -webkit-box !important; -webkit-box-orient: vertical; overflow: hidden; }
    html body .pos-container .prod-price { font-size: 15px !important; font-weight: 800 !important; }
    html body .pos-container .products-layout,
    html body .pos-container .prods-area { height: auto !important; max-height: none !important; overflow: visible !important; }

    /* السلة: الجدول والإجماليات القديمة مخفيين — بقوا جوه السلة اللى من تحت */
    html body .pos-container .pos-order-section { display: none !important; }

    html body .pos-mcartbar {
        display: flex; align-items: center; gap: 10px; position: fixed; left: 10px; right: 10px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 1040; height: 60px; padding: 0 10px 0 12px;
        border: 0; border-radius: 16px; background: #04252D; color: #fff; font-family: inherit; text-align: start;
        box-shadow: 0 10px 24px rgba(4, 37, 45, .35);
    }
    html body .pos-mcartbar.is-empty { background: #5B7178; box-shadow: none; }
    .pos-mcartbar-ic { position: relative; flex: 0 0 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 20px; }
    .pos-mcartbar-ic b { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--fs-action); font-size: 11px; display: grid; place-items: center; }
    .pos-mcartbar-t { flex: 1; min-width: 0; }
    .pos-mcartbar-t small { display: block; font-size: 11.5px; opacity: .75; }
    .pos-mcartbar-t strong { font-size: 18px; }
    .pos-mcartbar-t strong small { display: inline; font-size: 12px; }
    html body .pos-mcartbar .pos-mcartbar-go { display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--fs-action); font-size: 14px !important; font-weight: 800; }

    .pos-mcart-shade { display: block; position: fixed; inset: 0; z-index: 1045; background: rgba(4, 37, 45, .45); }
    .pos-mcart {
        display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; top: 56px; z-index: 1050;
        background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
    }
    .pos-mcart-hd { display: flex; align-items: center; justify-content: space-between; padding: 2px 16px 8px; }
    .pos-mcart-hd b { font-size: 17px; }
    .pos-mcart-hd b small { font-size: 13px; color: #6B8A91; font-weight: 600; }
    .pos-mcart-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 2px 10px; }
    .pos-mcart-body .fs-mcards { display: block !important; padding: 0 10px; }
    .pos-msum { margin: 6px 12px; padding: 8px 12px; border-radius: 12px; background: #F7FAFB; font-size: 13px; }
    .pos-msum > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; }
    .pos-msum > div b { font-weight: 800; }
    .pos-msum .is-disc .fs-disc { max-width: 210px; }
    .pos-msum .is-disc { flex-wrap: wrap; row-gap: 4px; }  /* صف الخصم يلف علشان كوبون الخصم (FsCouponBox) ينزل سطر لوحده تحته */
    .pos-mnet { margin: 6px 12px 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--fs-tint-1); border: 1px solid var(--fs-tint-5); font-weight: 800; }
    .pos-mnet b { font-size: 22px; color: var(--fs-primary); }
    .pos-mcart-ft { display: flex; gap: 8px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #E3ECEF; }
    html body .pos-mcart-ft button { height: 52px; border-radius: 12px; font-family: inherit; font-weight: 800; font-size: 15px !important; display: flex; align-items: center; justify-content: center; gap: 6px; }
    html body .pos-mcart-ft .pos-mbtn-g { flex: 0 0 100px; border: 1px solid #DCE7EA; background: #fff; color: #6B8A91; }
    html body .pos-mcart-ft .pos-mbtn-a { flex: 1; border: 0; background: var(--fs-action, var(--fs-primary)); color: #fff; }
    html body .pos-mcart-ft .pos-mbtn-a:disabled { opacity: .55; }
}
/* البلاطة: رقم الكمية جوه الحافة (الكارت عليه overflow:hidden) + من غير فراغ زيادة تحت */
html body .pos-container .prod-qty { top: 6px !important; inset-inline-end: 6px !important; border-color: #fff; }
@media (max-width: 768px) {
    html body .pos-container .prod-body { min-height: 0 !important; height: auto !important; gap: 4px; display: flex !important; flex-direction: column; }
    html body .pos-container .prod-card { display: flex !important; flex-direction: column; }
}
/* ══════════════════════════════════════════════════════════════════════
   FsPointsBox — نقاط العميل + زرار «استبدال النقاط» (المبيعات + نقطة البيع)
   ══════════════════════════════════════════════════════════════════════ */
.fs-pts, html body .pos-container .pos-mchip-pts {
    --fs-loyal: #7C4DCC;
    --fs-loyal-rgb: 124, 77, 204;
    --fs-loyal-hover: #6A3DB8;
    --fs-loyal-ink: #5B2FA6;
}
.fs-pts {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 12px;
    border: 1.5px solid rgba(var(--fs-loyal-rgb), .35);
    border-radius: 12px;
    background: rgba(var(--fs-loyal-rgb), .06);
    flex-shrink: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.fs-pts-ic {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--fs-loyal); color: #fff; flex-shrink: 0;
}
.fs-pts-ic i { font-size: 19px; }
.fs-pts-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.fs-pts-tx small { font-size: 11px; font-weight: 600; color: #6B8A91; white-space: nowrap; }
.fs-pts-tx b { font-size: 15px; font-weight: 800; color: #04252D; white-space: nowrap; }
.fs-pts-tx b em { font-style: normal; font-size: 11px; font-weight: 600; color: #6B8A91; }
.fs-pts-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 12px;
    margin-inline-start: auto;
    border: 1.5px solid var(--fs-loyal);
    border-radius: 9px;
    background: #fff; color: var(--fs-loyal-ink);
    font: inherit; font-size: 12.5px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s;
}
.fs-pts-btn i { font-size: 17px; }
.fs-pts-btn:hover:not(:disabled) { background: rgba(var(--fs-loyal-rgb), .12); }
.fs-pts-btn:disabled { opacity: .5; cursor: not-allowed; }
.fs-pts-btn:focus-visible { outline: 2px solid var(--fs-loyal); outline-offset: 2px; }
.fs-pts.is-on { border-color: var(--fs-loyal); background: rgba(var(--fs-loyal-rgb), .12); }
.fs-pts.is-on .fs-pts-btn { background: var(--fs-loyal); color: #fff; }
.fs-pts.is-on .fs-pts-btn:hover:not(:disabled) { background: var(--fs-loyal-hover); }
.fs-pts-x { font-size: 14px !important; opacity: .85; margin-inline-start: 2px; }
/* داخل السلة (نقطة البيع موبيل) */
.fs-pts.is-sheet { display: flex; width: 100%; margin-bottom: 10px; }

/* شريحة النقاط فى رأس نقطة البيع (موبيل) */
html body .pos-container .pos-mchip-pts { border-color: rgba(var(--fs-loyal-rgb), .45) !important; color: var(--fs-loyal-ink) !important; background: rgba(var(--fs-loyal-rgb), .08) !important; font-weight: 800; }
html body .pos-container .pos-mchip-pts.on { background: var(--fs-loyal) !important; border-color: var(--fs-loyal) !important; color: #fff !important; }
html body .pos-container .pos-mchip-pts:disabled { opacity: .55; }

@media (max-width: 768px) {
    html body .inv-footer-bottom .fs-pts { display: flex; width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════
   نقطة البيع ديسكتوب (2026-11-08) — رأس chips + سلة كروت + دفع كبير (F9) + بحث (F2)
   ▸ نفس markup الموبيل: .pos-mhead و posCartCards/Sum/Acts (FrmPOS.razor)
   ▸ الجدول والفوتر القديم مخفيين على الديسكتوب بس (موجودين فى الصفحة)
   ══════════════════════════════════════════════════════════════════════ */
.pos-dcart, .fs-mc-del, .pos-mchip-d { display: none; }
.pos-mbtn-row { display: flex; gap: 6px; width: 100%; }
html body .pos-mbtn-row button {
    flex: 1; height: 40px !important; display: flex; align-items: center; justify-content: center; gap: 5px;
    border: 1px solid #DCE7EA; border-radius: 10px; background: #fff; color: #33535B;
    font-family: inherit; font-size: 13px !important; font-weight: 700;
}
html body .pos-mbtn-row button i { font-size: 16px; color: var(--fs-primary); }
html body .pos-mbtn-row button.is-del { color: #C62828; border-color: #F5C2C2; background: #FFF6F6; }
html body .pos-mbtn-row button.is-del i { color: #C62828; }
.pos-kbd { display: none; }
@media (max-width: 768px) {
    .pos-mcart-ft { flex-wrap: wrap; }
}

@media (min-width: 769px) {
    /* ── الرأس: سطر chips، والرأس الكامل بـ «تفاصيل» ── */
    html body .pos-container .pos-mhead {
        display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: #fff;
        border-bottom: 1px solid #E3ECEF; flex-wrap: wrap;
    }
    html body .pos-container .pos-mchip {
        display: inline-flex; align-items: center; gap: 6px; max-width: 320px; height: 36px;
        padding: 0 14px; border: 1px solid #E3ECEF; border-radius: 20px; background: #fff;
        color: #33535B; font-family: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: default;
    }
    html body .pos-container button.pos-mchip { cursor: pointer; }
    html body .pos-container button.pos-mchip:hover:not(:disabled) { border-color: var(--fs-tint-12); }
    html body .pos-container .pos-mchip span { overflow: hidden; text-overflow: ellipsis; }
    html body .pos-container .pos-mchip i { font-size: 16px; }
    html body .pos-container .pos-mchip.is-p { background: var(--fs-tint-1); border-color: var(--fs-tint-5); color: var(--fs-primary); }
    html body .pos-container .pos-mchip-more { margin-inline-start: auto; }
    html body .pos-container .pos-mchip-more.on { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
    html body .pos-container .pos-mchip-d { display: inline-flex; color: #6B8A91; }
    html body .pos-container:not(.pos-m-details) .pos-search-filters { display: none !important; }
    html body .pos-container .pos-search-filters .inv-form-header { display: none !important; }

    /* ── البلاطات: من غير فراغ تحت، والـ −/+ ظاهرين ── */
    html body .pos-container .prods-grid { grid-auto-rows: max-content !important; grid-template-rows: none !important; align-content: start !important; }
    html body .pos-container .prod-card { display: flex !important; flex-direction: column; height: auto !important; min-height: max-content !important; }
    html body .pos-container .prod-body { min-height: 0 !important; height: auto !important; display: flex !important; flex-direction: column; gap: 4px; flex: 1 0 auto; }
    html body .pos-container .prod-img { height: 76px !important; min-height: 0 !important; flex: 0 0 auto; }
    html body .pos-container .prod-price { margin-top: auto; }

    /* ── السلة: كروت بدل الجدول ── */
    html body .pos-container .pos-order-section > .order-summary,
    html body .pos-container .pos-order-section > .inv-gtb-actions,
    html body .pos-container .pos-order-section > .inv-footer { display: none !important; }
    html body .pos-container .pos-order-section { display: flex !important; flex-direction: column; min-height: 0; }
    .pos-dcart { display: flex; flex-direction: column; flex: 1; min-height: 0; background: #fff; }
    .pos-dcart-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #E3ECEF; }
    .pos-dcart-hd b { font-size: 16px; color: #04252D; display: inline-flex; align-items: center; gap: 6px; }
    .pos-dcart-hd b i { color: var(--fs-primary); font-size: 20px; }
    .pos-dcart-hd b small { font-size: 13px; color: #6B8A91; font-weight: 600; }
    html body .pos-dcart-add {
        display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
        border: 1px solid var(--fs-tint-5); border-radius: 10px; background: var(--fs-tint-1); color: var(--fs-primary);
        font-family: inherit; font-size: 13px !important; font-weight: 700; cursor: pointer;
    }
    .pos-dcart-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 4px; scrollbar-width: thin; }
    .pos-dcart-list .fs-mcards { display: block !important; padding: 0; }
    .pos-dcart-list .fs-mc { padding: 9px 12px; gap: 6px; }
    .pos-dcart-list .fs-mc-nm b { font-size: 14px; -webkit-line-clamp: 1; }
    .pos-dcart-list .fs-mc-step, .pos-dcart-list .fs-mc-step button { height: 32px; }
    .pos-dcart-list .fs-mc-step button { width: 32px; cursor: pointer; }
    .pos-dcart-list .fs-mc-step button:hover:not(:disabled) { background: var(--fs-tint-3); }
    .pos-dcart-list .fs-mc-add { display: none; }
    .pos-dcart-list .fs-mc-chev { display: none; }
    html body .pos-dcart .fs-mc-del {
        display: grid; place-items: center; flex: 0 0 30px; height: 30px; padding: 0;
        border: 0; border-radius: 8px; background: transparent; color: #A8BEC4; cursor: pointer;
    }
    html body .pos-dcart .fs-mc-del i { font-size: 17px; }
    html body .pos-dcart .fs-mc-del:hover { background: #FFF1F1; color: #C62828; }

    .pos-dcart-sum { padding: 6px 12px 0; border-top: 1px solid #E3ECEF; }
    .pos-dcart-sum .fs-pts { display: flex; width: 100%; margin: 4px 0 6px; }
    .pos-dcart-sum .pos-msum { padding: 4px 12px; border-radius: 12px; background: #F7FAFB; font-size: 13px; }
    .pos-dcart-sum .pos-msum > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; }
    .pos-dcart-sum .pos-msum > div b { font-weight: 800; color: #04252D; }
    .pos-dcart-sum .pos-msum .is-disc .fs-disc { max-width: 200px; align-items: flex-end; }
    .pos-dcart-sum .pos-ret-spin { max-width: 160px; }
    .pos-dcart-sum .pos-mnet { margin: 6px 0 0; display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--fs-tint-1); border: 1px solid var(--fs-tint-5); font-weight: 800; color: #04252D; }
    .pos-dcart-sum .pos-mnet b { font-size: 24px; color: var(--fs-primary); }

    .pos-dcart-ft { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 12px; }
    html body .pos-dcart-ft > button { height: 56px; border-radius: 12px; font-family: inherit; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
    html body .pos-dcart-ft .pos-mbtn-g { flex: 0 0 96px; border: 1px solid #DCE7EA; background: #fff; color: #6B8A91; font-size: 14px !important; }
    html body .pos-dcart-ft .pos-mbtn-g:hover { background: #F7FAFB; }
    /* (2026-11-20) زرار «خيارات» جاى من FsOptionsMenu جوه غلاف (.fs-om) فقاعدة «> button» مابتوصلوش:
       كان block من غير مسافة بين الأيقونة والكلمة ، وعرضه مش زى «جديد» — نفس شكل باقى الزراير */
    html body .pos-dcart-ft > .fs-om { flex: 0 0 96px; display: flex; }
    html body .pos-dcart-ft > .fs-om .pos-mbtn-g { flex: 1; width: 100%; height: 56px; border-radius: 12px; font-family: inherit; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
    html body .pos-dcart-ft .pos-mbtn-a { flex: 1; border: 0; background: var(--fs-action); color: #fff; font-size: 17px !important; }
    html body .pos-dcart-ft .pos-mbtn-a:hover:not(:disabled) { background: var(--fs-action-hover); }
    html body .pos-dcart-ft .pos-mbtn-a:disabled { opacity: .55; cursor: not-allowed; }
    html body .pos-dcart-ft .pos-mbtn-a i { font-size: 20px; }
    .pos-kbd { display: inline-block; padding: 1px 6px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 5px; background: transparent; color: inherit; font-family: inherit; font-size: 11px; font-weight: 700; opacity: .85; box-shadow: none; }
    .pos-dcart-add .pos-kbd { border-color: var(--fs-tint-12); }

    /* ── «إضافة صنف» / تعديل الصنف / البدائل: نافذة فى النص بدل اللى من تحت ── */
    html body .fs-msearch, html body .fs-malt {
        top: 6vh; bottom: 6vh; left: 50%; right: auto; width: 600px; transform: translateX(-50%);
        border-radius: 18px; box-shadow: 0 20px 50px rgba(4, 37, 45, .3);
    }
    html body .fs-msheet {
        top: 50%; bottom: auto; left: 50%; right: auto; width: 560px; max-height: 88vh; transform: translate(-50%, -50%);
        border-radius: 18px; padding-bottom: 16px; box-shadow: 0 20px 50px rgba(4, 37, 45, .3);
    }
    html body .fs-msearch .fs-msheet-grab, html body .fs-msheet .fs-msheet-grab, html body .fs-malt .fs-msheet-grab { visibility: hidden; height: 2px; margin: 4px auto; }
    html body .fs-msr-add, html body .fs-msheet-ok, html body .fs-msheet-acts button, html body .fs-mpick-row, html body .fs-malt-go { cursor: pointer; }
}

/* نقطة البيع: الصنف اللى اتضاف للسلة بيتعلّم لحظة (fsPosCart.reveal فى fs-more.js) */
@keyframes fs-mc-flash {
    0%, 35% { background: var(--fs-tint-3); border-color: var(--fs-primary); box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .18); }
    100% { background: #fff; border-color: #DCEBEF; box-shadow: none; }
}
@keyframes fs-cartbar-bump { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
html body .fs-mc.is-flash { animation: fs-mc-flash 1.4s ease-out; }
html body .pos-mcartbar.is-bump { animation: fs-cartbar-bump .35s ease-out; }
@media (prefers-reduced-motion: reduce) {
    html body .fs-mc.is-flash { animation-duration: .01s; }
    html body .pos-mcartbar.is-bump { animation: none; }
}

/* الاسكرول للصنف الجديد على الموبيل: يفضل ظاهر تحت الهيدر الثابت وفوق شريط الأزرار اللى تحت */
html body .fs-mc[data-rk] { scroll-margin-top: 90px; scroll-margin-bottom: 110px; }
html body .pos-dcart .fs-mc[data-rk] { scroll-margin: 8px; }
/* سطر الجدول اللى اتضاف (ديسكتوب) */
@keyframes fs-row-flash { 0%, 35% { background-color: var(--fs-tint-3); } 100% { background-color: transparent; } }
html body .dxbl-grid tr.is-flash > td { animation: fs-row-flash 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { html body .dxbl-grid tr.is-flash > td { animation-duration: .01s; } }
html body .dxbl-grid tr[data-visible-index] { scroll-margin-top: 60px; scroll-margin-bottom: 40px; }

/* ══════════════════════════════════════════════════════════════════════
   فاتورة المبيعات ديسكتوب: «جدول | سلة» (2026-11-08)
   ▸ الجدول هو الأساسى؛ «سلة» = نفس كروت الموبيل (.fs-mcards) بس كسطور عريضة
   ▸ الزرار والاختيار فى FrmOrders.razor (.inv-viewsw) و MobileItems.razor.cs (_cartView)
   ══════════════════════════════════════════════════════════════════════ */
.inv-viewsw, .inv-cart-add { display: none; }
@media (min-width: 769px) {
    html body :is(.inv-gtb, .rinv-gtb) .inv-viewsw {
        display: inline-flex; flex: 0 0 auto; margin-inline-start: auto; height: 34px; padding: 2px;
        border: 1px solid #DCE7EA; border-radius: 10px; background: #F4F8F9;
    }
    html body .inv-viewsw button {
        display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; border: 0; border-radius: 8px;
        background: transparent; color: #5B7178; font-family: inherit; font-size: 13px !important; font-weight: 700; cursor: pointer;
    }
    html body .inv-viewsw button i { font-size: 16px; }
    html body .inv-viewsw button:hover:not(.on) { color: var(--fs-primary); }
    html body .inv-viewsw button.on { background: #fff; color: var(--fs-primary); box-shadow: 0 1px 3px rgba(4, 37, 45, .12); }

    html body :is(.inv-grid-card, .rinv-grid-card).is-cart { display: flex !important; flex-direction: column; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart :is(.inv-grid-body, .rinv-grid-body),
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart :is(.inv-gtb-actions, .rinv-gtb-actions),
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart :is(.inv-gtb-sep, .rinv-gtb-sep) { display: none !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-add {
        display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
        border: 1px solid var(--fs-tint-5); border-radius: 10px; background: var(--fs-tint-1); color: var(--fs-primary);
        font-family: inherit; font-size: 13px !important; font-weight: 700; cursor: pointer;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-add .pos-kbd { display: inline-block; border-color: var(--fs-tint-12); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mcards {
        display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px 4px; scrollbar-width: thin;
    }

    /* السطر: الاسم والعلامات يمين، والكمية والسعر والإجمالي والحذف شمال */
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; row-gap: 5px; align-items: center;
        margin-bottom: 6px; padding: 9px 14px;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc:hover { border-color: var(--fs-tint-12); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc > * { grid-column: 1; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc > .fs-mc-bot { grid-column: 2; grid-row: 1 / span 3; gap: 16px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-alt { justify-self: start; cursor: pointer; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-nm b { -webkit-line-clamp: 1; font-size: 14px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-chev { display: none; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step,
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step button { height: 32px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step button { width: 32px; cursor: pointer; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step button:hover:not(:disabled) { background: var(--fs-tint-3); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-pr { min-width: 110px; justify-content: flex-end; font-size: 13px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tot { min-width: 120px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-add { height: 40px; cursor: pointer; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-del {
        display: grid; place-items: center; flex: 0 0 30px; height: 30px; padding: 0;
        border: 0; border-radius: 8px; background: transparent; color: #A8BEC4; cursor: pointer;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-del i { font-size: 17px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-del:hover { background: #FFF1F1; color: #C62828; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc[data-rk] { scroll-margin: 8px; }
}
/* «تخصيص» جنب «إضافة صنف» فى وضع السلة */
.inv-cart-cols { display: none; }
@media (min-width: 769px) {
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-cols {
        display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
        border: 1px solid #DCE7EA; border-radius: 10px; background: #fff; color: #33535B;
        font-family: inherit; font-size: 13px !important; font-weight: 700; cursor: pointer;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-cols i { color: var(--fs-primary); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-cols:hover { border-color: var(--fs-tint-12); }
}@media (min-width: 769px) {
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-colw { position: relative; display: inline-flex; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-cols.on { background: var(--fs-tint-1); border-color: var(--fs-tint-5); color: var(--fs-primary); }
    .inv-cart-colshade { position: fixed; inset: 0; z-index: 1040; }
    .inv-cart-colpop {
        position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 1041; min-width: 250px;
        display: flex; flex-direction: column; gap: 2px; padding: 8px;
        background: #fff; border: 1px solid #DCE7EA; border-radius: 12px; box-shadow: 0 12px 30px rgba(4, 37, 45, .18);
    }
    .inv-cart-colopt { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #33535B; cursor: pointer; }
    .inv-cart-colopt:hover { background: #F4F8F9; }
    .inv-cart-colopt input { width: 16px; height: 16px; accent-color: var(--fs-primary); cursor: pointer; }
    /* الحاجات المخفية من السطر */
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-sub .fs-mc-nm small,
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-tags .fs-mc-tags,
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-pr .fs-mc-pr,
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-note .fs-mc-tot small { display: none !important; }
}@media (min-width: 769px) {
    html body .inv-cart-colpop { min-width: 290px; }
    html body .inv-cart-colpop .inv-cart-colopt, html body .inv-cart-colpop .inv-cart-colopt span { color: #33535B !important; white-space: nowrap; font-size: 13px !important; font-weight: 600 !important; }
}
/* ══════════════════════════════════════════════════════════════════════
   وضع «سلة» ديسكتوب: الفوتر بيبقى لوحة جانبية (2026-11-08)
   ▸ .inv-main فى FrmOrders.razor بتلف الأصناف + الفوتر؛ فى وضع «جدول» display:contents = مفيش أى تغيير
   ▸ نفس عناصر الفوتر بالظبط (مفيش نسخة تانية): نقاط ← إجماليات ← صافى ← أزرار ← بيانات الصنف
   ══════════════════════════════════════════════════════════════════════ */
.inv-main { display: contents; }
@media (min-width: 769px) {
    html body .inv-main.is-cart { display: flex; flex: 1 1 0%; min-height: 0; gap: 6px; }
    html body .inv-main.is-cart > :is(.inv-grid-card, .rinv-grid-card) { flex: 1 1 0%; min-width: 0; }
    html body .inv-main.is-cart > :is(.inv-footer, .rinv-footer) {
        flex: 0 0 360px; width: 360px; min-height: 0; overflow-y: auto; scrollbar-width: thin;
        display: flex; flex-direction: column; gap: 10px; padding: 12px; box-shadow: var(--sh, 0 1px 3px rgba(0,0,0,.06));
    }
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) :is(.inv-mob-totals, .rinv-mob-totals) { display: none !important; }
    html body .inv-main.is-cart :is(.inv-footer-inner, .rinv-footer-inner),
    html body .inv-main.is-cart :is(.inv-footer-bottom, .rinv-footer-bottom) { display: contents !important; }
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts { order: 1; display: flex; width: 100%; margin: 0; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) { order: 2; }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) { order: 3; }
    html body .inv-main.is-cart .inv-stats { order: 4; }

    /* الإجماليات: سطر لكل بند، والصافى كبير تحت */
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) {
        display: flex !important; flex-direction: column; gap: 0; flex: 0 0 auto;
        padding: 4px 12px; border-radius: 12px; background: #F7FAFB !important; border: 0 !important;
    }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-op, .rinv-tot-op) { display: none !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell, .rinv-tot-cell) {
        flex-direction: row !important; justify-content: space-between !important; align-items: center !important;
        min-height: 40px !important; padding: 4px 0 !important; border: 0 !important; border-bottom: 1px solid #E8EFF1 !important;
        background: transparent !important; text-align: start !important; width: auto !important;
    }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-lbl, .rinv-tot-lbl) { margin: 0 !important; font-size: 13px !important; font-weight: 700 !important; letter-spacing: 0 !important; text-transform: none !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-val, .rinv-tot-val) { font-size: 15px !important; color: #04252D !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) .tc-disc .fs-disc { max-width: 190px; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) .tc-pts .dxbl-spin-edit { width: 150px !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) {
        margin: 8px -12px -4px; padding: 12px 14px !important; border: 1px solid var(--fs-tint-5) !important; border-radius: 12px;
        background: var(--fs-tint-1) !important; min-height: 0 !important;
    }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) :is(.inv-tot-lbl, .rinv-tot-lbl) { color: #04252D !important; font-size: 15px !important; font-weight: 800 !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) :is(.inv-tot-val, .rinv-tot-val) { color: var(--fs-primary) !important; font-size: 28px !important; font-weight: 900 !important; }

    /* الأزرار: «حفظ» كبير، و«جديد» جنبه، والطباعة/الحذف تحت */
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) {
        /* flex-wrap + gap + justify-content بـ !important: القاعدة العامة فوق (سطر ~109، صف واحد nowrap !important لعرض الجدول)
           كانت غالبة هنا، فأزرار الفاتورة المحفوظة (جديد، تعديل، طباعة، طباعة 2، حذف) فى العمود الضيق كانت بتطلع برا الشاشة —
           فى عرض السلة بس الأزرار تنزل صفوف. بيأثر على المبيعات (inv-) والمرتجع (rinv-) فى عرض السلة */
        display: flex !important; flex-wrap: wrap !important; gap: 8px !important; padding: 0 !important; border: 0 !important; background: transparent !important;
        justify-content: stretch !important; flex: 0 0 auto;
    }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn) { flex: 1 1 40%; height: 42px !important; justify-content: center; margin: 0 !important; }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn).a-new { flex: 0 0 96px; height: 56px !important; }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn).a-save { flex: 1 1 0; height: 56px !important; font-size: 17px !important; gap: 8px; }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn).a-save .pos-kbd { display: inline-block; }

    /* بيانات الصنف المحدد: chips بتلف بدل الاسكرول */
    html body .inv-main.is-cart .inv-stats {
        display: flex !important; flex-wrap: wrap !important; gap: 6px; overflow: visible !important;
        margin-top: auto; padding-top: 10px; border-top: 1px solid #E8EFF1; max-width: none !important;
    }
}@media (min-width: 769px) {
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell, .rinv-tot-cell) { align-self: stretch !important; max-width: none !important; height: auto !important; box-shadow: none !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) { width: auto !important; }
    html body .inv-main.is-cart .inv-stats { align-items: flex-start !important; }
    html body .inv-main.is-cart .inv-stats > * { height: auto !important; align-self: flex-start; }
    html body .inv-main.is-cart .inv-stats .inv-invbar2 {
        flex-wrap: wrap !important; width: 100% !important; max-width: 100% !important; overflow: visible !important; gap: 6px !important; height: auto !important;
    }
    html body .inv-main.is-cart .inv-stats .inv-invbar2-lbl { flex: 0 0 100%; }
    html body .inv-main.is-cart .inv-stats .inv-chip-sep { display: none !important; }
}@media (min-width: 769px) {
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right),
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell, .rinv-tot-cell),
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left),
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts { flex-shrink: 0 !important; }
    html body .inv-main.is-cart .inv-stats { align-content: flex-start !important; }
}@media (min-width: 769px) {
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts { flex-wrap: wrap; row-gap: 8px; }
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts > button,
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts > .fs-pts-act { flex: 1 0 100%; justify-content: center; margin-inline-start: 0 !important; }
}@media (min-width: 769px) {
    html body :is(.inv-page, .rinv-page) .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) { min-height: 60px !important; height: auto !important; }
}
/* ══════════════════════════════════════════════════════════════════════
   «سلة» المبيعات ديسكتوب — الشكل المعتمد (مقترح 2، 2026-11-08)
   أعمدة واضحة + تباين أعلى + البدائل علامة صغيرة + الربح جنب الصافى + بيانات الصنف جدول
   ══════════════════════════════════════════════════════════════════════ */
.fs-mc-cols, .fs-mc-ds, .fs-mc-vat, .fs-mc-altchip, .inv-net-prof, .inv-stats-hd { display: none; }
@media (min-width: 769px) {
    html body .inv-main.is-cart { --c-ink: #0B2A33; --c-ink2: #3F5C64; --c-mute: #6A838A; --c-line: #DCE6E9; --c-line2: #EBF1F3; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-add { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; height: 38px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-add .pos-kbd { border-color: rgba(255,255,255,.7); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-cart-cols, html body :is(.inv-grid-card, .rinv-grid-card).is-cart .inv-viewsw { height: 38px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mcards { padding: 0; }

    /* الأعمدة: # | الصنف | الكمية | السعر | الخصم | الإجمالى | حذف */
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-cols,
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc {
        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) 140px 150px 120px 160px 40px;
        column-gap: 12px; align-items: center;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-cols {
        position: sticky; top: 0; z-index: 3; height: 38px; padding: 0 16px;
        background: #F6F9FA; border-bottom: 1px solid var(--c-line);
        font-size: 12.5px; font-weight: 800; color: var(--c-ink2); white-space: nowrap;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc {
        grid-template-rows: auto auto; row-gap: 3px;
        min-height: 70px; margin: 0; padding: 10px 16px;
        border: 0; border-bottom: 1px solid var(--c-line2); border-radius: 0; background: #fff;
        cursor: pointer;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc:hover { background: #FAFCFC; border-color: var(--c-line2); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc.is-last { background: var(--fs-tint-1); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc.is-last::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--fs-primary); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc.is-sel { box-shadow: inset 0 0 0 2px var(--fs-tint-5); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc > .fs-mc-top,
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc > .fs-mc-bot { display: contents !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc > * { grid-column: auto; grid-row: auto; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-no { grid-column: 1; grid-row: 1 / span 2; align-self: center; background: var(--fs-tint-3); color: var(--fs-primary); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-nm { grid-column: 2; grid-row: 1; align-self: end; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tags { grid-column: 2; grid-row: 2; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-alt, html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-chev { display: none !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step, html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-qty { grid-column: 3; grid-row: 1 / span 2; justify-self: start; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-pr { grid-column: 4; grid-row: 1 / span 2; min-width: 0; justify-content: flex-start; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-ds { grid-column: 5; grid-row: 1 / span 2; display: block; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tot { grid-column: 6; grid-row: 1 / span 2; min-width: 0; margin: 0; text-align: start; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-del { grid-column: 7; grid-row: 1 / span 2; }

    /* الخط والتباين */
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-nm b { font-size: 15.5px; font-weight: 800; color: var(--c-ink); -webkit-line-clamp: 1; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-nm small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; color: var(--c-mute); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-altchip {
        display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px;
        border: 1px solid var(--fs-tint-5); border-radius: 6px; background: #fff; color: var(--fs-primary);
        font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
    }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-altchip:hover { background: var(--fs-tint-1); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-altchip.is-out { border-color: #F5C2C2; color: #B42318; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tags { gap: 5px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tag { font-size: 12px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step { height: 36px; border-color: var(--fs-tint-5); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step button { width: 36px; height: 36px; font-size: 18px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-step span { min-width: 42px; font-size: 15px; color: var(--c-ink); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-pr { font-size: 14.5px; font-weight: 700; color: var(--c-ink); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-pr .ti-pencil { color: var(--fs-primary); font-size: 14px; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-ds { font-size: 13px; color: var(--c-mute); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-ds.has { color: #137A3F; font-weight: 700; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tot b { font-size: 16.5px; font-weight: 900; color: var(--c-ink); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tot small { display: none; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tot small.fs-mc-vat { display: block; font-size: 12px; color: var(--c-mute); }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-add { width: auto; margin: 12px 16px; height: 42px; }
    /* «تخصيص» */
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-sub .fs-mc-nm small .fs-mc-sub { display: none !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-sub .fs-mc-nm small { display: flex !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-pr .fs-mc-pr { visibility: hidden; display: inline-flex !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart.hide-note .fs-mc-tot small.fs-mc-vat { display: none !important; }

    /* ── اللوحة الجانبية ── */
    html body .inv-main.is-cart > :is(.inv-footer, .rinv-footer) { flex-basis: 380px; width: 380px; padding: 0; gap: 10px; background: transparent; border: 0; box-shadow: none; }
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts { flex-wrap: nowrap; padding: 10px 12px; border-radius: 14px; }
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts > button { flex: 0 0 auto; }
    html body .inv-main.is-cart :is(.inv-footer, .rinv-footer) .fs-pts-tx { flex: 1; min-width: 0; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) { background: #fff !important; border: 1px solid var(--c-line) !important; border-radius: 14px; padding: 2px 14px 0; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell, .rinv-tot-cell) { border-bottom-color: var(--c-line2) !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-lbl, .rinv-tot-lbl) { color: var(--c-ink2) !important; font-size: 14px !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-val, .rinv-tot-val) { color: var(--c-ink) !important; font-size: 15.5px !important; font-weight: 800 !important; }
    html body :is(.inv-page, .rinv-page) .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) {
        display: grid !important; grid-template-columns: 1fr auto; grid-template-rows: auto auto; row-gap: 2px;
        margin: 4px -15px -1px; padding: 12px 16px !important; min-height: 76px !important;
        border: 0 !important; border-radius: 14px; background: color-mix(in srgb, var(--fs-primary) 70%, #000) !important;
    }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) :is(.inv-tot-lbl, .rinv-tot-lbl) { grid-column: 1; grid-row: 1; color: rgba(255,255,255,.85) !important; font-size: 13px !important; font-weight: 700 !important; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) :is(.inv-tot-cell.tc-net, .rinv-tot-cell.tc-netret) :is(.inv-tot-val, .rinv-tot-val) { grid-column: 1; grid-row: 2; color: #fff !important; font-size: 30px !important; font-weight: 900 !important; text-align: start; }
    html body .inv-main.is-cart .inv-net-prof {
        grid-column: 2; grid-row: 1 / span 2; align-self: center;
        display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px;
        background: rgba(255,255,255,.14); color: #C9F2D8; font-size: 13px; font-weight: 700; white-space: nowrap;
    }
    html body .inv-main.is-cart .inv-net-prof.is-neg { color: #FFC9C2; }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn).a-save { box-shadow: 0 4px 12px rgba(224, 122, 31, .28); font-weight: 900 !important; }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn).a-new { background: #fff !important; }
    html body .inv-main.is-cart :is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn):not(.a-save):not(.a-new) { flex: 1 1 30%; height: 40px !important; }

    /* بيانات الصنف المحدد: جدول 3 أعمدة */
    html body .inv-main.is-cart .inv-stats {
        display: block !important; margin: 0; padding: 0 0 6px; border: 1px solid var(--c-line) !important; border-radius: 14px; background: #fff;
    }
    html body .inv-main.is-cart .inv-stats-hd {
        display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--c-line2);
        font-size: 13px; font-weight: 700; color: var(--c-ink2);
    }
    html body .inv-main.is-cart .inv-stats-hd i { color: var(--fs-primary); font-size: 17px; }
    html body .inv-main.is-cart .inv-stats-hd b { color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    html body .inv-main.is-cart .inv-stats > .inv-chip { display: none !important; }
    html body .inv-main.is-cart .inv-stats .inv-invbar2 { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 !important; padding: 4px 6px 0; background: transparent !important; border: 0 !important; }
    html body .inv-main.is-cart .inv-stats .inv-invbar2-lbl { display: none !important; }
    html body .inv-main.is-cart .inv-stats .inv-chip {
        display: flex !important; flex-direction: column; align-items: flex-start; gap: 1px; height: auto !important;
        padding: 6px 8px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; min-width: 0;
    }
    html body .inv-main.is-cart .inv-stats .inv-chip i { display: none !important; }
    html body .inv-main.is-cart .inv-stats .inv-chip .k { font-size: 11.5px !important; color: var(--c-mute) !important; font-weight: 600 !important; }
    html body .inv-main.is-cart .inv-stats .inv-chip .v { font-size: 14px !important; color: var(--c-ink) !important; font-weight: 800 !important; }
    html body .inv-main.is-cart .inv-stats .inv-chip.inv-chip-danger .v { color: #B42318 !important; }
}@media (min-width: 769px) {
    html body :is(.inv-page, .rinv-page) .inv-main.is-cart .inv-stats > span.inv-chip { display: none !important; }
    html body :is(.inv-page, .rinv-page) .inv-main.is-cart > :is(.inv-footer, .rinv-footer) { background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-add { width: calc(100% - 32px) !important; }
    html body .inv-main.is-cart .inv-stats .inv-invbar2 { align-items: start; }
}@media (min-width: 769px) {
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-x { display: none; }
    html body .inv-main.is-cart .inv-stats { flex: 0 0 auto !important; height: auto !important; }
    html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-pr, html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-tot, html body :is(.inv-grid-card, .rinv-grid-card).is-cart .fs-mc-ds,
    html body .inv-main.is-cart :is(.inv-tot-val, .rinv-tot-val), html body .inv-main.is-cart .inv-stats .v { font-variant-numeric: tabular-nums; }
}
/* الموبيل: «سلة» اختيار ديسكتوب بس — أزرارها ماتظهرش حتى لو الاختيار محفوظ */
@media (max-width: 768px) {
    html body :is(.inv-gtb, .rinv-gtb) .inv-cart-add, html body :is(.inv-gtb, .rinv-gtb) .inv-cart-cols, html body :is(.inv-gtb, .rinv-gtb) .inv-cart-colw { display: none !important; }
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell).mob-disc-cell .fs-disc-seg button { min-width: 0 !important; width: auto !important; flex: 0 0 auto; padding: 0 8px !important; }
}@media (max-width: 768px) {
    html body :is(.inv-page, .rinv-page) .fs-disc .fs-disc-box .fs-disc-seg button { height: auto !important; min-height: 0 !important; padding: 0 9px !important; font-size: 12.5px !important; }
}@media (max-width: 768px) {
    /* :not(#_) = وزن ID — قاعدة الأزرار العامة فى mobile-ui-pack.css فيها سلسلة :not طويلة */
    html body .fs-disc .fs-disc-seg button:not(#_) { height: auto !important; min-height: 0 !important; padding: 0 9px !important; font-size: 12.5px !important; }
}
/* عرض السعر: مفتاح إخفاء الكود، والمشتريات: أرصدة المورد — جوه اللوحة بعد الأزرار */
@media (min-width: 769px) {
    html body .inv-main.is-cart .inv-footer .inv-pts-wrap { order: 4; flex: 0 0 auto; padding: 8px 12px; border: 1px solid #DCE6E9; border-radius: 12px; background: #fff; }
    html body .inv-main.is-cart .inv-footer .purchase-footer-balances { order: 5; flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; }
    html body .inv-main.is-cart .pur-tabs-head { flex: 0 0 auto; }
}
/* المشتريات: الفوتر متثبّت أسفل الشاشة (frm-purchases.css) — فى وضع السلة بيرجع لوحة عادية جنب الأصناف */
@media (min-width: 769px) {
    html body .inv-page:has(> .inv-main.is-cart) { padding-bottom: 6px !important; min-height: 0 !important; height: calc(100vh - 56px) !important; }
    html body .inv-page > .inv-main.is-cart > .inv-footer { position: static !important; height: auto !important; max-height: none !important; z-index: auto; margin: 0 !important; border-top: 0 !important; overflow-y: auto; }
    html body .inv-main.is-cart > .inv-grid-card { min-height: 0 !important; }
}
@media (min-width: 769px) {
    html body .inv-main.is-cart .inv-footer .inv-stats:not(#_) { flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; }
}

/* المرتجع: «خصم بكوبون» تحت الخصم لو فاتورة البيع عليها كوبون — للعرض بس (FrmOrdersReturn.razor) */
.fs-coupon-note { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; white-space: nowrap;
    background: rgba(var(--fs-action-rgb), .14); color: var(--fs-action-deeper); border: 1px solid rgba(var(--fs-action-rgb), .35); }

/* تأكيد حذف سطر (ConfirmDeleteModal جوه .fs-line-del): فوق شيت تعديل الصنف على الموبيل (.fs-msheet z-index 1060) — كان confirm المتصفح فوق كل حاجة */
.fs-line-del .modal { z-index: 1080 !important; }

/* زرار «واتساب» فى المبيعات (FrmOrders.razor): نفس مقاس وترتيب أزرار الطباعة (a-print) بلون أخضر فاتح زى زرار الوندوز UiButton2 — ديسكتوب وموبيل */
html body .inv-abtn.a-print.a-wa { background: #E9F7EF !important; color: #157A3C !important; border-color: #A8DCBC !important; }
html body .inv-abtn.a-print.a-wa i { color: #1FA855 !important; }
html body .inv-abtn.a-print.a-wa:hover { background: #D6F0E0 !important; }

/* لينك «تغيير الصافى» تحت كوبون الخصم — FsNetPrice (ألوان الثيم) */
.fs-netp-link { flex-basis: 100%; align-self: flex-end; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px;
    background: none; border: 0; padding: 0; margin-top: 2px; cursor: pointer; font-size: 12px; color: var(--fs-primary);
    text-decoration: underline dotted; text-underline-offset: 3px; }
.fs-netp-link:hover { color: var(--fs-primary-hover); }
.fs-netp-link:focus-visible { outline: 2px solid var(--fs-primary); outline-offset: 2px; }

/* ══ (2026-11-17) أزرار الفاتورة على الجوال — طلب المالك: «شكلها سئ جداً … محتاج تكون واضحة زى شاشة الإعداد» ══
   المشكلة: الفاتورة المحفوظة فيها 7 أزرار (تعديل/حفظ ، جديد ، طباعة ، طباعة 2 ، واتساب ، حذف ، خيارات) فى سطر واحد ،
   «حفظ» واخد ضعف المساحة وشكله مختلف ، والكلام مقصوص. الحل: شبكة أعمدة متساوية (كل زرار نفس العرض) ،
   الأيقونة فوق والكلمة تحتها ، و«حفظ/تعديل» بلون الحفظ بنفس الشكل. بيتطبق على كل شاشات الفواتير (inv-page / rinv-page). */
@media (max-width: 768px) {
    html body :is(.inv-page, .rinv-page) :is(.inv-footer-left, .rinv-footer-left) {
        display: grid !important;                                   /* أعمدة متساوية مهما كان عدد الأزرار */
        grid-auto-flow: column !important;
        grid-auto-columns: minmax(0, 1fr) !important;
        gap: 5px !important;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn) {
        flex-direction: column !important;                          /* الأيقونة فوق والكلمة تحتها */
        height: 56px !important;
        padding: 3px 1px !important;
        gap: 3px !important;
        font-size: 10.5px !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        text-align: center !important;
    }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn) i { font-size: 18px !important; }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn).a-save {
        flex-direction: column !important;                          /* نفس شكل الباقى (كان صف وضعف العرض) */
        gap: 2px !important;
        font-size: 10.5px !important;
        line-height: 1.05 !important;
        white-space: normal !important;                             /* «حفظ التعديلات» على سطرين */
    }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn).a-save i { font-size: 15px !important; }
    html body :is(.inv-page .inv-abtn, .rinv-page .rinv-abtn) .pos-kbd { display: none !important; }   /* F9 مالهاش لازمة على الجوال */
    /* «خيارات» (FsOptionsMenu) نفس عرض وارتفاع الباقى */
    html body :is(.inv-page, .rinv-page) .fs-om,
    html body :is(.inv-page, .rinv-page) .fs-om .fs-om-btn { width: 100% !important; min-width: 0 !important; height: 56px !important; }
    html body :is(.inv-page, .rinv-page) .fs-om .fs-om-btn { padding: 3px 1px !important; font-size: 10.5px !important; }
}

/* (2026-11-17) مرتجع المبيعات على الجوال: علامة «فيزا» كانت فى سطر والكلمة فى سطر تانى وتحتهم فراغ ← الاتنين فى سطر واحد */
@media (max-width: 768px) {
    html body .rinv-page .rinv-vat-row { display: inline-flex !important; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
}

/* (2026-11-17) الكاشير: رسالة مكان الأصناف لما مفيش مجموعة مختارة أو المجموعة فاضية (كان بيبان مكان أبيض) */
html body .pos-container .prods-grid .prods-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; padding: 24px 12px; border: 1.5px dashed var(--fs-tint-4); border-radius: 14px; background: var(--fs-tint-1); color: #4B6168; font-size: 15px; font-weight: 700; text-align: center; }
html body .pos-container .prods-grid .prods-empty i { font-size: 40px; color: var(--fs-primary); }

/* (2026-11-17) فاتورة المشتريات على الجوال: تبويبين «تفاصيل الفاتورة والأصناف / تفاصيل القيد المحاسبي المرفق»
   كانوا أعرض من الشاشة والتانى مقصوص ← نصّين متساويين، والكلام ينزل سطرين لو احتاج */
@media (max-width: 768px) {
    html body .inv-page .pur-tabs-buttons:not(#_) { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; width: 100%; overflow: visible; }
    html body .inv-page .pur-tabs-buttons .pur-tab-btn:not(#_) { min-width: 0 !important; width: auto !important; white-space: normal !important; line-height: 1.3; text-align: center; padding: 8px 6px !important; height: auto !important; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px; }
    html body .inv-page .pur-tabs-buttons .pur-tab-btn:not(#_) i { margin: 0 !important; flex: none; }
}

/* ══ (2026-11-17) فاتورة المشتريات — تبويب «القيد المحاسبى المرفق» على الجوال: كروت بدل الجدول
   ▸ الجدول وزراير «إدراج / حذف / الأعمدة» مخفيين، والكروت + «إضافة سطر» مكانهم (FrmPurchases.JournalMobile.razor.cs)
   ▸ شريط القيد: العنوان سطر، و«تحديث القيد» عرض كامل، والمدين/الدائن/الفرق/الحالة شبكة 2×2
   ▸ الديسكتوب: الكروت مخفية والجدول زى ما هو ══ */
.pur-jcards { display: none; }
@media (max-width: 768px) {
    html body .inv-page .pur-journal-grid-area:not(#_),
    html body .inv-page .pur-journal-btn.add:not(#_),
    html body .inv-page .pur-journal-btn.delete:not(#_),
    html body .inv-page .pur-journal-btn.columns:not(#_),
    html body .inv-page .pur-journal-balance:not(#_) { display: none !important; }
    html body .inv-page .pur-journal-panel:not(#_) { height: auto !important; min-height: 0 !important; overflow: visible !important; }   /* اللوحة على قد محتواها */
    html body .inv-page .pur-journal-toolbar:not(#_) { display: grid !important; height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px !important; overflow: visible !important; flex-wrap: unset; }
    html body .inv-page .pur-journal-toolbar-title:not(#_) { display: flex !important; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; }
    html body .inv-page .pur-journal-btn.refresh:not(#_) { width: 100% !important; height: 44px !important; justify-content: center; font-size: 14px !important; }
    html body .inv-page .pur-journal-summary-inline:not(#_) { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 !important; overflow: visible !important; }
    html body .inv-page .pur-journal-summary-chip:not(#_) { display: flex !important; justify-content: space-between; align-items: center; min-width: 0; height: 40px; padding: 0 10px !important; font-size: 13px; }

    .pur-jcards { display: block; padding: 4px 10px 10px; }
    .pur-jc { background: #fff; border: 1px solid #DCE6E9; border-radius: 13px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
    .pur-jc-t { display: flex; align-items: center; gap: 8px; }
    .pur-jc-t b { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; color: #0B2A33; overflow-wrap: anywhere; }
    .pur-jc-tag { flex: 0 0 auto; padding: 2px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; background: var(--fs-tint-3); color: var(--fs-primary-deep); }
    .pur-jc-tag.is-credit { background: #EFE8FB; color: #6A3DB8; }
    .pur-jc-s { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; color: #6A838A; font-size: 13px; }
    .pur-jc-s span { min-width: 0; overflow-wrap: anywhere; }
    .pur-jc-s strong { flex: 0 0 auto; font-size: 17px; font-weight: 900; color: #0B2A33; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
    .pur-jc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 10px; color: #8AA3AA; font-size: 13px; }
    .pur-jc-empty i { font-size: 30px; color: var(--fs-tint-5); }
    html body .pur-jc-add:not(#_) { width: 100%; height: 46px !important; min-height: 0 !important; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--fs-tint-4); border-radius: 12px; background: var(--fs-tint-1); color: var(--fs-primary); font-family: inherit; font-size: 15px !important; font-weight: 800; }
    /* زرار الحذف وهو بيطلب تأكيد */
    html body .fs-tr-sheet .fs-tr-del.is-confirm:not(#_) { flex-basis: 84px; width: 84px; background: #FEECEC; font-size: 14px !important; font-weight: 800; }
}

/* (2026-11-17) استقبال من فرع على الجوال: «رقم الطلب» و«نوع الدفع» كانوا كل واحد نص سطر لوحده وجنبه فراغ
   ← نرتّب الخانات: «الفرع المحول» قبل «رقم الطلب» عشان «رقم الطلب» و«نوع الدفع» ييجوا جنب بعض فى سطر واحد */
@media (max-width: 768px) {
    html body .reception-page .reception-master-row > .inv-cell:nth-child(1) { order: 1; }
    html body .reception-page .reception-master-row > .inv-cell:nth-child(2) { order: 2; }
    html body .reception-page .reception-master-row > .inv-cell:nth-child(3) { order: 3; }
    html body .reception-page .reception-master-row > .inv-cell:nth-child(5) { order: 4; }   /* الفرع المحول */
    html body .reception-page .reception-master-row > .inv-cell:nth-child(4) { order: 5; }   /* رقم الطلب */
    html body .reception-page .reception-master-row > .inv-cell:nth-child(6) { order: 6; }   /* نوع الدفع */
    html body .reception-page .reception-master-row > .inv-cell:nth-child(n+7) { order: 7; }
}

/* ══════════════════════════════════════════════════════════════════════
   (2026-11-17) منيو الأوامر «fsc-» (FsCmdMenu) + حركة الصنف «fim-» (FsItemMoves) — المبيعات / الكاشير / المرتجع
   ديسكتوب: منيو عند الماوس أو فى النص (Ctrl+K) ، نافذة الحركة جدول
   جوال (≤768): الاتنين نافذة من تحت فوق شريط التنقل ، أزرار 46px وخط 15 ، والحركة كروت (قواعد شكل الجوال)
   ══════════════════════════════════════════════════════════════════════ */
.fsc-shade, .fim-shade { position: fixed; inset: 0; z-index: 1065; background: transparent; }
.fim-shade { background: rgba(4, 37, 45, .45); }
.fsc { position: fixed; z-index: 1070; width: 310px; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #DCE6E9; border-radius: 14px; box-shadow: 0 16px 40px rgba(4, 37, 45, .22); direction: rtl; font-family: inherit; }
.fsc.is-center { top: 12vh; left: 50%; transform: translateX(-50%); width: min(520px, 94vw); max-height: 72vh; }
.fsc-grab { display: none; }
.fsc-search { display: flex; align-items: center; gap: 8px; margin: 8px 8px 4px; padding: 0 10px; height: 38px; border: 1px solid #DCE6E9; border-radius: 10px; background: #F6F9FA; }
.fsc-search i { color: var(--fs-primary); font-size: 17px; }
html body .fsc-search input:not(#_) { flex: 1; min-width: 0; height: 36px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 14px !important; }
.fsc-search kbd, .fsc-it kbd { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; color: #6A838A; background: #F1F5F6; border: 1px solid #DCE6E9; border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.fsc-ctx { display: flex; align-items: center; gap: 6px; margin: 2px 10px 4px; padding: 4px 8px; border-radius: 8px; background: var(--fs-tint-1); color: var(--fs-primary-deep, var(--fs-primary)); font-size: 12.5px; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fsc-list { overflow-y: auto; padding: 2px 6px 8px; }
html body .fsc-it:not(#_), html body .fsc-grp:not(#_) { width: 100%; min-height: 34px !important; height: auto !important; padding: 6px 8px !important; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; background: transparent; color: #0B2A33; font: inherit; font-size: 13.5px !important; font-weight: 600; text-align: start; cursor: pointer; }
html body .fsc-it:not(#_):hover:not(:disabled), html body .fsc-it.hi:not(#_), html body .fsc-grp:not(#_):hover { background: var(--fs-tint-1); }
.fsc-it > i, .fsc-grp > i:first-child { flex: none; width: 20px; font-size: 18px; color: var(--fs-primary); text-align: center; }
.fsc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fsc-t small { font-size: 11px; color: #8AA3AA; font-weight: 500; }
html body .fsc-it.off:not(#_) { color: #A9B9BE; cursor: default; }
.fsc-it.off > i { color: #C5D3D7; }
.fsc-soon { flex: none; font-size: 10.5px; font-weight: 700; color: #8A5A00; background: #FDF3E2; border-radius: 6px; padding: 1px 6px; }
html body .fsc-grp:not(#_) { margin-top: 2px; border-top: 1px solid #EEF3F5; border-radius: 0; font-weight: 800; }
.fsc-grp span { flex: 1; }
.fsc-chev { font-size: 15px; color: #8AA3AA; transition: transform .15s; }
.fsc-grp.on .fsc-chev { transform: rotate(180deg); }
.fsc-sub { padding-inline-start: 14px; border-inline-start: 2px solid var(--fs-tint-3); margin: 0 6px 4px 0; }
.fsc-empty { padding: 18px 8px; text-align: center; color: #8AA3AA; font-size: 13px; }

.fim { position: fixed; z-index: 1070; top: 6vh; left: 50%; transform: translateX(-50%); width: min(1040px, 96vw); max-height: 86vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(4, 37, 45, .3); direction: rtl; overflow: hidden; }
.fim-hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #E3ECEF; }
.fim-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--fs-primary); color: #fff; font-size: 19px; }
.fim-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fim-tt b { font-size: 16px; font-weight: 900; color: #0B2A33; }
.fim-tt small { font-size: 12.5px; color: #6A838A; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html body .fim-x:not(#_) { width: 36px; height: 36px !important; min-height: 0 !important; padding: 0 !important; display: grid; place-items: center; border: 0; border-radius: 10px; background: #F1F5F6; color: #3F5C64; font-size: 18px; }
.fim-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 10px 14px 0; padding: 3px; border-radius: 11px; background: #F1F5F6; max-width: 420px; }
html body .fim-seg button:not(#_) { height: 36px !important; min-height: 0 !important; padding: 0 !important; border: 0; border-radius: 9px; background: transparent; color: #3F5C64; font: inherit; font-size: 14px !important; font-weight: 800; }
html body .fim-seg button.on:not(#_) { background: var(--fs-primary); color: #fff; }
.fim-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 140px)); gap: 8px; margin: 10px 14px 0; }
.fim-sum div { display: flex; flex-direction: column; padding: 7px 10px; border: 1px solid #E3ECEF; border-radius: 10px; font-size: 12px; color: #6A838A; }
.fim-sum b { font-size: 17px; color: #0B2A33; font-variant-numeric: tabular-nums; }
.fim-sum .in b, .fim-tbl .q.in, .fim-c .q.in { color: #2F6B12; }
.fim-sum .out b, .fim-tbl .q.out, .fim-c .q.out { color: #A32D2D; }
.fim-body { flex: 1; min-height: 140px; overflow: auto; margin: 10px 0 0; border-top: 1px solid #EEF3F5; }
.fim-msg { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 12px; color: #6A838A; font-size: 14px; text-align: center; }
.fim-msg i { font-size: 34px; color: var(--fs-tint-5); }
.fim-msg.err { color: #A32D2D; }
.fim-msg.err i { color: #E24B4A; }
.fim-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.fim-tbl th { position: sticky; top: 0; z-index: 1; background: #F2F8F9; color: #3F5C64; font-weight: 800; padding: 8px 6px; text-align: center; border-bottom: 1px solid #DCE6E9; white-space: nowrap; }
.fim-tbl td { padding: 7px 6px; text-align: center; border-bottom: 1px solid #F0F4F5; font-variant-numeric: tabular-nums; }
.fim-tbl td.t { text-align: start; }
.fim-tbl .q { font-weight: 800; direction: ltr; }
.fim-cards { display: none; }

@media (max-width: 768px) {
    .fsc, .fsc.is-center { top: auto !important; left: 0 !important; right: 0; bottom: 0 !important; transform: none; width: auto; max-height: 82vh !important; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .fsc-grab { display: block; width: 40px; height: 4px; margin: 8px auto 2px; border-radius: 2px; background: #D3DDE0; }
    .fsc-search kbd, .fsc-it kbd { display: none; }   /* مفيش كيبورد على الجوال */
    html body .fsc-search:not(#_) { height: 44px; }
    html body .fsc-search input:not(#_) { font-size: 16px !important; }   /* 16 عشان الآيفون مايكبّرش الصفحة */
    html body .fsc-it:not(#_), html body .fsc-grp:not(#_) { min-height: 46px !important; font-size: 15px !important; }
    .fsc-it > i, .fsc-grp > i:first-child { font-size: 20px; }
    .fsc-shade { background: rgba(4, 37, 45, .45); }

    .fim { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: auto; max-height: 88vh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .fim-seg { max-width: none; }
    .fim-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fim-sum b { font-size: 15px; }
    .fim-tbl { display: none; }
    .fim-cards { display: block; padding: 8px 10px 12px; }
    .fim-c { border: 1px solid #DCE6E9; border-radius: 12px; padding: 9px 11px; margin-bottom: 7px; }
    .fim-c1 { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; color: #0B2A33; }
    .fim-c1 .q { direction: ltr; font-variant-numeric: tabular-nums; }
    .fim-c2 { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 12.5px; color: #6A838A; }
}

/* زرار «عرض الحركات الأقدم» فى حركة الصنف (آخر 200 بس من الأول — قواعد السرعة) */
html body .fim-older:not(#_) { display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 20px); margin: 8px 10px; height: 40px !important; min-height: 0 !important; border: 1.5px dashed var(--fs-tint-4); border-radius: 10px; background: var(--fs-tint-1); color: var(--fs-primary); font: inherit; font-size: 14px !important; font-weight: 800; }

/* حركة الصنف لما المستخدم مسموحله بنوع واحد بس (صلاحيات الوندوز) ← اسم النوع بدل الأزرار */
.fim-one { margin: 10px 14px 0; font-size: 14px; font-weight: 800; color: var(--fs-primary); }

/* (2026-11-17) حركة الصنف: بحث + تجميع + إجماليات (طلب المالك)
   ديسكتوب: جدول DevExpress بطول ثابت (لازم عشان الرسم الجزئى للقوايم الكبيرة — قواعد السرعة)
   جوال: أدوات فوق (بحث + تجميع حسب) ، عناوين المجموعات بإجمالياتها ، شريط إجماليات ثابت تحت */
.fim-body:has(.fim-grid) { overflow: hidden; padding: 0 10px 10px; border-top: 0; }
html body .fim .fim-grid:not(#_) { height: min(58vh, 560px) !important; min-height: 0 !important; max-height: none !important; }
.fim-q { font-weight: 800; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.fim-q.in { color: #2F6B12; }
.fim-q.out { color: #A32D2D; }
.fim-mtools { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 6px; padding: 8px 10px; background: #fff; border-bottom: 1px solid #EEF3F5; }
.fim-msearch { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px; border: 1px solid #DCE6E9; border-radius: 10px; background: #F6F9FA; margin: 0; }
.fim-msearch i { color: var(--fs-primary); font-size: 17px; }
html body .fim-msearch input:not(#_) { flex: 1; min-width: 0; height: 40px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 16px !important; outline: 0; }
html body .fim-mgroup:not(#_) { height: 42px !important; min-height: 0 !important; padding: 0 8px !important; border: 1px solid #DCE6E9; border-radius: 10px; background: #fff; font: inherit; font-size: 14px !important; font-weight: 700; color: #0B2A33; }
.fim-gh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 6px; padding: 7px 10px; border-radius: 10px; background: var(--fs-tint-1); font-size: 13px; color: #3F5C64; }
.fim-gh b { font-size: 14px; color: var(--fs-primary-deep, var(--fs-primary)); }
.fim-mtot { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 2px solid var(--fs-primary); }
.fim-mtot div { display: flex; flex-direction: column; align-items: center; font-size: 11.5px; color: #6A838A; }
.fim-mtot b { font-size: 16px; color: #0B2A33; font-variant-numeric: tabular-nums; }

/* (2026-11-17) طلب المالك: سطر الإجماليات فى حركة الصنف «ملوّن ومختلف»
   الإجمالى العام: تركوازى غامق وكلام أبيض عريض ، إجمالى كل مجموعة: تركوازى فاتح ، والجوال نفس الشريط الغامق */
html body .fim .fim-grid .dxbl-grid-footer-row:not(#_) > td,
html body .fim .fim-grid tfoot td:not(#_) { background: var(--fs-primary-deep, var(--fs-primary)) !important; color: #fff !important; font-weight: 900 !important; font-size: 13.5px !important; border-color: rgba(255, 255, 255, .15) !important; }
html body .fim .fim-grid .dxbl-grid-footer-row:not(#_) > td *,
html body .fim .fim-grid tfoot td:not(#_) * { color: #fff !important; }
html body .fim .fim-grid .dxbl-grid-group-footer-row:not(#_) > td { background: var(--fs-tint-2, #E3F1F4) !important; color: var(--fs-primary-deep, var(--fs-primary)) !important; font-weight: 800 !important; }
html body .fim .fim-mtot:not(#_) { background: var(--fs-primary-deep, var(--fs-primary)); border-top: 0; border-radius: 14px 14px 0 0; }
html body .fim .fim-mtot:not(#_) div { color: rgba(255, 255, 255, .8); }
html body .fim .fim-mtot:not(#_) b { color: #fff !important; }
/* الأرقام فى سطر الإجمالى كانت بتتقص بـ «…» ← تنزل سطرين بدل ما تتقص */
html body .fim .fim-grid :is(.dxbl-grid-footer-row, .dxbl-grid-group-footer-row):not(#_) > td,
html body .fim .fim-grid :is(.dxbl-grid-footer-row, .dxbl-grid-group-footer-row):not(#_) > td * { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.25; }
/* طلب المالك: لون الإجمالى مختلف عن الأبيض ← ذهبى (زى أرقام الكروت الغامقة فى البرنامج) */
html body .fim .fim-grid .dxbl-grid-footer-row:not(#_) > td,
html body .fim .fim-grid .dxbl-grid-footer-row:not(#_) > td * { color: #FFD27A !important; }
html body .fim .fim-mtot:not(#_) b { color: #FFD27A !important; }
/* نوع الحركة (طلب المالك: أساسى وظاهر دايماً) ← شارة بلون الاتجاه: داخل أخضر ، خارج أحمر ، محايد رمادى */
.fim-type { display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 800; background: #EEF3F5; color: #3F5C64; white-space: nowrap; }
.fim-type.in { background: #EAF3DE; color: #2F6B12; }
.fim-type.out { background: #FCEBEB; color: #A32D2D; }
/* فتح المستند من الحركة: الصفوف/الكروت اللى ليها شاشة بتبان قابلة للضغط ، ورسالة لو مالهاش شاشة أو صلاحية */
html body .fim .fim-grid tr[data-visible-index] { cursor: pointer; }
.fim-c.is-link { cursor: pointer; }
.fim-c.is-link:active { background: var(--fs-tint-1); }
.fim-note { display: flex; align-items: center; gap: 8px; margin: 8px 14px 0; padding: 8px 10px; border-radius: 10px; background: #FDF3E2; color: #8A5A00; font-size: 13px; font-weight: 700; }
.fim-note span { flex: 1; }
html body .fim-note button:not(#_) { width: 28px; height: 28px !important; min-height: 0 !important; padding: 0 !important; border: 0; border-radius: 8px; background: transparent; color: #8A5A00; }
/* حركة الصنف (ديسكتوب): النافذة أعرض عشان الأعمدة العشرة تدخل من غير سحب ، والجدول أقصر عشان سطر الإجمالى يفضل باين جوه النافذة */
@media (min-width: 769px) {
    html body .fim:not(#_) { width: min(1200px, 97vw); top: 4vh; max-height: 92vh; }
    html body .fim .fim-grid:not(#_) { height: min(calc(92vh - 300px), 520px) !important; }
}
/* الجدول بياخد باقى طول النافذة بالظبط (مهما كانت الرسالة ظاهرة ولا لأ) ← سطر الإجمالى دايماً جوه */
@media (min-width: 769px) {
    html body .fim .fim-body:has(.fim-grid) { display: flex; flex-direction: column; min-height: 0; flex: 1 1 0; }
    html body .fim .fim-grid:not(#_) { flex: 1 1 0; height: auto !important; min-height: 0 !important; max-height: none !important; }   /* style.css بيفرض min-height:500 على كل الجداول */
    html body .fim:not(#_) { height: 92vh; }
}

/* (2026-11-17) حركة الصنف: أزرار طباعة / Excel / PDF فى الرأس + 5 أزرار نوع (تحويلات واستقبالات) + مربع رصيد أول المدة */
.fim-acts { display: flex; gap: 6px; }
html body .fim-act:not(#_) { display: inline-flex; align-items: center; gap: 6px; height: 36px !important; min-height: 0 !important; padding: 0 12px !important; border: 1px solid #DCE6E9; border-radius: 10px; background: #fff; color: var(--fs-primary-deep, var(--fs-primary)); font: inherit; font-size: 13.5px !important; font-weight: 800; cursor: pointer; }
html body .fim-act:not(#_) i { font-size: 18px; }
html body .fim-act.xl:not(#_) i { color: #1D6F42; }   /* لون Excel */
html body .fim-act.pdf:not(#_) i { color: #B42318; }  /* لون PDF */
html body .fim-act:not(#_):hover:not(:disabled) { background: var(--fs-tint-1); border-color: var(--fs-primary); }
html body .fim-act:not(#_):disabled { opacity: .45; cursor: default; }
.fim-seg { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); max-width: 640px; }
.fim-sum { grid-template-columns: repeat(4, minmax(0, 140px)); }
@media (max-width: 768px) {
    html body .fim-act:not(#_) { width: 38px; padding: 0 !important; justify-content: center; }
    html body .fim-act:not(#_) span { display: none; }          /* الجوال: أيقونات بس (المساحة) */
    .fim-acts { gap: 4px; }
    .fim-seg { max-width: none; }
    html body .fim-seg button:not(#_) { font-size: 13px !important; }
    .fim-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .fim-sum div { padding: 6px 6px; font-size: 11px; }
    .fim-sum b { font-size: 14px; }
}
/* معاينة الطباعة فوق نافذة الحركة (النافذة z-index 1070) */
body:has(.fim) .fs-print-popup, body:has(.fim) .dxbl-modal:has(.fs-print-popup) { z-index: 1090 !important; }

/* (2026-11-17) حركة الصنف: زرار خروج واضح + النافذة بتستخبى وقت معاينة الطباعة (المعاينة كانت بتظهر وراها) */
html body .fim-exit:not(#_) { display: inline-flex; align-items: center; gap: 6px; height: 36px !important; min-height: 0 !important; padding: 0 14px !important; border: 0; border-radius: 10px; background: #B42318; color: #fff; font: inherit; font-size: 13.5px !important; font-weight: 800; cursor: pointer; }
html body .fim-exit:not(#_) i { font-size: 18px; }
html body .fim-exit:not(#_):hover { background: #912018; }
.fim.fim-away, .fim-shade.fim-away { visibility: hidden; }
@media (max-width: 768px) {
    html body .fim-exit:not(#_) { width: 38px; padding: 0 !important; justify-content: center; }
    html body .fim-exit:not(#_) span { display: none; }
}
/* (2026-11-17) جدول الجرد فى حركة الصنف: كل البيانات فى النص (طلب المالك) — العناوين والخلايا والإجماليات */
html body .fim .fim-grid:not(#_) th, html body .fim .fim-grid:not(#_) td { text-align: center !important; }
html body .fim .fim-grid:not(#_) .dxbl-grid-header-content, html body .fim .fim-grid:not(#_) .dxbl-grid-footer-cell, html body .fim .fim-grid:not(#_) .dxbl-grid-group-footer-cell { justify-content: center !important; text-align: center !important; }

/* (2026-11-17) منيو الأوامر: المجموعات قوايم جانبية على الديسكتوب (طلب المالك — بدل ما تنزل لتحت وتعمل اسكرول) */
.fsc-fly { position: fixed; z-index: 1072; display: flex; flex-direction: column; gap: 1px; padding: 6px; overflow-y: auto; background: #fff; border: 1px solid #DCE6E9; border-radius: 12px; box-shadow: 0 16px 40px rgba(4, 37, 45, .22); direction: rtl; animation: fsc-fly-in .12s ease-out; }
.fsc-fly-hd { display: flex; align-items: center; gap: 7px; padding: 4px 8px 7px; margin-bottom: 2px; border-bottom: 1px solid #EEF3F5; font-size: 12.5px; font-weight: 800; color: var(--fs-primary-deep, var(--fs-primary)); }
.fsc-fly-hd i { font-size: 16px; color: var(--fs-primary); }
html body .fsc-grp.is-fly.on:not(#_) { background: var(--fs-tint-1); }        /* المجموعة اللى قايمتها مفتوحة */
.fsc-grp.is-fly .fsc-chev { transform: none !important; }
@keyframes fsc-fly-in { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fsc-fly { animation: none; } }
.fsc-sep { height: 1px; margin: 4px 8px; background: #EEF3F5; }   /* (2026-11-17) خط فاصل بين أقسام المنيو (Sep فى InvCmds) */

/* (2026-11-17) زرار «المزيد» (منيو الأوامر من غير صنف) — للجوال بس ؛ الديسكتوب عنده كليك يمين و Ctrl+K */
.fs-cmd-more, .pos-dcart-ft .pos-mbtn-more { display: none !important; }
@media (max-width: 768px) {
    html body :is(.inv-page, .rinv-page) .fs-cmd-more { display: flex !important; }
    html body .pos-mcart-ft .pos-mbtn-more { flex: 0 0 52px; padding: 0; font-size: 22px !important; }
    /* ضغطة طويلة على كارت الصنف = المنيو: من غير تحديد نص ولا قايمة النسخ بتاعة iOS */
    html body .fs-mc[data-rk] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.fsc-fly { max-height: calc(100vh - 16px) !important; }   /* (2026-11-17) القايمة الجانبية تاخد طولها كله (كان بيظهر اسكرول فى 3 أوامر) */
@media (max-width: 768px) {
    /* (2026-11-17) سلة الكاشير بعد زرار ⋯: «جديد» و«خيارات» أصغر شوية عشان زرار الدفع يفضل الأعرض */
    html body .pos-mcart-ft > .pos-mbtn-g:not(.pos-mbtn-more), html body .pos-mcart-ft > .fs-om { flex: 0 0 82px !important; min-width: 0; }
    html body .pos-mcart-ft > .fs-om .pos-mbtn-g { width: 100%; }
    html body .pos-mcart-ft > .pos-mbtn-more { flex: 0 0 48px !important; }
}

/* ══ (2026-11-17) FsSubject — شارة الصنف/العميل اللى النافذة مفتوحة عليه (لون مختلف عن أزرار الأوامر — طلب المالك) ══ */
.fs-subj { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid var(--fs-subject-bd, #F2C28E); border-radius: 10px; background: var(--fs-subject-bg, #FDF1E4); color: var(--fs-subject-ink, #6E3A0E); direction: rtl; }
.fs-subj-ic { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--fs-subject, #A9561A); color: #fff; font-size: 15px; }
.fs-subj-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fs-subj-t b { font-size: 13.5px; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fs-subj-t small { font-size: 11.5px; font-weight: 600; opacity: .8; text-align: right; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
/* Pill: سطر واحد صغير جنب عنوان النافذة */
.fs-subj.is-pill { display: inline-flex; max-width: 100%; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; }
.fs-subj.is-pill .fs-subj-ic { width: 22px; height: 22px; border-radius: 50%; font-size: 13px; }
.fs-subj.is-pill .fs-subj-t { flex-direction: row; align-items: baseline; gap: 6px; }
.fs-subj.is-pill .fs-subj-t b { font-size: 13px; }
/* المنيو: الشارة مكان سطر الصنف القديم */
.fsc .fs-subj { margin: 4px 8px 6px; }
.fim-tt { gap: 3px; }                       /* (2026-11-17) العنوان وتحته شارة الصنف */
.fim-tt .fs-subj.is-pill { align-self: flex-start; }
/* الأصناف البديلة: كارت الصنف الأصلى بلون «الموضوع» (نفس FsSubject) */
html body .fs-malt-orig:not(#_) { background: var(--fs-subject-bg, #FDF1E4); border: 1px solid var(--fs-subject-bd, #F2C28E); color: var(--fs-subject-ink, #6E3A0E); border-inline-start: 4px solid var(--fs-subject, #A9561A); }
html body .fs-malt-orig:not(#_) b { color: var(--fs-subject-ink, #6E3A0E); }
/* (2026-11-17 طلب المالك) مفيش سطرين: رأس النوافذ اللى فيها شارة الصنف سطر واحد دايماً — الاسم بيتقص بـ «…» والعدّادات ثابتة */
html body .sp-head-top:has(> .fs-subj):not(#_) { flex-wrap: nowrap !important; }
html body .sp-head-top > .fs-subj { flex: 0 1 auto; min-width: 0; margin-inline-end: auto; }
html body .sp-head-top:has(> .fs-subj) > .sp-badge { flex: none; }
.fs-subj.is-pill { min-width: 0; white-space: nowrap; }
.fs-subj.is-pill .fs-subj-t { min-width: 0; overflow: hidden; }
.fs-subj.is-pill .fs-subj-t b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fs-subj.is-pill .fs-subj-t small { flex: none; }

/* ══ (2026-11-17 طلب المالك) رأس كل نوافذ البحث/الاختيار (sp-head-top — 13 نافذة) سطر واحد دايماً ، مفيش لف لسطرين ══
   العدّادات ثابتة ، والنص الطويل بيتقص بـ «…» ، وعلى الموبايل: «مسح التحديد» أيقونة × ، و«رقم الفاتورة» أيقونة + الرقم */
html body .sp-head-top:not(#_) { flex-wrap: nowrap !important; min-width: 0; }
html body .sp-head-top:not(#_) > * { flex: none; }
html body .sp-head-top:not(#_) > .fs-subj,
html body .sp-head-top:not(#_) > .rdx-badge-info { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .sp-head-top:not(#_) > .sp-clear-sel { margin-inline-start: auto; white-space: nowrap; }
@media (max-width: 768px) {
    html body .sp-head-top:not(#_) { gap: 6px !important; }
    html body .sp-head-top:not(#_) > .sp-clear-sel { font-size: 0 !important; width: 28px; height: 28px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
    html body .sp-head-top:not(#_) > .sp-clear-sel svg { width: 13px; height: 13px; }
    html body .sp-head-top:not(#_) > .rdx-badge-info { font-size: 0 !important; gap: 4px; }
    html body .sp-head-top:not(#_) > .rdx-badge-info i,
    html body .sp-head-top:not(#_) > .rdx-badge-info b { font-size: 12px; }
}

/* (2026-11-18) FsItemRename — إعادة تسمية الصنف (نفس كارت FsConfirm) */
.fs-ren .fs-cf-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fs-ren-lbl { display: block; margin: 12px 0 4px; font-size: 12.5px; color: #6A838A; }
.fs-ren-in { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid var(--fs-primary); border-radius: 10px; font: inherit; font-size: 16px; font-weight: 700; color: #0B2A33; outline: none; }
.fs-ren-in:focus { box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .18); }
.fs-ren-in.has-err { border-color: #dc3545; }
.fs-ren-err { margin: 4px 0 0; font-size: 12px; color: #dc3545; }
.fs-ren .fs-cf-actions { margin-top: 14px; }

/* (2026-11-18) FsItemRename بيستخدم كارت FsConfirm (fs-cf-) ، وCSS بتاع FsConfirm scoped فمش بيوصله ← نفس القواعد هنا عامة (بنفس القيم فمابتغيّرش FsConfirm) */
.fs-cf-back:has(> .fs-ren) {
    position: fixed; inset: 0; z-index: 1092; background: rgba(0, 0, 0, .45);
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.fs-cf-card.fs-ren { width: 400px; max-width: 100%; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); outline: none; }
.fs-ren .fs-cf-bar { height: 4px; background: var(--fs-primary); }
.fs-cf-card.fs-ren.is-warn .fs-cf-bar { background: var(--fs-action, var(--fs-primary)); }
.fs-ren .fs-cf-body { padding: 16px 18px 18px; }
.fs-ren .fs-cf-head { display: flex; gap: 12px; align-items: center; }
.fs-ren .fs-cf-ic {
    flex: 0 0 42px; height: 42px; border-radius: 50%; font-size: 21px;
    display: flex; align-items: center; justify-content: center;
    background: var(--fs-tint-3); color: var(--fs-primary-deep);
}
.fs-cf-card.fs-ren.is-warn .fs-cf-ic { background: #fdf0de; color: #8a5208; }
.fs-ren .fs-cf-txt { min-width: 0; }
.fs-ren .fs-cf-title { margin: 0; font-size: 15px; font-weight: 600; color: #22313a; }
.fs-ren .fs-cf-msg { margin: 3px 0 0; font-size: 13px; color: #5f6b70; line-height: 1.5; white-space: pre-line; }  /* pre-line: سطر جديد فى الرسالة بيتعرض سطر (تنبيه آخر سعر) */
.fs-ren .fs-cf-actions { display: flex; gap: 8px; margin-top: 16px; }
.fs-ren .fs-cf-ok, .fs-ren .fs-cf-no { flex: 1; height: 40px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.fs-ren .fs-cf-ok { border: 0; background: var(--fs-primary); color: #fff; }
.fs-cf-card.fs-ren.is-warn .fs-cf-ok { background: var(--fs-action, var(--fs-primary)); }
.fs-ren .fs-cf-no { border: 1px solid #d5dde0; background: #fff; color: #3b464b; }
.fs-ren .fs-cf-ok:focus-visible, .fs-ren .fs-cf-no:focus-visible { outline: 2px solid var(--fs-primary); outline-offset: 2px; }
@media (max-width: 600px) {
    .fs-cf-back:has(> .fs-ren) { align-items: flex-end; padding: 0; }
    .fs-cf-card.fs-ren { width: 100%; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
/* (2026-11-18 طلب المالك) أزرار نافذة إعادة التسمية: «حفظ» زرار الفعل الأساسى بلون الأكشن وعريض ، «إلغاء» زرار ثانوى صغير جنبه — نفس «تغيير الصافى» */
.fs-ren .fs-cf-actions { gap: 10px; }
.fs-ren .fs-cf-ok { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 11px; background: var(--fs-action, var(--fs-primary)); font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.fs-ren .fs-cf-ok:hover { background: var(--fs-action-hover, var(--fs-action, var(--fs-primary))); }
.fs-ren .fs-cf-ok i { font-size: 18px; }
.fs-ren .fs-cf-no { flex: 0 0 auto; min-width: 96px; height: 46px; padding: 0 18px; border-radius: 11px; font-weight: 700; color: #5F6B70; }
.fs-ren .fs-cf-no:hover { background: #F4F7F8; }
.fs-ren .fs-cf-ic { border-radius: 11px; background: var(--fs-primary); color: #fff; }   /* أيقونة الرأس مربع بلون الثيم زى «تغيير الصافى» */
/* (2026-11-18) FsItemAsAlt — كود الصنف الأساسى + زرار بحث جنبه ، والصنف اللى اتلقى */
.fs-alt-row { display: flex; gap: 8px; }
.fs-alt-row .fs-ren-in { flex: 1; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.fs-alt-find { flex: 0 0 44px; height: 44px; border: 1.5px solid var(--fs-primary); border-radius: 10px; background: #fff; color: var(--fs-primary); font-size: 19px; cursor: pointer; display: grid; place-items: center; }
.fs-alt-find:hover { background: var(--fs-tint-1); }
.fs-alt-main { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: #6A838A; min-width: 0; white-space: nowrap; }
.fs-ren .fs-cf-ok:disabled { opacity: .45; cursor: not-allowed; }

/* (2026-11-18) FsItemPromos / FsPriceChecker — نوافذ الكاشير الصغيرة (نفس كارت fs-ren) */
.fs-promo-msg { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 4px; color: #6A838A; font-size: 13.5px; }
.fs-promo-msg i { font-size: 20px; }
.fs-promo-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.fs-promo-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid #E3ECEF; border-radius: 10px; }
.fs-promo-list b { font-size: 14px; color: #0B2A33; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-promo-list span { flex: none; font-size: 11.5px; font-weight: 700; color: var(--fs-primary-ink); background: var(--fs-tint-1); border-radius: 999px; padding: 2px 10px; }
.fs-pc { width: 460px; }
.fs-pc .fs-alt-row { margin-top: 12px; }
.fs-pc-name { margin-top: 12px; }
.fs-pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.fs-pc-grid > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid #E3ECEF; border-radius: 12px; text-align: center; min-width: 0; }
.fs-pc-grid span { font-size: 11.5px; color: #6A838A; }
.fs-pc-grid b { font-size: 20px; font-weight: 800; color: #0B2A33; font-variant-numeric: tabular-nums; }
.fs-pc-grid em { font-style: normal; font-size: 12px; font-weight: 800; color: #2F6B12; }
.fs-pc-grid > .has-offer { border-color: #9CCB7D; background: #F2F9EC; }
.fs-pc-grid > .has-offer b { text-decoration: line-through; font-size: 15px; color: #6A838A; }   /* السعر الأصلى متشطّب لو فيه عرض */
.fs-pc-grid > .is-none { background: #F7F9FA; }
.fs-pc-grid > .is-none b { color: #A9B9BE; }

/* ══ (2026-11-18 قرار المالك «الشكل والترتيب الخاص بك كخبير») — fs-xbar: شريط الفاتورة المقترح ══
   الترتيب حسب الاستخدام: حفظ/تعديل ← طباعة (+ سهم طباعة 2) ← واتساب ← جديد … ثم بعيد: خيارات ← حذف
   الديسكتوب صف واحد ، والجوال 5 زراير (الباقى فى «المزيد»). الأيقونات Tabler بلون الثيم ؛ الأخضر للواتساب والأحمر للحذف بس.
   :not(#_) فى قواعد الجوال علشان تغلب ستايل الزراير العام فى mobile-ui-pack.css (body button:not×7) */
html body .fs-xbar:is(.inv-footer-left, .rinv-footer-left) > * { order: 0 !important; }                                   /* ترتيب الـ markup هو اللى يمشى */
html body .fs-xbar :is(.inv-abtn, .rinv-abtn) i { color: var(--fs-primary); font-size: 17px; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-save i { color: #fff; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-wa { background: #fff !important; color: #157A3C !important; border: 1px solid #A8DCBC !important; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-wa i { color: #1FA855; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-wa:hover { background: #EEF9F2 !important; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-del { background: #fff !important; color: #C62828 !important; border: 1px solid #F1C4C4 !important; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-del i { color: #C62828; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-del:hover:not(:disabled) { background: #FFF4F4 !important; }
html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-new, html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-print, html body .fs-xbar :is(.inv-abtn, .rinv-abtn).a-caret { background: #fff !important; color: #1C2434 !important; border: 1px solid #C8D0DE !important; }
html body .fs-xbar .fs-xprint { display: inline-flex; align-items: stretch; flex-shrink: 0; }
html body .fs-xbar .fs-xprint > :is(.inv-abtn, .rinv-abtn).a-print { border-start-end-radius: 0 !important; border-end-end-radius: 0 !important; }   /* طباعة + السهم = زرار واحد */
html body .fs-xbar .fs-xprint .fs-om, html body .fs-xbar .fs-xprint .fs-desk-only { display: inline-flex; }
html body .fs-xbar .fs-xprint :is(.inv-abtn, .rinv-abtn).a-caret { min-width: 30px !important; width: 30px; padding: 0 !important; justify-content: center; margin-inline-start: -1px; border-start-start-radius: 0 !important; border-end-start-radius: 0 !important; }
html body .fs-xbar .fs-xprint :is(.inv-abtn, .rinv-abtn).a-caret i { font-size: 14px; }
html body .fs-xbar .fs-desk-only, html body .fs-xbar .fs-xend { display: inline-flex; }
html body .fs-xbar .fs-mob-only { display: none !important; }
html body .fs-xbar .fs-xend { margin-inline-start: auto; }                                         /* خيارات وحذف بعيد عن الباقى */

/* ديسكتوب — عرض السلة (العمود الجانبى الضيق): «حفظ» سطر لوحده عريض ، والباقى تلاتة فى السطر */
@media (min-width: 769px) {
    html body .inv-main.is-cart .fs-xbar:is(.inv-footer-left, .rinv-footer-left) > :is(.inv-abtn, .rinv-abtn).a-save { flex: 1 1 100% !important; height: 52px !important; }
    html body .inv-main.is-cart .fs-xbar:is(.inv-footer-left, .rinv-footer-left) > :is(:is(.inv-abtn, .rinv-abtn), .fs-xprint, .fs-xend) { flex: 1 1 30% !important; height: 40px !important; }
    html body .inv-main.is-cart .fs-xbar .fs-xprint > :is(.inv-abtn, .rinv-abtn).a-print { flex: 1 1 auto !important; height: 40px !important; }
    html body .inv-main.is-cart .fs-xbar .fs-xprint :is(.inv-abtn, .rinv-abtn).a-caret { height: 40px !important; }
    html body .inv-main.is-cart .fs-xbar .fs-xend { margin-inline-start: 0; }
    html body .inv-main.is-cart .fs-xbar .fs-xend .fs-om, html body .inv-main.is-cart .fs-xbar .fs-xend .fs-om-btn { width: 100%; height: 40px !important; justify-content: center; }
}

/* الجوال: 5 أعمدة — «حفظ/تعديل» عمودين ، و«المزيد» فيه الباقى */
@media (max-width: 768px) {
    html body :is(.inv-page, .rinv-page) .fs-xbar .fs-desk-only { display: none !important; }
    html body :is(.inv-page, .rinv-page) .fs-xbar .fs-mob-only { display: block !important; }
    html body :is(.inv-page, .rinv-page) .fs-xbar .fs-xprint { display: contents; }
    html body :is(.inv-page, .rinv-page) .fs-xbar:is(.inv-footer-left, .rinv-footer-left) > :is(.inv-abtn, .rinv-abtn).a-save { grid-column: span 2 !important; }
    html body :is(.inv-page, .rinv-page) .fs-xbar .fs-xmore .fs-om, html body :is(.inv-page, .rinv-page) .fs-xbar .fs-xmore .fs-om-btn { width: 100% !important; height: 56px !important; }
    html body :is(.inv-page, .rinv-page) .fs-xbar :is(.inv-abtn, .rinv-abtn) i { font-size: 20px !important; }
    html body :is(.inv-page, .rinv-page) .fs-xbar:is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn):not(#_) { font-size: 12px !important; padding: 3px 0 !important; }
    html body :is(.inv-page, .rinv-page) .fs-xbar:is(.inv-footer-left, .rinv-footer-left) :is(.inv-abtn, .rinv-abtn).a-save:not(#_) { font-size: 14px !important; flex-direction: row !important; gap: 8px !important; }
    html body :is(.inv-page, .rinv-page) .fs-xbar .fs-xmore .fs-om-btn:not(#_) { flex-direction: column !important; gap: 3px !important; background: #fff !important; color: #1C2434 !important; border: 1px solid #C8D0DE !important; }
}
.fsc:focus { outline: none; }   /* (2026-11-18) المنيو بتاخد التركيز علشان Esc — من غير إطار التركيز حوالين المنيو كلها */

/* ══ (2026-11-18 طلب المالك «البوب اب الخاص بتخصيص محتاج تعديل التصميم») — نافذة «تخصيص» الأعمدة (DevExpress Column Chooser) ══
   كارت أبيض بحواف 16 وظل هادى ، عنوان واضح بخط فاصل ، كل عمود سطر 40px بخلفية فاتحة لو ظاهر ،
   علامة الاختيار بلون الثيم ، ومقبض السحب باهت لحد ما الماوس يعدّى عليه. بيتطبق على كل الجداول.
   :not(#_) علشان يغلب ستايلات DevExpress الافتراضية */
html body .dxbl-window-dialog.dxbl-grid-column-chooser-dialog:not(#_) {
    width: 340px !important; max-width: calc(100vw - 24px) !important;
    border: 0 !important; border-radius: 16px !important; overflow: hidden;
    box-shadow: 0 20px 48px rgba(4, 37, 45, .22), 0 2px 8px rgba(4, 37, 45, .08) !important;
    background: #fff !important;
}
html body .dxbl-grid-column-chooser-dialog .dxbl-popup-header:not(#_) {
    padding: 14px 16px 12px !important; background: #fff !important;
    border-bottom: 1px solid #EBF1F3 !important;
}
html body .dxbl-grid-column-chooser-dialog .dxbl-window-title:not(#_) {
    font-size: 15px !important; font-weight: 800 !important; color: var(--fs-primary-ink) !important;
    display: inline-flex; align-items: center; gap: 8px;
}
html body .dxbl-grid-column-chooser-dialog .dxbl-window-title:not(#_)::before {   /* أيقونة أعمدة صغيرة جنب العنوان */
    content: ""; width: 26px; height: 26px; border-radius: 8px; flex: none;
    background: var(--fs-tint-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006780' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M9 4v16M15 4v16'/%3E%3C/svg%3E") center / 16px no-repeat;
}
html body .dxbl-grid-column-chooser-dialog .dxbl-window-header-button:not(#_) {   /* زرار X */
    width: 32px !important; height: 32px !important; border-radius: 10px !important; background: #F2F6F7 !important; color: #3B464B !important;
}
html body .dxbl-grid-column-chooser-dialog .dxbl-window-header-button:not(#_):hover { background: var(--fs-tint-2) !important; }
html body .dxbl-grid-column-chooser-dialog .dxbl-popup-body:not(#_) { padding: 8px !important; }
html body .dxbl-grid-column-chooser:not(#_) { max-height: min(62vh, 520px) !important; overflow: auto !important; }
html body .dxbl-grid-column-chooser .dxbl-scroll-viewer-content:not(#_) { display: flex; flex-direction: column; gap: 2px; }

/* سطر العمود */
html body .dxbl-grid-column-chooser-item:not(#_) {
    display: flex !important; align-items: center !important; gap: 8px; min-height: 40px !important;
    padding: 4px 10px !important; border-radius: 10px !important; border: 0 !important; cursor: pointer;
    transition: background .12s;
}
html body .dxbl-grid-column-chooser-item:not(#_):hover { background: #F5F8F9 !important; }
html body .dxbl-grid-column-chooser-item[aria-checked="true"]:not(#_) { background: var(--fs-tint-1) !important; }   /* العمود الظاهر */
html body .dxbl-grid-column-chooser-item[aria-checked="true"]:not(#_):hover { background: var(--fs-tint-2) !important; }
html body .dxbl-grid-column-chooser-item:focus-visible { outline: 2px solid var(--fs-primary); outline-offset: -2px; }
html body .dxbl-grid-column-chooser-item .dxbl-checkbox:not(#_) { flex: 1; min-width: 0; gap: 10px; }
html body .dxbl-grid-column-chooser-item .dxbl-checkbox label:not(#_) { font-size: 13.5px !important; color: #22313A !important; font-weight: 500; }
html body .dxbl-grid-column-chooser-item[aria-checked="true"] .dxbl-checkbox label:not(#_) { color: var(--fs-primary-ink) !important; font-weight: 700; }

/* مربع الاختيار بلون الثيم */
html body .dxbl-grid-column-chooser-item .dxbl-checkbox-check-element:not(#_) {
    width: 20px !important; height: 20px !important; border-radius: 6px !important;
    border: 1.5px solid #B9C7CC !important; background: #fff !important; flex: none;
}
html body .dxbl-grid-column-chooser-item .dxbl-checkbox-checked .dxbl-checkbox-check-element:not(#_) {
    background: var(--fs-primary) !important; border-color: var(--fs-primary) !important; color: #fff !important;
}
html body .dxbl-grid-column-chooser-item .dxbl-checkbox-checked .dxbl-checkbox-check-element svg:not(#_) { color: #fff !important; fill: currentColor; }

/* مقبض السحب: باهت ، ويوضح مع الماوس */
html body .dxbl-grid-column-chooser-item-drag-anchor:not(#_) { opacity: .28; color: #6A838A; transition: opacity .12s; cursor: grab; }
html body .dxbl-grid-column-chooser-item:hover .dxbl-grid-column-chooser-item-drag-anchor:not(#_) { opacity: .8; }
/* التركيز على أول سطر (DevExpress بيحطه لوحده): كان إطار أسود تقيل ← حلقة خفيفة بلون الثيم مع الكيبورد بس */
html body .dxbl-grid-column-chooser-item:not(#_):focus { outline: none !important; box-shadow: none !important; border: 0 !important; }
html body .dxbl-grid-column-chooser-item:not(#_):focus-visible { box-shadow: inset 0 0 0 2px var(--fs-tint-5) !important; }
html body .dxbl-grid-column-chooser:not(#_):focus, html body .dxbl-grid-column-chooser:not(#_):focus-visible { outline: none !important; box-shadow: none !important; }
html body .dxbl-grid-column-chooser-item[aria-checked="true"]:not(#_) { background: var(--fs-tint-2) !important; }   /* الظاهر أوضح شوية */

/* (2026-11-18 طلب المالك) «تخصيص»: خانة البحث (fs-grid-nav.js) + من اليمين للشمال فى العربى */
html body.layout-mode-rtl .dxbl-grid-column-chooser-dialog:not(#_) { direction: rtl; text-align: right; }   /* المربع يمين والكلام يبدأ من اليمين */
html body.layout-mode-rtl .dxbl-grid-column-chooser-dialog .dxbl-checkbox label:not(#_) { text-align: right; }
.fs-cc-search { position: relative; margin: 2px 2px 8px; }
.fs-cc-search i { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: #7A8C92; font-size: 16px; pointer-events: none; }
.fs-cc-search input {
    width: 100%; height: 38px; padding-inline: 34px 10px; border: 1px solid #DCE6E9; border-radius: 10px;
    background: #F7FAFB; font-size: 13.5px; color: #22313A; outline: none; transition: border-color .12s, background .12s;
}
.fs-cc-search input:focus { border-color: var(--fs-primary); background: #fff; box-shadow: 0 0 0 3px var(--fs-tint-2); }
.fs-cc-empty { padding: 18px 10px; text-align: center; color: #7A8C92; font-size: 13px; }
/* DevExpress بيحط direction:ltr على كل سطر ← نرجّعه rtl فى العربى (المربع يمين والكلام من اليمين) */
html body.layout-mode-rtl .dxbl-grid-column-chooser-dialog :is(.dxbl-grid-column-chooser, .dxbl-grid-column-chooser-item, .dxbl-checkbox, .dxbl-popup-header):not(#_) { direction: rtl !important; }
html body .dxbl-grid-column-chooser-item.fs-cc-hide:not(#_) { display: none !important; }   /* العمود مش مطابق للبحث */
html body .dxbl-grid-column-chooser-dialog .dxbl-window-body:not(#_) { display: flex !important; flex-direction: column !important; align-items: stretch !important; }
html body .dxbl-grid-column-chooser-dialog .fs-cc-search:not(#_) { width: auto; align-self: stretch; flex: none; }   /* البحث بعرض النافذة كلها */
html body .dxbl-grid-column-chooser:not(#_) { height: min(56vh, 460px) !important; }   /* ارتفاع ثابت — النافذة ماتتنططش وانت بتكتب فى البحث */

/* ══ (2026-11-18 طلب المالك «وحّد شكل التخصيص») — «تخصيص» وضع السلة (FsCartToolbar) بنفس شكل «تخصيص» الجدول ══ */
html body .inv-cart-colpop.fs-cc:not(#_) {
    width: 320px; min-width: 0 !important; max-width: calc(100vw - 24px); padding: 0 !important; gap: 0 !important; overflow: hidden;
    border: 0 !important; border-radius: 16px !important; box-shadow: 0 20px 48px rgba(4, 37, 45, .22), 0 2px 8px rgba(4, 37, 45, .08) !important; direction: inherit;
}
.fs-cc-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 11px; border-bottom: 1px solid #EBF1F3; }
.fs-cc-head b { font-size: 15px; font-weight: 800; color: var(--fs-primary-ink); }
.fs-cc-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--fs-tint-2); color: var(--fs-primary); font-size: 16px; flex: none; }
html body button.fs-cc-x:not(#_) { margin-inline-start: auto; width: 32px; height: 32px; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0; border-radius: 10px; background: #F2F6F7; color: #3B464B; display: grid; place-items: center; cursor: pointer; }
html body button.fs-cc-x:not(#_):hover { background: var(--fs-tint-2); }
.fs-cc > .fs-cc-search { margin: 10px 10px 6px; }
.fs-cc-list { display: flex; flex-direction: column; gap: 2px; padding: 0 8px 8px; max-height: min(56vh, 420px); overflow: auto; }
html body .fs-cc .fs-cc-row:not(#_) { min-height: 40px; padding: 4px 10px !important; border-radius: 10px; gap: 10px; color: #22313A !important; font-weight: 500 !important; font-size: 13.5px !important; }
html body .fs-cc .fs-cc-row:not(#_):hover { background: #F5F8F9; }
html body .fs-cc .fs-cc-row.is-on:not(#_) { background: var(--fs-tint-2); }
html body .fs-cc .fs-cc-row.is-on:not(#_) span:not(.fs-cc-box) { color: var(--fs-primary-ink) !important; font-weight: 700 !important; }
html body .fs-cc .fs-cc-row input:not(#_) { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }   /* المربع الأصلى مستخبى — fs-cc-box مكانه */
.fs-cc-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #B9C7CC; background: #fff; display: grid; place-items: center; flex: none; color: transparent; font-size: 14px; transition: background .12s, border-color .12s; }
.fs-cc-row.is-on .fs-cc-box { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
.fs-cc-row input:focus-visible + .fs-cc-box { box-shadow: 0 0 0 3px var(--fs-tint-5); }
html body .fs-cc .fs-cc-row.is-on .fs-cc-box:not(#_) { color: #fff !important; }   /* علامة ✓ بيضا جوه المربع */
html body .fs-cc .fs-cc-box:not(#_) { color: transparent !important; }   /* المربع الفاضى من غير علامة (قاعدة قديمة كانت بتلوّن كل span فى النافذة) */

/* ═══════════════════════════════════════════════════════════════════
   (2026-11-18 قرار المالك) تبويب فاتورة المشتريات: «الأصناف» / «القيد المرفق» — FrmPurchases.razor (fs-ptabs)
   ديسكتوب: شريط فاتح فيه زرين ، المفتوح لون الهوية مليان وكلامه أبيض ، وجنب كل زرار رقم صغير
   جوال: مربعين متساويين ، الأيقونة فوق والكلمة تحت ، والرقم فى الركن (شكل التبويبات المعتمد على الجوال)
   الألوان كلها من متغيرات الثيم ، فالثيم البرتقالى بيغيّرها لوحده
   الـ selector فيه 4 classes + !important عشان يغلب قواعد pur-tabs-head القديمة فى FrmPurchases.razor.css (scoped)
   ═══════════════════════════════════════════════════════════════════ */
.frm-purchases-page .inv-grid-card > .pur-tabs-head.fs-ptabs-head {
    height: auto !important;
    min-height: 0 !important;
    padding: 6px 8px !important;
    overflow: visible !important;
    align-items: center !important;
    background: #fff !important;
    border-bottom: 1px solid var(--fs-tint-5) !important;
}
.frm-purchases-page .fs-ptabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--fs-tint-2);
    border-radius: 10px;
}
.frm-purchases-page .fs-ptab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--fs-primary-ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.frm-purchases-page .fs-ptab .ti { font-size: 18px; }
.frm-purchases-page .fs-ptab:hover { background: var(--fs-tint-3); }
.frm-purchases-page .fs-ptab:focus-visible { outline: 2px solid var(--fs-primary); outline-offset: 2px; }
.frm-purchases-page .fs-ptab.is-on { background: var(--fs-primary); color: #fff; }
.frm-purchases-page .fs-ptab-n {
    min-width: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--fs-tint-5);
    color: var(--fs-primary-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.frm-purchases-page .fs-ptab.is-on .fs-ptab-n { background: #fff; color: var(--fs-primary); }

@media (max-width: 768px) {
    .frm-purchases-page .inv-grid-card > .pur-tabs-head.fs-ptabs-head {
        padding: 8px 0 !important;
        border-bottom: 0 !important;
        background: transparent !important;
    }
    .frm-purchases-page .fs-ptabs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
        padding: 0;
        background: transparent;
    }
    .frm-purchases-page .fs-ptab {
        position: relative;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        height: auto;
        min-height: 64px;
        padding: 10px 4px;
        border: 1px solid var(--fs-tint-5);
        border-radius: 12px;
        background: var(--fs-tint-2);
        font-size: 14px;
    }
    .frm-purchases-page .fs-ptab .ti { font-size: 22px; }
    .frm-purchases-page .fs-ptab.is-on { border-color: var(--fs-primary); }
    .frm-purchases-page .fs-ptab-n { position: absolute; top: 6px; left: 8px; }
}

/* (2026-11-18 قرار المالك) جوال — خانة «الضريبة» (وتحديث سعر البيع / الخصم على سعر البيع) فى رأس فاتورة المشتريات:
   كانت كارت عريض لوحده ارتفاعه 64 ← سطر رفيع فيه شرايح صغيرة (حوالى 38) — نفس المكان ، والديسكتوب ماتغيّرش */
@media (max-width: 768px) {
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-vat {
        min-height: 0 !important;
        height: auto !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-vat .pur-vat-options {
        min-height: 0 !important;
        height: auto !important;
        padding: 0 !important;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
    html body #invForm .inv-form-body.fs-hdr-pur .hdr-vat .inv-vat-row {
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 12px !important;
        gap: 6px;
        border: 1px solid var(--fs-tint-5) !important;
        border-radius: 999px !important;
        background: var(--fs-tint-2) !important;
        color: var(--fs-primary-ink);
        font-size: 13px;
        font-weight: 700;
    }
}

/* (2026-11-18 قرار المالك) جوال — إحصائيات الصنف فى فاتورة المشتريات:
   الشريط اللى تحت الصافى (كان بيتسحب بالعرض ومقطوع) مستخبى ، والإحصائيات بتظهر فى نافذة الصنف (fs-msheet-stats) شبكة عمودين */
.fs-msheet-stats { display: none; }
@media (max-width: 768px) {
    html body .frm-purchases-page .inv-footer-bottom .inv-stats { display: none !important; }
    html body .frm-purchases-page .fs-msheet-stats { display: block; margin: 4px 0 10px; }
    html body .frm-purchases-page .fs-msheet-stats .inv-invbar2 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }
    html body .frm-purchases-page .fs-msheet-stats .inv-invbar2-lbl,
    html body .frm-purchases-page .fs-msheet-stats .inv-chip-sep { display: none !important; }
    html body .frm-purchases-page .fs-msheet-stats .inv-chip {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        min-width: 0;
        height: auto !important;
        padding: 8px 10px !important;
        border-radius: 10px !important;
        background: var(--fs-tint-1) !important;
        border: 1px solid var(--fs-tint-5) !important;
        white-space: nowrap;
    }
    html body .frm-purchases-page .fs-msheet-stats .inv-chip .k { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    html body .frm-purchases-page .fs-msheet-stats .inv-chip .v { font-weight: 700; font-variant-numeric: tabular-nums; }
}

/* (2026-11-18 قرار المالك) ديسكتوب — رأس فاتورة المشتريات: «نوع الفاتورة» كان عموده 87px فالكلمة بتتقطع («نق…») واسمه بيدخل فى اسم الخانة اللى جنبه
   ← عمودين بدل واحد ، و«مركز التكلفة» عمودين بدل 3 عشان عرض الصف يفضل زى ما هو (شبكة 16 عمود — FrmPurchases.razor.css) */
@media (min-width: 1251px) {
    html body .frm-purchases-page #invForm .inv-row .hdr-type { grid-column: span 2 !important; }
    html body .frm-purchases-page #invForm .inv-row .hdr-cost { grid-column: span 2 !important; }
}

/* (2026-11-18 قرار المالك) شريط القيد المرفق: نفس زراير شريط الأصناف (inv-tb) ، والإجماليات (مدين/دائن/الفرق/متزن) على الشمال */
html body .frm-purchases-page .pur-journal-toolbar.fs-pj-tb {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border-top: 0 !important;
}
html body .frm-purchases-page .pur-journal-toolbar.fs-pj-tb .inv-gtb-actions { display: flex; gap: 6px; align-items: center; }
html body .frm-purchases-page .pur-journal-toolbar.fs-pj-tb .pur-journal-summary-inline { margin-inline-start: auto; }

/* (2026-11-18) جدول فاضى (لا توجد بيانات): الجريد بيحط علامة «الصف الحالى» (خط أزرق 4px) على خانة الرسالة نفسها فبتبان خط على طول الشاشة
   ← العلامة بتتشال من خانة الرسالة بس ، والأسطر الحقيقية بتفضل بعلامتها — مرتجع المشتريات (frm-pret-page) */
html body .frm-pret-page .dxbl-grid .dxbl-grid-empty-data-area { box-shadow: none !important; }

/* ══ (2026-11-20) «استيراد أصناف من Excel» فى المبيعات — FrmOrders.ExcelImport (fs-xli) ══ */
.fs-xli-shade { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1050; }
.fs-xli {
    position: fixed; z-index: 1051; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
    background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
    padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.fs-xli-h { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--fs-primary-deep); }
.fs-xli-h > i { font-size: 22px; color: var(--fs-primary); }
.fs-xli-x { margin-inline-start: auto; border: 0; background: transparent; font-size: 18px; color: #6B8A91; cursor: pointer; }   /* رمادى مزرق (نفس fs-disc-hint) — tint-5 كان باهت مش باين */
.fs-xli-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: #6B8A91; }
.fs-xli-link { border: 0; background: transparent; color: var(--fs-primary); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.fs-xli-file {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 64px; border: 2px dashed var(--fs-primary); border-radius: 12px;
    color: var(--fs-primary-deep); background: var(--fs-tint-1); cursor: pointer; padding: 8px 12px; text-align: center;
}
.fs-xli-file.has-file { border-style: solid; }
.fs-xli-file > i { font-size: 22px; }
.fs-xli-file > span { color: inherit; }   /* قاعدة عامة للـ label span كانت بتلوّن الكلام أحمر — يرث لون الخانة */
.fs-xli-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fs-xli-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fs-xli-mode button {
    border: 1px solid var(--fs-tint-2); background: #fff; border-radius: 10px; padding: 9px 8px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: #6B8A91;   /* الزرار اللى مش مختار — مقروء بس أهدى من المختار */
}
.fs-xli-mode button.is-on { border-color: var(--fs-primary); color: var(--fs-primary-deep); background: var(--fs-tint-1); font-weight: 600; }
.fs-xli-rep { border: 1px solid var(--fs-tint-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; max-height: 220px; overflow: auto; }
.fs-xli-rep ul { margin: 6px 0 0; padding-inline-start: 18px; }
.fs-xli-rep li { margin: 2px 0; }
.fs-xli-acts { display: flex; gap: 8px; }
.fs-xli-go {
    flex: 1; border: 0; border-radius: 10px; padding: 10px; background: var(--fs-action); color: #fff; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.fs-xli-go:disabled { opacity: .5; cursor: default; }
.fs-xli-cancel { border: 1px solid var(--fs-tint-2); background: #fff; border-radius: 10px; padding: 10px 16px; cursor: pointer; }

/* ══════════════════════════════════════════════════════════════════════
   (2026-11-21 طلب المالك) فاتورة المبيعات: الجدول ياخد مساحة أكبر
   «الجرد ارتفاعها قليل بتظهر 5 صفوف بس» ← سطر أقل فوق الجدول + فوتر أقصر
   ══════════════════════════════════════════════════════════════════════ */

/* 1) أرصدة العميل جوه شريط الباركود (الديسكتوب الواسع بس) — FrmOrders.razor: BalancesStrip
      inv-bals-row = الصف القديم (جوال / شاشة أضيق من 1200 / وضع «سلة») ، inv-bals-gtb = جوه الشريط */
html body .inv-bals.inv-bals-gtb { display: none !important; }                                   /* الافتراضى: مستخبى */
@media (min-width: 1200px) {
    html body .inv-page .inv-bals.inv-bals-row { display: none !important; }                     /* الصف القديم اتشال ← الجدول ياخد مكانه */
    html body .inv-page:has(.inv-main.is-cart) .inv-bals.inv-bals-row { display: flex !important; }   /* «سلة»: اللوحة الجانبية ضيقة ← الصف القديم يرجع */
    html body .inv-gtb > .inv-bals.inv-bals-gtb {
        display: flex !important;                                                                 /* يمين الشريط */
        flex: 0 0 auto;
        flex-wrap: nowrap;
        padding: 0;
        min-height: 0;
        gap: 6px;
    }
    html body .inv-main.is-cart .inv-gtb > .inv-bals.inv-bals-gtb { display: none !important; }  /* «سلة»: مش جوه الشريط */
    html body .inv-gtb > .inv-bals-gtb .inv-bal { box-shadow: none; padding: 2px 10px; }          /* شارة أهدى جوه الشريط */
    /* الباركود فى النص بين الأرصدة والأزرار */
    html body .inv-gtb:has(> .inv-bals-gtb) > .inv-bc-wrap {
        flex: 1 1 auto !important;
        max-width: 640px !important;
        margin-inline: auto !important;
    }
}

/* 2) فوتر الإجماليات أقصر (الديسكتوب) — الخانات كانت عالية من غير داعى */
@media (min-width: 769px) {
    html body .inv-footer-right > .inv-tot-cell { min-height: 0; padding: 4px 10px; }           /* كانت 62px و 8px */
    html body .inv-footer-left { padding-top: 6px; padding-bottom: 6px; }                       /* الأزرار */
    html body .inv-tot-cell.tc-net { margin-top: 4px; margin-bottom: 4px; padding-top: 4px; padding-bottom: 4px; }   /* كارت الصافى */
    html body .inv-tot-cell .inv-tot-lbl { margin-bottom: 2px; }
}

/* 3) «تغيير الصافى» تحت رقم الصافى (كان تحت الخصم) — لون فاتح على كارت الصافى */
.fs-netp-link.fs-netp-net {
    flex-basis: auto;
    align-self: center;
    justify-content: center;
    margin-top: 2px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .88) !important;
    text-decoration-color: rgba(255, 255, 255, .6);
}
.fs-netp-link.fs-netp-net:hover { color: #fff !important; }
.fs-netp-link.fs-netp-net i { color: inherit; }
/* «سلة» الديسكتوب: كارت الصافى بخلفية فاتحة ← اللينك بلون الثيم */
/* (2026-11-22) «سلة»: كارت الصافى غامق — اللينك أبيض تحت شارة الربح (العمود الشمال) ، والكارت يطول على قده بدل ما اللينك يخرج منه */
html body .inv-main.is-cart .inv-tot-cell.tc-net { height: auto !important; flex: 0 0 auto !important; }   /* flex:1.25 1 0 بتاع الجدول كان بيثبّت ارتفاعه */
html body .inv-main.is-cart .fs-netp-link.fs-netp-net {
    grid-column: 2; grid-row: 3; justify-self: center; align-self: center;
    margin: 0; color: rgba(255, 255, 255, .9) !important; text-decoration-color: rgba(255, 255, 255, .6);
}
html body .inv-main.is-cart .inv-tot-cell.tc-net:not(:has(.inv-net-prof)) .fs-netp-link.fs-netp-net { grid-column: 1; }   /* من غير الربح: تحت الرقم */

/* (2026-11-21) تقصير أكتر: «عندك كوبون؟» جنب خانة الخصم بدل تحتها ، و«تغيير الصافى» فى ركن كارت الصافى (مش سطر زيادة) */
@media (min-width: 769px) {
    html body .inv-main:not(.is-cart) .inv-footer-right > .inv-tot-cell.tc-disc {
        flex-direction: row;                       /* العنوان سطر ، والخانة + الكوبون جنب بعض تحته */
        flex-wrap: wrap;
        align-content: center;
        justify-content: center;
        column-gap: 10px;
    }
    html body .inv-main:not(.is-cart) .inv-footer-right > .tc-disc > .inv-tot-lbl { flex-basis: 100%; text-align: center; }
    html body .inv-main:not(.is-cart) .inv-footer-right > .tc-disc > .fs-disc { width: auto; flex: 0 1 190px; }
    html body .inv-main:not(.is-cart) .inv-footer-right > .tc-disc > .fs-coupon { width: auto; flex: 0 0 auto; }
    html body .inv-main:not(.is-cart) .inv-tot-cell.tc-net { position: relative; }   /* عشان اللينك يتثبّت فى الركن */
    html body .inv-main:not(.is-cart) .fs-netp-link.fs-netp-net {
        position: absolute;
        top: 5px;
        inset-inline-end: 10px;                    /* الركن اللى قصاد العنوان */
        margin: 0;
        font-size: 11px;
    }
}@media (min-width: 769px) {
    /* لو «تغيير الصافى» ظاهر: العنوان والرقم يمين الكارت ، واللينك شمال فى النص — مايتداخلوش مهما كبر الرقم */
    html body .inv-main:not(.is-cart) .inv-tot-cell.tc-net:has(.fs-netp-net) { align-items: flex-start; padding-inline: 16px 10px; }
    html body .inv-main:not(.is-cart) .fs-netp-link.fs-netp-net { top: 50%; transform: translateY(-50%); line-height: 1.2; }
}@media (min-width: 769px) {
    /* خانة الخصم: شبكة (مش flex-wrap) — على 1366 الخانة كانت بتنزّل «عندك كوبون؟» سطر تانى ؛ دلوقتى خانة الخصم هى اللى بتصغر */
    html body .inv-main:not(.is-cart) .inv-footer-right > .inv-tot-cell.tc-disc {
        display: grid;
        grid-template-columns: minmax(0, 190px) auto;
        justify-content: center;
        align-items: center;
    }
    html body .inv-main:not(.is-cart) .inv-footer-right > .tc-disc > .inv-tot-lbl { grid-column: 1 / -1; }
    html body .inv-main:not(.is-cart) .inv-footer-right > .tc-disc > .fs-disc { width: 100%; min-width: 0; }
    html body .inv-main:not(.is-cart) .inv-footer-right > .tc-disc > .fs-disc .fs-disc-box { max-width: none; }
}
/* (2026-11-21 طلب المالك) المشتريات: أرصدة المورد شمال صف التبويبات «الأصناف / القيد المرفق» (FrmPurchases.razor: SupplierBalances)
   نفس فكرة المبيعات — inv-bals-row (فوق الجدول) بيستخبى على الديسكتوب الواسع بالقاعدة اللى فوق ، وده بيظهر مكانه */
html body .inv-bals.inv-bals-tabs { display: none !important; }
@media (min-width: 1200px) {
    html body .pur-tabs-head > .inv-bals.inv-bals-tabs {
        display: flex !important;
        flex: 0 1 auto;
        flex-wrap: nowrap;
        margin-inline-start: auto;                 /* شمال الصف (التبويبات يمين) */
        padding: 0;
        min-height: 0;
        gap: 6px;
        overflow: hidden;
    }
    html body .inv-main.is-cart .pur-tabs-head > .inv-bals.inv-bals-tabs { display: none !important; }   /* «سلة»: الصف القديم بيرجع */
    html body .pur-tabs-head > .inv-bals-tabs .inv-bal { box-shadow: none; padding: 2px 10px; }
    html body .frm-purchases-page .inv-grid-card > .pur-tabs-head.fs-ptabs-head { display: flex !important; gap: 8px; }
}
/* (2026-11-21 طلب المالك) مرتجع المبيعات (كلاسات rinv): نفس فكرة المبيعات — أرصدة العميل جوه شريط الأوامر على الديسكتوب الواسع */
html body .rinv-bals.inv-bals-gtb { display: none !important; }
@media (min-width: 1200px) {
    html body .rinv-page .rinv-bals.inv-bals-row,
    html body .inv-page .rinv-bals.inv-bals-row { display: none !important; }                    /* الصف القديم اتشال */
    html body :is(.rinv-page, .inv-page):has(.inv-main.is-cart) .rinv-bals.inv-bals-row { display: flex !important; }   /* «سلة» */
    html body .rinv-gtb > .rinv-bals.inv-bals-gtb {
        display: flex !important;
        flex: 0 1 auto;
        flex-wrap: nowrap;
        padding: 0;
        min-height: 0;
        gap: 6px;
        margin-inline-end: auto;                   /* الأرصدة يمين والأزرار تتزق شمال */
        overflow: hidden;
    }
    html body .inv-main.is-cart .rinv-gtb > .rinv-bals.inv-bals-gtb { display: none !important; }
    html body .rinv-gtb > .inv-bals-gtb .rinv-bal { box-shadow: none; padding: 2px 10px; }
}
/* (2026-11-21 طلب المالك: مساحة أكبر للجدول) مرتجع المشتريات وسند الإخراج: صف التبويبات فيه تبويب واحد بس («الأصناف»)
   ← على الديسكتوب بيتشال (سطر كامل من غير فايدة ، والعدد ظاهر فى عمود # فى الجدول). الجوال زى ما هو (مربع التبويب المعتمد) */
@media (min-width: 769px) {
    html body :is(.frm-pret-page, .frm-ev-page) .inv-grid-card > .pur-tabs-head.fs-ptabs-head { display: none !important; }
}
/* (2026-11-21) فوتر مرتجع المبيعات أقصر — نفس تقصير المبيعات (كلاساته rinv) */
@media (min-width: 769px) {
    html body .rinv-footer-right > .rinv-tot-cell { min-height: 0; padding: 4px 10px; }           /* كانت 62px و 8px */
    html body .rinv-footer-left { padding-top: 6px; padding-bottom: 6px; }
    html body .rinv-tot-cell.tc-netret { margin-top: 4px; margin-bottom: 4px; padding-top: 4px; padding-bottom: 4px; }
    html body .rinv-tot-cell .rinv-tot-lbl { margin-bottom: 2px; }
}
/* (2026-11-22 المالك: «لون تغيير الصافى مش ظاهر مع لون الخلفية») — شارة فاتحة على كارت الصافى الغامق زى شارة «الربح»:
   خلفية بيضا شفافة + كلام أبيض تقيل ، من غير الخط المنقّط (فى الجدول والسلة) */
html body .fs-netp-link.fs-netp-net {
    padding: 3px 10px !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16) !important;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1.2;
    white-space: nowrap;
}
html body .fs-netp-link.fs-netp-net:hover { background: rgba(255, 255, 255, .28) !important; }
/* (2026-11-22 المالك: صورة خانة الخصم فوق «المجموع») — لما يكون فيه خصم بيظهر تحت الخانة «= 5.00%» (fs-disc-hint)
   فالخانة بتبقى 55px جوه صف ارتفاعه 40px فى «سلة» ← بتطلع فوق «المجموع» وتحت على «خصم نقاطى» (وفى الجدول بتطوّل الفوتر)
   الحل: النسبة جنب الخانة مش تحتها (الجدول والسلة) + صفوف «سلة» على قد محتواها */
@media (min-width: 769px) {
    html body :is(.inv-footer-right, .rinv-footer-right) .tc-disc .fs-disc { flex-direction: row; align-items: center; gap: 6px; }
    html body :is(.inv-footer-right, .rinv-footer-right) .tc-disc .fs-disc-hint { white-space: nowrap; flex: 0 0 auto; margin: 0; }
    html body :is(.inv-footer-right, .rinv-footer-right) .tc-disc .fs-disc-box { min-width: 0; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) > :is(.inv-tot-cell, .rinv-tot-cell) { flex: 0 0 auto !important; }   /* flex:1 1 0 كان بيثبّت ارتفاع الصف */
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) .tc-disc .fs-disc { max-width: 240px; }
}
/* (2026-11-22 المالك: صورة «...0») — لما الكوبون يتطبّق (شارة «gg · خصم 50.00 ×») أو خانة كتابته مفتوحة ، الشارة عريضة
   فخانة الخصم كانت بتضيق لحد ما الرقم يتقطّع ← الكوبون ينزل سطر لوحده تحت الخصم ، وخانة الخصم تفضل بعرضها */
@media (min-width: 769px) {
    /* «سلة»: الصف يلف ، والكوبون سطر كامل على الشمال */
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) > .tc-disc:has(.fs-coupon-chip, .fs-coupon-form) { flex-wrap: wrap !important; row-gap: 6px; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) > .tc-disc:has(.fs-coupon-chip, .fs-coupon-form) > .fs-coupon { flex: 1 1 100%; justify-content: flex-end; }
    html body .inv-main.is-cart :is(.inv-footer-right, .rinv-footer-right) .tc-disc .fs-disc-box { min-width: 120px; }
    /* الجدول: عمود واحد ، والكوبون تحت خانة الخصم */
    html body .inv-main:not(.is-cart) .inv-footer-right > .inv-tot-cell.tc-disc:has(.fs-coupon-chip, .fs-coupon-form) { grid-template-columns: minmax(0, 220px); row-gap: 4px; }
    html body .inv-main:not(.is-cart) .inv-footer-right > .tc-disc:has(.fs-coupon-chip, .fs-coupon-form) > .fs-coupon { justify-content: center; }
}
/* (2026-11-22 المالك — سامسونج A55: «رسائل غريبة من الأسفل وأنا بضيف الأصناف»)
   الضغط السريع/المطوّل على كارت الصنف كان بيحدد اسم الصنف كنص ← أندرويد يطلّع Copy / Translate / بحث جوجل من تحت
   الحل: كروت الأصناف وأزرارها مابتتحددش كنص ، ومن غير زووم الضغطتين (touch-action) — الخانات (input) زى ما هى */
.pos-products-section .products-layout,
.pos-products-section .prods-grid,
.prod-card,
.fs-mcards,
.pos-msum,
.fs-xbar {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;              /* قايمة الضغط المطوّل فى أندرويد/آيفون */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;               /* الضغطتين مايعملوش زووم ولا تحديد */
}
:is(.pos-products-section .products-layout, .prod-card, .fs-mcards, .pos-msum) :is(input, textarea, [contenteditable="true"]) {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}
/* (2026-11-22) اسم الوحدة جنب سعر كارت الصنف فى الكاشير («175.00 / كرتون») — FrmPOS.CardPrices */
.prod-card .prod-price .prod-unit {
    margin-inline-start: 4px;
    font-size: .78em;
    font-weight: 600;
    color: #6B8A91;
}
/* (2026-11-22 مراجعة الموقع الفعلى) سلة الكاشير على الموبايل: زرار «حفظ/دفع · المبلغ» كان 115px بس فالكلام بيتقسّم 3 سطور
   ← الزراير الجانبية (جديد / خيارات) على قد كلامها ، «المزيد» مربع صغير ، وزرار الحفظ ياخد الباقى وسطر واحد */
@media (max-width: 767.98px) {
    html body .pos-mcart-ft { flex-wrap: nowrap; }                                   /* الزراير كلها فى سطر واحد */
    html body .pos-mcart-ft .pos-mbtn-g { flex: 0 1 auto; padding: 0 12px; }       /* جديد / خيارات: عرض كلامها بس (وتصغر لو المبلغ كبير) */
    html body .pos-mcart-ft .pos-mbtn-more { flex: 0 0 44px; padding: 0; }          /* «المزيد» (...): مربع */
    html body .pos-mcart-ft .pos-mbtn-a { flex: 1 1 auto; min-width: 0; white-space: nowrap; }   /* الحفظ: الباقى كله ومن غير لف */
    html body .pos-mcart-ft .pos-mbtn-a .pos-kbd { display: none; }                  /* F9 مالوش لازمة على الموبايل */
}

/* (2026-11-22 مراجعة الموقع الفعلى) خانة الخصم فى إجماليات الموبايل (المبيعات / عرض السعر / المشتريات / الكاشير العريض):
   الكوبون (FsCouponBox) واخد flex-basis:100% علشان ينزل سطر لوحده فى الصفوف ، لكن الخانة هنا عمود ← بقى 100% من الطول
   فكلمة «الخصم» اتزقّت لفوق واستخبت تحت خانة المبلغ. ← فى العمود ياخد طوله الطبيعى بس */
html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell) .fs-coupon { flex-basis: auto; }

/* (2026-11-22 مراجعة الموقع الفعلى) شريط الأرصدة على الموبايل (رصيد العميل/المورد ، الحد الإئتمانى ، الرصيد المتبقى):
   كان سطر واحد بسكرول مستخبى (invoice.css) ← آخر شارة بتتقطع على الشمال ومحدش يعرف إنها بتتسحب.
   ← الشارات تنزل سطر تانى فى النص لما ماتكفيش ، وكلها باينة */
@media (max-width: 767.98px) {
    html body .inv-bals.inv-bals-row,
    html body .rinv-bals { flex-wrap: wrap !important; justify-content: center; overflow-x: visible !important; row-gap: 6px !important; }
}

/* (2026-11-22 مراجعة الموقع الفعلى) مرتجع المبيعات على الموبايل:
   1) «اسم العميل» كان واخد نص العرض والنص التانى فاضى ← ياخد السطر كله زى المبيعات
   2) شريط الأوامر (rinv-gtb) كل اللى جواه مستخبى على الموبايل ← كان بيبان خط فاضى تحت الأرصدة ← يستخبى */
@media (max-width: 767.98px) {
    html body .rinv-form-body .rinv-cell.rinv-cell--ret-cust { grid-column: 1 / -1 !important; }
    html body .rinv-page .rinv-gtb { display: none !important; }
}

/* (2026-11-22 مراجعة الموقع الفعلى) تبويبات الأسعار على الموبايل: عرض السعر فيه 4 (سعر1/2/3 + سعر التكلفة)
   فالشريط كان أعرض من الشاشة و«سعر التكلفة» متقطع ← التبويبات تتقسم العرض بالتساوى */
@media (max-width: 767.98px) {
    html body .price-seg { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
    html body .price-seg .price-seg-btn { flex: 1 1 0 !important; min-width: 0 !important; padding-inline: 4px !important; gap: 3px !important; white-space: nowrap; }
}

/* (2026-11-22 تجربة المالك: مبالغ فوق 30,000) الكاشير على الموبايل:
   1) زرار «دفع/حفظ · المبلغ» فى السلة: 180,074.99 كان بيتقص من الشمال ← سطرين: الكلمة صغيرة فوق والمبلغ كامل تحتها
      (الكلمة والمبلغ فى عناصر منفصلة فى FrmPOS.razor — pos-dpay-txt ، والديسكتوب زى ما هو بالنقطة)
   2) شريط العميل/النوع/التاريخ/تفاصيل فوق الأصناف كان أعرض من الشاشة و«تفاصيل» متقصوصة
      ← اسم العميل بس هو اللى يصغر بـ «...» والباقى ثابت */
@media (max-width: 767.98px) {
    html body .pos-mcart-ft .pos-dpay > i { display: none; }                                   /* الأيقونة بتاخد مكان المبلغ */
    html body .pos-mcart-ft .pos-dpay-txt { display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-width: 0; }
    html body .pos-mcart-ft .pos-dpay-sep { display: none; }                                    /* النقطة مالهاش لازمة فى سطرين */
    html body .pos-mcart-ft .pos-dpay-lbl { font-size: 12px; font-weight: 700; opacity: .9; }  /* «دفع» / «حفظ» */
    html body .pos-mcart-ft .pos-dpay-amt { font-size: 16px; font-weight: 800; }               /* المبلغ */
    html body .pos-mhead > .pos-mchip { flex: 0 0 auto; }
    html body .pos-mhead > .pos-mchip.is-p { flex: 0 1 auto; min-width: 0; overflow: hidden; }
    html body .pos-mhead > .pos-mchip.is-p > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* (2026-11-22 مراجعة بعد النشر) شريط العميل فى الكاشير: بعد تصليح «تفاصيل» اسم العميل اتقص لـ «عمى...»
   السبب: mobile-ui-pack.css بيدى كل الزراير padding 14px بـ !important (محدّد بـ 7 كلاسات) ← الشارات أعرض من اللازم
   ← الشارات مسافتها 9px والفراغ بينها 4px ، فالأربعة يكفّوا الشاشة واسم العميل يبان كامل (الكلاس متكرر عشان يغلب المحدّد ده) */
@media (max-width: 767.98px) {
    html body .pos-container .pos-mhead { gap: 4px; padding-inline: 8px; }
    html body .pos-container .pos-mhead > .pos-mchip { padding-inline: 8px !important; gap: 4px; }
    html body .pos-container .pos-mhead > button.pos-mchip.pos-mchip.pos-mchip.pos-mchip.pos-mchip.pos-mchip { padding: 6px 9px !important; }
}

/* (2026-11-22 مراجعة بعد النشر) خانة الخصم فى إجماليات الموبايل لما يكون فيه صنف: «عندك كوبون؟» + «تغيير الصافى» (كل واحد 42px من mobile-ui-pack)
   ← الخانة عمود بارتفاع ثابت فكلمة «الخصم» كانت بتنكمش لـ 6px وتستخبى ← محدش من العناصر ينكمش ، والخانة تطول على قد المحتوى */
@media (max-width: 767.98px) {
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell).mob-disc-cell > * { flex-shrink: 0; }
    /* (2026-11-24 المالك: «الخصم على الجوال ظاهر بالطريقة دى») «تغيير الصافى» عنده flex-basis:100% (سطر 1411 للديسكتوب)
       ← جوه الخانة العمود دى معناها 100% من ارتفاعها (154px) فالمحتوى بيطلع برّه والخصم من فوق بيتقص ← ارتفاعه على قد محتواه */
    html body :is(.inv-mob-tot-cell, .rinv-mob-tot-cell).mob-disc-cell > .fs-netp-link { flex-basis: auto; }
}

/* (2026-11-23 المالك — بند 1) اسم وحدة السعر فى نتايج «إضافة صنف» على الموبايل — زى «/ كرتون» على كارت الكاشير */
html body .fs-msr-pr .fs-msr-unit { margin-inline-start: 3px; font-size: .72em; font-weight: 600; color: #6B8A91; white-space: nowrap; }

/* (2026-11-23 تحسين 5) شريط معلومات الصنف على الموبايل (ItemsStatistics: الكمية/الأسعار/التكلفة) بيتسحب بالعرض
   وآخره كان مقطوع على الشمال من غير ما يبان إنه بيتسحب ← ظل خفيف على الطرف الشمال يوضّح إن فيه باقى */
@media (max-width: 767.98px) {
    html body .inv-invbar2 {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30px);
        mask-image: linear-gradient(to right, transparent 0, #000 30px);
        padding-left: 18px !important;
    }
}

/* (2026-11-23 تحسين 10) شريط أرصدة المورد فى مرتجع المشتريات: الصف inv-bals-row بيستخبى على الديسكتوب الواسع (≥1200)
   لأن فى المشتريات بيتنقل جنب التبويبات — المرتجع مالوش صف تبويبات على الديسكتوب ← الصف يفضل ظاهر */
html body .frm-pret-page .inv-bals.inv-bals-row.pret-bals { display: flex !important; }

/* (2026-11-24 مراجعة المالك — بند 7) فوتر الجدول على شاشة 1366: خانة خصم الإجمالى كانت بتضيق لـ 33px لما «= 8.57%» يظهر جنبها
   فرقم الخصم بيتقص («0.») ← النسبة جنب الخانة بتستخبى على الشاشات دى (بتظهر بالماوس: title فى FsDiscountBox) ، والخانة أقل عرض 120px
   (الموبايل و«سلة» وشاشات 1600+ زى ما هم) */
@media (min-width: 769px) and (max-width: 1599.98px) {
    html body :is(.inv-main, .rinv-main):not(.is-cart) :is(.inv-footer-right, .rinv-footer-right) > .tc-disc .fs-disc-hint { display: none; }
    html body :is(.inv-main, .rinv-main):not(.is-cart) :is(.inv-footer-right, .rinv-footer-right) > .tc-disc > .fs-disc .fs-disc-box { min-width: 120px; }
}
/* (2026-11-24 مراجعة المالك — بند 6) الكمية فى كارت الصنف بقت بتفتح نافذة السطر — شكل الضغط */
html body .fs-mc-step .fs-mc-qty { cursor: pointer; }

/* (2026-11-24 طلب المالك) «نوع الطلب» فى الكاشير: على الموبايل بيتحط جنب التاريخ (كان مكان فاضى) بدل سطر لوحده تحت
   ▸ الخانة مترسومة مرتين فى FrmPOS.razor (orderTypeCell): pos-ot-a فى صف التاريخ ، pos-ot-b مكانها القديم
   ▸ الديسكتوب صفه الأول 6 أعمدة ثابتة فبيفضل على pos-ot-b */
html body .pos-container .pos-ot-a { display: none !important; }
@media (max-width: 768px) {
    html body .pos-container .pos-ot-a { display: flex !important; flex-direction: column; }
    html body .pos-container .pos-ot-b { display: none !important; }
}

/* (2026-11-24 طلب المالك) مرتجع المبيعات: «فيزا» جنب عنوان «نوع الفاتورة» على الموبايل بدل سطر كامل لوحدها
   ▸ FrmOrdersReturn.razor: .ret-visa-tog جوه العنوان (موبايل بس) ، والمكان القديم .rinv-cell--ret-extra (ديسكتوب بس) */
html body .ret-visa-tog { display: none; }
@media (max-width: 768px) {
    html body .rinv-lbl.ret-type-lbl { display: flex !important; align-items: center; justify-content: space-between; gap: 6px; overflow: visible !important; }
    html body .ret-visa-tog { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 11.5px; font-weight: 700; cursor: default; }
    html body .rinv-cell-extra.rinv-cell--ret-extra { display: none !important; }
}

/* (2026-11-24 طلب المالك) دفعة صلاحيتها منتهية فى الكاشير والمبيعات ← الصف أحمر فاتح (زى الوندوز FrmCashierWithoutGroupsByPatch) — تنبيه بس والحفظ بيكمل
   ▸ الجدول: Grid_CustomizeElement بيحط fs-row-expired على خلايا الصف ، الكروت (موبايل/السلة): is-expired على .fs-mc — الشرط فى BatchRules.IsExpired */
html body td.fs-row-expired, html body .dxbl-grid td.fs-row-expired { background: #FDE2E2 !important; }
html body .fs-mc.is-expired { border-color: #E57373 !important; background: #FFF5F5 !important; box-shadow: inset 4px 0 0 #D32F2F; }
html body .fs-mc.is-expired .fs-mc-tag.t-batch { background: #FDE2E2 !important; color: #B71C1C !important; border-color: #F5B5B5 !important; }

/* (2026-11-24 مراجعة المالك) فاتورة الشراء على الديسكتوب: خانة الخيارات (خصم البيع / تحديث سعر البيع + الضريبة) ضيقة
   ← الاتنين جنب بعض كانوا بيطلعوا برّه الشاشة (الضريبة كانت مش ظاهرة خالص على 1366) — دلوقتى تحت بعض جوه نفس الخانة */
@media (min-width: 769px) {
    html body .frm-purchases-page #invForm .hdr-vat .pur-vat-options {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 2px !important;
    }
    html body .frm-purchases-page #invForm .hdr-vat .pur-vat-options .inv-vat-row { white-space: nowrap; }
}

/* (2026-11-25) زرار المساعد الذكى (rpt-ai-btn فى 19 شاشة) مخفى لحد ما بوابة الذكاء الاصطناعى (AiGate فى MainLayout) تسمح:
   الإعدادات شغّالة + المساعد مفتوح + مجموعة المستخدم مسموح لها ← الكلاس fs-ai-assist على <html> */
html:not(.fs-ai-assist) .rpt-ai-btn { display: none !important; }

/* (2026-11-25) زرار «اشرح الشاشة» فى الهيدر — ظاهر بس لو AiGate حط fs-ai-explain على <html> */
html:not(.fs-ai-explain) .fs-ai-explain-only { display: none !important; }
.fs-aix i { color: var(--fs-action); }                         /* علامة الذكاء بالكهرمانى */
.fs-aix-item i { color: var(--fs-action); margin-inline-end: 6px; font-size: 17px; vertical-align: -2px; }  /* بند القايمة على الموبيل */
@media (max-width: 991.96px) {
    .fs-aix-li { display: none !important; }                    /* زرار الهيدر للكمبيوتر بس — الموبيل من قايمة النقط التلاتة */
}