/* ══════════════════════════════════════════════════════════════════════
   التقارير (2026-11-08) — فوق قالب القوائم fs-list.css
   الشاشة بتاخد class «fs-rpt» + has-res لما تظهر نتايج + f-open لما الفلاتر تتفتح
   العنصر المميز: شريط المعادلة. الباقى هادى.
   ══════════════════════════════════════════════════════════════════════ */
html body { --rp-dark: color-mix(in srgb, var(--fs-primary) 70%, #000); --rp-line: #DCE6E9; --rp-line2: #EBF1F3; --rp-ink: #0B2A33; --rp-ink2: #3F5C64; --rp-mute: #6A838A; --rp-bad: #B42318; --rp-ok: #137A3F; }

/* ═══ السطر العلوى ═══ */
html body .fs-rpt .rpt-top-bar { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 8px !important; min-height: 0 !important; margin: 0 !important; padding: 8px 12px !important; background: #fff !important; border: 1px solid var(--rp-line) !important; border-radius: 14px !important; box-shadow: none !important; }
html body .fs-rpt .rpt-vdiv { display: none !important; }
html body .fs-rpt .rpt-top-brand { flex: 0 0 auto; display: flex !important; align-items: center !important; gap: 9px !important; }
html body .fs-rpt .rpt-top-bar .rpt-header-icon { flex: 0 0 38px !important; width: 38px !important; height: 38px !important; display: grid !important; place-items: center !important; border-radius: 11px !important; background: var(--fs-tint-3) !important; color: var(--fs-primary-ink) !important; box-shadow: none !important; font-size: 17px !important; }
html body .fs-rpt .rpt-top-brand-text { font-size: 17px !important; font-weight: 900 !important; color: var(--rp-ink) !important; white-space: nowrap; }
html body .fs-rpt .rpt-top-filters { display: flex !important; flex: 1 1 0; align-items: center !important; justify-content: flex-end; gap: 8px !important; min-width: 0; flex-wrap: nowrap !important; }
html body .fs-rpt .rpt-top-filters .rpt-radzen-wrap { flex: 0 1 260px; min-width: 150px; }
html body .fs-rpt .rpt-top-toggle { height: 44px !important; display: inline-flex !important; align-items: center !important; gap: 6px !important; padding: 0 10px !important; background: #fff !important; border: 1px solid var(--rp-line) !important; border-radius: 12px !important; font-size: 13px !important; font-weight: 700 !important; color: var(--rp-ink2) !important; white-space: nowrap; }
html body .fs-rpt .rpt-radzen-wrap .rz-dropdown, html body .fs-rpt .rpt-radzen-wrap .rz-timespanpicker, html body .fs-rpt .rpt-radzen-wrap .rz-numeric { height: 44px !important; border: 1px solid var(--rp-line) !important; border-radius: 12px !important; box-shadow: none !important; }
html body .fs-rpt .rpt-radzen-wrap .rz-dropdown-label { line-height: 42px !important; font-weight: 700 !important; color: var(--rp-ink) !important; }
html body .fs-rpt .rpt-search-btn { flex: 0 0 auto; height: 44px !important; min-width: 0 !important; padding: 0 18px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; border: 0 !important; border-radius: 12px !important; background: var(--fs-action, var(--fs-primary)) !important; color: #fff !important; font-size: 15px !important; font-weight: 800 !important; box-shadow: none !important; white-space: nowrap; }
html body .fs-rpt .stock-action-btns { display: contents !important; }
html body .fs-rpt .stock-reset-btn { background: #fff !important; border: 1px solid var(--rp-line) !important; color: var(--rp-ink2) !important; }
html body .fs-rpt .rpt-f-tg, html body .fs-rpt .rpt-ai-btn, html body .fs-rpt .rpt-back-btn { flex: 0 0 40px !important; width: 40px !important; min-width: 0 !important; height: 40px !important; padding: 0 !important; display: inline-grid !important; place-items: center !important; border: 1px solid var(--rp-line) !important; border-radius: 10px !important; background: #fff !important; color: var(--fs-primary) !important; box-shadow: none !important; font-size: 0 !important; text-decoration: none !important; position: relative; }
html body .fs-rpt .rpt-f-tg i, html body .fs-rpt .rpt-ai-btn i, html body .fs-rpt .rpt-back-btn i { font-size: 18px !important; margin: 0 !important; }
html body .fs-rpt .rpt-ai-btn span:not(.rpt-ai-dot) { display: none; }
html body .fs-rpt .rpt-ai-dot { position: absolute; top: 3px; inset-inline-end: 4px; font-size: 7px !important; color: var(--rp-ok); }
html body .fs-rpt.f-open .rpt-f-tg { background: var(--fs-tint-3) !important; }

/* ═══ خانة الفترة ═══ */
html body .fs-rpt .rpt-date-wrap { flex: 0 0 auto; width: auto !important; height: auto !important; min-width: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
html body .fs-rpt .rpt-date-wrap:has(#daterange) > :not(.fs-dr) { display: none !important; }
html body .fs-rpt .rpt-date-wrap:not(:has(#daterange)) { height: 44px !important; padding: 0 10px !important; background: #fff !important; border: 1px solid var(--rp-line) !important; border-radius: 12px !important; display: inline-flex !important; align-items: center !important; }
html body .fs-rpt .rpt-date-wrap:not(:has(#daterange)) .rpt-date-input { width: 44px !important; min-width: 0 !important; padding: 0 4px !important; border: 0 !important; background: none !important; }
/* القوايم: نفس الخانة جوه محددات البحث */
html body .rpt-page .rpt-date-wrap:has(.fs-dr) { width: 100%; height: auto !important; min-height: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
html body .rpt-page .rpt-date-wrap:has(.fs-dr) > :not(.fs-dr) { display: none !important; }
html body .rpt-page .rpt-field .fs-dr { width: 100%; }
html body .rpt-page .rpt-field .fs-dr-s { flex: 1; min-width: 0; padding: 0 6px; }
html body .rpt-page .rpt-field .fs-dr-ic { flex: 0 0 32px; width: 32px; }
html body .rpt-page .rpt-field .fs-dr-n { display: none; }
html body .rpt-page .rpt-field .fs-dr-s b { font-size: 13px; }
/* الشاشة الرئيسية */
html body .db-date-wrap:has(.fs-dr):not(#_) { height: auto; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
html body .db-date-wrap:has(.fs-dr) > :not(.fs-dr) { display: none !important; }
@media (max-width: 768px) {
    html body .db-date-wrap .fs-dr { width: 100%; }
    html body .db-date-wrap .fs-dr-s { flex: 1; min-width: 0; }
}

/* نوافذ البحث */
html body :is(.op-date-wrap, .ors-date-wrap, .pyo-date-wrap):has(.fs-dr):not(#_) { height: auto; min-width: 280px; padding: 0; overflow: visible; border: 0; background: none; box-shadow: none; }
html body :is(.op-date-wrap, .ors-date-wrap, .pyo-date-wrap):has(.fs-dr) > :not(.fs-dr) { display: none !important; }
html body :is(.op-date-wrap, .ors-date-wrap, .pyo-date-wrap) .fs-dr { width: 100%; height: 40px; }
html body :is(.op-date-wrap, .ors-date-wrap, .pyo-date-wrap) .fs-dr-s { flex: 1; min-width: 0; padding: 0 6px; }
html body :is(.op-date-wrap, .ors-date-wrap, .pyo-date-wrap) .fs-dr-s b { font-size: 12.5px; white-space: nowrap; }
html body :is(.op-date-wrap, .ors-date-wrap, .pyo-date-wrap) .fs-dr-n { display: none; }

html body .fs-dr { height: 44px; display: inline-flex; align-items: center; padding: 0; border: 1.5px solid var(--fs-tint-4); border-radius: 12px; background: #fff; overflow: hidden; font-family: inherit; color: var(--rp-ink); white-space: nowrap; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
html body .fs-dr:hover, html body .fs-dr:focus-visible { border-color: var(--fs-primary); box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14); outline: 0; }
html body .fs-dr-ic { align-self: stretch; width: 38px; display: grid; place-items: center; background: var(--fs-tint-1); color: var(--fs-primary); font-size: 19px; }
html body .fs-dr-s { padding: 0 10px; line-height: 1.1; text-align: start; }
html body .fs-dr-s small { display: block; font-size: 10.5px; font-weight: 700; color: var(--rp-mute); }
html body .fs-dr-s b { font-size: 14px; font-weight: 800; }
html body .fs-dr-ar { color: var(--fs-primary); font-size: 15px; }
html [dir="ltr"] .fs-dr-ar, html[dir="ltr"] .fs-dr-ar { transform: scaleX(-1); }
html body .fs-dr-n { margin-inline: 2px 8px; padding: 2px 8px; border-radius: 7px; background: var(--fs-tint-3); color: var(--fs-primary-ink); font-size: 12px; font-weight: 800; }

html body .fs-drp-shade { position: fixed; inset: 0; z-index: 1090; background: transparent; }
html body .fs-drp-shade.m { background: rgba(4, 37, 45, .45); }
html body .fs-drp { position: fixed; z-index: 1091; width: 744px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--rp-line); border-radius: 18px; box-shadow: 0 24px 60px rgba(4, 37, 45, .3); font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif; color: var(--rp-ink); overflow: hidden; }
/* فوق نوافذ البحث وزر الآلة الحاسبة العائم */
html body .fs-drp-shade { z-index: 300000; }
html body .fs-drp { z-index: 300001; }
html body .fs-drp button { font-family: inherit; cursor: pointer; }
html body .fs-drp-main { display: flex; }
html body .fs-drp-pre { flex: 0 0 158px; display: flex; flex-direction: column; gap: 2px; padding: 12px; background: #F6FAFB; border-inline-end: 1px solid var(--rp-line); }
html body .fs-drp-pre b { margin: 0 8px 4px; font-size: 12px; color: var(--rp-mute); }
html body .fs-drp-pre button { padding: 6px 10px; border: 0; border-radius: 9px; background: none; text-align: start; font-size: 13.5px; font-weight: 700; color: var(--rp-ink2); }
html body .fs-drp-pre button:hover { background: var(--fs-tint-3); }
html body .fs-drp-pre button.on, html body .fs-drp-hs button.on { background: var(--fs-primary); color: #fff; }
html body .fs-drp-cals { flex: 1; display: flex; justify-content: center; gap: 18px; padding: 14px; }
html body .fs-cal { width: 268px; }
html body .fs-cal-h { display: flex; align-items: center; justify-content: space-between; height: 36px; margin-bottom: 4px; }
html body .fs-cal-h b { font-size: 15px; font-weight: 900; }
html body .fs-cal-h button, html body .fs-cal-h span { width: 32px; height: 32px; }
html body .fs-cal-h button { display: grid; place-items: center; border: 0; border-radius: 9px; background: #F2F6F7; color: var(--fs-primary); font-size: 17px; }
html body .fs-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
html body .fs-cal-g u { height: 26px; line-height: 26px; text-decoration: none; font-size: 11.5px; font-weight: 800; color: var(--rp-mute); }
html body .fs-cal-g s { text-decoration: none; }
html body .fs-cal-g button { height: 42px; padding: 0; border: 0; background: none; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--rp-ink); font-variant-numeric: tabular-nums; }
html body .fs-cal-g button:hover { background: var(--fs-tint-3); }
html body .fs-cal-g button.t { box-shadow: inset 0 0 0 1.5px var(--fs-action, var(--fs-primary)); }
html body .fs-cal-g button.in { background: var(--fs-tint-3); color: var(--fs-primary-ink); border-radius: 0; }
html body .fs-cal-g button.a, html body .fs-cal-g button.b { background: var(--fs-primary); color: #fff; font-weight: 900; box-shadow: none; }
html body .fs-cal-g button.a:not(.b) { border-start-end-radius: 0; border-end-end-radius: 0; }
html body .fs-cal-g button.b:not(.a) { border-start-start-radius: 0; border-end-start-radius: 0; }
html body .fs-drp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--rp-line); }
html body .fs-drp-foot i { color: var(--fs-primary); }
html body .fs-drp-foot input { width: 124px; height: 40px; padding: 0 10px; border: 1px solid var(--rp-line); border-radius: 9px; font-family: inherit; font-weight: 700; color: var(--rp-ink); font-variant-numeric: tabular-nums; }
html body .fs-drp-foot input:focus, html body .fs-drp-two input:focus { border-color: var(--fs-primary); outline: 0; }
html body .fs-drp-n { padding: 3px 10px; border-radius: 8px; background: var(--fs-tint-3); color: var(--fs-primary-ink); font-size: 13px; font-weight: 800; }
html body .fs-drp-foot .sp { flex: 1; }
html body .fs-drp-foot .ok { height: 42px; padding: 0 22px; border: 0; border-radius: 11px; background: var(--fs-primary); color: #fff; font-size: 15px; font-weight: 800; }
html body .fs-drp-foot .ok:disabled { opacity: .5; cursor: default; }
html body .fs-drp-foot .cn { height: 42px; padding: 0 14px; border: 1px solid var(--rp-line); border-radius: 11px; background: #fff; color: var(--rp-ink2); font-weight: 700; }

html body .fs-drp.m { inset: auto 0 0 0; width: 100%; max-width: none; max-height: 92dvh; overflow-y: auto; padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 22px 22px 0 0; animation: fs-drp-up .22s cubic-bezier(.22, 1, .36, 1); }
@keyframes fs-drp-up { from { transform: translateY(100%); } to { transform: none; } }
html body .fs-drp-grab { width: 42px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: #D5E2E6; }
html body .fs-drp.m h3 { margin: 0 0 8px; font-size: 17px; font-weight: 900; }
html body .fs-drp-hs { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
html body .fs-drp-hs button { flex: 0 0 auto; padding: 8px 12px; border: 0; border-radius: 10px; background: #F2F6F7; font-size: 13.5px; font-weight: 700; color: var(--rp-ink2); }
html body .fs-drp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
html body .fs-drp-two label { margin: 0; padding: 6px 11px; border: 1.5px solid var(--rp-line); border-radius: 11px; }
html body .fs-drp-two small { display: block; font-size: 11.5px; font-weight: 700; color: var(--rp-mute); }
html body .fs-drp-two input { width: 100%; border: 0; padding: 0; font-family: inherit; font-size: 15px; font-weight: 900; color: var(--rp-ink); }
html body .fs-drp.m .fs-drp-cals { padding: 0; }
html body .fs-drp.m .fs-cal { width: 100%; }
html body .fs-drp.m .fs-cal-g button { height: 40px; font-size: 15px; }
html body .fs-drp.m .fs-drp-foot { padding: 10px 0 0; border: 0; }
html body .fs-drp.m .fs-drp-foot .ok { width: 100%; height: 50px; border-radius: 12px; font-size: 16px; }

/* ═══ الفلاتر والشرايح ═══ */
html body .fs-rpt .rpt-filter-card { margin: 0 !important; background: #fff !important; border: 1px solid var(--rp-line) !important; border-radius: 14px !important; box-shadow: none !important; }
html body .fs-rpt .rpt-filter-head { display: none !important; }
html body .fs-rpt .rpt-filter-body { padding: 10px 12px !important; }
html body .fs-rpt.has-res:not(.f-open) .rpt-filter-card { display: none !important; }
html body .fs-rpt .rpt-lbl { font-size: 12.5px !important; font-weight: 700 !important; color: var(--rp-ink2) !important; }
html body .fs-rpt .rpt-radio-wrap, html body .fs-rpt .rpt-options-box { min-height: 44px; height: auto; border: 1px solid var(--rp-line); border-radius: 12px; }
html body .fs-rpt .rpt-option-txt { color: var(--rp-ink2); }
html body .fs-chips { display: none; flex-wrap: wrap; align-items: center; gap: 6px; }
html body .fs-rpt.has-res:not(.f-open) .fs-chips { display: flex; }
html body .fs-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 1px solid var(--rp-line); border-radius: 8px; background: #fff; font-size: 12.5px; font-weight: 700; color: var(--rp-ink2); white-space: nowrap; }
html body .fs-chip b { font-weight: 800; color: var(--rp-ink); }
html body .fs-chip-e { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px; border: 0; background: none; font-family: inherit; font-size: 12.5px; font-weight: 800; color: var(--fs-primary); cursor: pointer; }
html body .fs-chips.m-only { display: none !important; }

/* ═══ شريط المعادلة ═══ */
html body .fs-eq { display: flex; align-items: stretch; background: var(--rp-dark); border-radius: 16px; color: #fff; overflow: hidden; }
html body .fs-eq-terms { flex: 3; display: flex; align-items: stretch; min-width: 0; }
html body .fs-eq-c { flex: 1; min-width: 0; padding: 12px 16px; }
html body .fs-eq small { display: block; font-size: 12.5px; font-weight: 700; color: #CFE6EC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .fs-eq b { display: block; font-size: 24px; font-weight: 900; line-height: 1.25; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
html[dir="ltr"] body .fs-eq b { text-align: left; }
html body .fs-eq-ft { display: block; margin-top: 1px; font-size: 12px; font-weight: 700; color: #9CC9D4; }
html body .fs-eq-op { flex: 0 0 30px; align-self: center; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); font-size: 18px; font-weight: 900; }
html body .fs-eq-eq { margin-inline: 4px; }
html body .fs-eq-r { flex: 1.25; min-width: 0; padding: 12px 16px; background: rgba(0, 0, 0, .2); }
html body .fs-eq-r small { color: #fff; }
html body .fs-eq-r em { margin-inline-start: 4px; padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .16); font-style: normal; font-size: 11.5px; }
html body .fs-eq-r b { font-size: 28px; color: #FFD27A; }
html body .fs-eq-mix { display: flex; height: 6px; gap: 2px; margin-top: 9px; }
html body .fs-eq-mix i { display: block; border-radius: 3px; }
html body .fs-eq-mix .c0 { background: #7FD1E2; }
html body .fs-eq-mix .c1 { background: #fff; }
html body .fs-eq-mix .c2 { background: #FFD27A; }

/* ═══ الجدول ═══ */
html body .fs-rpt .trial-tree-rtl { height: 100%; min-height: 0; display: flex; flex-direction: column; }
html body .fs-rpt.rpt-page--list .dxbl-grid tr[data-visible-index] > td:nth-child(2) { font-weight: 500 !important; }
html body .fs-rpt.rpt-page--list .dxbl-grid tr[data-visible-index] > td.rpt-z, html body .fs-rpt.rpt-page--list .dxbl-grid tr[data-visible-index] > td.rpt-z * { color: #B4C5CA !important; font-weight: 500 !important; }
html body .fs-rpt.rpt-page--list .dxbl-grid tr[data-visible-index] > td.rpt-neg, html body .fs-rpt.rpt-page--list .dxbl-grid tr[data-visible-index] > td.rpt-neg * { color: var(--rp-bad) !important; font-weight: 800 !important; }
html body .fs-rpt .rpt-grid-toolbar { padding: 4px 8px !important; background: none !important; border: 0 !important; }
html body .fs-rpt .rpt-grid-toolbar .rpt-tb-btn { height: 34px !important; border: 1px solid var(--rp-line) !important; border-radius: 9px !important; background: #fff !important; color: var(--rp-ink2) !important; box-shadow: none !important; font-weight: 700 !important; }
html body .fs-lb-colsw { position: relative; }
html body .fs-lb-colsmenu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 1041; min-width: 200px; padding: 6px; background: #fff; border: 1px solid var(--rp-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(4, 37, 45, .2); }
html body .fs-lb-colsmenu button { width: 100%; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--rp-ink); cursor: pointer; }
html body .fs-lb-colsmenu button:hover { background: var(--fs-tint-1); }
html body .fs-lb-colsmenu i { font-size: 18px; color: var(--fs-primary); }
html body .fs-lb-colsshade { position: fixed; inset: 0; z-index: 1040; }
html body .fs-dock { display: none; }

/* تنبيهات المخزون */
html body .fs-rpt .stock-alert-bar { position: static !important; display: flex !important; gap: 6px; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
html body .fs-rpt .stock-alert { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 800; }
html body .fs-rpt .stock-alert--neg { background: #FDE3DE; color: var(--rp-bad); }
html body .fs-rpt .stock-alert--zero { background: #FFF0DC; color: #B86A0B; }

/* قبل ظهور نتايج: البحث وشريط الأدوات مالهمش لازمة على الموبيل */
@media (max-width: 768px) {
    html body .sr-wrap:has(.fs-dock) { transform: none !important; animation: none !important; }
    html body .fs-rpt.rpt-page { padding-bottom: 96px !important; }

    html body .fs-rpt .rpt-top-bar { order: 0; flex-wrap: wrap !important; margin: 0 !important; padding: 8px 12px !important; border: 0 !important; border-bottom: 1px solid var(--rp-line) !important; border-radius: 0 !important; }
    html body .fs-rpt .rpt-back-btn { order: 0; }
    html body .fs-rpt .rpt-back-btn i { transform: scaleX(-1); }
    html body .fs-rpt .rpt-top-brand { order: 1; flex: 1 1 0; }
    html body .fs-rpt .rpt-top-bar .rpt-header-icon { display: none !important; }
    html body .fs-rpt .rpt-top-brand-text { white-space: normal; line-height: 1.2; }
    html body .fs-rpt .rpt-ai-btn { order: 2; }
    html body .fs-rpt .rpt-f-tg { order: 3; }
    html body .fs-rpt .rpt-top-filters { order: 4; flex: 1 0 100%; flex-wrap: wrap !important; justify-content: stretch; }
    html body .fs-rpt .rpt-top-filters > * { flex: 1 0 100%; max-width: none; }
    html body .fs-rpt .rpt-search-btn { order: 5; flex: 1 0 100%; height: 48px !important; }
    html body .fs-rpt .stock-reset-btn { order: 6; }
    html body .fs-rpt .rpt-date-wrap { width: 100% !important; }
    html body .fs-dr { width: 100%; }
    html body .fs-dr-s { flex: 1; }
    html body .fs-rpt.has-res:not(.f-open) .rpt-top-filters > :not(.rpt-date-wrap:has(#daterange)),
    html body .fs-rpt.has-res:not(.f-open) .rpt-search-btn { display: none !important; }

    html body .fs-rpt .fs-chips, html body .fs-rpt.has-res:not(.f-open) .fs-chips.m-only { order: 1; padding: 8px 12px 0; }
    html body .fs-rpt.has-res:not(.f-open) .fs-chips.m-only { display: flex !important; }
    html body .fs-rpt .fs-chip-e { display: none; }
    html body .fs-rpt .rpt-filter-card { order: 2; margin: 10px 12px 0 !important; }
    html body .fs-rpt .stock-alert-bar { order: 2; margin: 8px 12px 0 !important; }
    html body .fs-rpt .fs-eq { order: 3; flex-direction: column; margin: 10px 12px 0; }
    html body .fs-rpt .fs-eq-r { order: -1; padding: 12px 14px; }
    html body .fs-rpt .fs-eq-terms { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    html body .fs-rpt .fs-eq-op { display: none; }
    html body .fs-rpt .fs-eq-c { padding: 9px 12px; }
    html body .fs-rpt .fs-eq small { font-size: 11.5px; }
    html body .fs-rpt .fs-eq b { font-size: 15px; }
    html body .fs-rpt .fs-eq-r b { font-size: 28px; }
    html body .fs-rpt .fs-eq-ft { display: none; }

    html body .fs-rpt .fs-lb { order: 4; padding: 10px 12px 2px; background: transparent; border: 0; }
    html body .fs-rpt:not(.has-res) .fs-lb, html body .fs-rpt:not(.has-res) .fs-lc { display: none; }
    html body .fs-rpt .fs-lb-morew { display: none; }
    html body .fs-rpt .fs-lc { order: 5; padding: 8px 12px 0; }
    html body .fs-rpt:not(.has-res)::after { content: ''; }

    html body .fs-rc { margin-bottom: 8px; padding: 11px 12px; background: #fff; border: 1px solid var(--rp-line); border-radius: 13px; }
    html body .fs-rc-a { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14.5px; font-weight: 800; color: var(--rp-ink); }
    html body .fs-rc-a span { min-width: 0; }
    html body .fs-rc-a strong { flex: none; font-size: 18px; font-weight: 900; color: var(--fs-primary-ink); font-variant-numeric: tabular-nums; }
    html body .fs-rc-a strong.neg { color: var(--rp-bad); }
    html body .fs-rc-x { margin-top: 2px; font-size: 12.5px; color: var(--rp-mute); }
    html body .fs-rc-r3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--rp-line2); font-size: 12px; font-weight: 700; color: var(--rp-ink2); }
    html body .fs-rc-r3 b { display: block; font-size: 14px; color: var(--rp-ink); font-variant-numeric: tabular-nums; text-align: right; }
    html body .fs-rc-r3 b.z { color: #B4C5CA; font-weight: 500; }
    html body .fs-rc-r3 b.neg { color: var(--rp-bad); }

    html body .fs-tl-day { margin: 8px 2px 4px; font-size: 12.5px; font-weight: 800; color: var(--fs-primary-ink); }
    html body .fs-tl-row { display: flex; gap: 10px; margin-bottom: 8px; padding: 10px 12px; background: #fff; border: 1px solid var(--rp-line); border-radius: 13px; }
    html body .fs-tl-ic { flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-size: 17px; }
    html body .fs-tl-ic.up { background: #FFF0DC; color: #B86A0B; }
    html body .fs-tl-ic.dn { background: #E3F5E9; color: var(--rp-ok); }
    html body .fs-tl-i { flex: 1; min-width: 0; }
    html body .fs-tl-i b { display: block; font-size: 14.5px; font-weight: 800; color: var(--rp-ink); }
    html body .fs-tl-i small { display: block; font-size: 12px; font-weight: 600; color: var(--rp-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    html body .fs-tl-a { flex: none; text-align: left; }
    html body .fs-tl-a strong { display: block; font-size: 16px; font-weight: 900; color: var(--rp-ink); font-variant-numeric: tabular-nums; }
    html body .fs-tl-a strong.dn { color: var(--rp-ok); }
    html body .fs-tl-a small { font-size: 12px; font-weight: 700; color: var(--rp-mute); }

    html body .fs-rpt.has-res .fs-dock { position: fixed; inset: auto 0 0 0; z-index: 1040; display: flex; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--rp-line); }
    html body .fs-dock button:not(#_) { flex: 1 !important; height: 50px !important; min-height: 0 !important; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--rp-line); border-radius: 10px; background: #fff; color: var(--rp-ink2); font-family: inherit; font-size: 14px !important; font-weight: 700; }
    html body .fs-dock button i { font-size: 18px; color: var(--fs-primary); }
    html body .fs-dock button.pri:not(#_) { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
    html body .fs-dock button.pri i { color: #fff; }
}
@media (min-width: 769px) {
    html body .fs-rpt .rpt-f-tg.m-only { display: none !important; }
}

/* ═══ صفحة التقارير ═══ */
html body .rl { max-width: 1500px; height: calc(100dvh - 65px); margin: 0 auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; color: var(--rp-ink); }
html body .rl-top { display: flex; align-items: center; gap: 14px; }
html body .rl-title:not(#_) { font-family: inherit; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 21px; font-weight: 800; color: var(--fs-primary-deep); white-space: nowrap; }
html body .rl-title small { font-size: 13px; font-weight: 600; color: var(--rp-mute); }
html body .rl-find { flex: 1; display: flex; align-items: center; gap: 9px; height: 44px; margin: 0; padding: 0 14px; background: #fff; border: 1px solid var(--rp-line); border-radius: 11px; }
html body .rl-find:focus-within { border-color: var(--fs-primary); box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14); }
html body .rl-find i { font-size: 19px; color: var(--fs-primary); }
html body .rl-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--rp-ink); }
html body .rl-find kbd { font: 600 12px inherit; padding: 2px 7px; background: var(--fs-tint-1); border: 1px solid var(--rp-line); border-radius: 5px; color: var(--rp-mute); box-shadow: none; }
html body .rl-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 12px; }
html body .rl-rail, html body .rl-pane { background: #fff; border: 1px solid var(--rp-line); border-radius: 13px; }
html body .rl-rail { padding: 8px; overflow-y: auto; }
html body .rl-sep { height: 1px; margin: 7px 6px; background: var(--rp-line); }
html body .rl-nav:not(#_) { width: 100%; height: 38px; min-height: 0; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--rp-ink); font-size: 14px; font-weight: 700; text-align: start; cursor: pointer; }
html body .rl-nav:not(#_):hover { background: var(--fs-tint-1); }
html body .rl-nav i { flex: none; font-size: 18px; color: var(--fs-primary); }
html body .rl-nav span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .rl-nav b { flex: none; font-size: 12.5px; font-weight: 700; color: var(--rp-mute); }
html body .rl-nav.on:not(#_), html body .rl-nav.on:not(#_):hover { background: var(--fs-primary); color: #fff; }
html body .rl-nav.on i, html body .rl-nav.on b { color: #fff; }
html body .rl-pane { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
html body .rl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px; border-bottom: 1px solid var(--rp-line); }
html body .rl-head h2:not(#_) { margin: 0; font-family: inherit; font-size: 16px !important; font-weight: 800; color: var(--rp-ink); }
html body .rl-n { font-size: 13px; font-weight: 600; color: var(--rp-mute); }
html body .rl-subs { display: flex; flex-wrap: wrap; gap: 7px; }
html body .rl-chip:not(#_) { height: 30px; min-height: 0; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--rp-line); border-radius: 15px; background: #fff; color: var(--rp-ink); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
html body .rl-chip:not(#_):hover { border-color: var(--fs-primary); }
html body .rl-chip.on:not(#_) { background: var(--fs-tint-1); border-color: var(--fs-primary); color: var(--fs-primary-deep); }
html body .rl-chip em { font-style: normal; font-weight: 600; color: var(--rp-mute); }
html body .rl { --tn: var(--fs-primary); --tb: var(--fs-tint-1); }
html body .rl-tone1 { --tn: #1E7A46; --tb: #E8F4EC; }
html body .rl-tone2 { --tn: #6A46B0; --tb: #EFEAF8; }
html body .rl-tone3 { --tn: #2F6DB5; --tb: #E6F0FA; }
html body .rl-board { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 11px; padding: 12px 14px; overflow-x: auto; }
html body .rl-col { min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--fs-tint-1); border: 1px solid var(--rp-line); border-top: 4px solid var(--tn); border-radius: 12px; }
html body .rl-col header { flex: none; display: flex; align-items: center; gap: 7px; padding: 10px 12px; font-size: 14.5px; font-weight: 800; color: var(--rp-ink); }
html body .rl-col header em { margin-inline-start: auto; padding: 1px 8px; font-size: 12px; font-style: normal; font-weight: 700; color: var(--rp-mute); background: #fff; border: 1px solid var(--rp-line); border-radius: 10px; }
html body .rl-its { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 0 9px 9px; overflow-y: auto; }
html body .rl-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); align-content: start; gap: 9px; padding: 12px 14px; overflow-y: auto; }
html body .rl-c { flex: none; display: flex; align-items: center; gap: 4px; min-height: 62px; padding: 6px 6px 6px 10px; background: #fff; border: 1px solid var(--rp-line); border-radius: 10px; }
html body .rl-c:hover { border-color: var(--tn); box-shadow: 0 3px 10px rgba(var(--fs-primary-rgb), .13); }
html body .rl-a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--rp-ink); text-decoration: none; }
html body .rl-a:hover { color: var(--rp-ink); }
html body .rl-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--tb); color: var(--tn); font-size: 20px; }
html body .rl-t { flex: 1; min-width: 0; }
html body .rl-t b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.35; }
html body .rl-t small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--rp-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .rl-star:not(#_) { flex: none; width: 28px; height: 28px; min-height: 0; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: none; color: #B7C7CC; font-size: 16px; cursor: pointer; }
html body .rl-star.on:not(#_) { color: var(--fs-action); }
html body .rl-nav:focus-visible, html body .rl-chip:focus-visible, html body .rl-a:focus-visible, html body .rl-star:focus-visible { outline: 2px solid var(--fs-primary); outline-offset: 1px; }
html body .rl-none { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 36px 16px; color: var(--rp-mute); font-weight: 600; text-align: center; }
html body .rl-none i { font-size: 36px; color: var(--fs-tint-4); }
@media (max-width: 768px) {
    html body .rl { height: auto; padding: 10px 12px 20px; gap: 9px; }
    html body .rl-top { flex-direction: column; align-items: stretch; gap: 9px; }
    html body .rl-find { flex: none; }
    html body .rl-find kbd { display: none; }
    html body .rl-body { display: block; }
    html body .rl-rail { display: flex; gap: 7px; margin-bottom: 9px; padding: 0 0 2px; overflow-x: auto; background: none; border: 0; border-radius: 0; }
    html body .rl-sep { display: none; }
    html body .rl-rail, html body .rl-subs { scrollbar-width: none; }
    html body .rl-rail::-webkit-scrollbar, html body .rl-subs::-webkit-scrollbar { display: none; }
    html body .rl-nav:not(#_) { flex: none; width: auto; height: 36px; padding: 0 12px; border: 1px solid var(--rp-line); border-radius: 18px; background: #fff; font-size: 13.5px; }
    html body .rl-nav span { overflow: visible; }
    html body .rl-head h2:not(#_) { width: 100%; }
    html body .rl-board { display: block; overflow: visible; }
    html body .rl-col { margin-bottom: 10px; }
    html body .rl-its { overflow: visible; }
    html body .rl-grid { grid-template-columns: minmax(0, 1fr); overflow: visible; }
    html body .rl-t small { white-space: normal; }
    html body .rl-star:not(#_) { width: 40px; height: 40px; font-size: 18px; }
    html body .rl-subs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; }
}

@media print { .fs-eq, .fs-chips, .fs-dock, .fs-lb, .fs-lc, .rpt-top-bar { display: none !important; } }

/* (2026-11-17) الجوال: خانة «اختر العميل/المورد/الحساب» فى كشوف الحساب كانت واخدة 260px بس وجنبها فراغ ← عرض كامل زى التاريخ */
@media (max-width: 768px) {
    html body .fs-rpt .rpt-top-filters .rpt-radzen-wrap { flex: 1 1 100%; width: 100%; min-width: 0; }
}

/* ══ (2026-11-18) تقرير أعمار الديون لعميل (CustomerAgeingReport) — أزرار الطباعة ومربعات الأعمار ══ */
.fs-age-acts { display: flex; align-items: center; gap: 8px; margin: 12px 0 10px; flex-wrap: nowrap; min-width: 0; }
.fs-age-acts .fs-subj { margin-inline-end: auto; }
.fs-age-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.fs-age-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid #E3ECEF; border-radius: 12px; background: #fff; font-size: 12.5px; color: #6A838A; min-width: 0; }
.fs-age-grid b { font-size: 20px; font-weight: 800; color: #0B2A33; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-age-grid > .is-bal { background: var(--fs-primary); border-color: var(--fs-primary); color: rgba(255, 255, 255, .85); }
.fs-age-grid > .is-bal b { color: #fff; }
.fs-age-grid > .is-old b { color: #A32D2D; }   /* أقدم من 120 يوم = الأخطر */
@media (max-width: 768px) {
    .fs-age-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .fs-age-grid > .is-bal { grid-column: 1 / -1; }
    .fs-age-grid b { font-size: 18px; }
    html body .fs-age-acts .fim-act:not(#_) { width: 40px; padding: 0 !important; justify-content: center; }
    html body .fs-age-acts .fim-act:not(#_) span { display: none; }
}
