/* ═══════════════════════════════════════════════════════════════════════════
   الرواتب — التصميم المعتمد (ديسكتوب + موبيل)
   فوق payroll.css؛ ولأن payroll.css بيتحمّل بعده من HeadContent كل القواعد
   بتبدأ بـ html body عشان تكسب من غير !important.
   الكروت من fs-list.css (FsKpiRow). الألوان من الثيم عشان يشتغل فى الثيمين.
   ═══════════════════════════════════════════════════════════════════════════ */

html body { --pr-dark: color-mix(in srgb, var(--fs-primary) 70%, #000); --pr-line: #DCE6E9; --pr-line2: #EBF1F3; --pr-ink: #0B2A33; --pr-ink2: #3F5C64; --pr-mute: #6A838A; --pr-bad: #B42318; --pr-ok: #137A3F; }

/* الخلفية: كانت بتقف عند آخر المحتوى فيبان شريط أبيض تحته */
@media screen {
    html:has(.pr-root), html:has(.pr-root) body { background: #EEF2F4; }
    html body .pr-root { min-height: 100dvh; background: #EEF2F4; color: var(--pr-ink); }
    html body .pr-root::before { display: none; }
}

/* ═══ الهيدر ═══ */
html body .pr-root .pr-hdr { padding: 0 16px; background: var(--pr-dark) !important; color: #fff; box-shadow: none; }
html body .pr-root .pr-hdr::before, html body .pr-root .pr-hdr::after { display: none; }
html body .pr-root .pr-hdr-row { min-height: 60px; gap: 10px; }
html body .pr-root .pr-hdr-back, html body .pr-root .pr-hdr-menu { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .13); color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 20px; }
html body .pr-root .pr-hdr-back:hover, html body .pr-root .pr-hdr-menu:hover { background: rgba(255, 255, 255, .22); color: #fff; transform: none; box-shadow: none; }
html body .pr-root .pr-hdr-menu-ico span { background: #fff; }
html body .pr-root .pr-hdr-ttl { min-width: 0; color: #fff; font-size: 18px; font-weight: 900; letter-spacing: 0; white-space: nowrap; text-overflow: ellipsis; }
html body .pr-root .pr-hdr-ttl small { display: block; margin-top: 2px; color: #CFE6EC; opacity: 1; font-size: 12.5px; font-weight: 600; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
html body .pr-root .pr-hdr-crumbs { display: none; }
html body .pr-root .pr-hdr-acts { display: flex; gap: 8px; }
html body .pr-root .pr-hdr-act { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; background: #fff; color: var(--pr-ink2); font-family: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
html body .pr-root .pr-hdr-act i { font-size: 18px; color: var(--fs-primary); }
html body .pr-root .pr-hdr-act.is-ic { width: 40px; padding: 0; }
html body .pr-root .pr-hdr-act:hover:not(:disabled) { background: var(--fs-tint-3); }
html body .pr-root .pr-hdr-act:disabled { opacity: .6; cursor: wait; }

/* ═══ الحاوية ═══ */
html body .pr-cnt { padding: 14px 16px 24px; }
html body .pr-cnt:has(.pr-save-bar:not(.is-view)) { padding-bottom: 90px; }
html body .pr-shd-lines-wrap { padding-bottom: 0; }

/* ═══ كروت الأرقام ═══ */
html body .pr-root .fs-kpis { grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 10px; }
html body .pr-root .fs-kpis:has(> :nth-child(3):last-child) { grid-template-columns: 1.25fr 1fr 1fr; }
html body .pr-root .fs-kpi { min-height: 84px; padding: 11px 14px; border-radius: 14px; }
html body .pr-root .fs-kpi small { font-size: 13px; }
html body .pr-root .fs-kpi-v { font-size: 25px; }
html body .pr-root .fs-kpi-v em { font-size: 12.5px; }
html body .pr-root .fs-kpi-ic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; font-size: 20px; }
html body .pr-root .fs-kpi-foot { padding-top: 4px; font-size: 12px; }
html body .pr-root .fs-kpi-row { margin: 0; }
html body .pr-root .fs-kpi-ic.t-pri { background: var(--fs-tint-3); color: var(--fs-primary-ink); }
html body .pr-root .pr-hero { display: block; margin: 0 0 10px; padding: 0; background: none; border: 0; box-shadow: none; }

/* ═══ العناوين والحالات الفاضية ═══ */
html body .pr-empty-ico i, html body .pr-error-ico i { font-size: 40px; color: var(--fs-primary); }
html body .pr-section-ttl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 8px; padding: 0; background: none; border: 0; }
html body .pr-section-ttl-main { display: flex; align-items: center; gap: 6px; }
html body .pr-section-ttl-main h2 { margin: 0; font-size: 15.5px; font-weight: 900; color: var(--pr-ink); }
html body .pr-section-ttl-ico { width: auto; height: auto; background: none; box-shadow: none; color: var(--fs-primary); font-size: 20px; }
html body .pr-section-ttl-sub { font-size: 12.5px; font-weight: 600; color: var(--pr-mute); }

/* ═══ الرئيسية ═══ */
html body .pr-hi { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
html body .pr-hi-av { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--fs-primary); color: #fff; font-size: 16px; font-weight: 900; }
html body .pr-hi b { display: block; font-size: 17px; font-weight: 900; }
html body .pr-hi small { color: var(--pr-mute); font-size: 12.5px; font-weight: 600; }

html body .pr-grp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
html body .pr-grp-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 9px; align-items: start; min-height: 0; padding: 13px 14px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; color: var(--pr-ink); text-decoration: none; transition: border-color .15s; animation: none; }
html body .pr-grp-card:hover { border-color: var(--fs-primary); box-shadow: none; transform: none; }
html body .pr-grp-accent, html body .pr-grp-pattern { display: none; }
html body .pr-grp-grid .pr-grp-card .pr-grp-icon { width: 40px; height: 40px; margin: 0; display: grid; place-items: center; border-radius: 11px; background: var(--fs-tint-3); color: var(--fs-primary-ink); box-shadow: none; }
html body .pr-grp-icon svg { width: 21px !important; height: 21px !important; }
html body .pr-grp-ttl { margin: 0; align-self: center; font-size: 15px; font-weight: 800; line-height: 1.35; color: var(--pr-ink); }
html body .pr-grp-stats { grid-column: 1 / -1; display: flex; gap: 14px; margin: 9px 0 0; padding: 0; border: 0; }
html body .pr-grp-stat { padding: 0; background: none; border: 0; font-size: 13px; font-weight: 700; color: var(--pr-ink2); }
html body .pr-grp-stat svg { color: var(--fs-primary); width: 15px !important; height: 15px !important; }
html body .pr-grp-last { grid-column: 1 / -1; display: flex; align-items: center; gap: 5px; margin: 9px 0 0; padding: 8px 0 0; background: none; border: 0; border-top: 1px solid var(--pr-line2); border-radius: 0; font-size: 12.5px; font-weight: 600; color: var(--pr-mute); }
html body .pr-grp-last-ico { background: none; color: var(--pr-mute); width: auto; height: auto; font-size: 14px; }
html body .pr-grp-draft { margin-inline-start: auto; padding: 2px 9px; border-radius: 7px; background: #FFF0DC; color: #B86A0B; font-size: 12px; font-weight: 800; white-space: nowrap; }

html body .pr-install-banner { margin-bottom: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--pr-line); border-radius: 12px; box-shadow: none; }
html body .pr-install-banner-ico i { color: var(--fs-primary); font-size: 22px; }

html body .pr-dash-kpis { gap: 10px; }
html body .pr-dash-kpi { padding: 11px 14px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; }
html body .pr-dash-kpi::before, html body .pr-dash-kpi::after { display: none; }
html body .pr-dash-kpi .pr-dash-kpi-ico { background: var(--fs-tint-3); color: var(--fs-primary-ink); box-shadow: none; }
html body .pr-dash-kpi-ico i { font-size: 20px; }
html body .pr-dash-chart-wrap { background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; }

/* ═══ كشوف المجموعة ═══ */
html body .pr-sh-kpis { margin-bottom: 10px; }
html body .pr-sh-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
html body .pr-sh-bar-ttl { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 900; color: var(--pr-ink); }
html body .pr-sh-bar-ttl i { color: var(--fs-primary); font-size: 20px; }
html body .pr-sh-act { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border: 1px solid var(--pr-line); border-radius: 10px; background: #fff; color: var(--pr-ink2); font-family: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
html body .pr-sh-act i { font-size: 18px; color: var(--fs-primary); }
html body .pr-sh-act:hover:not(:disabled) { background: var(--fs-tint-2); }
html body .pr-sh-act:disabled { opacity: .6; cursor: wait; }
html body .pr-sh-act.pri { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
html body .pr-sh-act.pri i { color: #fff; }
html body .pr-sh-act.pri:hover:not(:disabled) { background: var(--fs-primary-hover); }
html body .m-only, html body .pr-save-bar-btn.m-only { display: none; }

html body .pr-sh-filter { display: grid; grid-template-columns: 130px 150px 150px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; }
html body .pr-sh-filter-grp { flex: none; min-width: 0; }
html body .pr-sh-filter-lbl { display: none; }
html body .pr-sh-filter-sel, html body .pr-sh-filter-inp { width: 100%; height: 40px; min-width: 0; padding-block: 0; border: 1px solid var(--pr-line); border-radius: 9px; background-color: #fff; color: var(--pr-ink); font-size: 14px; font-weight: 700; box-shadow: none; }
html body .pr-sh-filter-inp { background: #F6F9FA; border-color: transparent; font-weight: 500; }
html body .pr-sh-filter-reset { height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: #FDE3DE; color: var(--pr-bad); font-weight: 700; }

html body .pr-sh-list { display: flex; flex-direction: column; gap: 8px; }
html body .pr-sh-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--pr-line); border-radius: 13px; box-shadow: none; color: var(--pr-ink); text-decoration: none; animation: none; }
html body .pr-sh-item::before, html body .pr-sh-item::after { display: none; }
html body .pr-sh-item:hover { border-color: var(--fs-primary); box-shadow: none; transform: none; }
html body .pr-sh-item.approved, html body .pr-sh-item.approved:hover { background: #fff; border: 1px solid var(--pr-line); box-shadow: none; }
html body .pr-sh-item.approved:hover { border-color: var(--fs-primary); }
html body .pr-sh-no { flex: 0 0 44px; width: 44px; height: 44px; min-width: 0; display: grid; place-items: center; padding: 0; border-radius: 12px; background: var(--pr-dark); color: #fff; box-shadow: none; }
html body .pr-sh-no small { display: none; }
html body .pr-sh-no span { color: #fff; font-size: 14px; font-weight: 900; }
html body .pr-sh-body { flex: 1; min-width: 0; }
html body .pr-sh-period { font-size: 15px; font-weight: 800; color: var(--pr-ink); }
html body .pr-sh-meta { gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--pr-mute); }
html body .pr-sh-meta-dot { font-size: 5px; color: var(--pr-mute); }
html body .pr-sh-tail { display: flex; flex-direction: row; align-items: center; gap: 12px; }
html body .pr-sh-amount { direction: ltr; font-size: 17px; font-weight: 900; color: var(--pr-ink); font-variant-numeric: tabular-nums; }
html body .pr-sh-currency { margin-inline-start: 3px; font-size: 11.5px; font-weight: 700; color: var(--pr-mute); }
html body .pr-sh-badge { padding: 2px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; box-shadow: none; border: 0; }
html body .pr-sh-badge-dot { display: none; }
html body .pr-sh-badge.approved { background: #E3F5E9; color: var(--pr-ok); }
html body .pr-sh-badge.draft { background: #FFF0DC; color: #B86A0B; }
html body .pr-sh-clear { height: 42px; padding: 0 18px; border: 1px solid var(--pr-line); border-radius: 10px; background: #fff; color: var(--pr-bad); font-family: inherit; font-weight: 700; cursor: pointer; }
html body .pr-empty .pr-sh-fab { position: static; }

/* ═══ الكشف ═══ */
html body .pr-lock-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 9px 14px; background: #E3F5E9; border: 1px solid #BFE6CC; border-radius: 12px; box-shadow: none; animation: none; }
html body .pr-lock-banner::before, html body .pr-lock-banner::after { display: none; }
html body .pr-lock-banner-ico { flex: none; width: auto; height: auto; background: none; box-shadow: none; animation: none; color: var(--pr-ok); font-size: 19px; }
html body .pr-lock-banner-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
html body .pr-lock-banner-title { display: inline; margin: 0; color: var(--pr-ok); font-size: 14px; font-weight: 800; }
html body .pr-lock-banner-badge { display: none; }
html body .pr-lock-banner-meta { color: #2C5B39; font-size: 13px; font-weight: 600; }
html body .pr-lock-banner-meta strong { font-weight: 700; color: inherit; }

html body .pr-shd-head { margin: 0 0 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; overflow: visible; }
html body .pr-shd-head::before, html body .pr-shd-head::after { display: none; }
@media screen {
    html body .pr-shd-head.is-ro, html body .pr-shd-head-top { display: none; }
    html body .pr-shd-head-fields > .pr-shd-fld:nth-child(3) { display: none; }
}
html body .pr-shd-head-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 620px; }
html body .pr-shd-fld { min-width: 0; }
html body .pr-shd-fld-lbl { font-size: 12.5px; font-weight: 700; color: var(--pr-ink2); }
html body .pr-shd-fld-sel { width: 100%; min-width: 0; height: 40px; padding-block: 0; border: 1px solid var(--pr-line); border-radius: 9px; background-color: #fff; font-size: 14px; font-weight: 700; color: var(--pr-ink); box-shadow: none; }
html body .pr-shd-fld-sel:disabled { background: #F6F9FA; }

html body .pr-bulk { margin: 0 0 10px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; overflow: hidden; }
html body .pr-bulk-toggle { min-height: 44px; background: #fff; border: 0; color: var(--pr-ink); font-weight: 800; box-shadow: none; }
html body .pr-bulk-toggle-ico { color: var(--fs-primary); background: none; box-shadow: none; }
html body .pr-bulk-toggle.open { background: var(--fs-tint-2); }
html body .pr-bulk-panel { background: #fff; border: 0; }
html body .pr-bulk-sel, html body .pr-bulk-inp { height: 40px; border: 1px solid var(--pr-line); border-radius: 9px; box-shadow: none; }
html body .pr-bulk-btn { height: 40px; border-radius: 10px; box-shadow: none; }
html body .pr-bulk-btn.apply { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
html body .pr-bulk-btn.clear { background: #fff; border: 1px solid var(--pr-line); color: var(--pr-ink2); }
html body .pr-bulk-hint { background: var(--fs-tint-2); border: 0; color: var(--pr-ink2); }

html body .pr-shd-add { height: 42px; margin-top: 10px; background: #fff; border: 1px dashed var(--fs-tint-4); border-radius: 10px; color: var(--fs-primary-ink); font-weight: 700; box-shadow: none; }

/* الجدول ديسكتوب */
@media screen and (min-width: 768px) {
    html body .pr-shd-ln-table-wrap { display: block; height: calc(100dvh - 268px); min-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; }
    html body .pr-shd-lines-wrap.is-edit .pr-shd-ln-table-wrap { height: calc(100dvh - 445px); }
    html body .pr-shd-ln-table { width: 100%; height: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
    html body .pr-shd-ln-table th:nth-child(2), html body .pr-shd-ln-table td:nth-child(2) { display: none; }
    html body .pr-shd-ln-table .pr-tbl-fill { height: 100%; }
    html body .pr-shd-ln-table .pr-tbl-fill td { padding: 0; border: 0; background: #fff; }
}
@media print { .pr-tbl-fill, .pr-scr { display: none !important; } }

html body .pr-shd-ln-table thead th { position: sticky; top: 0; z-index: 3; height: 38px; padding: 0 6px; background: #fff; border-bottom: 2px solid var(--pr-line); color: #5A747B; font-size: 12px; font-weight: 800; white-space: nowrap; }
html body .pr-shd-ln-table thead th::before, html body .pr-shd-ln-table thead th::after { display: none; }
html body .pr-shd-ln-table tbody tr:not(.pr-tbl-fill) { height: 58px; animation: none; }
html body .pr-shd-ln-table th:first-child { min-width: 230px; }
html body .pr-shd-ln-table tbody td { padding: 6px; background: #fff; border-bottom: 1px solid var(--pr-line2); vertical-align: middle; }
html body .pr-shd-ln-table tbody tr:not(.pr-tbl-fill):hover td { background: var(--fs-tint-1); }
html body .pr-shd-ln-table .pr-tbl-emp-av { display: none; }
html body .pr-shd-ln-table .pr-tbl-emp-body > div:first-child { font-size: 14px; font-weight: 800; color: var(--pr-ink); }
html body .pr-shd-ln-table .pr-tbl-emp-sub { font-size: 12px; font-weight: 500; color: var(--pr-mute); line-height: 1.4; }
html body .pr-shd-ln-table .pr-tbl-default { background: transparent; color: var(--pr-ink2); font-weight: 700; font-size: 13.5px; }
html body .pr-shd-ln-table .pr-tbl-inp { width: 100%; min-width: 78px; height: 34px; padding: 0 4px; background: #fff; border: 1px solid var(--pr-line2); border-radius: 8px; color: var(--pr-ink); font-size: 13.5px; font-weight: 700; text-align: center; box-shadow: none; }
html body .pr-shd-ln-table .pr-tbl-inp.negative { color: var(--pr-bad); }
html body .pr-shd-ln-table .pr-tbl-inp.is-z { color: #B4C5CA; font-weight: 500; }
html body .pr-shd-ln-table .pr-tbl-inp:focus { border-color: var(--fs-primary); color: var(--pr-ink); outline: 0; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14); }
html body .pr-shd-ln-table .pr-tbl-inp:disabled { background: #fff; color: var(--pr-ink); opacity: 1; -webkit-text-fill-color: currentColor; }
html body .pr-shd-ln-table .pr-tbl-inp.negative:disabled { color: var(--pr-bad); }
html body .pr-shd-ln-table .pr-tbl-inp.is-z:disabled { color: #B4C5CA; font-weight: 500; }
html body .pr-shd-ln-table .pr-tbl-net, html body .pr-shd-ln-table tbody td.pr-tbl-net { background: #fff; border: 0; border-bottom: 1px solid var(--pr-line2); box-shadow: none; color: var(--fs-primary-ink); font-size: 15px; font-weight: 900; }
html body .pr-shd-ln-table tbody td.pr-tbl-net { background: #fff !important; border-inline: 0 !important; color: var(--fs-primary-ink) !important; font-size: 15px !important; }
html body .pr-shd-ln-table tbody tr:not(.pr-tbl-fill):hover td.pr-tbl-net { background: var(--fs-tint-1) !important; }
html body .pr-shd-ln-table tfoot td.pr-tbl-net { background: #F6FAFB !important; border-inline: 0 !important; color: var(--pr-bad) !important; font-size: 14px !important; text-shadow: none; }
html body .pr-shd-ln-table .pr-tbl-calc { background: none; padding: 0; font-size: 11.5px; font-weight: 700; color: var(--pr-ok); }
html body .pr-shd-ln-table .pr-tbl-calc.negative { color: var(--pr-bad); }
html body .pr-shd-ln-table .pr-tbl-del { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #FDE3DE; color: var(--pr-bad); font-size: 17px; }

html body .pr-shd-ln-table tfoot td, html body .pr-shd-ln-table tfoot td.pr-tbl-net { position: sticky; bottom: 0; z-index: 3; height: 46px; padding: 2px 6px; background: #F6FAFB; border: 0; border-top: 2px solid var(--fs-primary); color: var(--pr-bad); font-size: 14px; font-weight: 800; text-align: center; }
html body .pr-shd-ln-table tfoot td.pr-tbl-net { background: #F6FAFB; box-shadow: none; }
html body .pr-shd-ln-table tfoot td:first-child { color: var(--pr-ink); white-space: nowrap; }
html body .pr-shd-ln-table tfoot .pr-tbl-days-total { background: none; color: inherit; font-size: 13px; font-weight: 800; }
html body .pr-shd-ln-table tfoot .pr-tbl-calc { color: inherit; }

/* الشريط السفلى */
html body .pr-save-bar { padding: 10px 16px; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid var(--pr-line); box-shadow: 0 -6px 18px rgba(4, 37, 45, .08); animation: none; }
html body .pr-save-bar.is-view { display: none; }
html body .pr-save-bar-total-lbl { font-size: 13px; font-weight: 700; color: var(--pr-ink); }
html body .pr-save-bar-total-val { color: var(--pr-bad); font-size: 20px; font-weight: 900; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
html body .pr-save-bar-total-val small { margin-inline: 4px; color: var(--pr-bad); }
html body .pr-save-bar-btns { display: flex; gap: 8px; }
html body .pr-save-bar-btn { height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border: 1px solid var(--pr-line); border-radius: 10px; background: #fff; color: var(--pr-ink2); font-family: inherit; font-size: 15px; font-weight: 800; white-space: nowrap; box-shadow: none; cursor: pointer; }
html body .pr-save-bar-btn i { font-size: 19px; color: var(--fs-primary); }
html body .pr-save-bar-btn.save { background: var(--fs-action, var(--fs-primary)); border-color: var(--fs-action, var(--fs-primary)); color: #fff; min-width: 160px; }
html body .pr-save-bar-btn.save i, html body .pr-save-bar-btn.print i { color: #fff; }
html body .pr-save-bar-btn.save:hover:not(:disabled) { filter: brightness(.93); background: var(--fs-action, var(--fs-primary)); transform: none; box-shadow: none; }
html body .pr-save-bar-btn.print { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
html body .pr-save-bar-btn.delete { background: #FDE3DE; border-color: #FDE3DE; color: var(--pr-bad); }
html body .pr-save-bar-btn.delete i { color: var(--pr-bad); }

/* كروت الموظفين والبحث (موبيل) */
html body .pr-ln-search { display: flex; align-items: center; gap: 8px; height: 42px; margin: 0; padding: 0 12px; background: #fff; border: 1px solid var(--fs-tint-4); border-radius: 10px; }
html body .pr-ln-search i { color: var(--fs-primary); font-size: 19px; }
html body .pr-ln-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-family: inherit; font-size: 15px; color: var(--pr-ink); }
html body .pr-ln-card { display: block; width: 100%; padding: 10px 12px; background: #fff; border: 1px solid var(--pr-line); border-radius: 13px; font-family: inherit; color: var(--pr-ink); text-align: right; cursor: pointer; }
html body .pr-ln-card:active { border-color: var(--fs-primary); background: var(--fs-tint-1); }
html body .pr-ln-a { display: flex; align-items: center; gap: 8px; }
html body .pr-ln-a > b { min-width: 0; font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .pr-ln-a em { flex: none; padding: 1px 7px; border-radius: 6px; background: #FFF0DC; color: #B86A0B; font-style: normal; font-size: 11.5px; font-weight: 800; }
html body .pr-ln-a strong { margin-right: auto; font-size: 18px; font-weight: 900; color: var(--fs-primary-ink); font-variant-numeric: tabular-nums; }
html body .pr-ln-x { display: block; margin-top: 3px; font-size: 12.5px; color: var(--pr-mute); }
html body .pr-ln-r3 { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--pr-line2); font-size: 12px; font-weight: 700; color: var(--pr-ink2); }
html body .pr-ln-r3 b { display: block; font-size: 14px; color: var(--pr-ink); text-align: right; font-variant-numeric: tabular-nums; }
html body .pr-ln-r3 b.p { color: var(--pr-ok); }
html body .pr-ln-r3 b.m { color: var(--pr-bad); }
html body .pr-ln-none { padding: 18px; text-align: center; color: var(--pr-mute); font-weight: 600; }

/* لوحة الموظف من تحت */
html body .pr-root > .pr-ls-wrap { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; }
html body .pr-ls-shade { position: absolute; inset: 0; background: rgba(4, 37, 45, .45); animation: pr-fade-in .18s; }
html body .pr-ls { position: relative; display: flex; flex-direction: column; width: 100%; max-height: 92dvh; padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px)); background: #fff; border-radius: 22px 22px 0 0; animation: pr-ls-up .22s cubic-bezier(.22, 1, .36, 1); }
@keyframes pr-ls-up { from { transform: translateY(100%); } to { transform: none; } }
html body .pr-ls-grab { flex: none; width: 42px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: #D5E2E6; }
html body .pr-ls-hd { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
html body .pr-ls-hd h3 { margin: 0; font-size: 17px; font-weight: 900; color: var(--pr-ink); }
html body .pr-ls-hd p { margin: 1px 0 8px; font-size: 12.5px; color: var(--pr-mute); }
html body .pr-ls-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #F2F6F7; color: var(--pr-ink2); font-size: 19px; }
html body .pr-ls-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
html body .pr-ls-def { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 9px; background: #F6F9FA; font-size: 12.5px; font-weight: 700; color: var(--pr-ink2); }
html body .pr-ls-def.mod { background: #FFF0DC; color: #B86A0B; }
html body .pr-ls-def b { font-size: 13.5px; font-weight: 800; }
html body .pr-ls-sec { margin: 9px 0 5px; font-size: 12.5px; font-weight: 800; color: var(--fs-primary-ink); }
html body .pr-ls-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html body .pr-ls-f { min-width: 0; }
html body .pr-ls-f label { display: block; margin-bottom: 3px; font-size: 12.5px; font-weight: 700; color: var(--pr-ink2); }
html body .pr-ls-f input { width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--pr-line); border-radius: 9px; background: #fff; color: var(--pr-ink); font-family: inherit; font-size: 16px; font-weight: 700; direction: ltr; text-align: right; }
html body .pr-ls-f input.neg { color: var(--pr-bad); }
html body .pr-ls-f input:focus { border-color: var(--fs-primary); outline: 0; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14); }
html body .pr-ls-f input:disabled { background: #F6F9FA; opacity: 1; -webkit-text-fill-color: currentColor; }
html body .pr-ls-f small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--pr-ok); }
html body .pr-ls-f small.neg { color: var(--pr-bad); }
html body .pr-ls-net { flex: none; display: flex; justify-content: space-between; align-items: center; margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--pr-dark); color: #CFE6EC; font-weight: 700; }
html body .pr-ls-net b { font-size: 24px; font-weight: 900; color: #FFD27A; font-variant-numeric: tabular-nums; }
html body .pr-ls-foot { flex: none; display: flex; gap: 8px; }
html body .pr-ls-del { flex: 0 0 50px; height: 50px; border: 0; border-radius: 12px; background: #FDE3DE; color: var(--pr-bad); font-size: 21px; }
html body .pr-ls-ok { flex: 1; height: 50px; border: 0; border-radius: 12px; background: var(--fs-primary); color: #fff; font-family: inherit; font-size: 16px; font-weight: 800; }

/* ═══ التقارير ═══ */
html body .pr-rpt-page { position: relative; }
html body .pr-rpt-wrap { max-width: 1400px; margin: 0 auto; padding: 14px 16px 24px; }
html body .pr-rpt-filter { margin: 0 0 10px; padding: 12px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; }
html body .pr-rpt-filter::before, html body .pr-rpt-filter::after { display: none; }
html body .pr-rpt-filter-ttl { display: none; }
html body .pr-rpt-filter-grid { gap: 8px; }
html body .pr-rpt-page .pr-rpt-filter-grid { grid-template-columns: 2fr 1fr 1fr; }
html body .pr-rpt-filter-lbl { margin-bottom: 4px; font-size: 12.5px; font-weight: 700; color: var(--pr-ink2); }
html body .pr-rpt-filter-sel { height: 40px; padding-block: 0; border: 1px solid var(--pr-line); border-radius: 9px; background-color: #fff; color: var(--pr-ink); font-size: 14px; font-weight: 700; box-shadow: none; }
html body .pr-rpt-chipbox { padding: 0; background: none; border: 0; gap: 6px; }
html body .pr-rpt-chip { height: 34px; padding: 0 12px; border: 1px solid var(--pr-line); border-radius: 9px; background: #fff; color: var(--pr-ink2); font-size: 13px; font-weight: 700; box-shadow: none; }
html body .pr-rpt-chip.on { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
html body .pr-rpt-filter-actions { margin-top: 10px; padding-top: 0; border: 0; gap: 8px; }
html body .pr-rpt-btn { height: 42px; padding: 0 16px; border: 1px solid var(--pr-line); border-radius: 10px; background: #fff; color: var(--pr-ink2); font-size: 14px; font-weight: 800; box-shadow: none; }
html body .pr-rpt-btn i { font-size: 18px; }
html body .pr-rpt-btn.primary { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }
html body .pr-rpt-btn.success, html body .pr-rpt-btn.txt { background: #fff; border-color: var(--pr-line); color: var(--pr-ink2); }
html body .pr-rpt-btn:hover:not(:disabled) { transform: none; box-shadow: none; filter: brightness(.96); }

html body .pr-rpt-summary, html body .pr-cmp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 10px; padding: 0; background: none; border: 0; box-shadow: none; }
html body .pr-cmp-kpis .pr-cmp-kpi { background: #fff; border-top-color: var(--pr-line); }
html body .pr-rpt-summary-stat, html body .pr-cmp-kpi { min-height: 76px; padding: 11px 14px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; text-align: right; }
html body .pr-rpt-summary-stat small, html body .pr-cmp-kpi > small:first-child { display: block; font-size: 13px; font-weight: 700; color: var(--pr-ink2); }
html body .pr-rpt-summary-stat strong, html body .pr-cmp-kpi-val { display: block; font-size: 22px; font-weight: 900; color: var(--pr-ink); font-variant-numeric: tabular-nums; }
html body .pr-rpt-summary-stat.highlight { background: var(--pr-dark); border-color: var(--pr-dark); }
html body .pr-rpt-summary-stat.highlight small { color: #CFE6EC; }
html body .pr-rpt-summary-stat.highlight strong { color: #FFD27A; }
html body .pr-rpt-summary-stat.problem { background: #FDE3DE; border-color: #F9C9C0; }
html body .pr-rpt-summary-stat.problem.active { background: var(--pr-bad); border-color: var(--pr-bad); }

html body .pr-cmp-summary { background: none; border: 0; box-shadow: none; padding: 0; margin: 0 0 10px; }
html body .pr-cmp-period { margin: 0 0 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; }
html body .pr-cmp-empty { padding: 18px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; text-align: center; font-weight: 700; color: var(--pr-ink2); }
html body .pr-cmp-section { margin: 0 0 10px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; overflow-x: auto; }
html body .pr-cmp-section h2, html body .pr-cmp-section.new h2, html body .pr-cmp-section.left h2, html body .pr-cmp-section.changes h2 { position: sticky; right: 0; margin: 0; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--pr-line); color: var(--pr-ink); font-size: 15px; font-weight: 900; }
html body .pr-cmp-tbl tfoot td, html body .pr-cmp-tbl tfoot td.net { background: #F6FAFB; border-top: 2px solid var(--fs-primary); color: var(--pr-bad); font-weight: 800; }
html body .pr-cmp-tbl tfoot td.total-lbl { color: var(--pr-ink); }

html body .pr-rpt-toolbar { margin: 0 0 10px; }
html body .pr-rpt-search { height: 42px; background: #fff; border: 1px solid var(--pr-line); border-radius: 10px; box-shadow: none; }
html body .pr-rpt-search-ico i { color: var(--fs-primary); font-size: 19px; }
html body .pr-rpt-tbl-wrap { background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; box-shadow: none; }
html body .pr-rpt-tbl tfoot tr { background: #F6FAFB; border-top: 2px solid var(--fs-primary); }
html body .pr-rpt-tbl tfoot td, html body .pr-rpt-tbl tfoot td.num, html body .pr-rpt-tbl tfoot td.net { background: #F6FAFB; color: var(--pr-bad); }
html body .pr-rpt-tbl tfoot td.lbl { color: var(--pr-ink); }
html body .pr-rpt-card { background: #fff; border: 1px solid var(--pr-line); border-radius: 13px; box-shadow: none; }

/* ═══ الموبيل ═══ */
@media (max-width: 767.98px) {
    html body .pr-root .pr-hdr { padding: 0 12px; }
    html body .pr-root .pr-hdr-acts { display: none; }
    html body .pr-root .pr-hdr-act { width: 40px; padding: 0; }
    html body .pr-root .pr-hdr-act span { display: none; }
    html body .pr-cnt, html body .pr-rpt-wrap { padding: 12px 12px 20px; }
    html body .pr-cnt:has(.pr-save-bar) { padding-bottom: 150px; }
    html body .pr-cnt:has(.pr-sh-bar) { padding-bottom: 90px; }
    html body .m-only, html body .pr-save-bar-btn.m-only { display: inline-flex; }
    html body .d-only { display: none; }

    html body .pr-root .fs-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    html body .pr-root .fs-kpi { min-height: 70px; padding: 9px 11px; border-radius: 12px; }
    html body .pr-root .fs-kpi small { font-size: 12.5px; }
    html body .pr-root .fs-kpi-v { font-size: 21px; }
    html body .pr-root .fs-kpi-ic { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
    html body .pr-root .pr-hero .fs-kpis { grid-template-columns: 1.3fr 1fr; }
    html body .pr-root .pr-hero .fs-kpi:nth-child(n+3) { display: none; }
    html body .pr-root .pr-hero .fs-kpi.is-hero .fs-kpi-ic, html body .pr-root .pr-hero .fs-kpi-v em { display: none; }
    html body .pr-root .fs-kpis:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    html body .pr-root .fs-kpis:has(> :nth-child(3):last-child) .fs-kpi { min-height: 0; padding: 9px 10px; }
    html body .pr-root .fs-kpis:has(> :nth-child(3):last-child) .fs-kpi-ic { display: none; }
    html body .pr-root .fs-kpis:has(> :nth-child(3):last-child) .fs-kpi-v { font-size: 20px; }

    html body .pr-grp-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    html body .pr-section-ttl-sub { display: none; }

    html body .pr-sh-bar { position: fixed; inset: auto 0 0 0; z-index: 60; margin: 0; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--pr-line); }
    html body .pr-sh-bar-ttl { display: none; }
    html body .pr-sh-act { height: 50px; }
    html body .pr-sh-act.pri { flex: 1; background: var(--fs-action, var(--fs-primary)); border-color: var(--fs-action, var(--fs-primary)); font-size: 16px; }
    html body .pr-sh-act.more { flex: 0 0 54px; padding: 0; }
    html body .pr-sh-menu-shade { position: fixed; inset: 0; z-index: 61; background: rgba(4, 37, 45, .3); }
    html body .pr-sh-menu { position: absolute; left: 12px; bottom: calc(100% + 6px); z-index: 62; flex-direction: column; min-width: 210px; padding: 6px; background: #fff; border: 1px solid var(--pr-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(4, 37, 45, .22); }
    html body .pr-sh-menu button { height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--pr-ink); font-family: inherit; font-size: 15px; font-weight: 700; }
    html body .pr-sh-menu button i { font-size: 19px; color: var(--fs-primary); }

    html body .pr-sh-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; background: none; border: 0; }
    html body .pr-sh-filter-grp.grow { grid-column: 1 / -1; }
    html body .pr-sh-filter-inp { background: #fff; border: 1px solid var(--fs-tint-4); height: 42px; }
    html body .pr-sh-filter:has(.pr-sh-filter-reset) .pr-sh-filter-grp.grow { grid-column: span 2; }
    html body .pr-sh-filter-reset { height: 42px; }
    html body .pr-sh-meta-dot, html body .pr-sh-meta > :last-child { display: none; }
    html body .pr-sh-meta > :only-child { display: inline-flex; }   /* (2026-11-17) «آخر الكشوف»: السطر الوحيد «شوفته من…» كان بيستخبى بالقاعدة اللى فوق */
    html body .pr-sh-tail { flex-direction: column; align-items: flex-end; gap: 3px; }

    html body .pr-lock-banner { justify-content: center; }
    html body .pr-lock-banner-meta { display: none; }
    html body .pr-shd-head-fields { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html body .pr-shd-head-fields > .pr-shd-fld:last-child { grid-column: 1 / -1; }

    html body .pr-save-bar { flex-wrap: wrap; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); gap: 0; border-top: 2px solid var(--fs-primary); }
    html body .pr-save-bar.is-view { display: flex; }
    html body .pr-save-bar-total { flex: 1 0 100%; flex-direction: row; align-items: center; justify-content: space-between; padding: 9px 2px; }
    html body .pr-save-bar-total-lbl { color: var(--pr-bad); font-weight: 800; }
    html body .pr-save-bar-total-val { font-size: 19px; }
    html body .pr-save-bar-btns { flex: 1 0 100%; }
    html body .pr-save-bar-btn { height: 56px; flex: 1; padding: 0 10px; }
    /* (2026-11-17) كانت أيقونات بس ← أيقونة فوق وكلمة تحت (زى زراير الفواتير) */
    html body .pr-save-bar-btn.is-ic, html body .pr-save-bar-btn.delete { flex: 0 0 62px; padding: 0; flex-direction: column; gap: 3px; font-size: 11px; line-height: 1.1; }
    html body .pr-save-bar-btn.is-ic span, html body .pr-save-bar-btn.delete span { display: block; }
    html body .pr-save-bar-btn.save { min-width: 0; font-size: 16px; }

    html body .pr-rpt-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html body .pr-rpt-filter-grp.full { grid-column: 1 / -1; }
    html body .pr-rpt-page .pr-rpt-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html body .pr-rpt-page .pr-rpt-filter-grp:first-child { grid-column: 1 / -1; }
    html body .pr-rpt-filter-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
    html body .pr-rpt-btn { padding: 0 6px; font-size: 13px; white-space: nowrap; }
    html body .pr-rpt-summary, html body .pr-cmp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    html body .pr-rpt-summary-stat, html body .pr-cmp-kpi { min-height: 66px; padding: 9px 11px; border-radius: 12px; }
    html body .pr-rpt-summary-stat strong, html body .pr-cmp-kpi-val { font-size: 18px; }
    html body .pr-cmp-tbl { min-width: 620px; }
    /* (2026-11-17) جدول «موظفين خرجوا» 5 أعمدة بس ← يدخل فى الشاشة بدل ما «آخر صافى» يستخبى يمين؛ الجداول الأعرض تفضل بسحب */
    html body .pr-cmp-section.left .pr-cmp-tbl { min-width: 0; width: 100%; font-size: 12.5px; }
    html body .pr-cmp-section.left .pr-cmp-tbl :is(th, td) { padding-inline: 5px; white-space: normal; overflow-wrap: anywhere; }
    /* زرار «عرض المقارنة» كان الكلام على جنب ← فى النص */
    html body .pr-rpt-btn { justify-content: center; }
}

/* الشريط العلوى لا يظهر فى الطباعة */
@media print {
    .pr-hdr-acts, .pr-sh-bar, .pr-ls-wrap { display: none !important; }
    /* payroll.css بيخفى آخر عمود فى الطباعة عشان زرار الحذف؛ فى الكشف المعتمد مفيش زرار فكان الصافى بيختفى */
    .pr-shd-lines-wrap:not(.is-edit) .pr-shd-ln-table th:last-child, .pr-shd-lines-wrap:not(.is-edit) .pr-shd-ln-table td:last-child { display: table-cell !important; }
    .pr-shd-ln-table { height: auto !important; }
    .pr-shd-ln-table-wrap { height: auto !important; border: 0 !important; }
    .pr-shd-ln-table thead th, .pr-shd-ln-table tfoot td { position: static !important; color: #000 !important; }
}
