/* ══════════════════════════════════════════════════════════════════════
   fs-form.css — شاشات الإدخال: قيد اليومية، إيصال القبض، سند الصرف، الاستقبال من فرع
   كل حاجة تحت .fs-form-page ، والموبيل (≤768px) بيستخدم :not(#_) لما يقابل
   قاعدة الأزرار العامة فى mobile-ui-pack.css
   ══════════════════════════════════════════════════════════════════════ */

html body .fs-form-page { --fsf-ink: #0B2A33; --fsf-ink2: #3F5C64; --fsf-mute: #6A838A; --fsf-line: #DCE6E9; --fsf-line2: #EBF1F3; --fsf-ok: #137A3F; --fsf-ok-t: #E3F5E9; --fsf-bad: #B42318; --fsf-bad-t: #FDE3DE; --fsf-gold: #FFD27A; --fsf-dark: color-mix(in srgb, var(--fs-primary) 70%, #000); }
html body .fs-form-page bdi { unicode-bidi: isolate; }
html body .fs-kbd { font: inherit; font-size: 11px; font-weight: 800; line-height: 1.5; padding: 0 5px; margin-inline-start: 2px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 5px; background: transparent; color: inherit; box-shadow: none; }
html body .fs-form-page .fs-only-m { display: none !important; }

/* ══ الجدول الهادى (ديسكتوب): نفس قيم fs-list.css — (2026-11-20) ماعدا fs-like-sales (القيد والاستقبال) = جدول المبيعات ══ */
@media (min-width: 769px) {
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-card { border: 1px solid var(--fsf-line) !important; border-radius: 14px !important; box-shadow: none !important; background: #fff !important; overflow: hidden; }
    html body .fs-form-page:not(.fs-like-sales) .inv-gtb { min-height: 52px; padding: 8px 12px !important; background: #fff !important; border: 0 !important; border-bottom: 1px solid var(--fsf-line2) !important; }
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid { border: 0 !important; }
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid tr.dxbl-grid-header-row { background: transparent !important; height: auto !important; }
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid .dxbl-grid-header-row > th,
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid .dxbl-grid-header-row > td { background: #fff !important; color: #5A747B !important; font-size: 12.5px !important; font-weight: 800 !important; border-inline: 0 !important; border-top: 0 !important; border-bottom: 2px solid var(--fsf-line) !important; height: 38px !important; padding-block: 0 !important; }
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid tr[data-visible-index] > td { border-inline: 0 !important; border-top: 0 !important; border-bottom: 1px solid var(--fsf-line2) !important; font-size: 14px !important; color: var(--fsf-ink) !important; height: 46px !important; padding-block: 2px !important; }
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid tr[data-visible-index]:hover > td { background: #F4F9FA !important; }
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid tr.dxbl-grid-focused-row > td,
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid tr.dxbl-grid-selected-row > td { background: var(--fs-tint-1) !important; color: var(--fsf-ink) !important; }
    html body .fs-form-page:not(.fs-like-sales) .inv-grid-body .dxbl-grid .dxbl-grid-footer-row td { background: #F6F9FA !important; border-inline: 0 !important; font-weight: 800 !important; color: var(--fsf-ink) !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   قيد اليومية (AddAccountingTran)
   ══════════════════════════════════════════════════════════════════════ */
.fs-tr-chips, .fs-tr-strip { display: none; }

@media (min-width: 769px) {
    html body .fs-tran.fs-form-page { padding: 10px 14px !important; gap: 10px !important; background: #EEF2F4 !important; }

    /* كارت الرأس */
    html body .fs-tran .inv-form { border: 1px solid var(--fsf-line) !important; border-radius: 14px !important; box-shadow: none !important; }
    html body .fs-tran .inv-form-header { height: 40px; padding: 0 14px; border: 0 !important; border-bottom: 1px solid var(--fsf-line2) !important; }
    html body .fs-tran .inv-form-header-title { font-size: 15px; font-weight: 900; color: var(--fsf-ink); }
    html body .fs-tran .inv-form-body .inv-row { display: grid !important; grid-template-columns: minmax(180px, 210px) 130px 140px 170px 150px minmax(0, 1fr); gap: 10px; padding: 10px 14px 12px; border: 0 !important; min-height: 0; overflow: visible; }
    html body .fs-tran .inv-form-body .inv-cell { padding: 0 !important; border: 0 !important; gap: 4px; overflow: visible; }
    html body .fs-tran .inv-form-body .inv-cell.inv-cell-wide,
    html body .fs-tran .inv-form-body .inv-cell.inv-cell-fill { grid-column: auto; }
    html body .fs-tran .inv-form-body .inv-cell:nth-child(5) { order: 3; }
    html body .fs-tran .inv-form-body .inv-cell:nth-child(3) { order: 4; }
    html body .fs-tran .inv-form-body .inv-cell:nth-child(4) { order: 5; }
    html body .fs-tran .inv-form-body .inv-cell:nth-child(6) { order: 6; }
    html body .fs-tran .inv-form-body .inv-cell:nth-child(1) { order: 1; }
    html body .fs-tran .inv-form-body .inv-cell:nth-child(2) { order: 2; }
    html body .fs-tran .inv-form-body .inv-lbl { font-size: 12.5px; font-weight: 700; color: var(--fsf-ink2); }

    /* (2026-11-20) فوتر القيد (كروت + أزرار كبيرة) اتشال: الفوتر بقى نفس المبيعات بالظبط (invoice.css / fs-invoice.css) */
}

@media (max-width: 768px) {
    /* رأس القيد: الحقول مقفولة تحت «تفاصيل القيد» */
    html body .fs-tran .inv-form-header { pointer-events: none; height: auto; padding: 10px 12px 4px; border: 0 !important; }
    html body .fs-tran .inv-form-header-title { font-size: 19px; font-weight: 900; color: var(--fsf-ink); }
    html body .fs-tran .inv-form-summary,
    html body .fs-tran .inv-collapse-btn { display: none !important; }
    html body .fs-form-page .inv-form { border: 1px solid var(--fsf-line) !important; border-radius: 12px !important; box-shadow: none !important; }
    html body .fs-form-page .inv-form:not(.fs-hdr-open) .inv-form-body:not(#_) { display: none !important; }
    /* قاعدة FsMoreFields (fs-invoice.css) بتخفى الخانات فى الشاشات اللى من غير الزرار */
    html body .fs-form-page .inv-form-body .inv-cell:not(#_) { display: flex !important; }

    .fs-tr-chips { display: flex; gap: 6px; padding: 6px 12px 10px; flex-wrap: wrap; }
    html body .fs-tran .fs-tr-chip:not(#_) { flex: 0 1 auto; min-width: 0; height: 34px !important; min-height: 0 !important; padding: 0 11px !important; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--fsf-line); border-radius: 18px; background: #fff; color: var(--fsf-ink2); font-family: inherit; font-size: 13px !important; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    html body .fs-tran .fs-tr-chip i { font-size: 15px; color: var(--fs-primary); }
    html body .fs-tran .fs-tr-chip.is-on:not(#_) { background: var(--fs-tint-3); border-color: var(--fs-tint-5); }

    /* شريط مدين / دائن / الفرق */
    .fs-tr-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; position: sticky; top: 56px; z-index: 20; background: #fff; border: 1px solid var(--fsf-line); border-radius: 12px; overflow: hidden; }
    .fs-tr-strip > div { min-width: 0; padding: 7px 8px; text-align: center; border-inline-start: 1px solid var(--fsf-line2); }
    .fs-tr-strip > div:first-child { border-inline-start: 0; }
    .fs-tr-strip small { display: block; font-size: 12px; font-weight: 700; color: var(--fsf-ink2); }
    .fs-tr-strip b { display: block; font-size: 16px; font-weight: 900; color: var(--fsf-ink); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
    .fs-tr-strip .is-ok { background: var(--fsf-ok-t); }
    .fs-tr-strip .is-ok :is(small, b) { color: var(--fsf-ok); }
    .fs-tr-strip .is-bad { background: var(--fsf-bad-t); }
    .fs-tr-strip .is-bad :is(small, b) { color: var(--fsf-bad); }

    /* الجدول مخفى (fs-invoice.css) — والمجاميع فوق فى الشريط */
    html body .fs-form-page .inv-grid-card .inv-gtb:not(#_) { display: none !important; }
    html body .fs-tran .inv-footer { background: transparent !important; border: 0 !important; box-shadow: none !important; overflow: visible; min-height: 0; }
    html body .fs-tran .inv-footer-right:not(#_) { display: none !important; }
    html body .fs-tran .inv-abtn.a-save:not(#_) { order: 0 !important; }
    html body .fs-form-page .fs-kbd { display: none; }

    /* كارت السطر */
    html body .fs-tran .fs-tr-card { background: #fff; border: 1px solid var(--fsf-line); border-radius: 13px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
    html body .fs-tran .fs-tr-card-t { display: flex; align-items: center; gap: 8px; }
    html body .fs-tran .fs-tr-card-t b { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; color: var(--fsf-ink); overflow-wrap: anywhere; }
    html body .fs-tran .fs-tr-tag { flex: 0 0 auto; padding: 2px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; background: var(--fs-tint-3); color: var(--fsf-dark); }
    html body .fs-tran .fs-tr-tag.is-credit { background: #EFE8FB; color: #6A3DB8; }
    html body .fs-tran .fs-tr-card-s { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--fsf-mute); font-size: 13px; }
    html body .fs-tran .fs-tr-card-s span { min-width: 0; overflow-wrap: anywhere; }
    html body .fs-tran .fs-tr-card-s strong { flex: 0 0 auto; font-size: 17px; font-weight: 900; color: var(--fsf-ink); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
}

/* شاشة السطر (bottom sheet) */
html body .fs-tr-sheet .fs-tr-sheet-t { margin: 0 0 10px; font-size: 17px; font-weight: 900; color: #0B2A33; }
html body .fs-tr-sheet .fs-sf { margin-bottom: 9px; min-width: 0; }
html body .fs-tr-sheet .fs-sf > label { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 700; color: #3F5C64; }
html body .fs-tr-sheet .fs-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
html body .fs-tr-sheet .fs-tr-pick:not(#_) { width: 100%; height: 46px !important; min-height: 0 !important; padding: 0 12px !important; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid #DCE6E9; border-radius: 9px; background: #fff; color: #0B2A33; font-family: inherit; font-size: 14px !important; font-weight: 700; }
html body .fs-tr-sheet .fs-tr-pick:disabled { background: #F4F7F8; color: #6A838A; }
html body .fs-tr-sheet .fs-tr-pick > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .fs-tr-sheet .fs-tr-pick .is-ph { color: #8AA3AA; font-weight: 500; }
html body .fs-tr-sheet .fs-tr-pick small { color: #6A838A; font-size: 12px; font-weight: 700; }
html body .fs-tr-sheet .fs-tr-pick > i { flex: 0 0 auto; font-size: 18px; color: var(--fs-primary); }
html body .fs-tr-sheet .fs-tr-pick .fs-tr-x { flex: 0 0 auto; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: #C62828; font-size: 16px; background: #FFF1F1; }
html body .fs-tr-sheet .fs-tr-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 3px; margin-bottom: 10px; background: #F1F5F6; border-radius: 11px; }
html body .fs-tr-sheet .fs-tr-seg button:not(#_) { height: 40px !important; min-height: 0 !important; padding: 0 !important; border: 0; border-radius: 9px; background: transparent; color: #3F5C64; font-family: inherit; font-size: 14px !important; font-weight: 800; }
html body .fs-tr-sheet .fs-tr-seg button.is-on:not(#_) { background: var(--fs-primary); color: #fff; }
html body .fs-tr-sheet .fs-tr-amt .dxbl-text-edit { height: 54px !important; }
html body .fs-tr-sheet .fs-tr-amt input { font-size: 24px !important; font-weight: 900 !important; text-align: center !important; }
html body .fs-tr-sheet .fs-tr-acts { display: flex; gap: 8px; }
html body .fs-tr-sheet .fs-tr-del:not(#_) { flex: 0 0 56px; width: 56px; height: 50px !important; min-height: 0 !important; padding: 0 !important; display: grid; place-items: center; border: 1px solid #F3D0D0; border-radius: 12px; background: #fff; color: #B91C1C; font-size: 20px !important; }
html body .fs-tr-sheet .fs-tr-acts .fs-msheet-ok:not(#_) { flex: 1 1 auto; width: auto; height: 50px !important; min-height: 0 !important; padding: 0 !important; font-size: 16px !important; }

/* ══════════════════════════════════════════════════════════════════════
   إيصال القبض / سند الصرف (.fs-vf)
   ══════════════════════════════════════════════════════════════════════ */
html body .fs-form-page .fs-vf { background: #EEF2F4; }
html body .fs-form-page .fs-vf-h { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14.5px; font-weight: 800; color: var(--fsf-ink); }
html body .fs-form-page .fs-vf-h i { font-size: 18px; color: var(--fs-primary); }
html body .fs-form-page .fs-vf-card,
html body .fs-form-page .fs-vf-pay { background: #fff; border: 1px solid var(--fsf-line); border-radius: 14px; padding: 12px 14px; }

html body .fs-form-page .fs-vf-g { display: grid; gap: 10px; }
html body .fs-form-page .fs-vf-g1 { grid-template-columns: minmax(0, 1fr); }
html body .fs-form-page .fs-vf-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html body .fs-form-page .fs-vf-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
html body .fs-form-page .fs-vf-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
html body .fs-form-page .fs-vf-party { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

/* الحقول */
html body .fs-form-page .fs-vf .sr-cell { padding: 0; gap: 4px; border: 0; overflow: visible; justify-content: flex-start; background: transparent; }
html body .fs-form-page .fs-vf .sr-lbl { font-size: 12.5px; font-weight: 700; color: var(--fsf-ink2); text-transform: none; letter-spacing: 0; line-height: 1.4; white-space: normal; }
html body .fs-form-page .fs-vf .sr-ctrl { height: 40px; border: 1px solid var(--fsf-line); border-radius: 9px; }
html body .fs-form-page .fs-vf .sr-inp { font-size: 14px; font-weight: 700; color: var(--fsf-ink); }
html body .fs-form-page .fs-vf .sr-inp:disabled { background: #F4F7F8; color: var(--fsf-mute); }
html body .fs-form-page .fs-vf .sr-ctrl .dxbl-text-edit { height: 100% !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
html body .fs-form-page .fs-vf .sr-ctrl .dxbl-text-edit::before,
html body .fs-form-page .fs-vf .sr-ctrl .dxbl-text-edit::after { display: none !important; }
html body .fs-form-page .fs-vf .sr-dx-date .dxbl-text-edit,
html body .fs-form-page .fs-vf .sr-dx-edit .dxbl-text-edit { height: 40px !important; border: 1px solid var(--fsf-line) !important; border-radius: 9px !important; }
html body .fs-form-page .fs-vf .sr-dx-date .dxbl-edit-input-container,
html body .fs-form-page .fs-vf .sr-dx-date .dxbl-input-group,
html body .fs-form-page .fs-vf .sr-dx-edit .dxbl-edit-input-container,
html body .fs-form-page .fs-vf .sr-dx-edit .dxbl-input-group { height: 40px !important; min-height: 40px !important; }
html body .fs-form-page .fs-vf .sr-dx-date input,
html body .fs-form-page .fs-vf .sr-dx-edit input { font-size: 14px !important; font-weight: 700; }
html body .fs-form-page .fs-vf .sr-dx-wrap { align-items: stretch; }
html body .fs-form-page .fs-vf .sr-dx-clr { height: 40px; width: 32px; align-self: stretch; }
html body .fs-form-page .fs-vf .sr-ta { width: 100%; min-height: 86px; padding: 9px 10px; border: 1px solid var(--fsf-line); border-radius: 9px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--fsf-ink); resize: vertical; background: #fff; }
html body .fs-form-page .fs-vf .sr-ta:disabled { background: #F4F7F8; color: var(--fsf-mute); }
html body .fs-form-page .fs-vf .sr-cell-found,
html body .fs-form-page .fs-vf .sr-cell-inv,
html body .fs-form-page .fs-vf .sr-cell-inv-active { background: transparent; border: 0; }
html body .fs-form-page .fs-vf .sr-saved { margin: 0; border-radius: 12px; }

/* صندوق القيمة */
html body .fs-form-page .fs-vf-amt { padding: 16px; border-radius: 14px; background: var(--fsf-dark); color: #fff; }
html body .fs-form-page .fs-vf-amt-l { display: flex; align-items: center; gap: 5px; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .82); }
html body .fs-form-page .fs-vf-amt-in { display: flex; align-items: center; height: 62px; padding: 0 6px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); }
html body .fs-form-page .fs-vf-amt-in:focus-within { border-color: var(--fsf-gold); }
html body .fs-form-page .fs-vf-amt-v { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 4px; border: 0; outline: 0; background: transparent; color: var(--fsf-gold); font-family: inherit; font-size: 34px; font-weight: 900; text-align: center; direction: ltr; font-variant-numeric: tabular-nums; }
html body .fs-form-page .fs-vf-amt-v::placeholder { color: rgba(255, 210, 122, .45); }
html body .fs-form-page .fs-vf-amt-v:disabled { color: var(--fsf-gold); -webkit-text-fill-color: var(--fsf-gold); opacity: 1; }
html body .fs-form-page .fs-vf-amt-ib { flex: 0 0 30px; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .6); font-size: 17px; cursor: pointer; }
html body .fs-form-page .fs-vf-amt-ib:hover { background: rgba(255, 255, 255, .12); color: #fff; }
html body .fs-form-page .fs-vf-words { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: rgba(255, 255, 255, .85); }

/* طريقة الدفع: مهما كان عدد الأنواع تتلف صفوف */
html body .fs-form-page .fs-vf-pays { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 6px; margin-bottom: 10px; }
html body .fs-form-page .fs-vf-payb { min-height: 54px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1.5px solid var(--fsf-line); border-radius: 11px; background: #fff; color: var(--fsf-ink2); font-family: inherit; font-size: 13px; font-weight: 800; line-height: 1.25; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
html body .fs-form-page .fs-vf-payb i { font-size: 19px; color: var(--fs-primary); }
html body .fs-form-page .fs-vf-payb.is-on { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
html body .fs-form-page .fs-vf-payb.is-on i { color: #fff; }
html body .fs-form-page .fs-vf-payb:disabled { cursor: default; opacity: .75; }
html body .fs-form-page .fs-vf-acct-l { margin-bottom: 4px; }
html body .fs-form-page .fs-vf-acct { width: 100%; min-height: 42px; padding: 6px 12px; display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--fs-primary); border-radius: 10px; background: var(--fs-tint-3); color: var(--fsf-dark); font-family: inherit; font-size: 14px; font-weight: 800; text-align: start; cursor: pointer; }
html body .fs-form-page .fs-vf-acct span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .fs-form-page .fs-vf-acct i { flex: 0 0 auto; font-size: 17px; }
html body .fs-form-page .fs-vf-acct.is-empty { border-style: dashed; background: #fff; color: var(--fsf-mute); }
html body .fs-form-page .fs-vf-acct:disabled { cursor: default; }
html body .fs-form-page .fs-vf-acct:disabled .fs-vf-acct-go { display: none; }

/* زرار «تفاصيل السند» موبيل بس */
html body .fs-form-page .fs-vf-more { display: none; }

@media (min-width: 769px) {
    html body .fs-form-page .fs-vf { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 10px; padding: 12px 14px; align-items: stretch; overflow-y: auto; }
    html body .fs-form-page .fs-vf-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
    html body .fs-form-page .fs-vf-card-fill { flex: 1 1 auto; }
    html body .fs-form-page .fs-vf-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
    html body .fs-form-page .fs-vf-acts { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
    html body .fs-form-page .fs-vf-acts .sr-btn { width: 100%; height: 44px; justify-content: center; border-radius: 11px; font-size: 14px; font-weight: 800; }
    html body .fs-form-page .fs-vf-acts .sr-btn-save { order: -1; height: 58px; background: var(--fs-action) !important; border-color: var(--fs-action) !important; color: #fff !important; font-size: 19px; font-weight: 900; box-shadow: none; }
    html body .fs-form-page .fs-vf-acts .sr-btn-edit { order: -1; height: 58px; font-size: 17px; font-weight: 900; }
    html body .fs-form-page .fs-vf-acts .sr-btn-new { background: #fff; border: 1px solid var(--fsf-line); color: var(--fsf-ink2); }
}

@media (max-width: 768px) {
    html body .fs-form-page .fs-only-d { display: none !important; }
    html body .fs-form-page .fs-only-m { display: flex !important; }

    html body .fs-form-page.sr-pg .fs-vf:not(#_) { display: flex !important; flex-direction: column; gap: 9px; padding: 10px 12px 96px; overflow: visible !important; }
    html body .fs-form-page.sr-pg:has(.sr-btn-del) .fs-vf:not(#_) { padding-bottom: 150px; }
    html body .fs-form-page .fs-vf-main,
    html body .fs-form-page .fs-vf-side,
    html body .fs-form-page .fs-vf-main > .fs-vf-card,
    html body .fs-form-page .fs-vf-g2 { display: contents; }
    html body .fs-form-page .fs-vf-main .fs-vf-h { display: none; }
    html body .fs-form-page .fs-vf-pay .fs-vf-h { display: none; }

    /* الترتيب */
    html body .fs-form-page .fs-vf-amt { order: 1; padding: 12px 14px; }
    html body .fs-form-page .fs-vf-pay { order: 2; padding: 11px 12px; }
    html body .fs-form-page .fs-vf-o3 { order: 3; }
    html body .fs-form-page .fs-vf-more { order: 4; display: flex; }
    html body .fs-form-page .fs-vf-o5 { order: 5; }
    html body .fs-form-page .fs-vf-o6 { order: 6; }
    html body .fs-form-page .fs-vf-o7 { order: 7; }
    html body .fs-form-page .fs-vf-o8 { order: 8; }
    html body .fs-form-page .fs-vf-o9 { order: 9; }
    html body .fs-form-page .fs-vf-o10 { order: 10; }

    html body .fs-form-page .fs-vf-amt-in { height: 54px; }
    html body .fs-form-page .fs-vf-amt-v { font-size: 30px; }

    /* كروت الموبيل */
    html body .fs-form-page .fs-vf-o3,
    html body .fs-form-page .fs-vf-col { background: #fff; border: 1px solid var(--fsf-line); border-radius: 14px; padding: 11px 12px; margin: 0; }
    html body .fs-form-page .fs-vf-g3,
    html body .fs-form-page .fs-vf-g4,
    html body .fs-form-page .fs-vf-g1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html body .fs-form-page .fs-vf-o5 > :first-child,
    html body .fs-form-page .fs-vf-g1 > *:only-child { grid-column: 1 / -1; }
    html body .fs-form-page .fs-vf-o8 > .sr-cell,
    html body .fs-form-page .fs-vf-o7 > .sr-cell:has(.sr-dx-wrap) { grid-column: 1 / -1; }
    html body .fs-form-page .fs-vf-party { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html body .fs-form-page .fs-vf-party .fs-vf-ot { order: 1; }
    html body .fs-form-page .fs-vf-party .fs-vf-od { order: 2; }
    html body .fs-form-page .fs-vf-party .fs-vf-on { order: 3; grid-column: 1 / -1; }
    html body .fs-form-page .fs-vf:not(.is-open) .fs-vf-col:not(#_) { display: none !important; }

    html body .fs-form-page .fs-vf .fs-vf-more:not(#_) { width: 100%; height: 46px !important; min-height: 0 !important; padding: 0 14px !important; align-items: center; justify-content: space-between; border: 1px solid var(--fsf-line); border-radius: 12px; background: #fff; color: var(--fsf-ink2); font-family: inherit; font-size: 14px !important; font-weight: 800; }
    html body .fs-form-page .fs-vf .fs-vf-more.is-open:not(#_) { background: var(--fs-tint-3); border-color: var(--fs-tint-5); }

    /* شريط الأزرار الثابت: جديد + حفظ، وباقى أزرار السند المحفوظ صف تانى */
    html body .fs-form-page .fs-vf-acts { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--fs-tint-5); box-shadow: 0 -6px 16px rgba(4, 37, 45, .08); }
    html body .fs-form-page .fs-vf-acts .sr-btn:not(#_) { flex: 1 1 calc(33% - 6px) !important; height: 40px !important; min-height: 0 !important; padding: 0 4px !important; font-size: 12px !important; font-weight: 700 !important; border-radius: 10px !important; border: 1px solid var(--fs-tint-5) !important; background: #fff !important; color: #33535B !important; overflow: hidden; order: 2 !important; max-width: none !important; }
    html body .fs-form-page .fs-vf-acts .sr-btn i { color: var(--fs-primary); }
    html body .fs-form-page .fs-vf-acts .sr-btn-new:not(#_) { flex: 0 0 84px !important; height: 54px !important; order: 0 !important; font-size: 14px !important; }
    html body .fs-form-page .fs-vf-acts :is(.sr-btn-save, .sr-btn-edit):not(#_) { flex: 1 1 calc(100% - 96px) !important; height: 54px !important; order: 1 !important; background: var(--fs-action) !important; border-color: var(--fs-action) !important; color: #fff !important; font-size: 18px !important; font-weight: 900 !important; }
    html body .fs-form-page .fs-vf-acts :is(.sr-btn-save, .sr-btn-edit) i { color: #fff; }
    html body .fs-form-page .fs-vf-acts .sr-btn-del:not(#_) { color: #C62828 !important; border-color: #F5C2C2 !important; background: #FFF6F6 !important; }
    html body .fs-form-page .fs-vf-acts .sr-btn-del i { color: #C62828; }

    html body .fs-form-page.sr-pg .sr-titlebar { padding: 10px 14px; flex-wrap: wrap; }
    html body .fs-form-page.sr-pg .sr-tb-icon,
    html body .fs-form-page.sr-pg .sr-tb-path { display: none; }
    html body .fs-form-page.sr-pg .sr-tb-title { font-size: 19px; font-weight: 900; color: var(--fsf-ink); }
}

/* ══════════════════════════════════════════════════════════════════════
   الاستقبال من فرع (ReceptionFromBranch)
   ══════════════════════════════════════════════════════════════════════ */
html body .fs-form-page .fs-rc-sum { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--fsf-line2); background: #fff; font-size: 13px; font-weight: 700; color: var(--fsf-ink2); }
html body .fs-form-page .fs-rc-sum b { margin-inline-start: 4px; font-size: 15px; font-weight: 900; color: var(--fsf-ink); }
html body .fs-form-page .fs-rc-tog { display: none; }

@media (min-width: 769px) {
    html body .fs-form-page.reception-page .inv-form { border: 1px solid var(--fsf-line) !important; border-radius: 14px !important; box-shadow: none !important; }
}

@media (max-width: 768px) {
    html body .fs-form-page.reception-page .inv-form-header { height: auto; min-height: 0; padding: 10px 12px 8px; border: 0 !important; }
    html body .fs-form-page.reception-page .inv-form-header-title { font-size: 19px; font-weight: 900; color: var(--fsf-ink); }
    html body .fs-form-page.reception-page .inv-form-summary,
    html body .fs-form-page.reception-page .reception-header-actions { display: none !important; }
    html body .fs-form-page .fs-rc-sum { justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--fsf-line2); border-bottom: 0; }
    html body .fs-form-page .fs-rc-tog:not(#_) { width: 100%; height: 42px !important; min-height: 0 !important; padding: 0 12px !important; display: flex; align-items: center; justify-content: space-between; border: 0; border-top: 1px solid var(--fsf-line2); border-radius: 0; background: #fff; color: var(--fsf-ink2); font-family: inherit; font-size: 13.5px !important; font-weight: 800; }

    html body .fs-form-page .fs-rc { display: block; background: #fff; border: 1px solid var(--fsf-line); border-radius: 13px; padding: 10px 12px; margin-bottom: 8px; }
    html body .fs-form-page .fs-rc-n { display: block; font-size: 15px; font-weight: 800; color: var(--fsf-ink); overflow-wrap: anywhere; }
    html body .fs-form-page .fs-rc small { color: var(--fsf-mute); font-size: 12.5px; }
    html body .fs-form-page .fs-rc-tags { margin-top: 5px; }
    html body .fs-form-page .fs-rc-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
    html body .fs-form-page .fs-rc-q > span { font-size: 13px; font-weight: 700; color: var(--fsf-ink2); }
    html body .fs-form-page .fs-rc-q strong { font-size: 16px; font-weight: 900; color: var(--fsf-ink); font-variant-numeric: tabular-nums; }
    html body .fs-form-page .fs-rc-step { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--fs-tint-5); border-radius: 10px; overflow: hidden; }
    html body .fs-form-page .fs-rc-step button:not(#_) { flex: 0 0 36px; width: 36px; height: 36px !important; min-height: 0 !important; padding: 0 !important; display: grid; place-items: center; border: 0; border-radius: 0; background: var(--fs-tint-1); color: var(--fs-primary); font-size: 18px !important; font-weight: 800; }
    html body .fs-form-page .fs-rc-step button:disabled { color: #B7C9CE; }
    html body .fs-form-page .fs-rc-step .dxbl-spin-edit,
    html body .fs-form-page .fs-rc-step .dxbl-text-edit { width: 70px !important; height: 34px !important; min-height: 0 !important; border: 0 !important; background: #fff !important; box-shadow: none !important; }
    html body .fs-form-page .fs-rc-step .dxbl-text-edit::before,
    html body .fs-form-page .fs-rc-step .dxbl-text-edit::after { display: none !important; }
    html body .fs-form-page .fs-rc-step input { padding: 0 !important; text-align: center !important; font-size: 14px !important; font-weight: 800 !important; color: var(--fsf-ink) !important; }

    /* الأزرار: شريط ثابت — خلف، طباعة، إعادة ضبط، حفظ */
    html body .fs-form-page .reception-bottom-actions:not(#_) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; margin: 0; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; border: 0; border-top: 1px solid var(--fs-tint-5); border-radius: 0; background: #fff; box-shadow: 0 -6px 16px rgba(4, 37, 45, .08); }
    html body .fs-form-page .reception-bottom-center-info { display: none !important; }
    html body .fs-form-page .reception-bottom-group { display: contents; }
    html body .fs-form-page .reception-bottom-group .rpt-back-btn:not(#_) { flex: 1 1 0; min-width: 0; height: 54px !important; min-height: 0 !important; padding: 0 2px !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--fs-tint-5); border-radius: 11px; background: #fff; color: #33535B; font-family: inherit; font-size: 12px !important; font-weight: 800; text-decoration: none; overflow: hidden; white-space: nowrap; }
    html body .fs-form-page .reception-back-btn { order: 1; }
    html body .fs-form-page .reception-print-btn { order: 2; }
    html body .fs-form-page .reception-reset-btn { order: 3; }
    html body .fs-form-page .reception-bottom-group .reception-main-save-btn:not(#_) { order: 4; flex: 2.4 1 0; flex-direction: row; gap: 8px; background: var(--fs-action); border-color: var(--fs-action); color: #fff; font-size: 18px !important; font-weight: 900; }
    html body .fs-form-page .reception-bottom-group .reception-main-save-btn:disabled:not(#_) { background: #C9D5D9 !important; border-color: #C9D5D9 !important; color: #5A7077 !important; }
    html body .fs-form-page .reception-bottom-group .reception-main-save-btn i { color: #fff; }
}

/* تظبيطات بعد المراجعة */
/* (2026-11-20) القيد بفوتر المبيعات: خانة الفرق = خانة «الصافى» ، ولو القيد مش متوازن تبقى حمرا */
html body .fs-tran .inv-footer .inv-tot-cell.tc-net.is-bad { background: #B42318 !important; border-color: #B42318 !important; }
html body .fs-tran .inv-footer .inv-tot-cell.tc-net.is-bad :is(.inv-tot-lbl, .inv-tot-val) { color: #fff !important; -webkit-text-fill-color: #fff !important; }

/* نافذة سطر القيد: خانات نضيفة */
html body .fs-tr-sheet .dxbl-text-edit { border: 1px solid #DCE6E9 !important; border-radius: 9px !important; background: #fff !important; box-shadow: none !important; }
html body .fs-tr-sheet .dxbl-text-edit::before, html body .fs-tr-sheet .dxbl-text-edit::after { display: none !important; }
html body .fs-tr-sheet .dxbl-text-edit:focus-within { border-color: var(--fs-primary) !important; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14) !important; }
html body .fs-tr-sheet .dxbl-btn-group-vertical { display: none !important; }

@media (max-width: 768px) {
    /* .sr-wrap عليها transform بيخلّى الشريط الثابت يتحسب منها مش من الشاشة */
    html body .sr-wrap:has(.fs-vf-acts) { transform: none !important; animation: none !important; }
    html body .fs-form-page .fs-vf { padding-bottom: 96px; }
    /* (2026-11-20) !important: invoice.css عامل «.inv-page { min-height: 0 !important }» على الجوال فكان بيغلب هنا
       والخلفية الرمادى بتقف فى نص الشاشة وتحتها أبيض (القيد والاستقبال) */
    html body .fs-form-page { min-height: calc(100dvh - 100px) !important; }
}
@media (min-width: 769px) {
    /* (2026-11-20) الاستقبال بقى بفوتر المبيعات: الشريط القديم للجوال بس ، والفوتر الجديد للديسكتوب بس
       (اتشال «ارتفاع الجدول calc(100vh - 322px)» — الجدول دلوقتى بياخد المساحة زى المبيعات) */
    html body .fs-form-page.reception-page .reception-bottom-actions { display: none !important; }
}
@media (max-width: 768px) {
    html body .fs-form-page.reception-page > .inv-footer { display: none !important; }
}

/* (2026-11-17) نافذة العميل/المورد على الجوال: زراير «التالى/حفظ» كانت صغيرة (mobile-ui-pack بيصغّر الخط) ← أوضح زى زراير شاشة إعداد OTP */
@media (max-width: 768px) {
    html body .cu-foot .cu-btn:not(#_) { height: 50px !important; min-height: 0 !important; font-size: 15px !important; border-radius: 12px; }
    html body .cu-foot .cu-btn:not(#_) i { font-size: 19px; }
}

/* (2026-11-17) نافذة العميل/المورد على الجوال: التبويبات الخمسة كانت فى شريط بيتسحب وأغلبها مستخبى
   ← 5 مربعات فى سطر واحد: الأيقونة فوق والكلمة تحتها (لو طويلة تنزل سطرين)، والمفتوح تركوازى؛ الديسكتوب زى ما هو */
@media (max-width: 768px) {
    html body .cu-tabs:not(#_) { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px !important; overflow: visible; }
    html body .cu-tabs .cu-tab:not(#_) { position: relative; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 68px; height: auto !important; margin: 0; padding: 7px 3px !important; border: 1px solid #DCE6E9; border-radius: 12px; background: #fff; font-size: 11.5px !important; line-height: 1.25; font-weight: 700; white-space: normal; text-align: center; }
    html body .cu-tabs .cu-tab:not(#_) i { font-size: 21px; }
    html body .cu-tabs .cu-tab.on:not(#_) { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
    html body .cu-tabs .cu-tab.on:not(#_) i { color: #fff; }
    html body .cu-tabs .cu-dot:not(#_) { position: absolute; top: -6px; inset-inline-start: -4px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 9px; background: #B42318; color: #fff; font-size: 11px; font-weight: 800; }
}

/* (2026-11-17) كارت الصنف على الجوال: الست تبويبات كانت شريط بيتسحب وأغلبها مستخبى ← مربعات 3 فى السطر (سطرين)،
   الأيقونة فوق والاسم تحت، والمفتوح تركوازى — نفس فكرة تبويبات العميل/المورد؛ الديسكتوب (الشريط الرأسى) زى ما هو */
@media (max-width: 768px) {
    html body .ic-page .ic-rail:not(#_) { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 6px; padding: 8px !important; overflow: visible !important; }
    html body .ic-page .ic-rail .ic-ri:not(#_) { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0 !important; width: auto !important; min-height: 70px; height: auto !important; margin: 0 !important; padding: 8px 4px !important; border: 1px solid #DCE6E9 !important; border-radius: 12px !important; background: #fff !important; text-align: center; white-space: normal; }
    html body .ic-page .ic-rail .ic-ri:not(#_) .ic-ri-ic { margin: 0 !important; width: auto !important; height: auto !important; background: none !important; }
    html body .ic-page .ic-rail .ic-ri:not(#_) .ic-ri-ic i { font-size: 21px; color: var(--fs-primary); }
    html body .ic-page .ic-rail .ic-ri:not(#_) .ic-ri-t b { display: block; font-size: 12.5px !important; line-height: 1.25; font-weight: 800; white-space: normal; color: #0B2A33; }
    html body .ic-page .ic-rail .ic-ri:not(#_) .ic-ri-t small { display: none !important; }
    html body .ic-page .ic-rail .ic-ri.on:not(#_) { background: var(--fs-primary) !important; border-color: var(--fs-primary) !important; }
    html body .ic-page .ic-rail .ic-ri.on:not(#_) i, html body .ic-page .ic-rail .ic-ri.on:not(#_) .ic-ri-t b { color: #fff !important; }
    /* كلمة «صورة الصنف» كان زرار الكاميرا راكب عليها ← نطلّعها لفوق شوية */
    html body .ic-page .ic-plinth-empty:not(#_) { padding-bottom: 26px; }
}
