/* ══════════════════════════════════════════════════════════════════════
   الإعدادات (2026-11-08): الصلاحيات وطابعات نقطة البيع
   المتغيرات --rp-* من fs-report.css
   ══════════════════════════════════════════════════════════════════════ */

/* ═══ الصلاحيات ═══ */
html body .fs-perm { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - 66px); min-height: 520px; padding: 10px 12px; color: var(--rp-ink); }
html body .fs-perm button { font-family: inherit; cursor: pointer; }
html body .pm-ctx { flex: none; display: flex; align-items: center; gap: 9px; padding: 8px 12px; background: #fff; border: 1px solid var(--rp-line); border-radius: 14px; }
html body .pm-ic { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--fs-tint-3); color: var(--fs-primary-ink); font-size: 20px; }
html body .pm-ttl, html body .pm-ttl-sec { margin: 0; font-size: 17px; font-weight: 900; color: var(--rp-ink); white-space: nowrap; }
html body .pm-ttl-sec, html body .pm-back, html body .pm-cnt, html body .pm-dock, html body .pm-cards { display: none; }
html body .pm-tools { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
html body .pm-grp { flex: 0 1 280px; display: flex; align-items: center; gap: 6px; height: 44px; margin: 0; padding: 0 10px; background: #fff; border: 1px solid var(--rp-line); border-radius: 12px; }
html body .pm-grp small { flex: none; font-size: 12px; font-weight: 700; color: var(--rp-mute); }
html body .pm-grp .rz-dropdown { flex: 1; min-width: 0; width: auto; height: 40px; border: 0 !important; box-shadow: none !important; background: none !important; }
html body .pm-grp .rz-dropdown { display: flex !important; flex-direction: row !important; align-items: center !important; }
html body .pm-grp .rz-dropdown-label { flex: 1; height: auto !important; padding: 0 4px !important; line-height: 1.3 !important; font-weight: 800; color: var(--rp-ink); }
html body .pm-grp .rz-dropdown-trigger { position: static !important; height: auto !important; background: none !important; color: var(--fs-primary) !important; }
html body .pm-grp .rz-dropdown-trigger .rz-dropdown-trigger-icon, html body .pm-grp .rz-dropdown-trigger span { color: var(--fs-primary) !important; }
html body .pm-find { flex: 0 1 260px; display: flex; align-items: center; gap: 8px; height: 44px; margin: 0; padding: 0 12px; background: #F6F9FA; border: 1px solid transparent; border-radius: 12px; }
html body .pm-find:focus-within { background: #fff; border-color: var(--fs-primary); }
html body .pm-find i { font-size: 19px; color: var(--fs-primary); }
html body .pm-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--rp-ink); }
html body .pm-save { height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--fs-action, var(--fs-primary)); color: #fff; font-size: 15px; font-weight: 800; white-space: nowrap; }
html body .pm-save i { font-size: 18px; }
html body .pm-save em { padding: 1px 8px; border-radius: 7px; background: rgba(255, 255, 255, .22); font-style: normal; font-size: 13px; }
html body .pm-save:disabled { background: #C9D5D9; color: #5A7077; cursor: default; }

html body .pm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 10px; }
html body .pm-rail { padding: 8px; background: #fff; border: 1px solid var(--rp-line); border-radius: 14px; overflow-y: auto; }
html body .pm-sc { display: block; position: relative; width: 100%; margin-bottom: 1px; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--rp-ink); text-align: start; }
html body .pm-sc:hover { background: var(--fs-tint-1); }
html body .pm-sc .t { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
html body .pm-sc b { font-size: 13.5px; font-weight: 800; }
html body .pm-sc small { flex: none; font-size: 12px; font-weight: 700; color: var(--rp-mute); font-variant-numeric: tabular-nums; }
html body .pm-sc .bar { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--rp-line2); overflow: hidden; }
html body .pm-sc .bar i { display: block; height: 100%; border-radius: 2px; background: var(--fs-primary); transition: width .2s; }
html body .pm-sc .go { display: none; }
html body .pm-sc.on { background: var(--rp-dark); color: #fff; }
html body .pm-sc.on small { color: #CFE6EC; }
html body .pm-sc.on .bar { background: rgba(255, 255, 255, .2); }
html body .pm-sc.on .bar i { background: #FFD27A; }

html body .pm-mx { min-height: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rp-line); border-radius: 14px; overflow: hidden; }
html body .pm-scroll { flex: 1; min-height: 0; overflow-y: auto; }
html body .pm-h, html body .pm-r { display: grid; grid-template-columns: minmax(0, 1fr) repeat(6, 62px) 46px; align-items: center; padding: 0 12px; }
html body .pm-h { position: sticky; top: 0; z-index: 2; height: 60px; background: #fff; border-bottom: 2px solid var(--rp-line); font-size: 12.5px; font-weight: 800; color: #5A747B; text-align: center; }
html body .pm-h > span:first-child { text-align: start; }
html body .pm-h label { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 0; }
html body .pm-r { min-height: 45px; border-bottom: 1px solid var(--rp-line2); font-size: 14px; font-weight: 700; }
html body .pm-r:hover { background: #F7FAFB; }
html body .pm-r .n small { display: block; font-size: 11.5px; font-weight: 600; color: var(--rp-mute); }
html body .pm-r.ch { background: #FFF8EC; }
html body .pm-r.ch .n::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-inline-start: 7px; border-radius: 50%; background: #B86A0B; }
html body .fs-perm .c { width: 26px; height: 26px; margin: auto; padding: 0; display: grid; place-items: center; border: 1.5px solid #C6D6DB; border-radius: 8px; background: #fff; color: #fff; font-size: 17px; transition: background .12s, border-color .12s; }
html body .fs-perm .c:hover { border-color: var(--fs-primary); }
html body .fs-perm .c:focus-visible, html body .pm-sc:focus-visible, html body .pm-rowall:focus-visible { outline: 2px solid var(--fs-primary); outline-offset: 2px; }
html body .fs-perm .c.on { background: var(--fs-primary); border-color: var(--fs-primary); }
html body .fs-perm .c.part { background: var(--fs-tint-3); border-color: var(--fs-tint-4); color: var(--fs-primary-ink); }
html body .pm-rowall { padding: 4px 0; border: 0; background: none; color: var(--fs-primary); font-size: 12px; font-weight: 800; }
html body .pm-all { font-size: 12.5px; }
html body .pm-ft { flex: none; padding: 9px 12px; border-top: 1px solid var(--rp-line); font-size: 13px; font-weight: 700; color: var(--rp-mute); }
html body .pm-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px 12px; color: var(--rp-mute); text-align: center; }
html body .pm-state i { font-size: 38px; color: var(--fs-tint-4); }
html body .pm-state b { color: var(--rp-ink); font-size: 15px; }

@media (max-width: 768px) {
    html body .sr-wrap:has(.pm-dock) { transform: none !important; animation: none !important; }
    html body .fs-perm { height: auto; min-height: 0; padding: 0 0 92px; gap: 10px; }
    html body .d-only.pm-save { display: none; }
    html body .pm-ctx { flex-wrap: wrap; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--rp-line); border-radius: 0; }
    html body .pm-ic { display: none; }
    html body .pm-ttl { flex: 1; min-height: 40px; line-height: 40px; }
    html body .pm-tools { flex: 1 0 100%; flex-direction: column; align-items: stretch; }
    html body .pm-grp, html body .pm-find { flex: none; }
    html body .pm-find { background: #fff; border-color: var(--fs-tint-4); }
    html body .pm-body { display: block; padding: 0 12px; }
    html body .pm-mx { display: none; }
    html body .pm-rail { padding: 0; background: none; border: 0; overflow: visible; }
    html body .pm-sc:not(#_), html body .pm-sc.on:not(#_) { min-height: 0 !important; margin-bottom: 8px; padding: 10px 12px !important; padding-inline-end: 36px !important; background: #fff; border: 1px solid var(--rp-line); border-radius: 12px; color: var(--rp-ink); }
    html body .pm-sc b { font-size: 14.5px; }
    html body .pm-sc.on small { color: var(--rp-mute); }
    html body .pm-sc.on .bar { background: var(--rp-line2); }
    html body .pm-sc.on .bar i { background: var(--fs-primary); }
    html body .pm-sc .go { display: block; position: absolute; inset-inline-end: 12px; top: 50%; translate: 0 -50%; font-size: 17px; color: #A9BDC3; }

    html body .fs-perm.is-detail .pm-rail, html body .fs-perm.is-search .pm-rail { display: none; }
    html body .fs-perm.is-detail .pm-cards, html body .fs-perm.is-search .pm-cards { display: block; }
    html body .fs-perm.is-detail:not(.is-search) .pm-tools, html body .fs-perm.is-detail:not(.is-search) .pm-ttl { display: none; }
    html body .fs-perm.is-detail:not(.is-search) .pm-ttl-sec { display: block; flex: 1; white-space: normal; line-height: 1.2; }
    html body .fs-perm.is-detail:not(.is-search) .pm-back { display: grid; }
    html body .fs-perm.is-detail:not(.is-search) .pm-cnt { display: inline-block; padding: 3px 9px; border-radius: 7px; background: var(--fs-tint-3); color: var(--fs-primary-ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
    html body .pm-ib { flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border: 1px solid var(--rp-line); border-radius: 10px; background: #fff; color: var(--fs-primary); font-size: 18px; }

    html body .pm-fc { margin-bottom: 8px; padding: 10px 12px; background: #fff; border: 1px solid var(--rp-line); border-radius: 13px; }
    html body .pm-fc.ch { background: #FFFCF6; border-color: #F2C98D; }
    html body .pm-fc .t { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14.5px; font-weight: 800; }
    html body .pm-fc .t small { display: block; font-size: 11.5px; font-weight: 600; color: var(--rp-mute); }
    html body .pm-fc .t button:not(#_) { flex: none; min-height: 0 !important; padding: 2px 0 !important; border: 0; background: none; color: var(--fs-primary); font-size: 12px !important; font-weight: 800; white-space: nowrap; }
    html body .pm-fc .tg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
    html body .pm-fc .tg button:not(#_) { height: 40px !important; min-height: 0 !important; padding: 0 !important; border: 1.5px solid var(--rp-line); border-radius: 9px; background: #fff; color: var(--rp-mute); font-size: 13px !important; font-weight: 700; }
    html body .pm-fc .tg button.on:not(#_) { background: var(--fs-primary); border-color: var(--fs-primary); color: #fff; }

    html body .pm-dock { display: block; position: fixed; inset: auto 0 0 0; z-index: 1040; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--rp-line); }
    html body .pm-dock .pm-save:not(#_) { width: 100%; height: 50px !important; min-height: 0 !important; font-size: 16px !important; }
    html body .fs-perm .pm-state { padding: 24px 12px; }
}

/* ═══ طابعات نقطة البيع ═══ */
html body .fs-ptr { display: flex; flex-direction: column; gap: 10px; max-width: 1180px; margin: 0 auto; padding: 10px 12px 20px; color: var(--rp-ink); }
html body .fs-ptr button { font-family: inherit; cursor: pointer; }
html body .ptr-ctx { display: flex; align-items: center; gap: 9px; padding: 8px 12px; background: #fff; border: 1px solid var(--rp-line); border-radius: 14px; }
html body .ptr-ic { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--fs-tint-3); color: var(--fs-primary-ink); font-size: 20px; }
html body .ptr-ctx h2 { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 900; color: var(--rp-ink); }
html body .ptr-found { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--rp-ok); white-space: nowrap; }
html body .ptr-found i { font-size: 17px; }
html body .ptr-ref { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--rp-line); border-radius: 10px; background: #fff; color: var(--fs-primary); font-size: 19px; }
html body .ptr-dev { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 7px; background: var(--fs-tint-3); color: var(--fs-primary-ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
html body .ptr-note { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--fs-tint-1); border: 1px solid var(--fs-tint-4); border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--rp-ink2); }
html body .ptr-note i { flex: none; font-size: 19px; color: var(--fs-primary); }
html body .ptr-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
html body .ptr-c { display: flex; flex-direction: column; gap: 10px; padding: 13px 14px; background: #fff; border: 1px solid var(--rp-line); border-radius: 14px; }
html body .ptr-c.main { border-color: var(--fs-primary); box-shadow: inset 0 0 0 1px var(--fs-primary); }
html body .ptr-h { display: flex; align-items: center; gap: 9px; }
html body .ptr-h .ptr-ic { flex-basis: 40px; width: 40px; height: 40px; }
html body .ptr-h b { display: block; font-size: 15.5px; font-weight: 900; }
html body .ptr-h small { font-size: 12.5px; font-weight: 600; color: var(--rp-mute); }
html body .ptr-sel { position: relative; }
html body .ptr-sel select { width: 100%; height: 44px; padding-block: 0; padding-inline: 10px 30px; border: 1px solid var(--rp-line); border-radius: 10px; background: #fff; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--rp-ink); appearance: none; -webkit-appearance: none; }
html body .ptr-sel select:focus { border-color: var(--fs-primary); outline: 0; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14); }
html body .ptr-sel i { position: absolute; inset-inline-end: 10px; top: 50%; translate: 0 -50%; color: var(--fs-primary); font-size: 17px; pointer-events: none; }
html body .ptr-st { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 3px 9px; border-radius: 7px; background: #F2F6F7; color: var(--rp-mute); font-size: 12px; font-weight: 800; }
html body .ptr-st.ok { background: #E3F5E9; color: var(--rp-ok); }
html body .ptr-act { display: flex; align-items: center; gap: 8px; }
html body .ptr-save { height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--fs-action, var(--fs-primary)); color: #fff; font-size: 15px; font-weight: 800; }
html body .ptr-save:disabled { opacity: .6; cursor: wait; }
html body .ptr-clr { height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border: 1px solid var(--rp-line); border-radius: 12px; background: #fff; color: var(--rp-bad); font-weight: 700; }
html body .ptr-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 12px; background: #fff; border: 1px solid var(--rp-line); border-radius: 14px; color: var(--rp-mute); font-weight: 600; text-align: center; }
html body .ptr-state > i { font-size: 38px; color: var(--fs-tint-4); }

@media (max-width: 768px) {
    html body .sr-wrap:has(.ptr-act) { transform: none !important; animation: none !important; }
    html body .fs-ptr { padding: 0 12px 92px; }
    html body .ptr-ctx { margin-inline: -12px; border: 0; border-bottom: 1px solid var(--rp-line); border-radius: 0; }
    html body .ptr-found, html body .ptr-dev { display: none; }
    html body .ptr-g { grid-template-columns: minmax(0, 1fr); }
    html body .ptr-st { display: none; }
    html body .ptr-note { font-size: 12.5px; }
    html body .ptr-act { position: fixed; inset: auto 0 0 0; z-index: 1040; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--rp-line); }
    html body .ptr-save:not(#_) { flex: 1; height: 50px !important; min-height: 0 !important; font-size: 16px !important; }
    /* (2026-11-17) كان أيقونة سلة بس ← أيقونة فوق وكلمة «إلغاء التحديد» تحت */
    html body .ptr-clr:not(#_) { flex: 0 0 78px; width: 78px; height: 50px !important; min-height: 0 !important; padding: 0 4px !important; flex-direction: column; gap: 2px; font-size: 10.5px !important; line-height: 1.1; text-align: center; }
    html body .ptr-clr span { display: block; }
}

/* (2026-11-17) سجل أخطاء الويب: أيقونة «إظهار كلمة السر» كانت راكبة على الكلام جوه الخانة (ملف الموبايل العام بيصفّر الحشو) ← مكان للأيقونة */
html body :is(.el-pass .el-in, .ru-pass .ru-in):not(#_) { padding-left: 46px !important; }   /* + رفع التصاميم */
