/* إسناد — هيكل لوحة الإدارة: قائمة جانبية مجمّعة + شريط علوي + انتقالات هادئة بين الصفحات (4.85)
 * المبدأ: هدوء بصري وتباين واضح، ألوان الهوية من الإعدادات، حركة قصيرة لها معنى فقط، وبلا زخارف. */

:root{--side-w:248px; --side-mini:68px; --top-h:56px; --ease:cubic-bezier(.2,.7,.2,1)}
body.edv-body{background:#EFF2F7}

/* ---------- الهيكل ---------- */
.edv-body .edv-app.edv-shell{max-width:none; margin:0; padding:0; min-height:100vh; display:block}
.edv-shell .edv-main{margin-inline-start:var(--side-w); min-width:0; transition:margin .22s var(--ease)}
.edv-shell .edv-main-in{max-width:1320px; margin:0 auto; padding:6px 28px 32px}
html.side-mini .edv-shell .edv-main{margin-inline-start:var(--side-mini)}

/* ---------- القائمة الجانبية ---------- */
.edv-side{position:fixed; inset-block:0; inset-inline-start:0; width:var(--side-w); z-index:40; display:flex; flex-direction:column;
  --on-p:var(--edv-on-h,var(--edv-on-p,#fff)); --on-p-70:color-mix(in srgb,var(--on-p) 72%,transparent); --on-p-10:color-mix(in srgb,var(--on-p) 9%,transparent); --on-p-16:color-mix(in srgb,var(--on-p) 16%,transparent);
  background:var(--edv-h,var(--p)); color:var(--on-p); border-inline-end:1px solid color-mix(in srgb,var(--edv-h,var(--p)) 70%,#000); transition:width .22s var(--ease), transform .26s var(--ease)}
.edv-side-top{display:flex; align-items:center; min-height:var(--top-h); padding:10px 14px; border-bottom:1px solid var(--on-p-10)}
.edv-side-brand{display:block; min-width:0; color:inherit !important; text-decoration:none !important}
.edv-side .edv-brand{gap:10px; padding:0}
.edv-side .edv-brand strong{font-size:14px}
.edv-side .edv-brand small{font-size:11.5px}
.edv-side .edv-brand .edv-logo{max-width:180px; height:34px !important}
.edv-side .edv-emblem{flex:none}

.edv-side-nav{flex:1; overflow-y:auto; overflow-x:hidden; padding:10px 10px 12px; scrollbar-width:thin; scrollbar-color:var(--on-p-16) transparent}
.edv-side-g{display:flex; flex-direction:column; gap:1px; padding:6px 0}
.edv-side-g + .edv-side-g{border-top:1px solid var(--on-p-10)}
.edv-side-gt{display:block; padding:8px 10px 4px; font-size:11px; font-weight:600; letter-spacing:.2px; color:var(--on-p-70); opacity:.8; white-space:nowrap}
.edv-sl{position:relative; display:flex; align-items:center; gap:11px; height:38px; padding:0 10px; border-radius:7px;
  color:var(--on-p-70) !important; text-decoration:none !important; font-size:13.5px; font-weight:500; white-space:nowrap;
  transition:background-color .15s ease, color .15s ease}
.edv-sl svg{width:18px; height:18px; flex:none}
.edv-sl-t{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis}
.edv-sl:hover{background:var(--on-p-10); color:var(--on-p) !important}
.edv-sl.is-current{background:var(--on-p-16); color:var(--on-p) !important; font-weight:600}
.edv-sl.is-current::before{content:""; position:absolute; inset-inline-start:-10px; top:9px; bottom:9px; width:3px; border-radius:0 3px 3px 0; background:var(--a)}
[dir=rtl] .edv-sl.is-current::before{border-radius:3px 0 0 3px}
.edv-sl:focus-visible,.edv-side-mini:focus-visible{outline:2px solid var(--a); outline-offset:-2px}
.edv-sl .edv-nav-count{margin-inline-start:auto; flex:none}

.edv-side-mini{display:flex; align-items:center; gap:11px; margin:0 10px 10px; height:38px; padding:0 10px; border:0; border-radius:7px;
  background:transparent; color:var(--on-p-70); font-size:12.5px; cursor:pointer; white-space:nowrap; transition:background-color .15s, color .15s}
.edv-side-mini:hover{background:var(--on-p-10); color:var(--on-p)}
.edv-side-mini svg{width:18px; height:18px; flex:none; transition:transform .22s var(--ease)}
[dir=ltr] .edv-side-mini svg{transform:scaleX(-1)}

/* القائمة المطوية: أيقونات فقط مع اسم القسم عند المرور */
html.side-mini .edv-side{width:var(--side-mini)}
html.side-mini .edv-side-gt,html.side-mini .edv-sl-t,html.side-mini .edv-side-mini span,html.side-mini .edv-side .edv-brand > div,html.side-mini .edv-side .edv-brand small{display:none}
html.side-mini .edv-side-g{align-items:center}
html.side-mini .edv-sl{width:44px; justify-content:center; padding:0}
html.side-mini .edv-sl .edv-nav-count{position:absolute; top:3px; inset-inline-end:2px; min-width:16px; height:16px; font-size:10px}
html.side-mini .edv-side-mini{justify-content:center; margin-inline:12px; padding:0}
html.side-mini .edv-side-mini svg{transform:scaleX(-1)}
[dir=ltr] html.side-mini .edv-side-mini svg,html.side-mini [dir=ltr] .edv-side-mini svg{transform:none}
html.side-mini .edv-side-top{justify-content:center; padding:10px 8px}
html.side-mini .edv-side .edv-brand .edv-logo{max-width:44px; object-fit:cover; object-position:right center}
/* تلميح القائمة المطوية (5.9.2): بطاقة بلون النظام وشريط اللون الثانوي وسهم نحو الأيقونة */
#edv-tip{position:fixed; z-index:1200; display:flex; flex-direction:column; gap:1px; max-width:260px; padding:7px 12px 7px 12px; border-radius:9px;
  background:var(--edv-h,#0B1633); color:var(--edv-on-h,#fff); border-left:3px solid var(--edv-a,#1FC8B6); box-shadow:0 10px 24px -8px rgba(11,22,51,.45);
  font-family:var(--edv-font,inherit),system-ui,sans-serif; pointer-events:none; white-space:nowrap; opacity:0; visibility:hidden;
  transform:translate(-4px,-50%); transition:opacity .14s var(--ease),transform .14s var(--ease),visibility 0s linear .14s}
#edv-tip.is-rtl{transform:translate(4px,-50%); border-left:0; border-right:3px solid var(--edv-a,#1FC8B6)}
#edv-tip.is-on{opacity:1; visibility:visible; transform:translate(0,-50%); transition:opacity .14s var(--ease),transform .14s var(--ease)}
#edv-tip b{font-size:13px; font-weight:600; line-height:1.35}
#edv-tip small{font-size:11px; line-height:1.3; opacity:.72}
#edv-tip small[hidden]{display:none}
#edv-tip.is-current b::after{content:""; display:inline-block; width:6px; height:6px; margin-inline-start:7px; border-radius:50%; background:var(--edv-a,#1FC8B6); vertical-align:middle}
/* الشريط والسهم بجهة القائمة: يسار التلميح في الإنكليزية، يمينه في العربية */
#edv-tip::before{content:""; position:absolute; top:50%; left:-15px; margin-top:-6px; border:6px solid transparent; border-right-color:var(--edv-a,#1FC8B6)}
#edv-tip.is-rtl::before{left:auto; right:-15px; border-right-color:transparent; border-left-color:var(--edv-a,#1FC8B6)}
@media (prefers-reduced-motion:reduce){ #edv-tip,#edv-tip.is-on{transition:none} }
html.dk #edv-tip{background:#232838; color:#eef0f5; box-shadow:0 10px 24px -8px rgba(0,0,0,.7)}

/* ---------- الشريط العلوي ---------- */
.edv-topbar{position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:12px; height:var(--top-h); padding:0 28px;
  background:color-mix(in srgb,#EFF2F7 88%,transparent); border-bottom:1px solid var(--line);
  -webkit-backdrop-filter:saturate(1.4) blur(8px); backdrop-filter:saturate(1.4) blur(8px)}
.edv-crumb{display:flex; align-items:center; gap:6px; min-width:0; font-size:13px; color:var(--muted)}
.edv-crumb svg{width:14px; height:14px; opacity:.6; flex:none}
[dir=ltr] .edv-crumb svg{transform:scaleX(-1)}
.edv-crumb b{color:var(--ink); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.edv-crumb span{white-space:nowrap}
.edv-topbar .edv-bar-tools{order:0; margin-inline-start:auto; display:flex; align-items:center; gap:6px}
.edv-topbtn{display:inline-grid; place-items:center; min-width:36px; height:36px; padding:0 9px; border-radius:8px; border:1px solid transparent; background:transparent;
  color:var(--ink) !important; text-decoration:none !important; font-size:13px; font-weight:600; cursor:pointer; transition:background-color .15s, border-color .15s}
.edv-topbtn:hover{background:#fff; border-color:var(--line)}
.edv-topbtn svg{width:18px; height:18px}
.edv-topbtn:focus-visible,.edv-topbar .edv-me:focus-visible{outline:2px solid var(--p); outline-offset:1px}
.edv-topbar .edv-themebtn svg{display:none}
html[data-theme=auto] .edv-topbar .edv-themebtn .th-auto,html[data-theme=dark] .edv-topbar .edv-themebtn .th-dark,html[data-theme=light] .edv-topbar .edv-themebtn .th-light{display:block}
.edv-topbar .edv-me{order:0; background:transparent; color:var(--ink) !important; border:1px solid var(--line); padding:3px 10px 3px 4px; height:36px; border-radius:999px; transition:background-color .15s}
[dir=rtl] .edv-topbar .edv-me{padding:3px 4px 3px 10px}
.edv-topbar .edv-me:hover,.edv-topbar .edv-me.is-current{background:#fff}
.edv-topbar .edv-me-avatar{background:var(--p); color:var(--on-p)}
.edv-topbar .edv-logout{order:0}
.edv-menubtn{display:none}

/* عنوان الصفحة */
.edv-shell .edv-pagehead{margin:22px 0 18px}
.edv-shell .edv-pagehead h1{font-size:22px; letter-spacing:-.1px}
.edv-shell .edv-foot{margin-top:36px}

/* ---------- تحسينات عامة هادئة ---------- */
.edv-shell .edv-panel{border-radius:10px}
.edv-shell .edv-tabs-admin a{transition:color .15s, border-color .2s}
.edv-shell .edv-tabs-admin a:hover{color:var(--ink) !important}
.edv-shell .edv-table tbody tr{transition:background-color .12s}
.edv-shell .edv-abtn{transition:background-color .15s, border-color .15s, box-shadow .15s, transform .08s}
.edv-shell .edv-abtn:active{transform:translateY(1px)}
.edv-shell :focus-visible{outline-color:var(--p)}

/* ---------- شريط التحميل عند الانتقال بين الصفحات ---------- */
#edv-prog{position:fixed; inset-inline:0; top:0; height:2px; z-index:100; pointer-events:none; opacity:0; transition:opacity .2s}
#edv-prog i{display:block; height:100%; width:0; background:var(--edv-a,#1FC8B6); transition:width 8s cubic-bezier(.1,.8,.2,1)}
#edv-prog.is-on{opacity:1}
#edv-prog.is-on i{width:85%}

/* انتقال الصفحات: أُزيل في 4.94 — انتقال المتصفح بين المستندات يؤخّر ظهور الصفحة الجديدة حتى تكتمل (نحو ضعف الوقت).
 * التنقل الآن فوري، وشريط التقدّم العلوي (#edv-prog) يعطي إشارة الاستجابة عند النقر. */

/* ---------- الشاشات الأصغر: القائمة تنزلق من الجانب ---------- */
@media (max-width:1023px){
  .edv-shell .edv-main,html.side-mini .edv-shell .edv-main{margin-inline-start:0}
  html.side-mini .edv-side{width:var(--side-w)}
  html.side-mini .edv-side-gt,html.side-mini .edv-sl-t,html.side-mini .edv-side .edv-brand > div{display:revert}
  html.side-mini .edv-sl{width:auto; justify-content:flex-start; padding:0 10px}
  html.side-mini .edv-side-g{align-items:stretch}
  .edv-side{transform:translateX(-100%); box-shadow:none; visibility:hidden; transition:transform .26s var(--ease), visibility 0s .26s}
  [dir=rtl] .edv-side{transform:translateX(100%)}
  html.side-open .edv-side{transform:none; visibility:visible; box-shadow:0 0 0 100vmax rgba(10,18,15,.0), 0 20px 60px -10px rgba(0,0,0,.45); transition:transform .26s var(--ease)}
  .edv-side-mini{display:none}
  .edv-scrim{position:fixed; inset:0; z-index:35; background:rgba(10,18,15,.42); opacity:0; transition:opacity .2s}
  html.side-open .edv-scrim{opacity:1}
  .edv-menubtn{display:inline-grid}
  .edv-topbar{padding:0 12px; gap:8px}
  .edv-shell .edv-main-in{padding:4px 14px 28px}
  .edv-topbar .edv-me-name{display:none}
  .edv-topbar .edv-me{padding:3px !important; border-color:transparent}
}
@media (max-width:520px){
  .edv-crumb span,.edv-crumb svg{display:none}
  .edv-topbar .edv-langbtn2{display:none}
  .edv-shell .edv-pagehead{margin:14px 0 14px}
  .edv-shell .edv-pagehead h1{font-size:19px}
}
@media (min-width:1024px){ .edv-scrim{display:none !important} }

@media (prefers-reduced-motion:reduce){
  .edv-side,.edv-shell .edv-main,.edv-sl,.edv-scrim,#edv-prog i{transition:none !important}
}

/* ---------- الطباعة ووضع التلفاز ---------- */
@media print{
  .edv-side,.edv-topbar,.edv-scrim,#edv-prog{display:none !important}
  .edv-shell .edv-main{margin:0 !important}
  .edv-shell .edv-main-in{padding:0; max-width:none}
}
html.lv-tv .edv-side,html.lv-tv .edv-topbar,html.lv-tv .edv-scrim{display:none !important}
html.lv-tv .edv-shell .edv-main{margin:0 !important}
html.lv-tv .edv-shell .edv-main-in{max-width:none; padding:0}

/* ---------- الوضع الليلي ---------- */
html.dk body.edv-body{background:#12141a}
html.dk .edv-side{background:color-mix(in srgb,var(--p) 55%,#0c0d11); border-inline-end-color:#20242f}
html.dk .edv-topbar{background:color-mix(in srgb,#12141a 86%,transparent); border-bottom-color:#242936}
html.dk .edv-crumb{color:#929aad}
html.dk .edv-crumb b,html.dk .edv-topbtn,html.dk .edv-topbar .edv-me{color:#e3e6ee !important}
html.dk .edv-topbtn:hover,html.dk .edv-topbar .edv-me:hover,html.dk .edv-topbar .edv-me.is-current{background:#1b1e28; border-color:#282d3c}
html.dk .edv-topbar .edv-me{border-color:#282d3c}
html.dk .edv-sl.is-current{background:rgba(255,255,255,.1)}

/* =====================================================================
 * طبقة التفاعل (4.87): البحث السريع، الإشعارات، الأزرار المنتظرة، التعديلات غير المحفوظة
 * ===================================================================== */

/* زر البحث في الشريط العلوي */
.edv-qs-btn{margin-inline-start:auto; display:flex; align-items:center; gap:9px; width:min(340px,34vw); height:36px; padding:0 8px 0 12px; border:1px solid var(--line); border-radius:9px;
  background:#fff; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; transition:border-color .15s, box-shadow .15s}
[dir=rtl] .edv-qs-btn{padding:0 12px 0 8px}
.edv-qs-btn svg{width:16px; height:16px; flex:none; opacity:.75}
.edv-qs-btn span{flex:1; min-width:0; text-align:start; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.edv-qs-btn:hover{border-color:color-mix(in srgb,var(--p) 35%,var(--line))}
.edv-qs-btn:focus-visible{outline:none; border-color:var(--p); box-shadow:0 0 0 3px color-mix(in srgb,var(--p) 18%,transparent)}
.edv-topbar .edv-qs-btn + .edv-bar-tools{margin-inline-start:0}
.edv-shell kbd,.edv-qs kbd,.edv-keys kbd{display:inline-grid; place-items:center; min-width:22px; height:20px; padding:0 5px; border:1px solid var(--line); border-bottom-width:2px; border-radius:5px;
  background:#F6F7F9; color:var(--muted); font:600 10.5px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; direction:ltr}

/* نافذة البحث */
.edv-qs{width:min(640px,calc(100vw - 24px)); max-height:min(560px,calc(100vh - 120px)); margin:12vh auto auto; padding:0; border:1px solid var(--line); border-radius:14px;
  background:#fff; color:var(--ink); box-shadow:0 30px 80px -20px rgba(10,20,16,.45), 0 2px 6px rgba(10,20,16,.08); overflow:hidden}
.edv-qs[open]{animation:edvPop .16s var(--ease)}
.edv-qs::backdrop{background:rgba(12,20,17,.38); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); animation:edvFade .16s ease}
@keyframes edvPop{from{opacity:0; transform:translateY(-6px) scale(.985)}}
@keyframes edvFade{from{opacity:0}}
.edv-qs-in{display:flex; flex-direction:column; max-height:inherit}
.edv-qs-field{display:flex; align-items:center; gap:10px; padding:0 16px; height:56px; border-bottom:1px solid var(--line); flex:none}
.edv-qs-field > svg{width:19px; height:19px; color:var(--p); flex:none}
.edv-qs-field input{flex:1; min-width:0; height:100%; border:0 !important; outline:0; box-shadow:none !important; background:transparent; font:inherit; font-size:15.5px; color:var(--ink); padding:0 !important; min-height:0 !important}
.edv-qs-field input::-webkit-search-cancel-button{display:none}
.edv-qs-spin{width:16px; height:16px; border:2px solid var(--line); border-top-color:var(--p); border-radius:50%; opacity:0; transition:opacity .15s}
.edv-qs.is-loading .edv-qs-spin{opacity:1; animation:edvSpin .7s linear infinite}
@keyframes edvSpin{to{transform:rotate(360deg)}}
.edv-qs-list{flex:1; overflow-y:auto; padding:6px 8px 10px; overscroll-behavior:contain; scroll-padding:28px 0 8px}
.edv-qs-g{padding:12px 10px 5px; font-size:11.5px; font-weight:600; color:var(--muted)}
.edv-qs-o{display:flex; align-items:center; gap:12px; min-height:46px; padding:6px 10px; border-radius:9px; color:var(--ink) !important; text-decoration:none !important; cursor:pointer}
.edv-qs-o.is-sel{background:color-mix(in srgb,var(--p) 9%,#fff)}
.edv-qs-ic{display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:8px; background:#EFF1F6; color:var(--p); overflow:hidden}
.edv-qs-ic svg{width:17px; height:17px}
.edv-qs-ic.has-img{border-radius:50%}
.edv-qs-ic img{width:100%; height:100%; object-fit:cover}
.edv-qs-o.is-sel .edv-qs-ic{background:var(--p); color:var(--on-p)}
.edv-qs-tx{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px}
.edv-qs-tx b{font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.edv-qs-tx small{font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.edv-qs-go{width:16px; height:16px; flex:none; color:var(--muted); opacity:0; transform:translateX(4px); transition:opacity .12s, transform .12s}
[dir=ltr] .edv-qs-go{transform:scaleX(-1) translateX(4px)}
.edv-qs-o.is-sel .edv-qs-go{opacity:1; transform:none}
[dir=ltr] .edv-qs-o.is-sel .edv-qs-go{transform:scaleX(-1)}
.edv-qs-empty{padding:34px 16px; text-align:center; color:var(--muted); font-size:13.5px}
.edv-qs-foot{display:flex; gap:16px; flex:none; padding:9px 16px; border-top:1px solid var(--line); background:#F9FAFC; font-size:11.5px; color:var(--muted)}
.edv-qs-foot span{display:flex; align-items:center; gap:4px}

/* الإشعارات المنبثقة */
.edv-toasts{position:fixed; z-index:120; top:calc(var(--top-h) + 12px); inset-inline-end:24px; display:flex; flex-direction:column; gap:10px; width:min(380px,calc(100vw - 32px)); pointer-events:none}
.edv-toast{position:relative; display:flex; align-items:flex-start; gap:10px; padding:12px 12px 14px 14px; border-radius:11px; overflow:hidden; pointer-events:auto;
  background:#1b1c1d; color:#EBEEF6; box-shadow:0 18px 40px -14px rgba(0,0,0,.45);
  opacity:0; transform:translateY(-8px); transition:opacity .2s var(--ease), transform .2s var(--ease)}
[dir=rtl] .edv-toast{padding:12px 14px 14px 12px}
.edv-toast.is-in{opacity:1; transform:none}
.edv-toast.is-out{opacity:0; transform:translateY(-6px); transition-duration:.16s}
.edv-toast p{flex:1; margin:1px 0 0; font-size:13.5px; line-height:1.55}
.edv-toast-i{display:grid; place-items:center; width:22px; height:22px; flex:none; border-radius:50%; background:#2F9E6B; color:#fff}
.edv-toast.is-info .edv-toast-i{background:var(--a)}
.edv-toast-i svg{width:13px; height:13px; stroke-width:2.6}
.edv-toast-x{display:grid; place-items:center; width:26px; height:26px; flex:none; margin:-3px -3px 0 0; border:0; border-radius:7px; background:transparent; color:inherit; opacity:.6; cursor:pointer}
.edv-toast-x:hover,.edv-toast-x:focus-visible{opacity:1; background:rgba(255,255,255,.1); outline:none}
.edv-toast-x svg{width:14px; height:14px}
.edv-toast-bar{position:absolute; inset-inline:0; bottom:0; height:2px; background:var(--a); transform-origin:var(--tb-o,right); animation:edvBar linear forwards}
[dir=ltr] .edv-toast-bar{--tb-o:left}
.edv-toast.is-paused .edv-toast-bar{animation-play-state:paused}
@keyframes edvBar{to{transform:scaleX(0)}}

/* رسالة خطأ بعد الحفظ: اهتزاز قصير يلفت النظر مرة واحدة */
.edv-flash.is-shake{animation:edvShake .32s ease 1}
@keyframes edvShake{25%{transform:translateX(4px)}50%{transform:translateX(-4px)}75%{transform:translateX(2px)}}

/* زر بانتظار الحفظ */
.edv-shell .edv-abtn.is-busy{pointer-events:none; opacity:.88}
.edv-shell .edv-abtn.is-busy::before{content:""; width:13px; height:13px; flex:none; border:2px solid currentColor; border-inline-end-color:transparent; border-radius:50%; animation:edvSpin .65s linear infinite}

/* تعديلات غير محفوظة */
.edv-dirty-pill{display:none; align-items:center; gap:7px; margin-inline-start:auto; font-size:12.5px; font-weight:600; color:#8A5A12}
.edv-dirty-pill::before{content:""; width:7px; height:7px; border-radius:50%; background:#D99A2B; box-shadow:0 0 0 3px rgba(217,154,43,.2)}
.edv-savebar.is-dirty .edv-dirty-pill{display:inline-flex}
.edv-savebar.is-dirty{box-shadow:0 -6px 18px -12px rgba(15,30,25,.25), inset 0 2px 0 #D99A2B}

/* نافذة الاختصارات */
.edv-keys{width:min(420px,calc(100vw - 24px)); padding:0; border:1px solid var(--line); border-radius:14px; background:#fff; color:var(--ink); box-shadow:0 30px 80px -20px rgba(10,20,16,.45)}
.edv-keys[open]{animation:edvPop .16s var(--ease)}
.edv-keys::backdrop{background:rgba(12,20,17,.38)}
.edv-keys header{display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--line)}
.edv-keys h3{margin:0; font-size:15px}
.edv-keys .edv-toast-x{color:var(--ink); margin:0}
.edv-keys .edv-toast-x:hover{background:#EFF1F6}
.edv-keys dl{display:grid; grid-template-columns:auto 1fr; gap:10px 16px; align-items:center; margin:0; padding:16px}
.edv-keys dt{display:flex; gap:4px; direction:ltr; justify-content:flex-end}
.edv-keys dd{margin:0; font-size:13.5px}

/* =====================================================================
 * محاذاة الجداول (4.88): كل خلية تبدأ من نفس حافة عنوان عمودها.
 * الأرقام والرموز والتواريخ تُكتب من اليسار لليمين (dir=ltr / edv-num) لكنها تُحاذى مع العنوان على اليمين في الواجهة العربية.
 * ===================================================================== */
[dir=rtl] .edv-shell table :is(td,th):is(.edv-num,[dir=ltr]),
[dir=rtl] .edv-shell table td :is(div,p,strong,b,small,span,a,time).edv-num:only-child,
[dir=rtl] .edv-shell table td :is(div,p)[dir=ltr]{text-align:right}
.edv-shell table th,.edv-shell table td{vertical-align:middle}

@media (max-width:760px){
  .edv-qs-btn{width:36px; flex:none; justify-content:center; padding:0 !important; border-color:transparent; background:transparent}
  .edv-qs-btn span,.edv-qs-btn kbd{display:none}
  .edv-qs-btn svg{width:18px; height:18px; opacity:1; color:var(--ink)}
  .edv-qs{margin-top:10px; max-height:calc(100vh - 20px)}
  .edv-qs-foot{display:none}
  .edv-toasts{inset-inline:12px; width:auto; top:calc(var(--top-h) + 8px)}
}
@media (pointer:coarse){ .edv-qs-o{min-height:52px} }
@media (prefers-reduced-motion:reduce){
  .edv-qs[open],.edv-keys[open],.edv-qs::backdrop,.edv-flash.is-shake{animation:none}
  .edv-toast,.edv-qs-go{transition:none}
  .edv-toast-bar{display:none}
}
@media print{ .edv-qs-btn,.edv-toasts,.edv-dirty-pill{display:none !important} }
html.lv-tv .edv-qs-btn,html.lv-tv .edv-toasts{display:none !important}

/* الوضع الليلي */
html.dk .edv-qs-btn{background:#181b23; border-color:#282d3c; color:#929aad}
html.dk .edv-shell kbd,html.dk .edv-qs kbd,html.dk .edv-keys kbd{background:#1e222e; border-color:#2e3445; color:#adb4c5}
html.dk .edv-qs,html.dk .edv-keys{background:#181b23; border-color:#282d3c; color:#e3e6ee}
html.dk .edv-qs-field,html.dk .edv-keys header{border-color:#282d3c}
html.dk .edv-qs-field input{color:#e3e6ee}
html.dk .edv-qs-o{color:#e3e6ee !important}
html.dk .edv-qs-o.is-sel{background:rgba(255,255,255,.07)}
html.dk .edv-qs-ic{background:#212531; color:#cfe0d7}
html.dk .edv-qs-foot{background:#14171e; border-color:#282d3c}
html.dk .edv-keys .edv-toast-x{color:#e3e6ee}
html.dk .edv-keys .edv-toast-x:hover{background:#212531}
html.dk .edv-toast{background:#242937; box-shadow:0 18px 40px -14px rgba(0,0,0,.7)}
html.dk .edv-dirty-pill{color:#E6B65C}
html.dk .edv-qs-field input{background:transparent !important; color:#e3e6ee !important}

/* عمود الإجراءات: بعرض محتواه فقط، ويبدأ من نفس حافة عنوانه فتصطف الأزرار الرئيسية عمودياً */
.edv-shell .edv-table td.edv-row-actions{width:1%}
.edv-shell .edv-row-actions > .edv-abtn:first-child,.edv-shell .edv-row-actions > .edv-inline-post:first-child{margin-inline-start:0}
.edv-shell .edv-abtn.is-icon{width:32px; min-width:32px; min-height:32px; padding:0; justify-content:center; vertical-align:middle}
.edv-shell .edv-abtn.is-icon svg{width:16px; height:16px}
.edv-shell .edv-row-actions .edv-abtn{vertical-align:middle}

/* جدول العهد: اسم العهدة لا ينكسر، والموقع بعرض مقروء */
.edv-shell .cu-name{min-width:200px}
.edv-shell .cu-name strong{white-space:nowrap}
.edv-shell .cu-actions{white-space:nowrap}
.edv-shell .edv-table .cu-atsite{white-space:nowrap}
.edv-shell .cu-table td:nth-child(5){min-width:110px}
.edv-shell .cu-table td:nth-child(6){min-width:130px}

/* =====================================================================
 * الوضع الليلي (4.89): ألوان المرور والتحديد كانت تُمزج مع الأبيض فتصير الصفوف بيضاء والنص أبيض.
 * هنا تُمزج مع خلفية الوضع الليلي: تظليل خفيف بلون الهوية يبقى النص فوقه واضحاً.
 * ===================================================================== */
html.dk,html.dk .edv-app{
  --p-soft:color-mix(in srgb,var(--edv-p,#1E3BB3) 30%,#1f2021);
  --p-soft-2:color-mix(in srgb,var(--edv-p,#1E3BB3) 45%,#252728);
}
html.dk .edv-app .edv-table tbody tr:hover,html.dk .edv-app .wp-list-table tbody tr:hover{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 22%,#20262a)}
html.dk .edv-rolepick input:checked + span{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 35%,#1a1d26); border-color:color-mix(in srgb,var(--edv-p,#1E3BB3) 40%,#fff); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--edv-p,#1E3BB3) 40%,#fff)}
html.dk .edv-rolepick input:checked + span strong{color:#fff}
html.dk .edv-rolepick span:hover{border-color:#3e475e}

/* الصلاحيات في نموذج المستخدم: الجدول بعرض النموذج كاملاً والملاحظة تحته (كان القالب القديم يقسمها لعمودين) */
.edv-caps{display:block}
.edv-caps .um-matrix{width:100%}
.edv-caps > .edv-hint{margin-top:10px}

/* ألوان النجاح والخطر «المصمتة» (خلفية ملونة ونص أبيض): في الوضع الليلي تصبح --ok و--bad فاتحة لتناسب النص،
   فتُعطى هذه العناصر درجات مصمتة خاصة بالوضع الليلي يبقى الأبيض فوقها مقروءاً. */
html.dk{--ok-solid:#1E7F52; --bad-solid:#B83A2C}
html.dk .hr-steps li.is-done::before,html.dk .vm-marks .is-ok input:checked + span,html.dk .ins-mk,html.dk .ach-r em,
html.dk .srv-chk input:checked + span,html.dk .edv-abtn.ap-ok,html.dk .fc-mb button.is-on[data-m=ok],html.dk .as-gc.m-p button,
html.dk .edv-app .edv-seg .is-ok input:checked + span,html.dk .edv-seg .is-ok input:checked + span{background:var(--ok-solid) !important; border-color:var(--ok-solid) !important; color:#fff !important}
html.dk .hr-steps li.is-bad::before,html.dk .edv-nav-count,html.dk .vm-marks .is-bad input:checked + span,html.dk .vm-marks .is-missing input:checked + span,
html.dk .fc-mc,html.dk .fc-mb button.is-on[data-m=bad],html.dk .fc-mb button.is-on[data-m=missing],html.dk .as-gc.m-a button,
html.dk .edv-app .edv-seg .is-bad input:checked + span,html.dk .edv-seg .is-bad input:checked + span,html.dk .edv-app .edv-abtn.is-danger-solid{background:var(--bad-solid) !important; border-color:var(--bad-solid) !important; color:#fff !important}
html.dk .edv-app .edv-abtn.is-danger-solid:hover{background:#9c2f23 !important; border-color:#9c2f23 !important}

/* بقية المواضع */
html.dk .cu-cond.is-missing{color:#CDB0F7}
html.dk .lvm-li-x{color:#F0CD97}
html.dk .edv-app code{background:#212531; color:#d9dce3}
/* معاينة الوثيقة في صفحة الهوية تبقى ورقة بيضاء: متغيرات الألوان داخلها بقيم الوضع الفاتح */
html.dk .edv-bp{--ink:#161820; --muted:#5B6478; --line:#D8DCE6; --line-2:#E8EBF2; color:#161820}

/* =====================================================================
 * غرفة العمليات (4.90): شريط قيادة موحّد، وقائمة واحدة لكل بطاقة بدل ستة أزرار
 * ===================================================================== */
.lv-bar{gap:10px 12px; padding:8px 12px; top:calc(var(--top-h) + 8px)}
html.lv-tv .lv-bar{top:0}
.lv-upd{display:inline-flex; align-items:center; gap:8px; line-height:1.25}
.lv-upd > span:last-child{display:flex; flex-direction:column}
.lv-upd small{font-size:11.5px; color:var(--muted)}
.lv-ring{--pct:1; width:18px; height:18px; flex:none; border-radius:50%;
  background:conic-gradient(var(--p) calc(var(--pct) * 360deg), var(--line) 0);
  -webkit-mask:radial-gradient(circle, transparent 5.5px, #000 6px); mask:radial-gradient(circle, transparent 5.5px, #000 6px); transition:background .9s linear}
.lv-pulse.is-off ~ .lv-upd .lv-ring{opacity:.35}
.lv-switch{position:relative; gap:8px !important; user-select:none}
.lv-switch input{position:absolute; opacity:0; width:1px; height:1px}
.lv-switch i{position:relative; width:34px; height:20px; border-radius:99px; background:#C4C9D6; transition:background .15s; flex:none}
.lv-switch i::after{content:""; position:absolute; top:2px; inset-inline-start:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:transform .18s var(--ease)}
.lv-switch input:checked + i{background:var(--p)}
.lv-switch input:checked + i::after{transform:translateX(14px)}
[dir=rtl] .lv-switch input:checked + i::after{transform:translateX(-14px)}
.lv-switch input:focus-visible + i{outline:2px solid var(--p); outline-offset:2px}
.lv-bar-act{display:flex; align-items:center; gap:6px}
.lv-cmd{display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 11px; border:1px solid var(--line); border-radius:9px; background:transparent; color:var(--ink); font:inherit; font-size:13px; font-weight:500; cursor:pointer; white-space:nowrap; transition:background-color .15s,border-color .15s}
.lv-cmd svg{width:16px; height:16px; flex:none}
.lv-cmd:hover{background:var(--p-soft); border-color:color-mix(in srgb,var(--p) 30%,var(--line))}
.lv-cmd:focus-visible{outline:2px solid var(--p); outline-offset:1px}
.lv-cmd kbd{margin-inline-start:2px}
.lv-cmd.is-on,#lv-cfg-btn[aria-expanded=true]{background:var(--p); border-color:var(--p); color:var(--on-p)}
@media (max-width:1800px){ .lv-cmd:not(.lv-cmd-q) span{display:none} .lv-cmd:not(.lv-cmd-q){width:34px; padding:0; justify-content:center} }
@media (max-width:900px){ .lv-cmd-q span,.lv-cmd-q kbd{display:none} .lv-cmd-q{width:34px; padding:0; justify-content:center} .lv-upd small{display:none} }
html.lv-tv .lv-bar-act{display:none}

/* البطاقات: رأس هادئ — العنوان والعدد والرابط، وزر قائمة واحد */
.lv-board{gap:16px}
.lv-w.edv-panel{border-radius:14px}
.lv-wh{min-height:48px; padding:8px 10px 8px 14px; gap:8px; cursor:default}
[dir=rtl] .lv-wh{padding:8px 14px 8px 10px}
.lv-grip{opacity:0; transition:opacity .15s}
.lv-w:hover .lv-grip,.lv-grip:focus-visible{opacity:.7}
@media (hover:none){ .lv-grip{opacity:.6} }
.lv-wc{opacity:1 !important}
.lv-wm{display:grid; place-items:center; width:32px; height:32px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); cursor:pointer; transition:background-color .15s,color .15s,border-color .15s}
.lv-wm svg{width:18px; height:18px}
.lv-wm:hover,.lv-wm[aria-expanded=true]{background:var(--p-soft); color:var(--ink); border-color:var(--line)}
.lv-wm:focus-visible{outline:2px solid var(--p); outline-offset:1px}
html.lv-tv .lv-wm,html.lv-tv .lv-grip{display:none}
.lv-w.is-min .lv-wb,.lv-w.is-min .lv-rz{display:none}

.lv-wmenu{position:fixed; z-index:200; min-width:236px; padding:6px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink);
  box-shadow:0 18px 44px -12px rgba(10,20,16,.35), 0 2px 6px rgba(10,20,16,.06); animation:edvPop .14s var(--ease)}
.lv-wmenu-g{padding:6px 6px 8px}
.lv-wmenu-t{display:block; font-size:11.5px; font-weight:600; color:var(--muted); margin-bottom:6px}
.lv-wmenu-seg{display:grid; grid-template-columns:repeat(5,1fr); gap:3px; padding:3px; border-radius:9px; background:var(--line-2)}
.lv-wmenu-seg button{height:28px; border:0; border-radius:7px; background:transparent; color:var(--ink); font:inherit; font-size:12px; cursor:pointer}
.lv-wmenu-seg button.is-on{background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.12); font-weight:600}
.lv-wmenu > button{display:flex; align-items:center; gap:10px; width:100%; height:36px; padding:0 10px; border:0; border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:13.5px; text-align:start; cursor:pointer}
.lv-wmenu > button svg{width:17px; height:17px; flex:none; color:var(--muted)}
.lv-wmenu > button:hover,.lv-wmenu button:focus-visible{background:var(--p-soft); outline:none}
.lv-wmenu > button.is-danger{color:#B42318}
.lv-wmenu > button.is-danger svg{color:currentColor}
.lv-wmenu hr{border:0; border-top:1px solid var(--line); margin:5px 4px}

html.dk .lv-wmenu{background:#181b23; border-color:#282d3c; color:#e3e6ee}
html.dk .lv-wmenu-seg{background:#202430}
html.dk .lv-wmenu-seg button{color:#c9cfde}
html.dk .lv-wmenu-seg button.is-on{background:#2d3343; color:#fff}
html.dk .lv-wmenu > button{color:#e3e6ee}
html.dk .lv-wmenu > button.is-danger{color:#F0A49B}
html.dk .lv-cmd{color:#e3e6ee; border-color:#2c3243}
html.dk .lv-switch i{background:#32384a}
html.dk .lv-switch input:checked + i{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 35%,#5fcf9f)}
html.dk .lv-ring{background:conic-gradient(color-mix(in srgb,var(--edv-p,#1E3BB3) 45%,#fff) calc(var(--pct) * 360deg), #2c3243 0)}
html.dk .lv-wm{color:#a1a9bd}
html.dk .lv-wm:hover,html.dk .lv-wm[aria-expanded=true]{color:#fff; border-color:#2c3243}
@media (prefers-reduced-motion:reduce){ .lv-wmenu{animation:none} .lv-ring{transition:none} }

/* ألوان أنواع الإجازات والعطل (يختارها المستخدم) تُفتَّح في الوضع الليلي حتى تُقرأ */
html.dk .hr-bal b{color:color-mix(in srgb,var(--c) 55%,#fff)}
html.dk .hr-code.is-h,html.dk .hr-c.is-h{color:#C4B5FD}

/* واجهة API: التوكنات والتوثيق (4.91) */
.api-new{border-color:var(--a) !important; box-shadow:0 0 0 3px color-mix(in srgb,var(--a) 22%,transparent)}
.api-tok{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.api-tok code{flex:1; min-width:0; padding:10px 12px; border-radius:8px; background:var(--line-2); font:600 14px/1.4 ui-monospace,Menlo,Consolas,monospace; word-break:break-all; user-select:all}
.api-scope{display:inline-block; padding:1px 7px; margin:1px 0; border-radius:6px; background:var(--p-soft); color:var(--ink); font:500 11.5px/1.6 ui-monospace,Menlo,Consolas,monospace; direction:ltr}
.api-form .edv-f{margin-bottom:12px}
.api-form fieldset{border:0; padding:0; margin:0 0 12px}
.api-form legend{font-weight:600; font-size:13px; margin-bottom:6px}
.api-sc{align-items:flex-start !important; margin-bottom:6px}
.api-sc span{display:flex; flex-direction:column; gap:1px}
.api-sc small{color:var(--muted); font-size:11.5px; line-height:1.45}
.api-docs .edv-panel-body{line-height:1.8}
.api-docs ol,.api-docs ul{margin:0; padding-inline-start:20px}
.api-code{margin:10px 0; padding:12px 14px; border-radius:10px; background:#0D111C; color:#E2E6F1; overflow-x:auto; font:12.5px/1.6 ui-monospace,Menlo,Consolas,monospace; text-align:left}
.api-docs code:not(.api-code code){font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12.5px}
tr.is-muted td{opacity:.55}

/* =====================================================================
 * العروض حسب القسم (4.92): مبدّل العروض، الأسطول المباشر، الملخص المالي
 * ===================================================================== */
.lv-views{display:flex; gap:4px; width:max-content; max-width:100%; margin:0 0 10px; padding:4px; border:1px solid var(--line); border-radius:12px; background:#fff; overflow-x:auto; scrollbar-width:none}
.lv-views[hidden]{display:none}
.lv-views button{display:inline-flex; align-items:center; gap:8px; height:36px; padding:0 16px; border:0; border-radius:9px; background:transparent; color:var(--muted); font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; white-space:nowrap; transition:background-color .15s,color .15s}
.lv-views button svg{width:17px; height:17px}
.lv-views button:hover{color:var(--ink); background:var(--p-soft)}
.lv-views button.is-on{background:var(--p); color:var(--on-p)}
.lv-views button:focus-visible{outline:2px solid var(--p); outline-offset:2px}
html.lv-tv .lv-views{display:none}

/* الأسطول المباشر */
.lfx{display:flex; flex-direction:column; height:100%; min-height:0}
.lfx-kpis{display:grid; grid-template-columns:repeat(auto-fit,minmax(70px,1fr)); gap:8px; padding:12px 12px 8px}
.lfx-k{display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:9px 10px; min-width:0; border:1px solid var(--line); border-radius:11px; background:transparent; color:var(--ink); font:inherit; cursor:pointer; text-align:start; transition:border-color .15s, background-color .15s}
.lfx-k b{font-size:22px; line-height:1.05}
.lfx-k span{font-size:12px; line-height:1.3; color:var(--muted)}
.lfx-k:hover{border-color:color-mix(in srgb,var(--p) 35%,var(--line))}
.lfx-k.is-on{border-color:var(--p); background:var(--p-soft); box-shadow:inset 0 0 0 1px var(--p)}
.lfx-k.is-ok b{color:#127043} .lfx-k.is-now b{color:var(--p)} .lfx-k.is-warn b{color:#B45309} .lfx-k.is-off b,.lfx-k.is-bad b{color:#B42318}
.lfx-q{padding:0 12px 8px; display:flex; gap:8px; align-items:center}
.lfx-q input{flex:1; min-width:0; height:38px}
/* 4.93: مبدّل طريقة العرض + «مفقودة» + عرض البطاقات */
.lfx-mode{display:inline-flex; border:1px solid var(--line); border-radius:9px; overflow:hidden; flex:none}
.lfx-mode button{border:0; background:transparent; color:var(--muted); font:inherit; font-size:12px; padding:0 10px; height:36px; cursor:pointer}
.lfx-mode button+button{border-inline-start:1px solid var(--line)}
.lfx-mode button:hover{background:var(--p-soft); color:var(--ink)}
.lfx-mode button.is-on{background:var(--p); color:#fff}
.lfx-k.is-lost b{color:#5B3FA8} .lfx-dot.is-lost{background:#7A5AF8} .lfx-c.is-lost{background:#EFEAFB; color:#5B3FA8}
.lfx-list.is-tiles{display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:8px; padding:2px 12px 10px; align-content:start}
.lfx-list.is-tiles li.lfx-t{display:flex; flex-direction:column; align-items:stretch; gap:5px; padding:10px 11px; border:1px solid var(--line); border-radius:11px; border-inline-start:4px solid var(--line); background:#fff; cursor:pointer; transition:transform .15s,box-shadow .15s}
.lfx-list.is-tiles li.lfx-t:hover{background:#fff; transform:translateY(-1px); box-shadow:0 4px 14px rgba(16,24,40,.08)}
.lfx-list.is-tiles li.lfx-t.is-sel,[dir=rtl] .lfx-list.is-tiles li.lfx-t.is-sel{box-shadow:0 0 0 2px var(--p)}
.lfx-list.is-tiles .lfx-t.is-ok{border-inline-start-color:#12B76A} .lfx-list.is-tiles .lfx-t.is-now{border-inline-start-color:var(--p)} .lfx-list.is-tiles .lfx-t.is-warn{border-inline-start-color:#F79009} .lfx-list.is-tiles .lfx-t.is-off,.lfx-list.is-tiles .lfx-t.is-bad{border-inline-start-color:#F04438} .lfx-list.is-tiles .lfx-t.is-lost{border-inline-start-color:#7A5AF8}
.lfx-th{display:flex; align-items:center; justify-content:space-between; gap:6px}
.lfx-th b{font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lfx-tm,.lfx-tf{color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lfx-t .lfx-c{align-self:flex-start}
@media (prefers-reduced-motion:reduce){ .lfx-list.is-tiles li.lfx-t{transition:none} .lfx-list.is-tiles li.lfx-t:hover{transform:none} }
.lfx-list{list-style:none; margin:0; padding:0 6px 8px; overflow-y:auto; flex:1; min-height:120px}
.lfx-list li[data-vid]{display:flex; align-items:center; gap:10px; padding:9px 8px; border-radius:9px; cursor:pointer; border-bottom:1px solid var(--line-2)}
.lfx-list li[data-vid]:hover{background:var(--p-soft)}
.lfx-list li.is-sel{background:var(--p-soft); box-shadow:inset 3px 0 0 var(--p)}
[dir=rtl] .lfx-list li.is-sel{box-shadow:inset -3px 0 0 var(--p)}
.lfx-list li:focus-visible{outline:2px solid var(--p); outline-offset:-2px}
.lfx-dot{width:9px; height:9px; border-radius:50%; flex:none; background:#9098AA}
.lfx-dot.is-ok{background:#12B76A} .lfx-dot.is-now{background:var(--p)} .lfx-dot.is-warn{background:#F79009} .lfx-dot.is-off,.lfx-dot.is-bad{background:#F04438}
.lfx-m{flex:1; min-width:0; display:flex; flex-direction:column}
.lfx-m b{font-size:13.5px}
.lfx-m small,.lfx-s small{font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lfx-s{display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex:none; max-width:45%}
.lfx-c{font-style:normal; font-size:11.5px; font-weight:600; padding:1px 8px; border-radius:99px; background:var(--line-2); white-space:nowrap}
.lfx-c.is-ok{background:#E3F3EA; color:#127043} .lfx-c.is-now{background:var(--p-soft); color:var(--p)} .lfx-c.is-warn{background:#FBF1DF; color:#B45309} .lfx-c.is-off,.lfx-c.is-bad{background:#FBEAE8; color:#B42318}
.lfx-go{display:grid; place-items:center; width:28px; height:28px; flex:none; border-radius:7px; color:var(--muted) !important}
.lfx-go:hover{background:var(--line-2); color:var(--ink) !important}
.lfx-go svg{width:15px; height:15px}
.lfx-empty{padding:28px 10px; text-align:center; color:var(--muted)}
.lvm-flash{width:28px; height:28px; border-radius:50%; background:var(--edv-a,#1FC8B6); border:3px solid #fff; box-shadow:0 0 0 0 color-mix(in srgb,var(--edv-a,#1FC8B6) 60%,transparent); animation:lvmFl 1.2s ease-out infinite}
@keyframes lvmFl{to{box-shadow:0 0 0 18px transparent}}


@media (max-width:640px){ .lfx-kpis{grid-template-columns:repeat(auto-fit,minmax(64px,1fr))} }
@media (prefers-reduced-motion:reduce){ .lvm-flash{animation:none} }

html.dk .lv-views{background:#171a23; border-color:#282d3b}
html.dk .lv-views button.is-on{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 70%,#000); color:#fff}
html.dk .lfx-k.is-ok b{color:#7DDBA8} html.dk .lfx-k.is-now b{color:color-mix(in srgb,var(--edv-p,#1E3BB3) 40%,#fff)} html.dk .lfx-k.is-warn b{color:#F5C46B} html.dk .lfx-k.is-off b,html.dk .lfx-k.is-bad b{color:#F2A097}
html.dk .lfx-k.is-lost b{color:#C3B5FD} html.dk .lfx-c.is-lost{background:#231c3a; color:#C3B5FD}
html.dk .lfx-list.is-tiles li.lfx-t,html.dk .lfx-list.is-tiles li.lfx-t:hover{background:rgba(255,255,255,.035); box-shadow:none}
html.dk .lfx-list.is-tiles li.lfx-t.is-sel{box-shadow:0 0 0 2px var(--p)}
html.dk .lfx-c.is-ok{background:#16261d; color:#7DDBA8} html.dk .lfx-c.is-now{color:color-mix(in srgb,var(--edv-p,#1E3BB3) 40%,#fff)} html.dk .lfx-c.is-warn{background:#2a2112; color:#F5C46B} html.dk .lfx-c.is-off,html.dk .lfx-c.is-bad{background:#2d1714; color:#F2A097}

/* الخريطة في بطاقة ضيقة: صف المؤشرات أفقي قابل للتمرير بدل أن ينكسر سطرين */
.lv-w:not(.s-12):not(.s-11):not(.s-10) .lvm-sum{display:flex; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin}
.lv-w:not(.s-12):not(.s-11):not(.s-10) .lvm-sum > *{flex:0 0 auto; min-width:118px}

/* ================= نموذج الواجب (4.98) ================= */
/* AM / PM: المختار بلون الهوية في الوضعين، وحالة مرور واضحة */
.msn-tp .tp-ap button{transition:background-color .15s,color .15s}
.msn-tp .tp-ap button:not(.is-on):hover{background:var(--p-soft); color:var(--p)}
.msn-tp .tp-ap button.is-on{background:var(--p); color:#fff}
.msn-tp .tp-ap button.is-on small{color:rgba(255,255,255,.85)}
.msn-tp .tp-ap button:focus-visible{outline:2px solid var(--p); outline-offset:-2px}
html.dk .msn-tp .tp-ap button.is-on{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 80%,#fff); color:#fff}
html.dk .msn-tp .tp-ap button.is-on small{color:rgba(255,255,255,.85)}
html.dk .msn-tp .tp-ap button:not(.is-on):hover{background:rgba(255,255,255,.06); color:#fff}

/* بطاقات الاختيار: العناصر والعجلات والأسلحة والأجهزة */
.msn-pick.msn-cgrid,.msn-pick .msn-cgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:8px}
.msn-pick.msn-cgrid{padding:12px; max-height:420px}
.msn-pick label.msn-card{position:relative; display:flex; align-items:center; gap:10px; min-height:64px; padding:9px 11px; border:1.5px solid var(--line); border-radius:12px; background:#fff; cursor:pointer; transition:border-color .15s,background-color .15s,box-shadow .15s}
.msn-pick label.msn-card:hover{border-color:color-mix(in srgb,var(--p) 45%,var(--line)); box-shadow:0 2px 8px rgba(16,24,40,.06)}
.msn-pick label.msn-card:has(input:checked){border-color:var(--p); background:var(--p-soft); box-shadow:0 0 0 1px var(--p) inset}
.msn-pick label.msn-card:has(input:focus-visible){outline:2px solid var(--p); outline-offset:2px}
.msn-pick label.msn-card>input{position:absolute; width:1px; height:1px; opacity:0; pointer-events:none}
.msn-card-av,.msn-card-ic{flex:none; width:44px; height:44px; border-radius:50%; display:grid; place-items:center; overflow:hidden; background:var(--p-soft); color:var(--p); font-weight:700; font-size:17px}
.msn-pick label.msn-card>.msn-card-av,.msn-pick label.msn-card>.msn-card-ic{display:grid; place-items:center; flex-wrap:nowrap}
.msn-card-av img{width:100%; height:100%; object-fit:cover; display:block}
.msn-card-ic{border-radius:11px}
.msn-card-ic svg{width:24px; height:24px}
.msn-card-ic.is-weapon{background:#F3EEE4; color:#7A5B1E}
.msn-card-ic.is-radio{background:#E8F0FB; color:#24569B}
.msn-card-ic.is-device{background:#EEEAFB; color:#5B3FA8}
.msn-pick label.msn-card>.msn-card-b{display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; flex:1}
.msn-card-t{font-size:13.5px; line-height:1.3; color:var(--ink); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.msn-pick .msn-card-s{font-size:11.5px; color:var(--muted); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.msn-card .msn-av{margin:2px 0 0}
.msn-card-tick{position:absolute; top:-7px; inset-inline-end:-7px; width:22px; height:22px; border-radius:50%; background:var(--p); color:#fff; display:none; place-items:center; box-shadow:0 0 0 2px #fff}
.msn-card-tick svg{width:13px; height:13px}
.msn-pick label.msn-card:has(input:checked) .msn-card-tick{display:grid}
.msn-pick .msn-cgrid{overflow:visible; padding:6px 4px 4px}
.msn-pick label.msn-card:has(input:checked) .msn-card-av,.msn-pick label.msn-card:has(input:checked) .msn-card-ic{background:#fff; box-shadow:0 0 0 1.5px color-mix(in srgb,var(--p) 35%,transparent)}
html.dk .msn-pick label.msn-card:has(input:checked) .msn-card-av,html.dk .msn-pick label.msn-card:has(input:checked) .msn-card-ic{background:#161922; box-shadow:none}
.msn-pick label.msn-card.is-lead{opacity:.45; cursor:not-allowed}
.msn-pick label.msn-card[data-st="busy"]:has(input:checked),.msn-pick label.msn-card[data-st="bad"]:has(input:checked){border-color:#D92D20; background:#FDF1F0; box-shadow:0 0 0 1px #D92D20 inset}
.msn-pick label.msn-card[data-st="busy"]:has(input:checked) .msn-card-tick,.msn-pick label.msn-card[data-st="bad"]:has(input:checked) .msn-card-tick{background:#D92D20}
@media (prefers-reduced-motion:reduce){ .msn-pick label.msn-card{transition:none} }
html.dk .msn-pick label.msn-card{background:#1d212b; border-color:#303648}
html.dk .msn-pick label.msn-card:hover{border-color:#47506a; box-shadow:none}
html.dk .msn-pick label.msn-card:has(input:checked){border-color:color-mix(in srgb,var(--edv-p,#1E3BB3) 55%,#fff); background:color-mix(in srgb,var(--edv-p,#1E3BB3) 30%,#1d212b); box-shadow:0 0 0 1px color-mix(in srgb,var(--edv-p,#1E3BB3) 55%,#fff) inset}
html.dk .msn-card-av,html.dk .msn-card-ic{background:#272c3a; color:color-mix(in srgb,var(--edv-p,#1E3BB3) 35%,#fff)}
html.dk .msn-card-ic.is-weapon{background:#2d2617; color:#E8C98A}
html.dk .msn-card-ic.is-radio{background:#1b2533; color:#9CC0F0}
html.dk .msn-card-ic.is-device{background:#251f38; color:#C3B5FD}
html.dk .msn-card-t{color:#e3e5eb}
html.dk .msn-pick .msn-card-s{color:#a0a7ba}
html.dk .msn-card-tick{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 70%,#fff); box-shadow:0 0 0 2px #1d212b}
html.dk .msn-pick label.msn-card[data-st="busy"]:has(input:checked),html.dk .msn-pick label.msn-card[data-st="bad"]:has(input:checked){border-color:#F04438; background:#321513; box-shadow:0 0 0 1px #F04438 inset}

/* ================= جولات الحراسة (4.99) ================= */
.tr-empty{padding:22px 24px}
.tr-empty h2{margin:0 0 10px; font-size:17px}
.tr-empty ol{margin:0 0 16px; padding-inline-start:20px; line-height:1.9; color:var(--ink)}
.tr-stats{margin-bottom:14px}
.tr-board{display:grid; grid-template-columns:repeat(auto-fill,minmax(420px,1fr)); gap:14px}
@media (max-width:640px){ .tr-board{grid-template-columns:1fr} }
.tr-plan{padding:14px 16px}
.tr-plan-h{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:12px}
.tr-plan-h h3{margin:0 0 3px; font-size:15px}
.tr-plan-h small{color:var(--muted); font-size:12.5px}
.tr-day{font-size:12px; color:var(--muted); background:var(--bg); border-radius:99px; padding:2px 10px; white-space:nowrap}
.tr-rounds{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:8px}
.tr-r{position:relative; display:flex; flex-direction:column; gap:2px; padding:8px 10px 10px; border:1px solid var(--line); border-inline-start:4px solid var(--c,#98A2B3); border-radius:10px; background:#fff; overflow:hidden}
.tr-r.is-ok{--c:#12B76A} .tr-r.is-now{--c:var(--p)} .tr-r.is-bad{--c:#F04438; background:#FEF6F5} .tr-r.is-idle{--c:#D0D5DD; opacity:.75}
.tr-r-t{font-size:12px; color:var(--muted)}
.tr-r b{font-size:13px; color:var(--ink)}
.tr-r.is-bad b{color:#B42318}
.tr-r-n{position:absolute; top:7px; inset-inline-end:9px; font-size:11.5px; font-weight:700; color:var(--muted)}
.tr-r-bar{position:absolute; inset-inline:0; bottom:0; height:3px; background:var(--line-2)}
.tr-r-bar::after{content:""; position:absolute; inset-block:0; inset-inline-start:0; width:var(--w); background:var(--c)}
.tr-r-miss{font-size:11px; color:#B42318; line-height:1.4; margin-top:2px}
.tr-pts{display:grid; grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr); gap:14px; margin-bottom:14px; align-items:start}
@media (max-width:1100px){ .tr-pts{grid-template-columns:1fr} }
.tr-map-panel{padding:10px}
.tr-map{height:440px; border-radius:10px; overflow:hidden; background:#E2E6F0}
.tr-map-panel .edv-hint{margin:8px 4px 2px}
.tr-form .edv-fields{grid-template-columns:1fr 1fr}
.tr-form-act{display:flex; gap:8px}
.tr-kinds{display:flex; gap:8px; flex-wrap:wrap}
.tr-kind{flex:1; min-width:90px; display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 8px; border:1.5px solid var(--line); border-radius:11px; cursor:pointer; font-size:13px; transition:border-color .15s,background-color .15s}
.tr-kind input{position:absolute; opacity:0; pointer-events:none}
.tr-kind .tr-ic{color:var(--muted)}
.tr-kind:has(input:checked){border-color:var(--p); background:var(--p-soft); color:var(--p); font-weight:600}
.tr-kind:has(input:checked) .tr-ic{color:var(--p)}
.tr-kind:has(input:focus-visible){outline:2px solid var(--p); outline-offset:2px}
.tr-pt{display:flex; align-items:center; gap:10px}
.tr-pt>span:last-child{display:flex; flex-direction:column}
.tr-pt small{color:var(--muted); font-size:12px}
.tr-pt-ic{flex:none; width:34px; height:34px; border-radius:9px; display:grid; place-items:center; background:var(--p-soft); color:var(--p)}
.tr-pt-ic.is-tower{background:#F3EEE4; color:#7A5B1E}
.tr-pt-ic.is-gate{background:#E8F0FB; color:#24569B}
.tr-table tr.is-off td{opacity:.55}
.tr-mk{background:none; border:0}
.tr-mk-i{display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:#fff; color:var(--c); border:2px solid var(--c); box-shadow:0 2px 6px rgba(0,0,0,.25)}
.tr-mk-i.is-sel{transform:scale(1.15); box-shadow:0 0 0 4px color-mix(in srgb,var(--c) 30%,transparent)}
.tr-mk-i.is-off{opacity:.5}
.tr-cpsel{display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:6px}
.tr-cpopt{display:flex; align-items:center; gap:8px; padding:6px 8px; border:1.5px solid var(--line); border-radius:10px; cursor:pointer; font-size:13px}
.tr-cpopt input{accent-color:var(--p)}
.tr-cpopt .tr-pt-ic{width:26px; height:26px; border-radius:7px}
.tr-cpopt:has(input:checked){border-color:var(--p); background:var(--p-soft)}
.tr-plans{display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr); gap:14px; align-items:start}
@media (max-width:1100px){ .tr-plans{grid-template-columns:1fr} }
html.dk .tr-r{background:#1d212b}
html.dk .tr-r.is-bad{background:#2d1714}
html.dk .tr-r.is-bad b,html.dk .tr-r-miss{color:#F2A097}
html.dk .tr-pt-ic{background:#272c3a; color:color-mix(in srgb,var(--edv-p,#1E3BB3) 35%,#fff)}
html.dk .tr-pt-ic.is-tower{background:#2d2617; color:#E8C98A}
html.dk .tr-pt-ic.is-gate{background:#1b2533; color:#9CC0F0}
html.dk .tr-kind:has(input:checked),html.dk .tr-cpopt:has(input:checked){border-color:color-mix(in srgb,var(--edv-p,#1E3BB3) 55%,#fff); background:color-mix(in srgb,var(--edv-p,#1E3BB3) 28%,#1d212b); color:#fff}
html.dk .tr-kind:has(input:checked) .tr-ic{color:#fff}
html.dk .tr-mk-i{background:#1d212b}
html.dk .tr-day{background:#242936}
/* ملصقات الباركود (A4، 6 ملصقات في الصفحة) */
.tr-print-bar{display:flex; align-items:center; gap:12px; padding:12px 16px; background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5}
.tr-print-bar span{flex:1; color:var(--muted)}
.tr-labels{display:grid; grid-template-columns:repeat(2,1fr); gap:8mm; padding:10mm; max-width:210mm; margin:0 auto; background:#fff}
.tr-label{border:1.5px dashed #929AAC; border-radius:4mm; padding:5mm; display:flex; flex-direction:column; align-items:center; text-align:center; gap:2mm; break-inside:avoid; page-break-inside:avoid; color:#0B1633}
.tr-label-h{display:flex; align-items:center; justify-content:space-between; width:100%; font-size:10pt; color:#5B6478}
.tr-label-h .edv-brand strong{font-size:10pt}
.tr-qr{width:46mm; height:46mm}
.tr-qr svg{width:100%; height:100%; display:block}
.tr-label-n{display:flex; align-items:center; gap:2mm; font-size:14pt}
.tr-label small{font-size:9.5pt; color:#5B6478}
.tr-label p{margin:0; font-size:8.5pt; color:#5B6478}
.tr-label code{font-size:9pt; letter-spacing:.5px; color:#5B6478}
@media print{ .no-print{display:none !important} .tr-labels{padding:0; gap:6mm} body{background:#fff !important} }
.tr-map .leaflet-control-layers{font:inherit; font-size:12.5px; border-radius:9px}
.tr-map .leaflet-control-layers-expanded{padding:6px 10px}
html.dk .tr-map .leaflet-control-layers{background:#1d212b; color:#e3e5eb}

/* ================= محرر نقاط جولات الحراسة (4.100) ================= */
.trm-bar{flex-wrap:wrap}
.trm-counts{display:inline-flex; gap:6px; flex-wrap:wrap}
.trm-count{display:inline-flex; align-items:center; gap:5px; padding:5px 10px; border:1px solid var(--line); border-radius:99px; font-size:12.5px; color:var(--muted); background:#fff}
.trm-count b{color:var(--ink)}
.trm-count.is-tower .tr-ic{color:#7A5B1E} .trm-count.is-gate .tr-ic{color:#24569B} .trm-count.is-point .tr-ic{color:var(--p)}
.trm{display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:14px; align-items:stretch; margin-bottom:14px}
@media (max-width:1100px){ .trm{grid-template-columns:1fr} }
.trm-mapwrap{position:relative; border-radius:14px; overflow:hidden; border:1px solid var(--line); background:#191d27; min-height:560px; height:calc(100vh - 290px)}
.trm-map{position:absolute; inset:0}
.trm.is-full{position:fixed; inset:0; z-index:1000; margin:0; gap:0; background:var(--bg); grid-template-columns:minmax(0,1fr) 340px}
.trm.is-full .trm-mapwrap{height:100vh; border-radius:0; border:0}
.trm.is-full .trm-side{border-radius:0; height:100vh}
html.trm-lock{overflow:hidden}
.trm.is-adding .trm-map, .trm.is-adding .trm-map .leaflet-interactive{cursor:crosshair !important}
.trm-tools{position:absolute; top:12px; inset-inline:12px; z-index:500; display:flex; flex-wrap:wrap; gap:8px; pointer-events:none}
.trm-seg{pointer-events:auto; display:inline-flex; align-items:center; background:rgba(255,255,255,.96); border-radius:11px; box-shadow:0 4px 14px rgba(16,24,40,.16); overflow:hidden; border:1px solid rgba(16,24,40,.08)}
.trm-seg button{display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 12px; border:0; background:transparent; color:#344054; font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background-color .15s,color .15s}
.trm-seg button+button{border-inline-start:1px solid #EAECF0}
.trm-seg button:hover{background:#F2F4F7}
.trm-seg button.is-on{background:var(--p); color:#fff}
.trm-seg button:focus-visible{outline:2px solid var(--p); outline-offset:-2px}
.trm-seg-l{padding:0 10px 0 12px; font-size:12.5px; font-weight:700; color:var(--muted); border-inline-end:1px solid #EAECF0; height:38px; display:inline-flex; align-items:center}
.trm-add button.is-on{background:var(--edv-a,#1FC8B6)}
.trm-hint{position:absolute; top:62px; inset-inline-start:50%; transform:translateX(50%); z-index:500; background:rgba(17,24,21,.88); color:#fff; padding:8px 16px; border-radius:99px; font-size:13px; font-weight:600; box-shadow:0 4px 14px rgba(0,0,0,.25); pointer-events:none; white-space:nowrap}
[dir=ltr] .trm-hint{transform:translateX(-50%)}
.trm-legend{position:absolute; bottom:12px; inset-inline-start:50%; transform:translateX(50%); z-index:500; display:flex; gap:12px; padding:6px 12px; background:rgba(255,255,255,.94); border-radius:99px; font-size:12px; color:#344054; box-shadow:0 2px 10px rgba(16,24,40,.14)}
[dir=ltr] .trm-legend{transform:translateX(-50%)}
.trm-legend span{display:inline-flex; align-items:center; gap:5px}
.trm-legend i{width:9px; height:9px; border-radius:50%; background:#98A2B3}
.trm-legend .is-ok i{background:#12B76A} .trm-legend .is-due i{background:#F79009} .trm-legend .is-late i{background:#F04438}
@media (max-width:760px){ .trm-legend{display:none} .trm-seg button span{display:none} }
/* العلامات */
.trm-mk{background:none; border:0}
.trm-pin{position:relative; display:grid; place-items:center; width:34px; height:34px; border-radius:11px; background:#fff; color:#0B1633; border:2.5px solid var(--c); box-shadow:0 3px 10px rgba(0,0,0,.35); transition:transform .15s}
.trm-pin.is-tower{color:#7A5B1E} .trm-pin.is-gate{color:#24569B} .trm-pin.is-point{color:var(--edv-p,#1E3BB3)}
.trm-pin.is-off{opacity:.5; filter:grayscale(1)}
.trm-mk:hover .trm-pin,.leaflet-marker-dragging .trm-pin{transform:scale(1.12)}
.trm-no{position:absolute; top:-8px; inset-inline-end:-8px; min-width:18px; height:18px; padding:0 4px; border-radius:99px; background:var(--edv-a,#1FC8B6); color:var(--edv-on-a,#fff); font-size:11px; font-weight:800; display:grid; place-items:center; box-shadow:0 0 0 2px #fff}
.trm-lbl{position:absolute; top:38px; left:50%; transform:translateX(-50%); white-space:nowrap; padding:2px 8px; border-radius:6px; background:rgba(17,24,21,.82); color:#fff; font-size:11.5px; font-weight:600; pointer-events:none}
.trm-leg{background:none; border:0; display:flex; align-items:center; justify-content:center; gap:4px; pointer-events:none}
.trm-arrow{color:var(--edv-a,#1FC8B6); font-size:12px; text-shadow:0 0 3px rgba(0,0,0,.6)}
.trm-dist{background:rgba(17,24,21,.8); color:#fff; font-size:11px; font-weight:700; padding:1px 7px; border-radius:99px; white-space:nowrap}
/* النوافذ المنبثقة */
.trm-popup .leaflet-popup-content-wrapper{border-radius:14px; box-shadow:0 10px 30px rgba(16,24,40,.22)}
.trm-popup .leaflet-popup-content{margin:14px; font:inherit; direction:inherit; text-align:start}
.trm-pop-h{display:flex; gap:10px; align-items:center; margin-bottom:8px}
.trm-pop-h b{display:block; font-size:14.5px}
.trm-pop-h small{color:var(--muted); font-size:12px}
.trm-pop-ic{width:36px; height:36px; border-radius:10px; display:grid; place-items:center; background:var(--p-soft); color:var(--p); flex:none}
.trm-pop-ic.is-tower{background:#F3EEE4; color:#7A5B1E} .trm-pop-ic.is-gate{background:#E8F0FB; color:#24569B}
.trm-pop-st{display:flex; align-items:center; gap:6px; margin:0 0 6px; font-size:12.5px; font-weight:600}
.trm-pop-st i{width:9px; height:9px; border-radius:50%; background:var(--c)}
.trm-pop-note{margin:0 0 6px; font-size:12.5px; background:#FFF8E6; color:#7A5B1E; padding:5px 8px; border-radius:8px}
.trm-pop-last{display:block; color:var(--muted); font-size:12px; margin-bottom:10px}
.trm-pop-a{display:flex; gap:6px; flex-wrap:wrap}
.trm-form{display:flex; flex-direction:column; gap:8px}
.trm-form .trm-kinds{display:grid; grid-template-columns:repeat(3,1fr); gap:6px}
.trm-kind{display:flex; flex-direction:column; align-items:center; gap:2px; padding:7px 4px; border:1.5px solid var(--line); border-radius:10px; cursor:pointer; font-size:12px; color:var(--muted)}
.trm-kind input{position:absolute; opacity:0; pointer-events:none}
.trm-kind:has(input:checked){border-color:var(--p); background:var(--p-soft); color:var(--p); font-weight:700}
.trm-kind:has(input:focus-visible){outline:2px solid var(--p); outline-offset:2px}
.trm-fl{display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--muted); font-weight:600}
.trm-fl input{height:36px; padding:0 10px; border:1px solid var(--line); border-radius:9px; font:inherit; font-size:13.5px; color:var(--ink); background:#fff}
.trm-fl input:focus{outline:2px solid color-mix(in srgb,var(--p) 40%,transparent); border-color:var(--p)}
.trm-row{display:grid; grid-template-columns:1fr 1fr; gap:8px}
/* القائمة الجانبية */
.trm-side{display:flex; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; min-height:560px; height:calc(100vh - 290px)}
.trm-side-h{padding:14px 16px 10px; border-bottom:1px solid var(--line-2)}
.trm-side-h h3{margin:0; font-size:15px}
.trm-len{margin:4px 0 0; font-size:12.5px; color:var(--muted)}
.trm-len b{color:var(--ink)}
.trm-list{list-style:none; margin:0; padding:6px; overflow-y:auto; flex:1; counter-reset:none}
.trm-li{display:flex; align-items:center; gap:8px; padding:6px; border-radius:10px; position:relative}
.trm-li:hover{background:var(--p-soft)}
.trm-li+.trm-li::before{content:""; position:absolute; top:-6px; inset-inline-start:17px; width:2px; height:12px; background:repeating-linear-gradient(to bottom,var(--edv-a,#1FC8B6) 0 3px,transparent 3px 6px)}
.trm-li.is-off{opacity:.55}
.trm-li-no{flex:none; width:22px; height:22px; border-radius:99px; background:var(--edv-a,#1FC8B6); color:var(--edv-on-a,#fff); font-size:11.5px; font-weight:800; display:grid; place-items:center}
.trm-li.is-noloc .trm-li-no{background:#D0D5DD}
.trm-li-ic{flex:none; width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:var(--p-soft); color:var(--p)}
.trm-li-ic.is-tower{background:#F3EEE4; color:#7A5B1E} .trm-li-ic.is-gate{background:#E8F0FB; color:#24569B}
.trm-li-m{flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; border:0; background:none; padding:0; font:inherit; text-align:start; cursor:pointer; color:var(--ink)}
.trm-li-m b{font-size:13px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.trm-li-m small{font-size:11.5px; color:var(--muted)}
.trm-li-m:focus-visible{outline:2px solid var(--p); outline-offset:2px; border-radius:6px}
.trm-li-st{flex:none; width:9px; height:9px; border-radius:50%; background:var(--c)}
.trm-li-mv{display:inline-flex; flex-direction:column; gap:1px; flex:none}
.trm-li-mv button{width:24px; height:17px; border:1px solid var(--line); background:#fff; border-radius:5px; font-size:9px; color:var(--muted); cursor:pointer; line-height:1}
.trm-li-mv button:hover:not(:disabled){border-color:var(--p); color:var(--p)}
.trm-li-mv button:disabled{opacity:.35; cursor:default}
.trm-empty{margin:auto 18px; text-align:center; color:var(--muted); font-size:13.5px; line-height:1.7}
.trm-side-f{margin:0; padding:10px 14px; border-top:1px solid var(--line-2); font-size:12px; color:var(--muted); line-height:1.6}
/* الوضع الليلي */
html.dk .trm-count{background:#1d212b; border-color:#303648}
html.dk .trm-count b{color:#e3e5eb}
html.dk .trm-side{background:#1d212b; border-color:#303648}
html.dk .trm-side-h,html.dk .trm-side-f{border-color:#2a3040}
html.dk .trm-li:hover{background:rgba(255,255,255,.05)}
html.dk .trm-li-ic,html.dk .trm-pop-ic{background:#272c3a; color:color-mix(in srgb,var(--edv-p,#1E3BB3) 35%,#fff)}
html.dk .trm-li-ic.is-tower,html.dk .trm-pop-ic.is-tower{background:#2d2617; color:#E8C98A}
html.dk .trm-li-ic.is-gate,html.dk .trm-pop-ic.is-gate{background:#1b2533; color:#9CC0F0}
html.dk .trm-li-mv button{background:#242936; border-color:#303648; color:#a0a7ba}
html.dk .trm-li-m{color:#e3e5eb}
html.dk .trm-popup .leaflet-popup-content-wrapper,html.dk .trm-popup .leaflet-popup-tip{background:#1d212b; color:#e3e5eb}
html.dk .trm-fl input{background:#161922; border-color:#303648; color:#e3e5eb}
html.dk .trm-kind:has(input:checked){border-color:color-mix(in srgb,var(--edv-p,#1E3BB3) 55%,#fff); background:color-mix(in srgb,var(--edv-p,#1E3BB3) 28%,#1d212b); color:#fff}
html.dk .trm-pop-note{background:#2d2617; color:#E8C98A}
html.dk .trm-seg{background:rgba(35,36,37,.96); border-color:#303648}
html.dk .trm-seg button{color:#ccd0da}
html.dk .trm-seg button:hover{background:rgba(255,255,255,.06)}
html.dk .trm-seg button+button,html.dk .trm-seg-l{border-color:#303648}
html.dk .trm-seg button.is-on{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 80%,#fff); color:#fff}
html.dk .trm-add button.is-on{background:var(--edv-a,#1FC8B6)}
html.dk .trm-legend{background:rgba(35,36,37,.94); color:#ccd0da}
@media (prefers-reduced-motion:reduce){ .trm-pin,.trm-seg button{transition:none} }

/* ================= حراس نقاط التفتيش (5.2) ================= */
.trm-g{position:absolute; bottom:-9px; inset-inline-start:-11px; display:inline-flex; align-items:center; gap:2px; height:18px; padding:0 5px 0 4px; border-radius:99px; background:#0B1633; color:#fff; font-size:11px; font-weight:800; white-space:nowrap; box-shadow:0 0 0 2px #fff}
.trm-g .tr-ic{width:11px; height:11px}
.trm-pin:has(.trm-g)+.trm-lbl{top:44px}
.trm-pop-g{margin-inline-start:auto; display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:99px; background:#EEF1F6; color:#0B1633; font-size:12px; font-weight:700; white-space:nowrap}
.trm-li-g{display:inline-flex; align-items:center; gap:2px; font-weight:700; color:var(--ink)}
.trm-li-g .tr-ic,.trm-pop-g .tr-ic{width:12px; height:12px}
.trm-fl .tr-ic{width:12px; height:12px; vertical-align:-1px}
.trm-guards{display:inline-flex; align-items:center; gap:8px; padding:5px 12px; border-radius:99px; border:1px solid #BFE0CC; background:#EFF2FA; color:#1E5B3C; font-size:12.5px}
.trm-guards b{font-size:13.5px}
.trm-guards-in{padding-inline-start:8px; border-inline-start:1px solid currentColor; border-color:rgba(30,91,60,.25)}
.trm-guards.is-short{border-color:#F3C9C4; background:#FDF3F2; color:#9B2C22}
.trm-guards.is-short .trm-guards-in{border-color:rgba(155,44,34,.25)}
html.dk .trm-pop-g{background:#272c3a; color:#e3e5eb}
html.dk .trm-guards{background:#161921; border-color:#2d5a3f; color:#b6edd4}
html.dk .trm-guards.is-short{background:#2d1512; border-color:#6b2a24; color:#f2b1aa}

/* ================= كشف المواقع والتسعير (5.2) ================= */
.qt-top{display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin-bottom:14px}
.qt-filter{display:inline-flex; flex-wrap:wrap; gap:6px}
.qt-filter a{display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 12px; border:1px solid var(--line); border-radius:99px; background:#fff; color:var(--muted); font-size:13px; font-weight:600; text-decoration:none}
.qt-filter a b{color:var(--ink)}
.qt-filter a i{width:8px; height:8px; border-radius:50%; background:#98A2B3}
.qt-filter a.is-info i{background:#2F80ED} .qt-filter a.is-ok i{background:#16A34A} .qt-filter a.is-bad i{background:#D92D20}
.qt-filter a.is-on{background:var(--p); border-color:var(--p); color:#fff}.qt-filter a.is-on b{color:#fff}
.qt-won{font-size:13px; color:var(--muted)} .qt-won b{color:var(--ink)}
.qt-fromsite{display:inline-flex; gap:6px; margin-inline-start:auto}
.qt-fromsite select{height:34px; min-width:200px}
.qt-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:14px}
.qt-card{display:flex; flex-direction:column; padding:16px; gap:14px; margin:0}
.qt-card-h{display:flex; align-items:flex-start; justify-content:space-between; gap:10px}
.qt-title{display:block; font-size:15.5px; line-height:1.4}
.qt-card-h small{display:block; color:var(--muted); font-size:12.5px; margin-top:2px}
.qt-site{display:inline-flex; align-items:center; gap:3px; color:var(--p); font-weight:600; font-size:12.5px}
.qt-badge{flex:none; display:inline-flex; align-items:center; padding:3px 10px; border-radius:99px; font-size:12px; font-weight:700; background:#EEF1F6; color:#4D5568; white-space:nowrap}
.qt-badge.is-info{background:#E7F0FD; color:#1D5FB8} .qt-badge.is-ok{background:#E3F5EA; color:#0E7A3D} .qt-badge.is-bad{background:#FBEAE8; color:#B42318}
.qt-stats{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(62px,1fr)); gap:6px}
.qt-stats li{display:flex; flex-direction:column; align-items:center; gap:2px; padding:9px 4px; border-radius:10px; background:#F5F6F9; text-align:center; min-width:0}
.qt-stats .tr-ic{color:var(--p)}
.qt-stats b{font-size:14px; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%}
.qt-stats small{font-size:11px; color:var(--muted)}
.qt-price{display:flex; align-items:flex-end; justify-content:space-between; gap:10px; padding-top:12px; border-top:1px dashed var(--line)}
.qt-price small{display:block; font-size:11.5px; color:var(--muted)}
.qt-price b{font-size:20px; color:var(--ink)}
.qt-price-x{text-align:end; font-size:12.5px; color:var(--muted)}
.qt-margin{display:inline-block; margin-top:4px; padding:1px 8px; border-radius:99px; background:#FFF6E0; color:#8F5A09; font-size:11.5px; font-weight:700}
.qt-card-f{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:auto}
.qt-ref{margin-inline-end:auto; font-size:12px; color:var(--muted)}
.qt-empty{display:flex; flex-direction:column; align-items:center; gap:10px; padding:40px 20px; text-align:center}
.qt-empty-ic{width:64px; height:64px; border-radius:18px; display:grid; place-items:center; background:var(--p-soft); color:var(--p)}
/* النموذج */
.qt-step{display:inline-grid; place-items:center; width:24px; height:24px; margin-inline-end:8px; border-radius:50%; background:var(--p); color:#fff; font-size:12.5px; vertical-align:2px}
.qt-form .edv-panel-head{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px}
.qt-hint{font-size:12.5px}
.qt-survey label .tr-ic{vertical-align:-3px; color:var(--p)}
.qt-extras{padding:0 18px 18px}
.qt-extras h3{font-size:14px; margin:4px 0 10px}
.qt-extras h3 small{font-weight:400; font-size:12px}
.qt-ex-head,.qt-ex-row{display:grid; grid-template-columns:minmax(0,1fr) 90px 150px 36px; gap:8px; align-items:center}
.qt-ex-head{font-size:12px; color:var(--muted); font-weight:600; margin-bottom:4px}
.qt-ex-row{margin-bottom:8px}
.qt-ex-row input{height:40px; width:100%}
.qt-ex-x{width:36px; height:40px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--muted); font-size:18px; cursor:pointer}
.qt-ex-x:hover{border-color:var(--bad); color:var(--bad)}
@media (max-width:600px){ .qt-ex-head{display:none} .qt-ex-row{grid-template-columns:1fr 70px; } .qt-ex-row input:first-child{grid-column:1/-1} .qt-stats{grid-template-columns:repeat(3,1fr)} }
.qt-sum{position:sticky; top:12px}
.qt-sum-t{width:100%; border-collapse:collapse; font-size:13px}
.qt-sum-t th{font-size:11.5px; color:var(--muted); font-weight:600; text-align:start; padding:8px 16px 6px; border-bottom:1px solid var(--line-2)}
.qt-sum-t td{padding:7px 16px; border-bottom:1px solid var(--line-2)}
.qt-sum-t th:not(:first-child),.qt-sum-t td:not(:first-child){text-align:end; white-space:nowrap}
.qt-sum-empty{color:var(--muted); text-align:center !important; padding:16px !important}
.qt-sum-big{margin:14px 16px 6px; padding:14px 16px; border-radius:12px; background:var(--p); color:#fff}
.qt-sum-big small{display:block; font-size:12px; opacity:.8}
.qt-sum-big b{display:block; font-size:24px; margin-top:2px}
.qt-sum-dl{margin:0; padding:4px 16px}
.qt-sum-dl div{display:flex; justify-content:space-between; gap:10px; padding:6px 0; font-size:13px; border-bottom:1px dashed var(--line-2)}
.qt-sum-dl dt{color:var(--muted)} .qt-sum-dl dd{margin:0; font-weight:700}
.qt-sum-dl .qt-profit dd{color:#8F5A09}
.qt-sum-note{margin:8px 16px 0; font-size:11.5px; color:var(--muted)}
.qt-sum-a{display:flex; flex-wrap:wrap; gap:8px; padding:14px 16px 16px}
.qt-sum-a .edv-abtn{flex:1; justify-content:center}
.qt-del{text-align:center}
html.dk .qt-filter a{background:#1d212b; border-color:#303648}
html.dk .qt-filter a b{color:#e3e5eb}
html.dk .qt-filter a.is-on{background:var(--dk-pbtn,#2f6f55); border-color:transparent; color:#fff}
html.dk .qt-stats li{background:#232734}
html.dk .qt-stats .tr-ic,html.dk .qt-survey label .tr-ic,html.dk .qt-site{color:var(--dk-pfg,#8fd3b4)}
html.dk .qt-badge{background:#272c3a; color:#c0c4cd}
html.dk .qt-badge.is-info{background:#16263d; color:#8db8f5} html.dk .qt-badge.is-ok{background:#163222; color:#7fd9a2} html.dk .qt-badge.is-bad{background:#2d1512; color:#f2a59e}
html.dk .qt-margin{background:#2e2610; color:#f0cf7a}
html.dk .qt-sum-dl .qt-profit dd{color:#f0cf7a}
html.dk .qt-ex-x{background:#242936; border-color:#303648; color:#a0a7ba}
html.dk .qt-empty-ic{background:#272c3a; color:var(--dk-pfg,#8fd3b4)}

/* حراس كل نوع في شريط العدّ، وعنوان حقل الحراس في نافذة النقطة (5.2) */
.trm-count-g{display:inline-flex; align-items:center; gap:2px; margin-inline-start:4px; padding:1px 7px 1px 6px; border-radius:99px; background:#0B1633; color:#fff; font-size:11.5px}
.trm-count-g[hidden]{display:none}
.trm-count-g b{color:#fff}
.trm-count-g .tr-ic{width:12px; height:12px; color:#fff}
.trm-fl{justify-content:flex-end}
.trm-fl-g{display:inline-flex; align-items:center; gap:4px}
.trm-fl-g svg{width:13px; height:13px; flex:none}

/* تجهيزات الكشف: أجهزة، أسلحة، عجلات — إن وجدت (5.2) */
.qt-eq{padding:4px 18px 18px}
.qt-eq h3{font-size:13.5px; margin:0 0 10px}
.qt-eq h3 small{font-weight:400; font-size:12px}
.qt-eq-g{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px}
.qt-eq-i{display:grid; grid-template-columns:auto 1fr; grid-template-areas:"ic l" "ic in"; align-items:center; gap:4px 10px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#F7F8FB; cursor:text}
.qt-eq-i:focus-within{border-color:var(--p); box-shadow:0 0 0 3px rgba(30,59,179,.12)}
.qt-eq-ic{grid-area:ic; width:40px; height:40px; border-radius:10px; display:grid; place-items:center; background:#fff; color:var(--p); border:1px solid var(--line)}
.qt-eq-l{grid-area:l; font-size:12.5px; font-weight:600; color:var(--muted)}
.qt-eq-i input{grid-area:in; height:36px; width:100%; border:1px solid var(--line); border-radius:8px; padding:0 10px; font:inherit; font-size:15px; font-weight:700; background:#fff}
.qt-eq-rate[hidden]{display:none}
.qt-stats li.is-eq{background:#FBF7EF}
.qt-need{margin:6px 0 0; color:#B42318; font-size:12.5px; font-weight:600}
.qt-form input.is-invalid{border-color:#D92D20; box-shadow:0 0 0 3px rgba(217,45,32,.14)}
.qt-money{font-variant-numeric:tabular-nums}
html.dk .qt-need{color:#F3A59E}
/* مخطط الموقع في الكشف (5.9) */
.qm{--qm-gate:#24569B; --qm-tower:#B7791F; --qm-post:#0E9384; --qm-sup:#7A3FB8; --qm-k9:#8A4B1C}
.qm-bar{display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px 16px 10px}
.qm-seg{display:inline-flex; flex-wrap:wrap; border:1px solid var(--line); border-radius:11px; overflow:hidden; background:#fff}
.qm-seg button{display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px; border:0; background:transparent; color:#344054; font:inherit; font-size:13px; font-weight:600; cursor:pointer}
.qm-seg button+button{border-inline-start:1px solid var(--line-2)}
.qm-seg button:hover{background:#F2F4F7}
.qm-seg button.is-on{background:var(--p); color:#fff}
.qm-seg button.is-gate .tr-ic{color:var(--qm-gate)} .qm-seg button.is-tower .tr-ic{color:var(--qm-tower)} .qm-seg button.is-post .tr-ic{color:var(--qm-post)} .qm-seg button.is-sup .tr-ic{color:var(--qm-sup)} .qm-seg button.is-k9 .tr-ic{color:var(--qm-k9)}
.qm-seg button.is-on .tr-ic{color:#fff}
.qm-base{margin-inline-start:auto}
.qm-wrap{border-top:1px solid var(--line-2)}
.qm-map{height:460px; background:#DDE3EA; z-index:0}
.qm-map.is-adding{cursor:crosshair}
.qm-map.is-adding .leaflet-grab{cursor:crosshair}
.qm-side{border-top:1px solid var(--line-2)}
.qm-sum{list-style:none; margin:0; padding:10px 12px; display:grid; grid-template-columns:repeat(6,1fr); gap:8px; border-bottom:1px solid var(--line-2)}
.qm-sum li{display:flex; flex-direction:column; align-items:center; gap:1px; padding:6px 2px; border-radius:9px; background:#F5F6F9; text-align:center; min-width:0}
.qm-sum li .tr-ic{color:var(--p)} .qm-sum li.is-gate .tr-ic{color:var(--qm-gate)} .qm-sum li.is-tower .tr-ic{color:var(--qm-tower)} .qm-sum li.is-post .tr-ic{color:var(--qm-post)} .qm-sum li.is-sup .tr-ic{color:var(--qm-sup)} .qm-sum li.is-k9 .tr-ic{color:var(--qm-k9)}
.qm-sum b{font-size:16px; line-height:1.2}
.qm-sum small{font-size:10.5px; color:var(--muted); line-height:1.2}
.qm-list{list-style:none; margin:0; padding:4px 12px; max-height:320px; overflow:auto; display:grid; grid-template-columns:1fr 1fr; gap:0 18px}
.qm-list:empty{display:none}
.qm-li{display:grid; grid-template-columns:30px minmax(0,1fr) 62px 62px 24px; align-items:center; gap:5px; padding:5px 2px; border-bottom:1px solid var(--line-2); cursor:pointer}
.qm-li-ic{position:relative; display:grid; place-items:center; width:28px; height:28px; border-radius:8px; color:#fff; background:var(--qm-post)}
.qm-li-ic.is-gate{background:var(--qm-gate)} .qm-li-ic.is-tower{background:var(--qm-tower)} .qm-li-ic.is-sup{background:var(--qm-sup)} .qm-li-ic.is-k9{background:var(--qm-k9)}
.qm-li-ic .tr-ic{width:15px; height:15px}
.qm-li-ic b{position:absolute; top:-6px; inset-inline-end:-6px; min-width:16px; height:16px; padding:0 3px; border-radius:99px; background:#fff; color:#0B1633; font-size:10px; line-height:16px; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,.3)}
.qm-li input{height:30px; width:100%; min-width:0; border:1px solid var(--line); border-radius:7px; padding:0 7px; font:inherit; font-size:13px; background:#fff; color:var(--ink)}
.qm-li-q{display:flex; align-items:center; gap:3px; color:var(--muted)}
.qm-li-q .tr-ic{flex:none}
.qm-li-q input{padding:0 4px; text-align:center; font-weight:700}
.qm-li-x{width:24px; height:24px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:18px; line-height:1; cursor:pointer}
.qm-li-x:hover{background:#FEE4E2; color:#B42318}
.qm-empty{margin:0; padding:16px; color:var(--muted); font-size:13px; line-height:1.7}
.qm-empty[hidden],.qm-hint[hidden]{display:none}
.qm-hint{margin:0; padding:9px 16px; background:#EEF4FF; color:#1E3BB3; font-size:13px; font-weight:600; border-top:1px solid var(--line-2)}
.qm-mk{background:none; border:0}
.qm-pin{position:relative; display:grid; place-items:center; width:34px; height:34px; border-radius:11px; color:#fff; background:var(--qm-post,#0E9384); border:2.5px solid #fff; box-shadow:0 3px 10px rgba(0,0,0,.4)}
.qm-pin.is-gate{background:var(--qm-gate,#24569B)} .qm-pin.is-tower{background:var(--qm-tower,#B7791F)} .qm-pin.is-sup{background:var(--qm-sup,#7A3FB8); border-radius:50%}
.qm-pin.is-sup .qm-g{background:#7A3FB8}
.qm-pin.is-k9{background:var(--qm-k9,#8A4B1C); border-radius:50%} .qm-pin.is-k9 .qm-g{background:#8A4B1C}
.qm-pin .tr-ic{width:17px; height:17px}
.qm-no{position:absolute; top:-8px; inset-inline-end:-8px; min-width:18px; height:18px; padding:0 4px; border-radius:99px; background:#fff; color:#0B1633; font-size:11px; line-height:18px; text-align:center; box-shadow:0 1px 4px rgba(0,0,0,.35)}
.qm-g{position:absolute; bottom:-9px; inset-inline-start:50%; transform:translateX(-50%); display:inline-flex; align-items:center; gap:1px; height:16px; padding:0 4px; border-radius:99px; background:#0B1633; color:#fff; font-size:10px; white-space:nowrap}
[dir=rtl] .qm-g{transform:translateX(50%)}
.qm-g .tr-ic{width:10px; height:10px}
@media (max-width:900px){ .qm-list{grid-template-columns:1fr} .qm-map{height:360px} .qm-base{margin-inline-start:0} }
@media (max-width:520px){ .qm-sum{grid-template-columns:repeat(3,1fr)} .qm-li{grid-template-columns:30px minmax(0,1fr) 58px 58px 22px} .qm-seg button span{font-size:12px} .qm-seg button{padding:0 9px} }
html.dk .qm-seg{background:#1a1d26; border-color:#303648}
html.dk .qm-seg button{color:#d9dce3}
html.dk .qm-seg button:hover{background:#232838}
html.dk .qm-seg button.is-on{background:var(--p); color:#fff}
html.dk .qm-sum li{background:#1a1d26}
html.dk .qm-li input{background:#12151c; border-color:#303648; color:#e3e5eb}
html.dk .qm-hint{background:#16203d; color:#c7d4ff}
html.dk .qm-li-x:hover{background:#3a1714; color:#f3a59e}
html.dk .qm{--qm-gate-fg:#8FB2EA; --qm-tower-fg:#E8B860; --qm-post-fg:#4FD1C0; --qm-sup-fg:#C9A4F0; --qm-k9-fg:#E3A774}
html.dk .qm-seg button.is-k9 .tr-ic,html.dk .qm-sum li.is-k9 .tr-ic{color:var(--qm-k9-fg)}
html.dk .qm-seg button.is-sup .tr-ic,html.dk .qm-sum li.is-sup .tr-ic{color:var(--qm-sup-fg)}
html.dk .qm-sum li .tr-ic{color:#A9B8FF}
html.dk .qm-seg button.is-gate .tr-ic,html.dk .qm-sum li.is-gate .tr-ic{color:var(--qm-gate-fg)}
html.dk .qm-seg button.is-tower .tr-ic,html.dk .qm-sum li.is-tower .tr-ic{color:var(--qm-tower-fg)}
html.dk .qm-seg button.is-post .tr-ic,html.dk .qm-sum li.is-post .tr-ic{color:var(--qm-post-fg)}
html.dk .qm-seg button.is-on .tr-ic{color:#fff}
@media (max-width:640px){.qt-eq-g{grid-template-columns:1fr}}
.qt-eq-g{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
/* عروض الأسعار (5.14): أنواع العروض، زر «عرض جديد»، وعرض تأجير العجلات */
.qt-kinds{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; margin-bottom:14px}
.qt-kinds a{display:flex; align-items:center; gap:10px; min-height:58px; padding:10px 14px; border:1px solid var(--line); border-radius:14px; background:#fff; color:var(--ink); font-weight:700; font-size:14px; text-decoration:none; transition:border-color .15s, box-shadow .15s}
.qt-kinds a:hover{border-color:var(--p)}
.qt-kinds a > span:nth-child(2){flex:1; min-width:0}
.qt-kinds a b{font-size:13px; color:var(--muted); background:#F2F4F8; border-radius:99px; padding:1px 9px}
.qt-kinds a.is-on{border-color:var(--p); box-shadow:0 0 0 3px rgba(30,59,179,.12)}
.qt-kinds a.is-on b{background:var(--p); color:#fff}
.qt-kind-ic{flex:none; display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:var(--p-soft,#EEF2FF); color:var(--p)}
.qt-kinds a.is-rental .qt-kind-ic,.qt-new-menu a.is-rental .qt-kind-ic{background:#FFF3E3; color:#B4610E}
.qt-kinds a.is-price .qt-kind-ic,.qt-new-menu a.is-price .qt-kind-ic{background:#E5F6F2; color:#0B7A68}
.qt-new{position:relative}
.qt-new > summary{list-style:none; cursor:pointer}
.qt-new > summary::-webkit-details-marker{display:none}
.qt-new-menu{position:absolute; z-index:30; top:calc(100% + 6px); inset-inline-end:0; width:min(340px,calc(100vw - 32px)); padding:6px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 14px 34px rgba(11,22,51,.16)}
.qt-new-menu a{display:flex; align-items:center; gap:12px; padding:10px; border-radius:10px; color:var(--ink); text-decoration:none}
.qt-new-menu a:hover,.qt-new-menu a:focus-visible{background:#F3F5FA; outline:none}
.qt-new-menu b{display:block; font-size:14px}
.qt-new-menu small{display:block; font-size:12px; color:var(--muted); font-weight:400; line-height:1.5}
.qt-card{position:relative}
.qt-kind-tag{align-self:flex-start; display:inline-flex; align-items:center; gap:5px; margin:-4px 0 -6px; padding:2px 9px 2px 8px; border-radius:99px; background:var(--p-soft,#EEF2FF); color:var(--p); font-size:11.5px; font-weight:700}
.qt-kind-tag.is-rental{background:#FFF3E3; color:#9A520B} .qt-kind-tag.is-price{background:#E5F6F2; color:#0B6B5B}
.qt-stats li.is-armored .tr-ic{color:#9A520B}
.qr-tot{list-style:none; margin:0; padding:2px 18px 12px; display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px}
.qr-tot li{display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:12px; background:#F5F7FB; border:1px solid var(--line-2,#EEF0F4)}
.qr-tot b{display:block; font-size:20px; line-height:1.2}
.qr-tot small{display:block; font-size:12px; color:var(--muted)}
.qr-ic{display:grid; place-items:center; width:46px; height:46px; border-radius:12px; background:#fff; color:var(--p); border:1px solid var(--line)}
.qr-tot li.is-armored .qr-ic,.qr-grp.is-armored h4 .tr-ic{color:#9A520B}
.qr-head,.qr-row{display:grid; grid-template-columns:154px minmax(0,1fr) 80px 150px 36px; gap:8px; align-items:center; padding:0 18px}
.qr-head{font-size:12px; color:var(--muted); font-weight:600; margin-bottom:4px}
.qr-row{padding-top:8px; padding-bottom:8px; border-top:1px dashed var(--line-2,#EEF0F4)}
.qr-row > input{height:40px; width:100%}
.qr-type{display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:3px; border:1px solid var(--line); border-radius:10px; background:#F5F6F9}
.qr-type label{display:flex; flex-direction:column; align-items:center; gap:0; padding:3px 2px; border-radius:7px; font-size:11px; font-weight:700; color:var(--muted); cursor:pointer; line-height:1.3}
.qr-type input{position:absolute; opacity:0; pointer-events:none}
.qr-type label:has(input:checked){background:#fff; color:var(--p); box-shadow:0 1px 3px rgba(11,22,51,.14)}
.qr-type label.is-armored:has(input:checked){color:#9A520B}
.qr-type label:has(input:focus-visible){outline:2px solid var(--p); outline-offset:1px}
.qr-linked{grid-column:2 / -1; display:flex; flex-wrap:wrap; gap:5px}
.qr-linked:empty{display:none}
.qr-chip{display:inline-flex; align-items:center; gap:4px; padding:2px 4px 2px 9px; border-radius:99px; background:var(--p-soft,#EEF2FF); color:var(--p); font-size:12px; font-weight:600}
.qr-chip button{width:20px; height:20px; border:0; border-radius:50%; background:transparent; color:inherit; cursor:pointer; font-size:14px; line-height:1}
.qr-chip button:hover{background:rgba(0,0,0,.08)}
.qr-empty{margin:4px 18px 8px; padding:14px; border:1px dashed var(--line); border-radius:12px; text-align:center; color:var(--muted); font-size:13px}
.qr-empty[hidden]{display:none}
.qr-add{display:flex; flex-wrap:wrap; gap:8px; padding:6px 18px 12px}
.qr-add .tr-ic{vertical-align:-4px}
.qr-inc{padding:6px 18px 14px; border-top:1px solid var(--line-2,#EEF0F4)}
.qr-inc h3{font-size:13.5px; margin:8px 0}
.qr-inc-g{display:flex; flex-wrap:wrap; gap:6px 18px}
.qr-pick{margin:0 18px 18px; border:1px solid var(--line); border-radius:12px; background:#FAFBFD}
.qr-pick > summary{display:flex; align-items:center; gap:8px; padding:11px 14px; cursor:pointer; font-weight:700; font-size:14px; color:var(--ink)}
.qr-pick > summary .tr-ic{color:var(--p)}
.qr-pick > summary b{margin-inline-start:auto; font-size:12px; color:var(--muted); background:#EEF1F6; border-radius:99px; padding:1px 9px}
.qr-pick > .edv-muted{padding:0 14px 12px; margin:0}
.qr-find{display:block; width:calc(100% - 28px); margin:0 14px 10px; height:38px}
.qr-groups{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; padding:0 14px 14px; max-height:420px; overflow:auto}
.qr-grp h4{display:flex; align-items:center; gap:6px; margin:0 0 6px; font-size:13px}
.qr-grp h4 .tr-ic{color:var(--p)}
.qr-cat{margin-bottom:8px}
.qr-cat[hidden],.qr-v[hidden]{display:none}
.qr-cat > b{display:block; font-size:12px; color:var(--muted); margin:4px 0}
.qr-v{display:flex; align-items:flex-start; gap:8px; padding:6px 8px; border-radius:8px; cursor:pointer; font-size:13px}
.qr-v:hover{background:#EEF1F6}
.qr-v input{margin-top:3px}
.qr-v small{display:block; font-size:11.5px; color:var(--muted)}
.qr-v.is-busy small,.qr-v.is-shop small{color:#9A520B}
.qr-v:has(input:checked){background:var(--p-soft,#EEF2FF)}
@media (max-width:720px){ .qr-head{display:none} .qr-row{grid-template-columns:1fr 80px 36px} .qr-type{grid-column:1 / -1} .qr-row > input[name$="[n]"]{grid-column:1 / -1} .qr-linked{grid-column:1 / -1} }
/* الإعدادات ← عروض الأسعار: شكل الغلاف ومعاينته */
.qs-cover{display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:18px; align-items:start; padding-inline-end:18px}
@media (max-width:900px){ .qs-cover{grid-template-columns:1fr; padding-inline-end:0} .qs-prev{justify-self:center; margin-bottom:18px} }
.qs-styles{display:flex; flex-wrap:wrap; gap:10px}
.qs-style{display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; font-size:12.5px; font-weight:600; color:var(--muted)}
.qs-style input{position:absolute; opacity:0}
.qs-style i{display:block; width:86px; height:120px; border-radius:8px; border:2px solid var(--line); background:linear-gradient(160deg,var(--qc-h),var(--qc-p)); position:relative; overflow:hidden}
.qs-style i::after{content:""; position:absolute; inset-inline:12px; top:52px; height:6px; border-radius:3px; background:var(--qc-a); box-shadow:0 12px 0 -1px rgba(255,255,255,.6), 0 22px 0 -1px rgba(255,255,255,.35)}
.qs-style.is-light i{background:#fff; border-inline-start:10px solid var(--qc-p)}
.qs-style.is-light i::after{background:var(--qc-p); box-shadow:0 12px 0 -1px #C9D0DE, 0 22px 0 -1px #E1E5EE}
.qs-style:has(input:checked) i{border-color:var(--p); box-shadow:0 0 0 3px rgba(30,59,179,.18)}
.qs-style.is-light:has(input:checked) i{border-inline-start-color:var(--qc-p)}
.qs-style:has(input:checked){color:var(--ink)}
.qs-style:has(input:focus-visible) i{outline:2px solid var(--p); outline-offset:2px}
.qs-thumb{max-width:200px; aspect-ratio:210/297}
.qs-prev{margin:18px 0 0; text-align:center}
.qs-prev figcaption{margin-top:8px; font-size:12px; color:var(--muted)}
html.dk .qt-kinds a,html.dk .qt-new-menu{background:#1d212b; border-color:#303648; color:#e3e5eb}
html.dk .qt-kinds a b{background:#272c3a; color:#c0c4cd}
html.dk .qt-kinds a.is-on b{background:var(--dk-pbtn,#2f6f55); color:#fff}
html.dk .qt-kind-ic,html.dk .qt-kind-tag,html.dk .qr-chip{background:#232a40; color:#A9B8FF}
html.dk .qt-kinds a.is-rental .qt-kind-ic,html.dk .qt-new-menu a.is-rental .qt-kind-ic,html.dk .qt-kind-tag.is-rental{background:#33240f; color:#F0B56A}
html.dk .qt-kinds a.is-price .qt-kind-ic,html.dk .qt-new-menu a.is-price .qt-kind-ic,html.dk .qt-kind-tag.is-price{background:#0f2d28; color:#6BD8C4}
html.dk .qt-new-menu a{color:#e3e5eb} html.dk .qt-new-menu a:hover{background:#262b38}
html.dk .qt-stats li.is-armored .tr-ic,html.dk .qr-tot li.is-armored .qr-ic,html.dk .qr-grp.is-armored h4 .tr-ic,html.dk .qr-type label.is-armored:has(input:checked){color:#F0B56A}
html.dk .qr-tot li,html.dk .qr-type,html.dk .qr-pick{background:#1a1d26; border-color:#303648}
html.dk .qr-ic{background:#12151c; border-color:#303648; color:#A9B8FF}
html.dk .qr-type label:has(input:checked){background:#2a3040; color:#A9B8FF}
html.dk .qr-pick > summary{color:#e3e5eb} html.dk .qr-pick > summary b{background:#272c3a; color:#c0c4cd}
html.dk .qr-v:hover{background:#232838} html.dk .qr-v:has(input:checked){background:#232a40}
html.dk .qr-v.is-busy small,html.dk .qr-v.is-shop small{color:#F0B56A}
html.dk .qr-empty{border-color:#303648}
/* تطبيق «إسناد» للجوال (5.10): ملصق باركود الشركة */
.app-grid{display:grid;grid-template-columns:minmax(300px,420px) 1fr;gap:16px;align-items:start}
@media (max-width:900px){.app-grid{grid-template-columns:1fr}}
.app-poster{text-align:center;padding:8px 4px}
.app-poster-h .edv-esnad{height:34px}
.app-poster h2{margin:14px 0 4px;font-size:20px}
.app-poster-org{margin:0 0 12px;color:var(--muted);font-weight:600}
.app-qr{width:240px;max-width:100%;margin:0 auto;padding:10px;background:#fff;border:1px solid var(--line);border-radius:14px}
.app-qr svg{display:block;width:100%;height:auto}
.app-steps{text-align:start;margin:16px auto 8px;max-width:340px;padding-inline-start:22px;line-height:1.9}
.app-poster-url{color:var(--muted);font-size:13px}
.app-poster-url bdi{font-weight:700}
.app-how p{margin:0 0 10px;line-height:1.8}
.app-print{max-width:150mm;margin:12mm auto;background:#fff;border:1px solid #DDE3EA;border-radius:16px;padding:12mm 10mm}
.app-print .app-qr{width:110mm;border:0}
.app-print .app-poster h2{font-size:28px}.app-print .app-steps{font-size:16px;max-width:120mm}
@media print{.app-print{border:0;margin:0 auto}}

/* ---------- الإعدادات الموحّدة (5.11): شريط حالة النظام + دليل الأقسام ---------- */
.edv-app .st-pagehead{margin-bottom:16px}
.st-band{display:grid; grid-template-columns:1.35fr repeat(3,1fr); border-radius:14px; overflow:hidden;
  background:var(--edv-h,#0B1633); color:var(--edv-on-h,#fff); --st-mut:color-mix(in srgb,var(--edv-on-h,#fff) 66%,transparent); --st-line:color-mix(in srgb,var(--edv-on-h,#fff) 10%,transparent)}
.st-band.st-n3{grid-template-columns:1.35fr 1fr 1fr}
.st-band.st-n2{grid-template-columns:1fr 1fr}
.st-band.st-n1{grid-template-columns:1fr}
.st-c{display:block; position:relative; min-width:0; padding:16px 22px 18px; color:inherit !important; text-decoration:none !important; border-inline-start:1px solid var(--st-line); transition:background-color .15s ease}
.st-c:first-child{border-inline-start:0}
.st-c:hover{background:color-mix(in srgb,var(--edv-on-h,#fff) 6%,transparent)}
.st-c:focus-visible{outline:2px solid var(--edv-a,#1FC8B6); outline-offset:-3px}
.st-c small{display:block; font-size:12.5px; color:var(--st-mut)}
.st-c b{display:block; margin:4px 0 2px; font-size:19px; font-weight:600; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.st-c span{display:block; font-size:12.5px; color:var(--st-mut); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.st-dot{display:inline-block; width:8px; height:8px; margin-inline-end:6px; border-radius:50%; background:var(--edv-a,#1FC8B6); vertical-align:1px}
.st-c.is-warn .st-dot{background:#F79009}
.st-chip{display:inline-flex; align-items:center; margin-top:8px; padding:2px 10px; border-radius:99px; font-size:12px; font-style:normal;
  background:color-mix(in srgb,var(--edv-a,#1FC8B6) 18%,transparent); color:color-mix(in srgb,var(--edv-a,#1FC8B6) 45%,#fff)}
.st-c.is-warn .st-chip{background:rgba(247,144,9,.18); color:#FEC84B}
.st-meter{display:block; height:4px; margin-top:10px; border-radius:4px; background:var(--st-line)}
.st-meter i{display:block; height:100%; border-radius:4px; background:var(--edv-a,#1FC8B6)}
.st-c.is-warn .st-meter i{background:#F79009}

.st-body{display:grid; grid-template-columns:244px minmax(0,1fr); gap:24px; align-items:start; margin-top:20px}
.st-rail{position:sticky; top:calc(var(--top-h) + 12px); padding:6px 8px 8px; background:#fff; border:1px solid var(--line-2,#E8EBF2); border-radius:12px}
.st-rg + .st-rg{border-top:1px solid var(--line-2,#E8EBF2); margin-top:4px; padding-top:2px}
.st-rail h4{margin:10px 10px 4px; font-size:12px; font-weight:500; color:var(--muted,#5B6478)}
.st-rail a{display:flex; align-items:center; gap:10px; min-height:36px; padding:0 10px; border-radius:8px; color:var(--ink,#0B1633) !important; text-decoration:none !important; font-size:13.5px; transition:background-color .15s ease}
.st-rail a svg{width:17px; height:17px; flex:none; color:var(--muted,#5B6478)}
.st-rail a span{flex:1; min-width:0}
.st-rail a:hover{background:var(--bg,#F3F4F7)}
.st-rail a:focus-visible{outline:2px solid var(--edv-p,#1E3BB3); outline-offset:-2px}
.st-rail a.is-on{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 10%,#fff); color:var(--edv-p,#1E3BB3) !important; font-weight:600}
.st-rail a.is-on svg{color:var(--edv-p,#1E3BB3)}
.st-rail em{flex:none; font-style:normal; font-size:11.5px; color:var(--muted,#5B6478)}
.st-rail em.is-w{padding:1px 7px; border-radius:99px; background:#FFF4E5; color:#B54708; font-weight:600}
.st-main{min-width:0}
.edv-app .st-head{margin:0 0 14px; align-items:center}
.edv-app .st-head h2{margin:0; font-size:18px; font-weight:600; line-height:1.35; color:var(--ink)}
/* 5.13 — هوية «إسناد» في الإعدادات: أيقونة القسم، مؤشر تركوازي في القائمة، ومفاتيح تبديل */
.edv-app .st-head > div:first-child{display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:12px; align-items:center}
.edv-app .st-head > div:first-child > :not(.st-hic){grid-column:2}
.st-hic{grid-row:span 2; display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:color-mix(in srgb,var(--edv-p,#1E3BB3) 9%,#fff); color:var(--edv-p,#1E3BB3); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--edv-p,#1E3BB3) 14%,transparent)}
.st-hic svg{width:21px; height:21px}
.st-rail a{position:relative}
.st-rail a.is-on::before{content:""; position:absolute; inset-block:8px; inset-inline-start:0; width:3px; border-radius:3px; background:var(--edv-a,#1FC8B6)}
.st-main .edv-panel{border-radius:14px}
.st-main .edv-panel-head h2{display:flex; align-items:center; gap:8px}
.st-main .edv-panel-head h2::before{content:""; flex:none; width:6px; height:6px; border-radius:2px; background:var(--edv-a,#1FC8B6)}
.st-main .edv-check{transition:border-color .15s ease,background-color .15s ease}
.st-main .edv-check:hover{border-color:color-mix(in srgb,var(--edv-p,#1E3BB3) 35%,var(--line,#D8DCE6))}
.st-main .edv-check:has(input[type=checkbox]:checked){border-color:color-mix(in srgb,var(--edv-p,#1E3BB3) 30%,var(--line,#D8DCE6)); background:color-mix(in srgb,var(--edv-p,#1E3BB3) 4%,#fff)}
.st-main .edv-check input[type=checkbox]{-webkit-appearance:none; appearance:none; flex:none; position:relative; width:36px; height:20px; margin:0; border-radius:99px; background:#C9CED9; cursor:pointer; transition:background-color .18s ease}
.st-main .edv-check input[type=checkbox]::after{content:""; position:absolute; top:2px; inset-inline-start:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(11,22,51,.25); transition:inset-inline-start .18s ease}
.st-main .edv-check input[type=checkbox]:checked{background:var(--edv-p,#1E3BB3)}
.st-main .edv-check input[type=checkbox]:checked::after{inset-inline-start:18px}
.st-main .edv-check input[type=checkbox]:focus-visible{outline:2px solid var(--edv-p,#1E3BB3); outline-offset:2px}
.st-main .edv-check input[type=checkbox]:disabled{opacity:.5; cursor:not-allowed}
@media (prefers-reduced-motion:reduce){.st-main .edv-check,.st-main .edv-check input[type=checkbox],.st-main .edv-check input[type=checkbox]::after{transition:none}}

/* قسم النسخ الاحتياطي */
.st-bkrow{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; padding:18px 20px 6px}
.st-lbl{display:block; margin-bottom:6px; font-size:13px; font-weight:500}
.st-seg{display:flex; height:40px; border:1px solid var(--line,#D8DCE6); border-radius:9px; overflow:hidden}
.st-seg label{flex:1; display:flex; margin:0; cursor:pointer}
.st-seg label + label{border-inline-start:1px solid var(--line-2,#E8EBF2)}
.st-seg input{position:absolute; opacity:0; pointer-events:none}
.st-seg span{flex:1; display:grid; place-items:center; font-size:13px; color:var(--muted,#5B6478); transition:background-color .15s, color .15s}
.st-seg input:checked + span{background:var(--edv-h,#0B1633); color:var(--edv-on-h,#fff); font-weight:600}
.st-seg input:focus-visible + span{outline:2px solid var(--edv-p,#1E3BB3); outline-offset:-3px}
.st-dest{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:18px 20px}
.st-d{display:grid; grid-template-columns:40px minmax(0,1fr); gap:2px 12px; align-items:center; padding:14px 16px; border:1px solid var(--line,#D8DCE6); border-radius:12px; min-width:0}
.st-d.is-on{border-color:color-mix(in srgb,var(--edv-a,#1FC8B6) 55%,#fff)}
.st-d.is-err{border-color:#FDB022}
.st-lg{grid-row:span 2; display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:var(--bg,#F3F4F7); color:var(--muted,#5B6478)}
.st-lg svg{width:24px; height:24px}
.st-d b{font-size:14.5px; font-weight:600}
.st-d small{font-size:12px; color:var(--muted,#5B6478); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.st-d .st-mail{text-align:start; unicode-bidi:plaintext}
.st-df{grid-column:1/-1; display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:10px; padding-top:10px; border-top:1px dashed var(--line-2,#E8EBF2); font-size:12.5px}
.st-dhint{color:var(--muted,#5B6478)}
.st-acts{display:flex; gap:6px; margin-inline-start:auto}
.st-acts form{margin:0}
.st-derr{grid-column:1/-1; margin:8px 0 0; font-size:12px; color:#B42318; overflow-wrap:anywhere}
.st-tag{display:inline-flex; align-items:center; padding:2px 9px; border-radius:99px; font-size:12px; background:var(--bg,#F3F4F7); color:var(--muted,#5B6478)}
.st-tag.is-ok{background:#E7F8F2; color:#067647}
.st-tag.is-bad{background:#FEF3F2; color:#B42318}
.st-note{display:flex; gap:10px; margin:0 20px 18px; padding:12px 14px; border-radius:10px; background:var(--bg,#F3F4F7); color:var(--muted,#5B6478); font-size:12.5px; line-height:1.75}
.st-note svg{flex:none; margin-top:3px; color:var(--edv-p,#1E3BB3)}
.st-locs{display:inline-flex; flex-wrap:wrap; gap:4px}
.st-loc{display:inline-flex; padding:1px 8px; border-radius:99px; font-size:11.5px; background:var(--bg,#F3F4F7); color:var(--muted,#5B6478); white-space:nowrap}
.st-loc.is-google{background:#E8F0FE; color:#1A56C4}
.st-loc.is-onedrive{background:#E5F1FB; color:#0B5CA8}
.edv-hint.st-ok{color:#067647}

@media (max-width:1180px){
  .st-band,.st-band.st-n3{grid-template-columns:1fr 1fr}
  .st-c:nth-child(3){border-inline-start:0}
  .st-c:nth-child(n+3){border-top:1px solid var(--st-line)}
  .st-dest{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .st-body{grid-template-columns:minmax(0,1fr); gap:14px}
  .st-rail{position:static; display:flex; gap:4px; overflow-x:auto; padding:6px; scrollbar-width:thin}
  .st-rg{display:flex; gap:4px}
  .st-rg + .st-rg{border-top:0; margin:0; padding:0; border-inline-start:1px solid var(--line-2,#E8EBF2); padding-inline-start:4px}
  .st-rail h4{display:none}
  .st-rail a{white-space:nowrap; flex:none}
  .st-bkrow,.st-dest{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:560px){
  .st-band,.st-band.st-n3,.st-band.st-n2{grid-template-columns:1fr 1fr}
  .st-c{padding:12px 14px 14px}
  .st-c b{font-size:16px}
}
html.dk .st-rail{background:#20242f; border-color:#2c3242}
html.dk .st-rg + .st-rg{border-color:#2c3242}
html.dk .st-rail a{color:#d9dce3 !important}
html.dk .st-rail a:hover{background:#262b38}
html.dk .st-rail a.is-on{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 28%,#20242f); color:#e3e8ff !important}
html.dk .st-rail a.is-on svg{color:#c9d3ff}
html.dk .st-rail a svg,html.dk .st-rail h4,html.dk .st-rail em{color:#a3aabc}
html.dk .st-rail em.is-w,html.dk .st-c.is-warn .st-chip{background:rgba(247,144,9,.16); color:#FEC84B}
html.dk .st-band{background:color-mix(in srgb,var(--edv-h,#0B1633) 70%,#0c0d11); color:#eef0f5; --st-mut:#b7bfd0; --st-line:rgba(255,255,255,.08)}
html.dk .st-seg,html.dk .st-d{border-color:#343b4e}
html.dk .st-seg label + label{border-color:#2c3242}
html.dk .st-seg span{color:#a3aabc}
html.dk .st-seg input:checked + span{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 55%,#20242f); color:#fff}
html.dk .st-d.is-on{border-color:color-mix(in srgb,var(--edv-a,#1FC8B6) 40%,#20242f)}
html.dk .st-lg,html.dk .st-tag,html.dk .st-note,html.dk .st-loc{background:#262b38; color:#b7bfd0}
html.dk .st-d small,html.dk .st-dhint{color:#a3aabc}
html.dk .st-df{border-color:#2c3242}
html.dk .st-tag.is-ok{background:rgba(6,118,71,.22); color:#75E0B1}
html.dk .st-tag.is-bad{background:rgba(180,35,24,.22); color:#FDA29B}
html.dk .st-derr{color:#FDA29B}
html.dk .st-loc.is-google{background:rgba(66,133,244,.2); color:#A8C7FA}
html.dk .st-loc.is-onedrive{background:rgba(15,120,212,.2); color:#9CCBF5}
html.dk .st-note svg{color:#A8C7FA}
html.dk .edv-hint.st-ok{color:#75E0B1}
@media (prefers-reduced-motion:reduce){.st-c,.st-rail a,.st-seg span{transition:none}}
/* الإعدادات ← البريد الإلكتروني (5.12) */
.mail-modes{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px}
.mail-mode{display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border:1.5px solid #DDE2EA; border-radius:10px; cursor:pointer; background:#fff}
.mail-mode:has(input:checked){border-color:var(--p,#1E3BB3); background:color-mix(in srgb,var(--p,#1E3BB3) 6%,#fff)}
.mail-mode input{margin-top:4px; accent-color:var(--p,#1E3BB3)}
.mail-mode span{display:flex; flex-direction:column; gap:3px}
.mail-mode small{color:#5B6478; font-size:12.5px; line-height:1.6}
.mail-test-go{align-self:end}
.edv-howto ul{margin:8px 0 0; padding-inline-start:20px; line-height:1.9}


/* ===== 5.22 — فحص التصميم: توحيد الارتفاعات والمسافات وإصلاح الخروج عن الشاشة ===== */
/* أزرار is-sm بجانب حقول ارتفاعها 38px في أشرطة التصفية: نفس الارتفاع حتى يستقيم الصف */
.edv-app .edv-toolbar .edv-abtn.is-sm,.edv-app .att-daybar .edv-abtn.is-sm,.edv-app .edv-bulkbar .edv-abtn.is-sm,
.edv-app .msn-inline .edv-abtn.is-sm,.edv-app .msn-addf .edv-abtn.is-sm,.edv-app .py-row .edv-abtn,.edv-app .srv-item .srv-del{min-height:38px; min-width:38px}
.edv-app .att-daybar a.edv-abtn.is-sm{min-width:38px}
.msn-addf input:not([type=file]),.msn-addf select{min-height:38px}
/* أشرطة صفحات الطباعة (بطاقة الواجب، ملصق التطبيق، ملصقات النقاط) خارج .edv-app: كانت أزرارها بلا تنسيق */
.mc-bar .edv-abtn,.tr-print-bar .edv-abtn{display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:0 14px; border:1px solid #D9DDE7; border-radius:6px; background:#fff; color:#0B1633; font:inherit; font-size:13.5px; font-weight:500; line-height:1; cursor:pointer; text-decoration:none; white-space:nowrap; transition:background-color .15s,border-color .15s}
.mc-bar .edv-abtn:hover,.tr-print-bar .edv-abtn:hover{background:#F3F5FA; border-color:#c0c6d4}
.mc-bar .edv-abtn:focus-visible,.tr-print-bar .edv-abtn:focus-visible{outline:2px solid var(--edv-p,#1E3BB3); outline-offset:2px}
.tr-print-bar .edv-abtn:not(.is-ghost){background:var(--edv-p,#1E3BB3); border-color:var(--edv-p,#1E3BB3); color:var(--edv-on-p,#fff)}
/* نصوص صغيرة جداً */
.msn-eng small{font-size:11px}
.trm-li-mv button{width:28px; height:20px; font-size:11px}
/* لمس: أزرار وأهداف أكبر على الجوال والتابلت */
@media (pointer:coarse){
  .edv-app .edv-abtn.is-sm{min-height:36px}
  .msn-chip button{width:28px; height:28px}
  .edv-pagebar-per a{min-height:36px; min-width:36px; display:inline-flex; align-items:center; justify-content:center}
  .edv-foot-sup{min-height:36px}
}
/* الجوال: لا شيء يخرج عن عرض الشاشة */
.hr-tbar{min-width:0}
.vci-car em{white-space:normal; max-width:100%}
@media (max-width:600px){
  .hr-trend{overflow-x:auto; overscroll-behavior-x:contain; padding-bottom:4px}
  .hr-tbar{flex:0 0 34px}
  .edv-f .emp-sal{flex-wrap:wrap}
  .edv-f .emp-sal input{flex:1 1 110px; min-width:0}
  .edv-f .emp-sal select{flex:1 1 150px; width:auto; min-width:0}
  .vci-car{grid-template-columns:auto minmax(0,1fr)}
  .vci-car em{grid-column:1 / -1; justify-self:start}
}
@media (max-width:760px){ .qt-new-menu{inset-inline-end:auto; inset-inline-start:0} }

/* ===== 5.23: تهدئة الألوان — بطاقات أرقام محايدة، اللون على الرقم فقط عند وجود مشكلة، أيقونات بلا مربعات ملونة، بلا تدرّجات زخرفية ===== */
.edv-stat::before,.lv-k::before,.hr-profile-head::before,.ap-card::before,.pt-svc::before{display:none}
.edv-stat .edv-stat-value{color:var(--ink)}
.edv-stat.is-invalid:not(.is-zero) .edv-stat-value{color:var(--bad)}
.edv-stat.is-expired:not(.is-zero) .edv-stat-value{color:var(--warn)}
.edv-stat.is-zero .edv-stat-value{color:var(--muted)}
.edv-stat.is-current{border-color:var(--p); box-shadow:0 0 0 1px var(--p)}
.lv-k b,.lv-k.is-ok b{color:var(--ink)}
.lv-k.is-warn b{color:#8F5A09}
.lv-k.is-bad b,.lv-k.is-now b{color:#B42318}
.lv-k.is-now{background:#FFF8F7; border-color:#F4C7C2}
.lv-k:hover{transform:none; box-shadow:none; border-color:#AEB6C8}
.qt-kind-ic,.qt-kinds a.is-rental .qt-kind-ic,.qt-kinds a.is-price .qt-kind-ic,.qt-new-menu a.is-rental .qt-kind-ic,.qt-new-menu a.is-price .qt-kind-ic,
.fl-cattab-i,.vc-ico,.st-hic,.pt-svc-i{background:transparent; box-shadow:none; color:var(--p); width:auto; height:auto; border-radius:0}
.fl-cattab.is-on .fl-cattab-i{background:transparent; color:inherit}
.pt-svc-i{color:var(--c); justify-content:start}
.pt-svc:hover{box-shadow:none; transform:none; border-color:#AEB6C8}
.edv-fav-home{background:var(--p)}
.ap-cost.is-lg,.fc-intake{background:var(--edv-h,#0B1633)}
.fl-catgrp-i{background:var(--p)}
.vc-card.is-shared{background:#FFFBF1}
.vc-ribbon{background:#F6D58E}
.edv-foot-mark,.edv-sup header{background:var(--edv-h,#0B1633)}
.lv-tk-prog i{background:var(--p,#12805C)}
html.dk .edv-stat .edv-stat-value,html.dk .lv-k b,html.dk .lv-k.is-ok b{color:#e3e5eb}
html.dk .edv-stat.is-invalid:not(.is-zero) .edv-stat-value,html.dk .lv-k.is-bad b,html.dk .lv-k.is-now b{color:#e58c85}
html.dk .edv-stat.is-expired:not(.is-zero) .edv-stat-value,html.dk .lv-k.is-warn b{color:#f0cd97}
html.dk .edv-stat.is-zero .edv-stat-value{color:#8b92a5}
html.dk .lv-k.is-now{background:#2a1d20; border-color:#5a2f2f}
html.dk .qt-kind-ic,html.dk .qt-kinds a .qt-kind-ic,html.dk .fl-cattab-i,html.dk .vc-ico,html.dk .st-hic,html.dk .pt-svc-i{background:transparent; color:var(--dk-pfg,#A9B8FF)}
html.dk .pt-svc-i{color:var(--c)}
html.dk .vc-card.is-shared{background:#2a2619}
/* 5.23: صف الموظف بسطر واحد تقريباً — الشارات لا تلتف، والبوابة عدد بدل صف أيقونات */
.emp-table .edv-badge,.emp-table .cu-reg{white-space:nowrap}
.emp-table td.pf-icons{white-space:nowrap}
.pf-n{font-weight:600; cursor:help}
/* 5.23: جدول العهد يتسع للشاشة — الحالة وحالة الجهاز في خلية واحدة، والموقع تحت اسم المستلم */
.cu-table td.cu-st{min-width:150px; max-width:210px}
.cu-table td.cu-st .msn-eng{white-space:normal}
.cu-table td.cu-st .cu-cond{margin-inline-start:4px}
.edv-shell .cu-name>.cu-ico,html.dk .edv-shell .cu-name>.cu-ico{background:transparent; padding:4px; width:30px; height:30px}
/* 5.23: أنواع عروض الأسعار صف تبويب واحد خفيف بدل أربع بطاقات كبيرة، وعلى الجوال يمرّر أفقياً */
.qt-kinds{display:flex; flex-wrap:nowrap; overflow-x:auto; gap:4px; border-bottom:1px solid var(--line); scrollbar-width:none}
.qt-kinds a{flex:none; min-height:0; padding:8px 12px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; font-weight:600; margin-bottom:-1px}
.qt-kinds a.is-on{border-color:var(--p); box-shadow:none; color:var(--p)}
.qt-kinds a > span:nth-child(2){flex:none}
.qt-kinds .qt-kind-ic svg,.qt-kinds .qt-kind-ic .ei{width:18px; height:18px}
html.dk .qt-kinds a{background:transparent; border-color:transparent}
html.dk .qt-kinds a.is-on{border-color:var(--dk-pfg,#A9B8FF); color:var(--dk-pfg,#A9B8FF)}
html.dk .qt-kinds{border-color:#303648}
/* 5.23: زر «تصفية» على الجوال (admin-ux.js) */
.edv-filt-tg{display:none}
@media (max-width:640px){
  .edv-filt-tg{display:inline-flex}
  form.is-filt-closed > select{display:none}
}
.py-empty-sites{margin:4px 0 18px; padding:12px 16px; background:#fff; border:1px solid var(--line); border-radius:10px; color:var(--muted); font-size:13.5px; line-height:1.7}
.py-empty-sites b{color:var(--ink); font-weight:600}
html.dk .py-empty-sites{background:#20242f; border-color:#303648}
html.dk .py-empty-sites b{color:#e3e5eb}
/* 5.23: على الجوال شارة الواجب واختيارات الأزرار المتجاورة تلتف بدل الخروج عن الشاشة */
@media (max-width:640px){
  .msn-eng{max-width:100%; flex-wrap:wrap; white-space:normal}
  .edv-f .edv-seg{display:flex; flex-wrap:wrap; max-width:100%}
}
@media (max-width:640px){ .fl-head-main{min-width:0; max-width:100%} .fl-head-main > div{min-width:0} }

/* 5.24: بطاقات خدمات البوابة بشبكة متساوية الارتفاع + علامة التحديد في الزاوية */
.pf-boxes{grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); grid-auto-rows:1fr; gap:10px}
.pf-box{display:flex; min-width:0; position:relative}
.pf-box span{flex:1; position:relative; min-width:0; display:grid; grid-template-columns:34px minmax(0,1fr); grid-template-rows:auto 1fr; align-items:start; gap:3px 10px; padding:12px; padding-inline-end:34px; border-width:1.5px; opacity:.72; transition:border-color .15s,background-color .15s,opacity .15s}
.pf-box i{grid-row:1 / 3; align-self:start; width:34px; height:34px; display:grid; place-items:center; border-radius:9px; background:color-mix(in srgb,var(--p) 8%,transparent); font-size:18px}
.pf-box b{font-size:13.5px; line-height:1.35; overflow-wrap:anywhere}
.pf-box small{line-height:1.45; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden}
.pf-box span::after{content:""; position:absolute; top:10px; inset-inline-end:10px; width:16px; height:16px; border-radius:50%; border:1.5px solid var(--line); box-sizing:border-box; display:grid; place-items:center; font-size:10px; font-weight:700; line-height:1; color:#fff}
.pf-box input:checked + span{opacity:1}
.pf-box input:checked + span b::after{content:none}
.pf-box input:checked + span::after{content:"✓"; background:var(--ok); border-color:var(--ok)}
.pf-box:hover span{opacity:1; border-color:color-mix(in srgb,var(--ok) 55%,var(--line))}
.pf-box input:checked + span:hover{border-color:var(--ok)}
html.dk .pf-box i{background:rgba(255,255,255,.06)}
html.dk .pf-box span::after{border-color:#3a4150}
html.dk .pf-box input:checked + span::after{border-color:var(--ok)}
@media (max-width:640px){
  .pf-boxes{grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px}
  .pf-box span{grid-template-columns:28px minmax(0,1fr); padding:10px; padding-inline-end:28px; gap:2px 8px}
  .pf-box i{width:28px; height:28px; font-size:16px}
  .pf-box span::after{top:8px; inset-inline-end:8px}
}
@media (prefers-reduced-motion:reduce){ .pf-box span{transition:none} }

/* 5.24: قائمة الموظفين — عمود واتساب ثابت على الحافة دائماً بلا سحب جانبي */
.emp-table th:last-child,.emp-table td:last-child{position:sticky; inset-inline-end:0; z-index:1; width:1%; white-space:nowrap; padding-inline:8px; background:#fff; box-shadow:inset 1px 0 0 var(--line)}
[dir=rtl] .emp-table th:last-child,[dir=rtl] .emp-table td:last-child{box-shadow:inset -1px 0 0 var(--line)}
.edv-app .emp-table thead th:last-child{background:#F6F7FA}
.emp-table tbody tr:hover td:last-child{background:color-mix(in srgb,var(--p) 3%,#fff)}
.emp-table .wa-btn{min-width:34px; justify-content:center; padding-inline:9px}
.emp-table .wa-btn span{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap}
.emp-table .wa-btn .ei{margin:0}
html.dk .emp-table th:last-child,html.dk .emp-table td:last-child{background:#20242f; box-shadow:inset 1px 0 0 #2e3442}
html.dk [dir=rtl] .emp-table td:last-child,html.dk [dir=rtl] .emp-table th:last-child{box-shadow:inset -1px 0 0 #2e3442}
html.dk .edv-app .emp-table thead th:last-child{background:#1c202a}
html.dk .emp-table tbody tr:hover td:last-child{background:color-mix(in srgb,var(--p) 3%,#20242f)}
.emp-table tbody tr:target td{animation:emp-hl 2.4s ease-out 1}
@keyframes emp-hl{0%,35%{background:color-mix(in srgb,var(--ok) 16%,transparent)}}
@media (prefers-reduced-motion:reduce){ .emp-table tbody tr:target td{animation:none; background:color-mix(in srgb,var(--ok) 10%,transparent)} }
.emp-table .pf-custom{display:block; line-height:1.2}

/* 5.26 notifications: جرس الإشعارات في الشريط العلوي وصفحة الإشعارات */
.edv-bell-w{position:relative}
.edv-bell{position:relative}
.edv-bell-n{position:absolute; top:1px; inset-inline-end:0; min-width:17px; height:17px; padding:0 4px; border-radius:99px; background:#D93A3A; color:#fff; font-size:10.5px; font-weight:700; line-height:17px; text-align:center; box-shadow:0 0 0 2px #EEF1F6; pointer-events:none}
.edv-bell-n[hidden]{display:none}
.edv-bell-pop{position:absolute; top:calc(100% + 8px); inset-inline-end:-6px; z-index:60; width:min(380px,calc(100vw - 24px)); background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 14px 40px rgba(11,22,51,.16); overflow:hidden}
.edv-bell-pop[hidden]{display:none}
.edv-bell-pop header,.edv-bell-pop footer{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 14px}
.edv-bell-pop header{border-bottom:1px solid var(--line)}
.edv-bell-pop header b{font-size:14.5px}
.edv-bell-pop footer{border-top:1px solid var(--line); font-size:13px}
.edv-bell-all{border:0; background:none; padding:4px 2px; color:var(--p); font-size:12.5px; font-weight:600; cursor:pointer}
.edv-bell-all:hover{text-decoration:underline}
.edv-bell-list{list-style:none; margin:0; padding:0; max-height:min(420px,60vh); overflow-y:auto; overscroll-behavior:contain}
.edv-bell-load,.edv-bell-empty{padding:26px 14px; text-align:center; color:var(--muted); font-size:13px}
.edv-bell-it + .edv-bell-it,.nt-item + .nt-item{border-top:1px solid var(--line-2)}
.edv-bell-it a,.nt-item a{display:grid; grid-template-columns:24px minmax(0,1fr) auto; gap:2px 11px; align-items:start; padding:11px 14px; color:inherit}
.edv-body .edv-bell-it a:hover,.edv-body .nt-item a:hover{text-decoration:none; background:#F6F7FA}
.edv-bell-ic,.nt-ic{width:24px; height:24px; display:grid; place-items:center; color:var(--muted)}
.edv-bell-ic svg,.nt-ic svg{width:19px; height:19px}
.edv-bell-tx,.nt-tx{display:flex; flex-direction:column; gap:2px; min-width:0}
.edv-bell-tx b,.nt-tx b{font-size:13.5px; font-weight:600; line-height:1.45}
.edv-bell-tx small{color:var(--muted); font-size:12px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-line}
.nt-tx small{color:var(--muted); font-size:12.5px; line-height:1.55}
.edv-bell-at,.nt-at{color:var(--muted); font-size:11.5px; white-space:nowrap; padding-top:2px; font-variant-numeric:tabular-nums}
.edv-bell-it.is-new a,.nt-item.is-new a{background:color-mix(in srgb,var(--p) 5%,#fff)}
.edv-bell-it.is-new .edv-bell-ic,.nt-item.is-new .nt-ic,.edv-bell-it.is-new .edv-bell-at,.nt-item.is-new .nt-at{color:var(--p)}
.edv-bell-it.is-new .edv-bell-tx b,.nt-item.is-new .nt-tx b{font-weight:800}
.nt-list{padding:0; overflow:hidden}
.nt-items{list-style:none; margin:0; padding:0}
.nt-item a{padding:13px 18px; grid-template-columns:26px minmax(0,1fr) auto}
.nt-more{text-align:center; padding:10px; margin:0; border-top:1px solid var(--line-2)}
.nt-empty-ic{display:inline-grid; color:var(--muted)}
.nt-empty-ic svg{width:34px; height:34px}
.nt-push{display:flex; align-items:center; gap:14px}
.nt-push > div{flex:1; min-width:0}
.nt-push p{margin:2px 0 0; color:var(--muted); font-size:13px}
.nt-push-ic{width:36px; height:36px; display:grid; place-items:center; color:var(--p)}
.nt-push-ic svg{width:24px; height:24px}
.nt-push.is-on .nt-push-ic{color:#1E8E5A}
@media (max-width:640px){ .edv-bell-pop{position:fixed; top:calc(var(--top-h) + 4px); inset-inline:12px; width:auto} }
html.dk .edv-bell-n{box-shadow:0 0 0 2px #181b24}
html.dk .edv-bell-pop{background:#20242f; border-color:#343b4e; box-shadow:0 14px 40px rgba(0,0,0,.45)}
html.dk .edv-bell-pop header,html.dk .edv-bell-pop footer{border-color:#343b4e}
html.dk .edv-bell-it + .edv-bell-it,html.dk .nt-item + .nt-item,html.dk .nt-more{border-color:#2c3243}
html.dk .edv-body .edv-bell-it a:hover,html.dk .edv-body .nt-item a:hover{background:#262b38}
html.dk .edv-bell-it.is-new a,html.dk .nt-item.is-new a{background:color-mix(in srgb,var(--edv-p,#1E3BB3) 14%,#20242f)}
html.dk .edv-bell-all,html.dk .edv-bell-it.is-new .edv-bell-ic,html.dk .nt-item.is-new .nt-ic,html.dk .edv-bell-it.is-new .edv-bell-at,html.dk .nt-item.is-new .nt-at,html.dk .nt-push-ic{color:color-mix(in srgb,var(--edv-p,#1E3BB3) 40%,#fff)}
html.dk .nt-push.is-on .nt-push-ic{color:#5FD39A}
[data-push-box] [hidden]{display:none !important}
/* 5.27: فحص التجربة والتصميم */
/* قائمة الموظفين تتسع لشاشة الحاسوب المحمول (1366–1440) بلا عمود مقصوص تحت عمود واتساب الثابت */
.emp-table thead th{white-space:normal; line-height:1.3}
.emp-table th.emp-sort a{display:inline-flex; flex-wrap:wrap}
.emp-table td .msn-eng,.emp-table td .cu-held-chip{white-space:nowrap; max-width:100%}
.emp-table td.emp-no{min-width:0}
/* مربع البحث في العجلات: حلقة تركيز واضحة عند الكتابة */
.fl-q:focus-within{border-color:var(--p); box-shadow:0 0 0 3px var(--p-soft-2)}
.emp-table .bdg-person strong,.emp-table .bdg-person small{white-space:normal}
.emp-table td:nth-child(3){min-width:170px; max-width:210px}
.emp-table .hr-shift{white-space:normal; max-width:90px}
/* ظل الحافة للجداول الأعرض من مكانها (admin-ux.js يضيف is-ovf-s / is-ovf-e) */
.edv-scroll.is-ovf-e{--ovf-e:28px} .edv-scroll.is-ovf-s{--ovf-s:28px}
.edv-scroll.is-ovf{-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,.25),#000 var(--ovf-l,0px),#000 calc(100% - var(--ovf-r,0px)),rgba(0,0,0,.25));
  mask-image:linear-gradient(to right,rgba(0,0,0,.25),#000 var(--ovf-l,0px),#000 calc(100% - var(--ovf-r,0px)),rgba(0,0,0,.25))}
[dir=ltr] .edv-scroll.is-ovf{--ovf-l:var(--ovf-s,0px); --ovf-r:var(--ovf-e,0px)}
[dir=rtl] .edv-scroll.is-ovf{--ovf-l:var(--ovf-e,0px); --ovf-r:var(--ovf-s,0px)}
.edv-scroll.is-ovf:has(> .emp-table){--ovf-e:0px}
.is-ovf-e > .emp-table th:last-child,.is-ovf-e > .emp-table td:last-child{box-shadow:inset 1px 0 0 var(--line),-10px 0 12px -10px rgba(11,22,51,.35)}
[dir=rtl] .is-ovf-e > .emp-table th:last-child,[dir=rtl] .is-ovf-e > .emp-table td:last-child{box-shadow:inset -1px 0 0 var(--line),10px 0 12px -10px rgba(11,22,51,.35)}
/* دفعة الرواتب: أزرار الصف تلتف على سطرين بدل أن تدفع الجدول خارج الشاشة */
#py-table td.edv-row-actions{white-space:normal; min-width:200px; max-width:220px; line-height:2.4}
#py-table td.edv-row-actions > *{margin-block:2px}
#py-table td.edv-row-actions .edv-inline-post{display:inline-block}
#py-table .py-sum{min-width:96px}
.edv-app .edv-users-table thead th{white-space:normal; line-height:1.3; vertical-align:bottom}
/* شاشات اللمس: أزرار الإزالة والإغلاق الصغيرة تكبر إلى مساحة لمس مريحة */
@media (pointer:coarse){
  .msn-chip > button,.edv-toast-x{position:relative}
  .msn-chip > button::after,.edv-toast-x::after{content:""; position:absolute; inset:-8px}
  .edv-crumb a,.cu-unreg-alert a,.msn-maplink{display:inline-block; padding-block:8px}
}
/* تقليل الحركة: إيقاف الانتقالات والحركات الزخرفية لمن فعّل الخيار في جهازه (عدا شاشات العرض) */
@media (prefers-reduced-motion:reduce){
  html:not(.lv-tv) .edv-app *,html:not(.lv-tv) .edv-app *::before,html:not(.lv-tv) .edv-app *::after{transition-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important}
}
.edv-app .emp-table td,.edv-app .emp-table th{padding-inline:9px}
#py-table td:first-child{min-width:160px; max-width:180px}
#py-table td.edv-num > strong,#py-table .py-net,#py-table td.edv-num > b{white-space:nowrap}
#py-table .py-proofs{flex-wrap:wrap}
#py-table td:nth-child(6){min-width:0}

/* 5.30.4: حقول نافذة نقطة التفتيش لا تخرج عن إطارها — الحقل يأخذ عرض عموده لا عرضه الافتراضي (~20 حرفاً) */
.trm-form{min-width:0}
.trm-fl{min-width:0}
.trm-fl input{width:100%; min-width:0; box-sizing:border-box}
.trm-row{grid-template-columns:repeat(2,minmax(0,1fr))}

/* 5.30.4: رأس ملصق باركود نقطة التفتيش — شعار صغير بارتفاع ثابت + الاسم، وعنوان «جولات الحراسة» في الطرف الآخر */
.tr-label-h{gap:3mm; padding-bottom:2.5mm; margin-bottom:1mm; border-bottom:1px solid #E3E6EE}
.tr-label-h .edv-brand{display:flex; align-items:center; gap:2mm; min-width:0}
.tr-label-h .edv-emblem{width:8mm; height:8mm; flex:none; display:grid; place-items:center; color:#5B6478}
.tr-label-h .edv-emblem svg{width:100%; height:100%; display:block}
.tr-label-h .edv-logo-plate{display:inline-flex; padding:1mm 2mm; border-radius:2mm; background:#0B1633}
.tr-label-h .edv-logo{width:auto !important; height:auto !important; max-height:9mm; max-width:34mm; object-fit:contain; display:block}
.tr-label-h .edv-brand>div{display:flex; flex-direction:column; min-width:0; line-height:1.25; text-align:start}
.tr-label-h .edv-brand strong{font-size:10pt; color:#0B1633; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tr-label-h .edv-brand small{font-size:7.5pt; color:#5B6478}
.tr-label-h>span{flex:none; font-size:9.5pt; font-weight:600; white-space:nowrap}

/* 5.30.4: تلميح «اضغط على مكان…» يختفي ما دامت نافذة النقطة مفتوحة (كان يغطي أعلاها وزر ×)، ويلتفّ على الجوال بدل أن يخرج عن الشاشة */
#trm:has(.trm-form) .trm-hint{display:none}
@media (max-width:640px){ .trm-hint{white-space:normal; width:max-content; max-width:calc(100% - 24px); text-align:center; font-size:12.5px; line-height:1.5; border-radius:14px} }

/* 5.31 — التحديث الشهري لوزارة الداخلية */
.moi-top .edv-toolbar{flex-wrap:wrap; gap:10px; align-items:center}
.moi-top label{font-weight:700; font-size:13px}
.moi-sent{font-weight:700; color:#1E7A4C; font-size:13px}
.moi-grid{display:grid; grid-template-columns:repeat(var(--n,4),minmax(0,1fr)); gap:12px; margin:0 0 16px} /* 5.33: البطاقات تملأ الصف بالتساوي (كان auto-fill يترك عموداً فارغاً على اليسار) */
@media (max-width:1100px){ .moi-grid{grid-template-columns:repeat(min(var(--n,4),2),minmax(0,1fr))} }
@media (max-width:560px){ .moi-grid{grid-template-columns:minmax(0,1fr)} }
.moi-card{display:grid; grid-template-columns:auto 1fr auto; grid-template-areas:"i l n" "s s s"; align-items:center; gap:6px 10px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 14px; min-width:0}
.moi-card.is-warn{border-color:#F0C6C0}
.moi-card-ico{grid-area:i; display:grid; place-items:center; width:34px; height:34px; border-radius:9px; background:#F1F4F9; color:var(--p); font-size:17px}
.moi-card-ico .cu-ico{width:20px; height:20px}
.moi-card-l{grid-area:l; font-size:13px; font-weight:700; color:var(--ink); min-width:0; text-wrap:balance; line-height:1.45}
.moi-card-n{grid-area:n; font-size:22px}
.moi-card-s{grid-area:s; display:flex; flex-wrap:wrap; gap:6px; min-height:20px}
.moi-chip{display:inline-block; font-style:normal; font-size:11.5px; font-weight:700; border-radius:7px; padding:1px 8px}
.moi-chip.is-g{background:#E3F7E6; color:#16723A}
.moi-chip.is-r{background:#FBEAE8; color:var(--bad)}
.moi-send{align-items:end}

/* 5.33: شارات تحميل التطبيق من المتاجر (روابطها في الإعدادات ← تطبيق الجوال للموظفين) */
.app-badges{display:flex; flex-wrap:wrap; gap:10px; align-items:center}
.app-badges.is-center,.app-poster .app-badges{justify-content:center}
.app-badge{display:inline-flex; align-items:center; gap:9px; min-height:48px; padding:7px 16px 7px 14px; border-radius:11px; background:#0B0D12; color:#fff; border:1px solid #2A2F3A; text-decoration:none; line-height:1.15; transition:transform .15s ease, box-shadow .15s ease}
.app-badge:hover{transform:translateY(-1px); box-shadow:0 6px 16px rgba(11,13,18,.18); color:#fff}
.app-badge,.app-badge:hover,.app-badge:visited,html.dk .app-badge,html.dk .app-badge:hover,.app-badge b,.app-badge small{color:#fff; text-decoration:none}
html.dk .app-badge{background:#000; border-color:#3A4150}
.app-badge:focus-visible{outline:2px solid var(--edv-a, #1F8BF5); outline-offset:2px}
.app-badge svg{flex:none}
.app-badge span{display:flex; flex-direction:column; align-items:flex-start}
.app-badge small{font-size:10.5px; font-weight:500; opacity:.85; letter-spacing:.01em}
.app-badge b{font-size:16px; font-weight:700; letter-spacing:-.01em}
.app-poster .app-badges{margin:4px 0 14px}
@media print{ .app-badge{-webkit-print-color-adjust:exact; print-color-adjust:exact} }
@media (prefers-reduced-motion:reduce){ .app-badge{transition:none} .app-badge:hover{transform:none} }

/* ===================== 5.34: توحيد التصميم — مقاسات وحواف واحدة لكل المكوّنات =====================
 * قبلها كانت الأزرار بارتفاعات 30/38، الحقول 38/40/41، البطاقات بحواف 8/10/12/14/16، وأزرار التصفية بثلاثة أشكال.
 * المرجع الآن: عنصر تحكم = 40px (صغير 32px) بحافة 8px، بطاقة/لوحة = حافة 12px، شارة/زر تصفية = كبسولة.
 * يقيسها tools/qa/ui_consistency.py (عدد الأشكال لكل نوع مكوّن). */
.edv-app{--r-ctl:8px; --r-card:12px; --h-ctl:40px; --h-sm:32px}

/* الأزرار */
.edv-app .edv-abtn{min-height:var(--h-ctl); border-radius:var(--r-ctl); font-size:14px; font-weight:600}
.edv-app .edv-abtn.is-sm{min-height:var(--h-sm); font-size:13px; font-weight:600}
.edv-shell .edv-abtn.is-icon{width:var(--h-sm); min-width:var(--h-sm); min-height:var(--h-sm)}
.edv-app .edv-toolbar .edv-abtn.is-sm,.edv-app .att-daybar .edv-abtn.is-sm,.edv-app .edv-bulkbar .edv-abtn.is-sm,
.edv-app .msn-inline .edv-abtn.is-sm,.edv-app .msn-addf .edv-abtn.is-sm{min-height:var(--h-ctl); min-width:var(--h-ctl)}
.edv-app .edv-abtn:focus{box-shadow:none}
.edv-app .edv-abtn:focus-visible,.edv-app button:focus-visible,.edv-app a:focus-visible,.edv-qs-btn:focus-visible{outline:2px solid var(--edv-p,#1E3BB3); outline-offset:2px}

/* الحقول: كل الأنواع بنفس الشكل (حقول url/tel/time/month كانت بلا تنسيق) */
.edv-app input[type=text],.edv-app input:not([type]),.edv-app input[type=email],.edv-app input[type=password],.edv-app input[type=date],
.edv-app input[type=number],.edv-app input[type=search],.edv-app input[type=url],.edv-app input[type=tel],.edv-app input[type=time],
.edv-app input[type=month],.edv-app input[type=week],.edv-app input[type=datetime-local],.edv-app select{min-height:var(--h-ctl); border-radius:var(--r-ctl)}
.edv-app input[type=url],.edv-app input[type=tel],.edv-app input[type=time],.edv-app input[type=month],.edv-app input[type=week],.edv-app input[type=datetime-local]{background:#fff; border:1px solid #C8CDDA; padding:7px 11px; max-width:100%; font:inherit; color:var(--ink)}
.edv-app input[type=url]:focus,.edv-app input[type=tel]:focus,.edv-app input[type=time]:focus,.edv-app input[type=month]:focus,.edv-app input[type=week]:focus,.edv-app input[type=datetime-local]:focus{outline:none; border-color:var(--p); box-shadow:0 0 0 3px var(--p-soft-2)}
.edv-app .edv-f input[type=url],.edv-app .edv-f input[type=tel],.edv-app .edv-f input[type=time],.edv-app .edv-f input[type=month],.edv-app .edv-f input[type=datetime-local]{width:100%}
.edv-app textarea{border-radius:var(--r-ctl)}
.edv-app .edv-f input[type=text],.edv-app .edv-f input:not([type]),.edv-app .edv-f input[type=email],.edv-app .edv-f input[type=date],.edv-app .edv-f input[type=month],.edv-app .edv-f input[type=time],.edv-app .edv-f input[type=password],
.edv-app .edv-f input[type=number],.edv-app .edv-f input[type=search],.edv-app .edv-f input[type=url],.edv-app .edv-f input[type=tel],.edv-app .edv-f select,.edv-app .edv-f textarea,.edv-app .edv-select{border-radius:var(--r-ctl)}
.edv-app .edv-f input[type=text],.edv-app .edv-f input:not([type]),.edv-app .edv-f input[type=email],.edv-app .edv-f input[type=date],.edv-app .edv-f input[type=month],.edv-app .edv-f input[type=time],.edv-app .edv-f input[type=password],
.edv-app .edv-f input[type=number],.edv-app .edv-f input[type=url],.edv-app .edv-f input[type=tel],.edv-app .edv-f select:not([multiple]):not([size]),.edv-app .edv-select:not([multiple]){height:var(--h-ctl); min-height:var(--h-ctl); padding-block:0}
.edv-app .edv-search input{min-height:var(--h-ctl); border-radius:var(--r-ctl); font-size:14px}
.edv-app .fl-sitesel select{border-radius:var(--r-ctl); border-color:#C8CDDA; min-height:var(--h-ctl)}
/* زر اختيار الملف بشكل زر النظام بدل زر المتصفح الرمادي */
.edv-app input[type=file]{font:inherit; font-size:13px; color:var(--muted); max-width:100%}
.edv-app input[type=file]::file-selector-button{min-height:var(--h-sm); margin-inline-end:10px; padding:0 14px; border:1px solid var(--line); border-radius:var(--r-ctl); background:#fff; color:var(--ink); font:inherit; font-size:13px; font-weight:600; cursor:pointer}
.edv-app input[type=file]::file-selector-button:hover{background:var(--bg); border-color:#c0c6d4}
html.dk .edv-app input[type=file]::file-selector-button{background:#232835; color:#e3e5eb; border-color:#3a4152}
html.dk .edv-app input[type=url],html.dk .edv-app input[type=tel],html.dk .edv-app input[type=time],html.dk .edv-app input[type=month],html.dk .edv-app input[type=week],html.dk .edv-app input[type=datetime-local]{background:#161922; border-color:#343b4e; color:#d9dce3}

/* البطاقات واللوحات: حافة واحدة */
.edv-app .edv-panel,.edv-shell .edv-panel,.edv-app .edv-stat,.edv-app .edv-card,.lv-w.edv-panel,.st-main .edv-panel,.edv-scan-insights .edv-panel,
.vc-card,.msn-pick label.msn-card,.qt-card,.edv-app-dialog{border-radius:var(--r-card,12px)}
.edv-app .edv-stat{padding:14px 18px}
.edv-app .notice{border-radius:10px}

/* عنوان الصفحة: الأزرار تبقى في السطر نفسه بجانب العنوان (كانت تنزل تحته في صفحات ولا تنزل في أخرى) */
.edv-pagehead > :first-child{flex:1 1 320px; min-width:0}
.edv-pagehead > .edv-pagehead-actions{flex:0 1 auto; justify-content:flex-end; margin-inline-start:auto}
.edv-pagehead p{text-wrap:pretty}

/* أزرار التصفية (الحالة/النوع): شكل كبسولة واحد في الموظفين والواجبات وعروض الأسعار وغيرها */
.edv-app .edv-filters{gap:6px}
.edv-app .edv-filters a,.msn-tabs a,.qt-filter a{display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 13px; border:1px solid var(--line); border-radius:99px; background:#fff; color:var(--muted) !important; font-size:13px; font-weight:600; text-decoration:none; transition:background-color .15s,border-color .15s,color .15s}
.edv-app .edv-filters a:hover,.msn-tabs a:hover,.qt-filter a:hover{border-color:#B1BACE; color:var(--ink) !important; text-decoration:none}
.edv-app .edv-filters a.current,.msn-tabs a.is-on,.qt-filter a.is-on{background:var(--p); border-color:var(--p); color:var(--on-p,#fff) !important}
.msn-tabs a em,.qt-filter a b{font-style:normal; font-size:12px; font-weight:700}
.edv-app .edv-filters a.current .edv-muted{color:inherit !important; opacity:.85}
html.dk .edv-app .edv-filters a,html.dk .msn-tabs a{background:#1d212b; border-color:#303648}
html.dk .edv-app .edv-filters a.current,html.dk .msn-tabs a.is-on{background:var(--dk-pbtn,#2f6f55); border-color:transparent; color:#fff !important}
.fl-cattab{border-radius:var(--r-card,12px); border-width:1px}

/* الشارات: كبسولة بخط 12/600 */
.edv-app .edv-badge{font-weight:600}
.moi-chip{border-radius:99px}

/* النوافذ المنبثقة: نفس حافة البطاقات وظل أهدأ */
.edv-app-dialog{box-shadow:0 24px 64px -16px rgba(11,22,51,.45); overscroll-behavior:contain}
.edv-app-dialog h3{font-size:16px; font-weight:700}
.edv-app .edv-dialog-actions{gap:8px}

/* عناوين الأقسام */
.edv-app .edv-panel-head h2{font-weight:700}
.edv-main-in > h2,.edv-app h2.ap-sec{font-size:17px; font-weight:700}
/* اللمس: مساحة نقر لا تقل عن 36px لأزرار التبديل الصغيرة وحذف الشارات وإغلاق التنبيه */
@media (pointer:coarse){
  .lvm-seg button,.lv-seg button,.msnwa-vars > button,.wa-vars > button,.edv-toast-x{min-height:36px}
  .msn-chip > button{min-width:36px; min-height:36px}
  .edv-app .edv-filters a,.msn-tabs a,.qt-filter a{min-height:38px}
}
/* أزواج متجاورة بنفس الارتفاع بعد توحيد المقاسات */
.edv-app .py-row .edv-abtn,.edv-app .py-row .edv-abtn.is-sm{min-height:var(--h-ctl)}
.edv-app .py-days > button{min-height:var(--h-ctl); min-width:var(--h-ctl)}
.edv-app .msn-addf input[type=file]::file-selector-button{min-height:var(--h-ctl)}
.lv-tk-opt select{min-height:34px; height:34px; padding-block:0}

/* ================= 5.35: ما ينتهي قريباً · جدول التوزيع · تقارير العملاء · اختيار الأعمدة ================= */
.rn-bar{flex-wrap:wrap; gap:10px}
.rn-bar .edv-filters{display:flex; flex-wrap:wrap; flex:1 1 auto}
.rn-kind{display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--ink)}
.rn-kind::before{content:""; width:8px; height:8px; border-radius:50%; background:var(--muted)}
.rn-k-contract::before{background:#7a5af8}.rn-k-empdoc::before{background:#2e90fa}.rn-k-moi::before{background:#0e9384}
.rn-k-weapon::before{background:#b42318}.rn-k-vehicle::before{background:#dc6803}.rn-k-badge::before{background:#1e3bb3}.rn-k-doc::before{background:#667085}
.rn-table tr.rn-expired td{background:#fdf3f2}
html.dk .rn-table tr.rn-expired td{background:#2b1a1a}
.rn-hint{margin-top:12px}

.ro-week{display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:12px}
.ro-week b{font-size:15px}
.ro-gaps{display:flex; flex-wrap:wrap; gap:4px 12px; align-items:baseline; padding:12px 16px; margin-bottom:14px; border-radius:var(--r-card,12px); border:1px solid var(--line); background:#fff; font-size:14px}
.ro-gaps.is-bad{border-color:#f5c2bd; background:#fef3f2; color:#912018}
.ro-gaps.is-ok{border-color:#b7e4cf; background:#f0faf5; color:#05603a}
.ro-gaps span{color:inherit; opacity:.85; font-size:13px}
.ro-wrap{display:grid; grid-template-columns:1fr; gap:14px; align-items:start}
.ro-wrap.is-edit{grid-template-columns:240px minmax(0,1fr)}
.ro-pool{position:sticky; top:calc(var(--top-h,56px) + 12px); display:flex; flex-direction:column; gap:8px; padding:12px; max-height:calc(100vh - var(--top-h,56px) - 40px)}
.ro-pool header{display:flex; justify-content:space-between; align-items:center}
.ro-pool .ro-find{width:100%; min-height:var(--h-sm,32px); padding:0 10px; border:1px solid var(--line); border-radius:var(--r-ctl,8px); font:inherit; font-size:13px; background:#fff; color:var(--ink)}
.ro-tip{margin:0; font-size:12px; color:var(--muted); line-height:1.6}
.ro-list{list-style:none; margin:0; padding:0; overflow:auto; display:flex; flex-direction:column; gap:4px; min-height:0}
.ro-pool.is-over{outline:2px dashed var(--p); outline-offset:-4px}
.ro-chip{display:flex; align-items:center; gap:6px; width:100%; min-height:34px; padding:4px 8px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font:inherit; font-size:13px; text-align:start; cursor:grab; touch-action:manipulation; user-select:none}
.ro-chip .ro-nm{flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600}
.ro-chip small{color:var(--muted); font-size:11px; max-width:40%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ro-chip .ro-wk{font-style:normal; min-width:20px; text-align:center; font-size:11px; font-weight:700; color:var(--muted); background:var(--bg,#f3f4f7); border-radius:99px; padding:1px 6px}
.ro-chip:hover{border-color:#b1bace}
.ro-chip[aria-pressed=true]{border-color:var(--p); background:var(--p-soft,#eef1fb); box-shadow:0 0 0 2px var(--p-soft,#eef1fb)}
.ro-chip:focus-visible{outline:2px solid var(--p); outline-offset:1px}
.ro-chip.is-drag{opacity:.45}
.ro-grid-w{overflow-x:auto; padding:0}
.ro-grid{width:100%; min-width:820px; border-collapse:separate; border-spacing:0; table-layout:fixed}
.ro-grid th,.ro-grid td{border-bottom:1px solid var(--line); border-inline-start:1px solid var(--line); vertical-align:top}
.ro-grid thead th{position:sticky; top:0; z-index:1; background:#f7f8fb; padding:8px 6px; font-size:13px; font-weight:700; text-align:center}
.ro-grid thead th small{display:block; font-weight:500; color:var(--muted); font-size:11px}
.ro-grid thead th.is-today{background:var(--p-soft,#eef1fb); color:var(--p)}
.ro-grid thead th.is-past{color:var(--muted)}
.ro-grid .ro-site-h{width:170px}
.ro-site{padding:10px; text-align:start; background:#fbfbfd}
.ro-site b{display:block; font-size:13px; line-height:1.4}
.ro-need{display:flex; align-items:center; gap:6px; margin-top:6px; font-size:11px; color:var(--muted); font-weight:500}
.ro-need input{width:52px; min-height:28px; padding:0 6px; border:1px solid var(--line); border-radius:6px; font:inherit; font-size:13px; text-align:center; background:#fff; color:var(--ink)}
.ro-cell{position:relative; padding:24px 5px 6px; min-height:84px; height:84px; background:#fff; transition:background-color .15s}
.ro-cell .ro-cnt{position:absolute; top:4px; inset-inline-end:6px; font-size:11px; font-weight:700; color:var(--muted)}
.ro-cell.is-short{background:#fef3f2}
.ro-cell.is-short .ro-cnt{color:#b42318}
.ro-cell.is-ok .ro-cnt{color:#067647}
.ro-cell.is-was-short .ro-cnt{color:#b42318; opacity:.7}
.ro-cell.is-past{background:#fafafa}
.ro-cell.is-over{background:var(--p-soft,#eef1fb); box-shadow:inset 0 0 0 2px var(--p)}
.ro-cell .ro-chip{margin-bottom:4px; min-height:28px; padding:2px 4px 2px 8px; font-size:12px; cursor:grab}
.ro-cell .ro-chip.is-leave{border-color:#f5c2bd; background:#fef3f2; color:#912018; text-decoration:line-through}
.ro-x{flex:none; display:grid; place-items:center; width:22px; height:22px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:16px; line-height:1; cursor:pointer}
.ro-x:hover{background:#f3f4f7; color:#b42318}
.ro-add{display:block; width:100%; min-height:26px; border:1px dashed var(--line); border-radius:8px; background:transparent; color:var(--muted); font-size:16px; line-height:1; cursor:pointer; opacity:0; transition:opacity .15s}
.ro-cell:hover .ro-add,.ro-add:focus-visible,.ro-wrap.is-picking .ro-add{opacity:1}
.ro-wrap.is-picking .ro-add{border-color:var(--p); color:var(--p)}
@media (pointer:coarse){.ro-add{opacity:1; min-height:34px}.ro-x{width:30px; height:30px}}
@media (max-width:900px){.ro-wrap.is-edit{grid-template-columns:1fr}.ro-pool{position:static; max-height:280px}}
html.dk .ro-gaps{background:#1d212b; border-color:#303648}
html.dk .ro-gaps.is-bad{background:#2b1a1a; border-color:#5c2a25; color:#f5b5ad}
html.dk .ro-gaps.is-ok{background:#14261e; border-color:#24503b; color:#9fdcbf}
html.dk .ro-chip,html.dk .ro-cell,html.dk .ro-pool .ro-find,html.dk .ro-need input{background:#1d212b; border-color:#303648; color:#e3e5eb}
html.dk .ro-grid thead th,html.dk .ro-site{background:#191c25}
html.dk .ro-grid thead th.is-today{background:#1f2a4a; color:#a9bdff}
html.dk .ro-cell.is-short,html.dk .ro-cell .ro-chip.is-leave{background:#2b1a1a; color:#f5b5ad}
html.dk .ro-cell.is-past{background:#181b23}
html.dk .ro-chip .ro-wk{background:#262c3b}

.cr-month{gap:10px; margin-bottom:14px; flex-wrap:wrap; align-items:center}
.cr-month input[type=month]{min-height:var(--h-ctl,40px); padding:0 10px; border:1px solid var(--line); border-radius:var(--r-ctl,8px); font:inherit}
.cr-list{display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr)); gap:14px}
.cr-site{padding:16px; display:flex; flex-direction:column; gap:12px}
.cr-head{display:flex; gap:10px; align-items:flex-start; justify-content:space-between}
.cr-head h2{margin:0 0 2px; font-size:15px; font-weight:700}
.cr-head small{color:var(--muted); font-size:12px}
.cr-form{display:flex; flex-direction:column; gap:10px; padding-top:12px; border-top:1px solid var(--line)}
.cr-form .edv-f{margin:0}
.cr-form > button{align-self:flex-start}

/* اختيار الأعمدة والفلاتر المحفوظة (5.35) */
.edv-colpick{position:relative; display:inline-flex}
.edv-colpick-pop{position:absolute; top:calc(100% + 6px); inset-inline-end:0; z-index:30; min-width:220px; max-height:340px; overflow:auto; padding:8px; border:1px solid var(--line); border-radius:var(--r-card,12px); background:#fff; box-shadow:0 16px 40px -12px rgba(11,22,51,.3)}
.edv-colpick-pop label{display:flex; align-items:center; gap:8px; min-height:32px; padding:0 8px; border-radius:6px; font-size:13px; cursor:pointer}
.edv-colpick-pop label:hover{background:var(--bg,#f3f4f7)}
.edv-colpick-pop footer{display:flex; justify-content:space-between; gap:6px; padding:8px 4px 2px; margin-top:6px; border-top:1px solid var(--line)}
.edv-colpick-pop footer button{border:0; background:none; color:var(--p); font:inherit; font-size:12px; font-weight:600; cursor:pointer; padding:4px}
.edv-savedf{display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:8px 16px 0}
.edv-savedf > span{font-size:12px; color:var(--muted); font-weight:600}
.edv-savedf a{display:inline-flex; align-items:center; gap:4px; min-height:28px; padding:0 4px 0 10px; border:1px solid var(--line); border-radius:99px; background:#fff; color:var(--ink); font-size:12px; font-weight:600; text-decoration:none}
.edv-savedf a.is-on{border-color:var(--p); color:var(--p); background:var(--p-soft,#eef1fb)}
.edv-savedf a button{display:grid; place-items:center; width:22px; height:22px; border:0; border-radius:99px; background:none; color:var(--muted); font-size:14px; cursor:pointer}
.edv-savedf a button:hover{background:#f3f4f7; color:#b42318}
.edv-savedf .edv-savedf-add{border-style:dashed; color:var(--muted); padding:0 10px; background:transparent; min-height:28px; border:1px dashed var(--line); border-radius:99px; font:inherit; font-size:12px; font-weight:600; cursor:pointer}
html.dk .edv-colpick-pop{background:#1d212b; border-color:#303648}
html.dk .edv-colpick-pop label:hover,html.dk .edv-savedf a button:hover{background:#262c3b}
html.dk .edv-savedf a{background:#1d212b; border-color:#303648; color:#e3e5eb}
.edv-qs-o.is-act .edv-qs-ic{background:var(--p-soft,#eef1fb); color:var(--p)}
.edv-savedf .edv-savedf-name{min-height:28px; width:150px; padding:0 10px; border:1px solid var(--p); border-radius:99px; font:inherit; font-size:12px; background:#fff; color:var(--ink)}
html.dk .edv-savedf .edv-savedf-name{background:#161922; color:#e3e5eb}

/* ================= 5.36: الامتثال وأدلة التدقيق ================= */
.co-ready{display:flex; align-items:center; gap:22px; padding:18px 22px; margin-bottom:16px}
.co-gauge{--v:0; flex:none; width:118px; height:118px; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--p,#1E3BB3) calc(var(--v)*1%), var(--line-2,#E8EBF2) 0)}
.co-gauge b{display:grid; place-items:center; width:88px; height:88px; border-radius:50%; background:var(--card,#fff); font-size:24px; font-weight:800; color:var(--ink)}
.co-ready-t h2{margin:0 0 4px; font-size:18px}
.co-ready-t p{margin:0 0 8px}
.co-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1100px){.co-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.co-ready{flex-direction:column; text-align:center}.co-stats{grid-template-columns:1fr}}
.co-todo{list-style:none; margin:0; padding:0}
.co-todo li + li{border-top:1px solid var(--line-2,#E8EBF2)}
.co-todo a{display:grid; grid-template-columns:minmax(150px,auto) 1fr auto; gap:12px; align-items:baseline; padding:10px 4px; color:inherit; text-decoration:none}
.co-todo a:hover b{color:var(--p)}
.co-todo span{color:var(--muted); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.co-todo time{font-size:12.5px; color:var(--muted)}
@media (max-width:700px){.co-todo a{grid-template-columns:1fr}}
.co-bar{flex-wrap:wrap; gap:8px}
.co-bar .edv-search{flex:1 1 180px}
.co-table tr.co-late td{background:color-mix(in srgb,#d92d20 6%,transparent)}
.co-pub{margin:0 0 12px; overflow-wrap:anywhere}
.co-form-p .edv-panel-head{gap:12px; flex-wrap:wrap}
.co-head-act{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.co-meta{margin:-4px 0 12px}
.co-linked{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:0 0 12px}
.co-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:4px 16px; border:0; padding:0; margin:0; min-width:0}
.co-grid .edv-f.is-wide{grid-column:1 / -1}
.co-grid select[multiple]{height:auto; min-height:170px}
.co-grid[disabled] input,.co-grid[disabled] select,.co-grid[disabled] textarea{background:var(--line-2,#F3F5F9); color:var(--ink); opacity:1}
.co-checks{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:6px 16px}
.co-score{margin:10px 0 0}
.co-del{margin-top:16px; padding-top:12px; border-top:1px solid var(--line-2,#E8EBF2)}
.co-wgate{display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; padding:14px 18px; margin-bottom:14px}
.co-wgate h2{margin:0 0 2px; font-size:16px}
.co-wgate p{margin:0}
.co-meter{display:inline-block; vertical-align:middle; width:64px; height:6px; border-radius:6px; background:var(--line-2,#E8EBF2); overflow:hidden}
.co-meter i{display:block; height:100%; width:var(--p); background:var(--p-ok,#12b76a)}
.co-stars{color:#f5a524; letter-spacing:1px}.co-stars i{font-style:normal; color:var(--line,#D8DCE6)}
.co-matrix-p{margin-bottom:14px}
.co-matrix{border-collapse:separate; border-spacing:4px; margin:4px 0}
.co-matrix td{width:52px; height:38px; border-radius:8px; text-align:center; font-size:15px}
.co-matrix th{font-size:12px; color:var(--muted); font-weight:600; padding:0 6px}
.co-m-low{background:#d1fadf}.co-m-medium{background:#fef0c7}.co-m-high{background:#fedbc7}.co-m-critical{background:#fecdca}
.co-matrix td b{color:#101828}
.co-legend{list-style:none; display:flex; gap:14px; flex-wrap:wrap; margin:6px 0 0; padding:0; font-size:12.5px; color:var(--muted)}
.co-legend i{display:inline-block; width:12px; height:12px; border-radius:3px; vertical-align:-1px; margin-inline-end:5px}
.co-coc{display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:16px; align-items:start}
@media (max-width:1000px){.co-coc{grid-template-columns:1fr}}
.co-coc-text{line-height:1.9; white-space:normal}
.co-names{list-style:none; margin:0; padding:0; max-height:420px; overflow:auto; columns:2 220px; column-gap:16px}
.co-names li{padding:3px 0; break-inside:avoid}
.co-evi td{vertical-align:top}
.co-evi-hint{margin:0 0 12px}
html.dk .co-gauge{background:conic-gradient(var(--edv-a,#1FC8B6) calc(var(--v)*1%), #2a3040 0)}
html.dk .co-gauge b{background:#191c25; color:#e3e5eb}
html.dk .co-m-low{background:#123524}html.dk .co-m-medium{background:#3a2e0b}html.dk .co-m-high{background:#41230f}html.dk .co-m-critical{background:#44171a}
html.dk .co-matrix td b{color:#f2f4f7}
html.dk .co-table tr.co-late td{background:#2b1a1a}
html.dk .co-grid[disabled] input,html.dk .co-grid[disabled] select,html.dk .co-grid[disabled] textarea{background:#1d212b}
html.dk .co-meter{background:#2a3040}


/* ===== 5.38: المشجب — مسح باج الموظف ثم باج السلاح ===== */
.am-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.am-wrap{display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:16px; align-items:start; margin-bottom:16px}
.am-scan{padding:20px 22px; display:flex; flex-direction:column; gap:14px}
.am-steps{display:flex; gap:10px; margin:0; padding:0; list-style:none}
.am-steps li{flex:1; display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:var(--r-ctl,8px); background:var(--bg); color:var(--muted); font-weight:600}
.am-steps li span{display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--line); color:var(--ink); font-size:13px}
.am-steps li.is-on{background:var(--p-soft-2); color:var(--p)}
.am-steps li.is-on span{background:var(--p); color:var(--on-p)}
.am-steps li.is-done span{background:var(--ok); color:#fff}
.am-lbl{display:block; font-size:18px; font-weight:700; margin-bottom:8px}
.am-input{display:flex; gap:8px; flex-wrap:wrap}
.am-input input{flex:1 1 220px; min-width:0; height:56px; font-size:22px; letter-spacing:.04em; padding:0 14px; border:2px solid var(--p); border-radius:var(--r-ctl,8px); background:var(--card,#fff); color:var(--ink)}
.am-input input:focus-visible{outline:3px solid var(--a); outline-offset:2px}
.am-input .edv-abtn{height:56px; padding:0 18px; font-size:16px}
.am-wrap.is-busy .am-input input{opacity:.6}
.am-reader{width:100%; max-width:440px; aspect-ratio:1; border-radius:12px; overflow:hidden; background:#0b0d12; margin-inline:auto}
.am-reader video{object-fit:cover}
.am-cond{display:flex; flex-wrap:wrap; gap:6px 14px; border:0; margin:0; padding:0; color:var(--muted)}
.am-cond legend{float:inline-start; margin-inline-end:6px; font-size:13px; padding:0}
.am-cond label{display:inline-flex; align-items:center; gap:5px; font-size:14px; color:var(--ink)}
.am-msg{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; border-radius:var(--r-ctl,8px); font-size:17px; font-weight:700}
.am-msg.is-ok{background:var(--ok-bg); color:var(--ok)}
.am-msg.is-bad{background:var(--bad-bg); color:var(--bad)}
.am-emp{padding:18px 20px}
.am-emp-head{display:flex; gap:14px; align-items:flex-start}
.am-photo{flex:none; width:84px; height:104px; border-radius:10px; overflow:hidden; background:var(--p-soft-2); display:grid; place-items:center; font-size:34px; font-weight:800; color:var(--p)}
.am-photo img{width:100%; height:100%; object-fit:cover}
.am-emp-info{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px}
.am-emp-info b{font-size:20px; line-height:1.3}
.am-emp-info #am-no,.am-emp-info #am-site{color:var(--muted); font-size:14px}
.am-bdg{align-self:flex-start; padding:3px 10px; border-radius:999px; font-size:13px; font-weight:600}
.am-bdg.is-ok{background:var(--ok-bg); color:var(--ok)}
.am-bdg.is-bad{background:var(--bad-bg); color:var(--bad)}
.am-bdg.is-warn{background:var(--warn-bg); color:var(--warn)}
.am-held h3{font-size:14px; color:var(--muted); margin:14px 0 6px}
.am-held ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px}
.am-held li{padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-size:14px}
.am-held li span{color:var(--muted); margin-inline-start:6px}
.am-held li.is-none{color:var(--muted); border-style:dashed}
.am-sub{display:block; color:var(--muted); font-size:12px}
.am-site-form{display:flex; align-items:center; gap:8px; font-size:13px}
.am-site-form select{height:var(--h-sm,32px)}
@media (max-width:900px){.am-wrap{grid-template-columns:1fr} .am-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.am-camwrap{position:relative}
.am-frame,.am-camoff{display:none}
.am-cond label span{font:inherit}

/* ===== 5.39: المشجب — تخطيط متوازن: بطاقة المسح + عمود جانبي بنفس الارتفاع (جاهز للمسح ← بطاقة الموظف) ===== */
[dir=ltr] .ei-dir{transform:scaleX(-1)}
.am-wrap:not(.is-kiosk){grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); align-items:stretch; gap:16px}
.am-wrap:not(.is-kiosk) .am-scan{margin:0; padding:20px 22px 22px; gap:16px; border-radius:var(--r-card,12px)}
.am-scan-head{display:flex; align-items:center; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--line-2,var(--line))}
.am-scan-head h2{margin:0; font-size:17px; font-weight:700; flex:1; min-width:0; text-wrap:balance}
.am-scan-ico{display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:var(--p-soft-2); color:var(--p); flex:none}
.am-scan-ico .ei{width:22px; height:22px; vertical-align:0}
.am-ready{display:inline-flex; align-items:center; gap:7px; font-size:13px; color:var(--muted); white-space:nowrap}
.am-ready i{width:8px; height:8px; border-radius:50%; background:var(--line); flex:none}
.am-ready-on{display:none}
.am-scan:focus-within .am-ready{color:var(--ok)}
.am-scan:focus-within .am-ready i{background:var(--ok); box-shadow:0 0 0 3px var(--ok-bg)}
.am-scan:focus-within .am-ready-on{display:inline}
.am-scan:focus-within .am-ready-off{display:none}
/* الخطوات: مؤشر متصل */
.am-wrap:not(.is-kiosk) .am-steps{gap:0; position:relative}
.am-wrap:not(.is-kiosk) .am-steps li{background:none; padding:0; gap:10px; border-radius:0; font-size:14px; position:relative}
.am-wrap:not(.is-kiosk) .am-steps li + li::before{content:""; height:2px; flex:0 0 32px; background:var(--line); border-radius:2px; margin-inline-end:2px}
.am-wrap:not(.is-kiosk) .am-steps li.is-done + li::before,.am-wrap:not(.is-kiosk) .am-steps li.is-on + li.is-on::before{background:var(--ok)}
.am-wrap:not(.is-kiosk) .am-steps li span{width:30px; height:30px; font-size:14px; font-weight:700; background:var(--bg); border:1px solid var(--line); color:var(--muted); flex:none}
.am-wrap:not(.is-kiosk) .am-steps li.is-on{color:var(--ink); background:none}
.am-wrap:not(.is-kiosk) .am-steps li.is-on span{background:var(--p); border-color:var(--p); color:var(--on-p); box-shadow:0 0 0 4px var(--p-soft-2)}
.am-wrap:not(.is-kiosk) .am-steps li.is-done{color:var(--ok)}
.am-wrap:not(.is-kiosk) .am-steps li.is-done span{background:var(--ok); border-color:var(--ok); color:#fff}
/* خانة المسح */
.am-wrap:not(.is-kiosk) .am-lbl{font-size:20px; margin-bottom:10px}
.am-wrap:not(.is-kiosk) .am-input{gap:10px; flex-wrap:nowrap}
.am-wrap:not(.is-kiosk) .am-input input{flex:1 1 auto; height:56px; font-size:20px; border:1.5px solid var(--line); border-radius:10px; padding-inline:16px; transition:border-color .15s, box-shadow .15s}
.am-wrap:not(.is-kiosk) .am-input input::placeholder{color:var(--muted); font-size:16px; letter-spacing:0}
.am-wrap:not(.is-kiosk) .am-input input:focus{border-color:var(--p); box-shadow:0 0 0 4px var(--p-soft-2); outline:0}
.am-wrap:not(.is-kiosk) .am-input .edv-abtn{height:56px; padding:0 20px; border-radius:10px; flex:none; gap:8px}
.am-wrap:not(.is-kiosk) .am-input .edv-abtn .ei{width:20px; height:20px}
/* حالة السلاح: أزرار مقطّعة بدل دوائر متفرقة */
.am-cond-opts{display:flex; flex-wrap:wrap; gap:8px}
.am-wrap:not(.is-kiosk) .am-cond{display:flex; flex-direction:column; gap:8px}
.am-wrap:not(.is-kiosk) .am-cond legend{float:none; margin:0 0 8px; font-size:13px; font-weight:600; color:var(--muted)}
.am-wrap:not(.is-kiosk) .am-cond label{position:relative; cursor:pointer}
.am-wrap:not(.is-kiosk) .am-cond input{position:absolute; inset:0; opacity:0; margin:0; cursor:pointer}
.am-wrap:not(.is-kiosk) .am-cond label span{display:inline-flex; align-items:center; height:36px; padding:0 16px; border:1px solid var(--line); border-radius:999px; background:var(--card,#fff); color:var(--ink); font-size:14px; transition:background-color .15s, border-color .15s}
.am-wrap:not(.is-kiosk) .am-cond label:hover span{border-color:var(--p)}
.am-wrap:not(.is-kiosk) .am-cond input:checked + span{background:var(--p-soft-2); border-color:var(--p); color:var(--p); font-weight:700}
.am-wrap:not(.is-kiosk) .am-cond input:focus-visible + span{outline:3px solid var(--a); outline-offset:2px}
.am-wrap:not(.is-kiosk) .am-msg{margin-top:auto; min-height:56px}
.am-msg-ph{display:flex; align-items:center; justify-content:center; gap:8px; margin:auto 0 0; min-height:56px; padding:0 16px; border:1.5px dashed var(--line); border-radius:var(--r-ctl,8px); color:var(--muted); font-size:14px}
.am-msg-ph .ei{width:18px; height:18px; opacity:.7}
.am-msg[hidden]{display:none}
.am-msg:not([hidden]) + .am-msg-ph{display:none}
.am-wrap:not(.is-kiosk) .am-emp[hidden]{display:none}
/* العمود الجانبي */
.am-side{display:flex; flex-direction:column; gap:16px; min-width:0}
.am-side > .edv-panel{margin:0; border-radius:var(--r-card,12px)}
.am-side > .am-idle,.am-side > .am-emp{flex:1 1 auto}
.am-side .am-camwrap{padding:12px}
.am-side .am-camwrap[hidden]{display:none}
.am-side .am-reader{max-width:none; aspect-ratio:4/3}
.am-wrap:not(.is-kiosk) .am-idle{display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:6px; padding:28px 24px; background:linear-gradient(180deg,var(--p-soft),var(--card,#fff) 60%)}
.am-wrap:not(.is-kiosk) .am-idle[hidden]{display:none}
.am-wrap:not(.is-kiosk) .am-idle-ico{display:grid; place-items:center; width:64px; height:64px; border-radius:18px; background:var(--p-soft-2); color:var(--p); margin-bottom:6px}
.am-wrap:not(.is-kiosk) .am-idle-ico .ei{width:32px; height:32px; vertical-align:0}
.am-idle h3{margin:0; font-size:18px; font-weight:700}
.am-idle > p{margin:0; color:var(--muted); font-size:14px; max-width:34ch; text-wrap:pretty}
.am-how{list-style:none; margin:14px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; width:100%; max-width:380px; text-align:start}
.am-how li{display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line-2,var(--line)); border-radius:10px; background:var(--card,#fff)}
.am-how-n{display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--bg); color:var(--muted); font-size:13px; font-weight:700; flex:none}
.am-how li > span:last-child{display:flex; flex-direction:column; min-width:0}
.am-how b{font-size:14px}
.am-how small{color:var(--muted); font-size:13px}
.am-wrap:not(.is-kiosk) .am-emp{padding:20px; display:flex; flex-direction:column}
.am-wrap:not(.is-kiosk) .am-emp-info b{overflow-wrap:anywhere}
.am-wrap:not(.is-kiosk) .am-held{flex:1}
.am-nw{white-space:nowrap; unicode-bidi:isolate}
.am-wrap:not(.is-kiosk) .am-bdg{line-height:1.5; margin-top:2px}
.am-wrap:not(.is-kiosk) .am-held h3{margin:18px 0 8px; padding-top:14px; border-top:1px solid var(--line-2,var(--line))}
.am-wrap:not(.is-kiosk) .am-held li{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px; border-radius:10px}
.am-wrap:not(.is-kiosk) .am-held li span{margin:0; font-size:13px; font-variant-numeric:tabular-nums}
/* أرقام المشجب بأيقونات */
.am-stats .edv-stat{position:relative; padding-inline-start:72px}
.am-stat-ico{position:absolute; inset-inline-start:18px; top:50%; translate:0 -50%; display:grid; place-items:center; width:42px; height:42px; border-radius:11px; background:var(--p-soft-2); color:var(--p)}
.am-stat-ico .ei{width:22px; height:22px; vertical-align:0}
.am-stats .is-ok .am-stat-ico{background:var(--ok-bg); color:var(--ok)}
.am-stats .is-warn .am-stat-ico{background:var(--warn-bg); color:var(--warn)}
[dir=rtl] .am-wrap .am-input input:placeholder-shown{direction:rtl}
@media (max-width:900px){.am-wrap:not(.is-kiosk){grid-template-columns:1fr} .am-wrap:not(.is-kiosk) .am-input{flex-wrap:wrap} .am-wrap:not(.is-kiosk) .am-input input{flex-basis:100%} .am-wrap:not(.is-kiosk) .am-input .edv-abtn{flex:1}}
.am-table{min-width:760px}
@media (max-width:900px){.am-msg-ph{margin-top:4px} .am-wrap:not(.is-kiosk) .am-idle{padding:20px 16px}}
@media (prefers-reduced-motion:reduce){.am-wrap:not(.is-kiosk) .am-input input,.am-wrap:not(.is-kiosk) .am-cond label span{transition:none}}
/* 5.41: معاينة الكاميرا في الصفحة العادية بإطار الباج نفسه */
.am-side .am-camwrap{position:relative}
.am-side .am-frame{display:block; position:absolute; left:50%; top:calc(50% - 12px); translate:-50% -50%; width:72%; aspect-ratio:85.6/54; border:2px solid var(--a); border-radius:12px; pointer-events:none; box-shadow:0 0 0 100vmax rgba(0,0,0,.35)}
.am-side .am-frame > i{display:none}
.am-side .am-frame-bar{position:absolute; inset-inline:3%; bottom:0; height:20%; border:2px solid var(--a); border-radius:5px; display:block}
.am-side .am-frame-bar i{position:absolute; inset-inline:3%; top:50%; height:2px; background:#ff4d4d}
.am-side .am-camoff{display:block; margin:8px 0 0; text-align:center; color:var(--muted); font-size:13px}
.am-side .am-camwrap{overflow:hidden}
.am-side .am-reader{position:relative}

/* ===== 5.44: توحيد تصميم الجداول ===== */
/* 1) رأس الجدول: كل العناوين تستقر على السطر الأخير، وسهم الترتيب يبقى بجانب العنوان */
.edv-app :is(.edv-table,.wp-list-table) thead th{vertical-align:bottom}
.emp-table th.emp-sort a{flex-wrap:nowrap; align-items:flex-end; min-height:24px; padding-block:2px}
.emp-table th.emp-sort a .emp-sort-i{margin-bottom:4px}
/* 2) شارة واحدة بشكل واحد في كل الجداول (الحالة، مسجل، ستيكر، باج، الحالة الفنية…) */
.edv-app :is(.edv-table,.wp-list-table) td :is(.edv-badge,.cu-reg,.cu-cond,.cu-held-chip,.msn-eng,.hr-code,.moi-chip,.bdg-chip,.att-geo,.cu-inveh,.bdg-kind,.st-loc){display:inline-flex; align-items:center; gap:5px; box-sizing:border-box; height:22px; min-height:0; padding:0 9px; margin-block:2px; margin-inline:0; border-radius:999px; font-size:11.5px; font-weight:600; font-style:normal; line-height:1; white-space:nowrap; vertical-align:middle; width:auto; max-width:100%; text-decoration:none}
.edv-app :is(.edv-table,.wp-list-table) td :is(.edv-badge,.cu-reg,.cu-cond,.cu-held-chip,.msn-eng,.hr-code,.moi-chip,.bdg-chip,.att-geo,.cu-inveh,.bdg-kind) :is(span,small,bdi,b){display:inline; font-size:inherit; margin:0}
.edv-app :is(.edv-table,.wp-list-table) td :is(.edv-badge,.cu-reg,.cu-cond,.cu-held-chip,.msn-eng,.hr-code,.moi-chip,.bdg-chip,.att-geo,.cu-inveh,.bdg-kind) + :is(.edv-badge,.cu-reg,.cu-cond,.cu-held-chip,.msn-eng,.hr-code,.moi-chip,.bdg-chip,.att-geo,.cu-inveh,.bdg-kind){margin-inline-start:4px}
/* مجموعة الشارات تحت الاسم: صف واحد يلتف عند الحاجة، بمسافات ثابتة */
.edv-tags{display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin-top:5px}
.edv-app .edv-table td .edv-tags > *{margin:0 !important}
.edv-tags.is-inline{display:inline-flex; flex-wrap:wrap; gap:4px 6px; margin-top:0; vertical-align:middle}
.edv-tags.is-stack{flex-direction:column; align-items:flex-start; margin-top:0}
.cu-name > span{display:flex; flex-direction:column; align-items:flex-start}
.cu-name .edv-tags{flex-direction:row}
.edv-app .edv-table td :is(.bdg-person,.cu-name) > span{align-items:flex-start; min-width:0}
/* 3) النص الثانوي تحت الاسم: حجم ولون واحد */
.edv-app :is(.edv-table,.wp-list-table) td small:not(.edv-badge){font-size:12px; line-height:1.45}
.edv-app :is(.edv-table,.wp-list-table) td :is(.bdg-person,.cu-name) strong{white-space:nowrap}
/* 4) الأرقام والتواريخ لا تنكسر وأرقامها بعرض ثابت */
.edv-app :is(.edv-table,.wp-list-table) :is(td.edv-num,td.is-nw,.edv-num){font-variant-numeric:tabular-nums}
.edv-app :is(.edv-table,.wp-list-table) td.is-nw{white-space:nowrap}
/* 5) الحالة: الشارات في سطر واحد */
.cu-table td.cu-st .cu-cond{margin-inline-start:4px}
/* مكان العهدة (موقع) نص عادي مع دبوس، لا شارة ملونة ثقيلة */
.edv-shell .edv-table .cu-atsite{background:none; padding:0; border-radius:0; color:inherit; font-weight:600}
.edv-shell .edv-table .cu-atsite svg,.edv-shell .edv-table .cu-atsite .ei{color:var(--muted)}
/* 6) الإجراءات دائماً في آخر الجدول وملتصقة بنهايته، والأزرار بمسافة ثابتة */
.edv-app :is(.edv-table,.wp-list-table) :is(th.edv-th-actions,td.edv-row-actions){text-align:end}
.edv-app :is(.edv-table,.wp-list-table) td.edv-row-actions > :is(.edv-abtn,.edv-inline-post,form,a,button){margin-inline:6px 0; vertical-align:middle}
.edv-app :is(.edv-table,.wp-list-table) td.edv-row-actions > :first-child{margin-inline-start:0}
.edv-app[dir=ltr] .edv-users-table .edv-row-actions,.edv-users-table .edv-row-actions{text-align:end}
#py-table td.edv-row-actions{text-align:end}
/* الوردية: النقطة الملونة بجانب الاسم دائماً */
.edv-app .edv-table .hr-shift{display:inline-flex; align-items:flex-start; gap:6px; line-height:1.4}
.edv-app .edv-table .hr-shift::before{flex:none; margin-top:.45em}
/* شارة الواجب (في واجب الآن / واجب قادم) تنبيه سياقي: سطر خاص بها تحت شارات الحالة ولا تُقصّ */
.edv-app :is(.edv-table,.wp-list-table) td .msn-eng{display:flex; flex-wrap:wrap; width:max-content; max-width:100%; height:auto; min-height:22px; padding-block:4px; white-space:normal; line-height:1.3; margin:5px 0 0}
.msn-eng-when{white-space:nowrap; unicode-bidi:isolate; direction:ltr}
/* مسير الرواتب: عمود التحديد كان يأخذ عرض عمود الاسم (160px)، والإجراءات صفّان مرتّبان: الأزرار النصية ثم الأيقونات */
#py-table td.edv-cb{min-width:0; max-width:none; width:36px}
/* جدول المستخدمين داخل الإعدادات (عرضه أضيق): مسافات أقل حتى يظهر كاملاً بلا تمرير */
.edv-app .edv-users-table :is(td,th){padding-inline:8px}
/* ملخص عرض السعر: أرقام العدد والسعر تحت عنوانها (نهاية السطر) في العربية أيضاً */
[dir=rtl] .qt-sum-t td.edv-num,.edv-app[dir=rtl] .qt-sum-t td.edv-num{text-align:left}
/* 5.50 — المشجب والكراج: موقع الموظف ظاهر، وقت استلام كل عهدة، خانة العداد، ملصق العجلة */
.am-emp-info .am-site-chip{align-self:flex-start; display:inline-flex; align-items:center; gap:6px; margin-top:2px; padding:4px 10px 4px 12px; border-radius:999px; background:var(--p-soft-2,#EEF2FF); color:var(--ink); font-size:14px; line-height:1.3}
.am-emp-info .am-site-chip svg{width:16px; height:16px; flex:none; color:var(--p)}
.am-emp-info .am-site-chip b{font-size:14px; font-weight:700}
.am-emp-info .am-site-chip.is-none{background:var(--warn-bg); color:var(--warn)}
.am-emp-info .am-site-chip.is-none svg{color:currentColor}
.am-held li{display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px}
.am-held li span{margin-inline-start:0}
.am-held .am-since{flex-basis:100%; color:var(--muted); font-size:12.5px}
.am-km{display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px}
.am-km label{font-size:13px; font-weight:600; color:var(--muted)}
.am-km label small{font-weight:400}
.am-km input{width:160px; min-height:38px; padding:0 12px; border:1px solid var(--line); border-radius:10px; background:var(--card,#fff); color:var(--ink); font:inherit; font-size:15px}
.am-km input:focus-visible{outline:3px solid var(--a); outline-offset:1px}
.am-kiosk .am-km label{color:inherit; opacity:.85}
.am-kiosk .am-km input{background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.25); color:inherit}

/* ===== 5.51: صفحة «مواقع العمل» — بطاقات منظّمة، شريط تصفية، وتبويبات لصفحة الموقع ===== */
.ws-ico{width:16px; height:16px; flex:none; vertical-align:-3px}
.ws-of{font-size:14px; font-weight:600; color:var(--muted)}
.ws-stat-note{display:block; margin-top:2px; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.ws-kpis a.edv-stat{text-decoration:none; color:inherit; transition:border-color .15s,box-shadow .15s}
.ws-kpis a.edv-stat:hover{border-color:#B1BACE; box-shadow:0 2px 8px rgba(11,22,51,.06)}
.ws-n{display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:99px; background:var(--bg); color:var(--muted); font-size:11.5px; font-weight:700; line-height:1}
.edv-filters a.current .ws-n,.edv-filters button.current .ws-n{background:rgba(255,255,255,.22); color:inherit}
.edv-tabs-admin a.is-current .ws-n{background:var(--p-soft-2,#E5EAFB); color:var(--p)}

/* شريط البحث والتصفية */
.edv-app .ws-bar{display:flex; flex-direction:column; gap:12px; padding:14px 16px; margin-bottom:16px}
.ws-bar-row{display:flex; flex-wrap:wrap; align-items:center; gap:10px}
.ws-bar-row .edv-search{flex:1 1 260px; min-width:0}
.ws-sort{display:inline-flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); white-space:nowrap}
.ws-sort select{min-width:150px}
.ws-filters{flex:1 1 auto}
.ws-views{display:inline-flex; padding:3px; border:1px solid var(--line); border-radius:var(--r-ctl,8px); background:var(--bg); margin-inline-start:auto}
.ws-views a{display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:0 12px; border-radius:6px; color:var(--muted) !important; font-size:13px; font-weight:600; text-decoration:none}
.ws-views a:hover{color:var(--ink) !important}
.ws-views a.is-on{background:#fff; color:var(--p) !important; box-shadow:0 1px 3px rgba(0,0,0,.12)}

/* شبكة البطاقات */
.ws-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px}
.ws-card{display:flex; flex-direction:column; gap:14px; min-width:0; padding:16px; background:#fff; border:1px solid var(--line); border-radius:var(--r-card,12px); transition:border-color .15s,box-shadow .15s}
.ws-card:hover,.ws-card:focus-within{border-color:#B1BACE; box-shadow:0 4px 14px rgba(11,22,51,.07)}
.ws-card.is-short{border-top:3px solid #D08A16}
.ws-card.is-off{opacity:.72}
.ws-card-h{display:flex; align-items:flex-start; gap:12px; min-width:0}
.ws-pin{flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:var(--p-soft-2,#E5EAFB); color:var(--p)}
.ws-pin .ws-ico{width:20px; height:20px}
.ws-card-t{flex:1; min-width:0}
.ws-card-t h2{margin:0; font-size:15.5px; font-weight:700; line-height:1.4; text-wrap:balance; overflow-wrap:anywhere}
.ws-card-t h2 a{color:var(--ink); text-decoration:none}
.ws-card-t h2 a:hover{color:var(--p); text-decoration:underline}
.ws-card-t h2 a::after{content:""; position:absolute; inset:0}
.ws-card{position:relative}
.ws-card-f,.ws-card .edv-badge{position:relative; z-index:1}
.ws-card-t p{margin:2px 0 0; font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.ws-card-h .edv-badge{flex:none}
.ws-staff{display:grid; grid-template-columns:1fr auto; align-items:center; gap:6px 10px; padding:10px 12px; border-radius:10px; background:var(--bg)}
.ws-staff-l{display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--muted); font-weight:600}
.ws-staff b{font-size:17px; font-weight:700; color:var(--ink)}
.ws-staff b small{font-size:12.5px; font-weight:600; color:var(--muted)}
.ws-staff .ws-meter,.ws-staff .ws-staff-hint{grid-column:1 / -1}
.ws-staff-hint{font-size:12px; color:var(--muted)}
.ws-meter{display:block; height:6px; border-radius:99px; background:var(--line-2,#E8EBF2); overflow:hidden}
.ws-meter i{display:block; height:100%; border-radius:inherit; background:var(--ok,#17693F)}
.ws-meter.is-short i{background:#D08A16}
.ws-counts{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:0; padding:0; list-style:none}
.ws-counts li{display:flex; flex-direction:column; align-items:center; gap:2px; padding:8px 4px; border:1px solid var(--line-2,#E8EBF2); border-radius:10px; text-align:center; min-width:0}
.ws-counts .cu-ico{width:18px; height:18px; color:var(--p)}
.ws-counts b{font-size:16px; font-weight:700; color:var(--ink); line-height:1.2}
.ws-counts span{font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%}
.ws-counts li.is-zero .cu-ico,.ws-counts li.is-zero b{color:var(--muted); opacity:.6}
.ws-card-f{display:flex; align-items:center; gap:8px; margin-top:auto}
.ws-card-f .edv-abtn:first-child{flex:1}
.ws-empty{display:flex; flex-direction:column; align-items:center; gap:10px; padding:40px 16px; text-align:center; color:var(--muted)}
.ws-empty .ws-ico{width:32px; height:32px; color:var(--p)}
.ws-empty p{margin:0}
.ws-td-staff .ws-meter{width:80px; margin-top:6px}

/* صفحة الموقع */
.edv-app .ws-hero{display:grid; grid-template-columns:1.4fr repeat(4,minmax(0,1fr)); gap:0; padding:0; margin-bottom:16px; overflow:hidden}
.ws-hero-i{display:flex; flex-direction:column; gap:6px; min-width:0; padding:16px 18px; border-inline-start:1px solid var(--line-2,#E8EBF2)}
.ws-hero-i:first-child{border-inline-start:0}
.ws-hero-i > small{font-size:12px; color:var(--muted); font-weight:600}
.ws-hero-i > b{font-size:15px; font-weight:700; color:var(--ink); overflow-wrap:anywhere}
.ws-hero-staff > b{font-size:24px; line-height:1.1}
.ws-hero-staff > b small{font-size:14px; color:var(--muted); font-weight:600}
.ws-hero-i a{display:inline-flex; align-items:center; gap:6px; color:var(--p); font-weight:600; text-decoration:none}
.ws-hero-i a:hover{text-decoration:underline}
.edv-app .ws-tabs{margin-bottom:12px}
.ws-tabs a{display:inline-flex; align-items:center; gap:8px}
.ws-pane-h{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px}
.ws-pane-h > div:first-child{min-width:0}
.ws-kinds{display:flex; flex-wrap:wrap; gap:6px}
.edv-app .ws-kinds button{display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 13px; border:1px solid var(--line); border-radius:99px; background:#fff; color:var(--muted); font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background-color .15s,border-color .15s,color .15s}
.edv-app .ws-kinds button:hover{border-color:#B1BACE; color:var(--ink)}
.edv-app .ws-kinds button.current{background:var(--p); border-color:var(--p); color:var(--on-p,#fff)}
.ws-kinds .cu-ico{width:15px; height:15px}
.ws-find{flex:0 1 260px}
.ws-pane-f{margin:0; padding:10px 16px; border-top:1px solid var(--line-2,#E8EBF2); font-size:13px}
.ws-pane-f a{color:var(--p); font-weight:600; text-decoration:none}
.ws-pane[hidden],.ws-cust tbody[hidden],#ws-guards tr[hidden]{display:none}
@media (max-width:1100px){.edv-app .ws-hero{grid-template-columns:repeat(3,minmax(0,1fr))} .ws-hero-i:nth-child(4){border-inline-start:0} .ws-hero-i:nth-child(n+4){border-top:1px solid var(--line-2,#E8EBF2)}}
@media (max-width:640px){
  .edv-app .ws-hero{grid-template-columns:1fr 1fr} .ws-hero-staff{grid-column:1 / -1}
  .ws-hero-i{border-inline-start:0 !important; border-top:1px solid var(--line-2,#E8EBF2)} .ws-hero-i:first-child{border-top:0}
  .ws-hero-i:nth-child(odd):not(:first-child){border-inline-start:1px solid var(--line-2,#E8EBF2) !important}
  .ws-views span{display:none} .ws-views{margin-inline-start:0}
  .ws-sort select{min-width:0}
  .ws-grid{grid-template-columns:1fr}
  .ws-kinds,.ws-filters{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; max-width:100%; padding-bottom:2px}
  .ws-kinds::-webkit-scrollbar,.ws-filters::-webkit-scrollbar{display:none}
  .ws-kinds button,.ws-filters a{flex:none; white-space:nowrap}
}
.ws-cust small.edv-num,#ws-guards small.edv-num,.ws-table small.edv-num{white-space:nowrap}
@media print{
  .ws-bar,.ws-tabs,.ws-kinds,.ws-find,.ws-pane-f,.ws-card-f{display:none !important}
  .ws-pane[hidden],.ws-cust tbody[hidden],#ws-guards tr[hidden]{display:block !important}
  .ws-cust tbody[hidden]{display:table-row-group !important} #ws-guards tr[hidden]{display:table-row !important}
  .ws-pane{break-inside:auto; margin-bottom:12px}
}
html.dk .ws-card{background:#20242f; border-color:#303648}
html.dk .ws-card:hover,html.dk .ws-card:focus-within{border-color:#4a5268}
html.dk .ws-staff{background:#191c25}
html.dk .ws-counts li{border-color:#303648}
html.dk .ws-meter{background:#303648}
html.dk .ws-meter i{background:#3FB37A}
html.dk .ws-n{background:#2a2f3c; color:#b6bccb}
html.dk .ws-pin{background:#26304d; color:#AFC0FF}
html.dk .ws-counts .cu-ico,html.dk .ws-hero-i a,html.dk .ws-pane-f a{color:var(--dk-pfg,#AFC0FF)}
html.dk .ws-views{background:#191c25; border-color:#303648}
html.dk .ws-views a.is-on{background:#2a2f3c; color:#e3e5eb !important}
html.dk .ws-hero-i,html.dk .ws-pane-f{border-color:#303648}
html.dk .edv-app .ws-kinds button{background:#1d212b; border-color:#303648; color:#b6bccb}
html.dk .edv-app .ws-kinds button.current{background:var(--p); border-color:var(--p); color:#fff}
html.dk .ws-card-t h2 a{color:#e3e5eb}
@media (prefers-reduced-motion:reduce){.ws-card,.ws-kpis a.edv-stat,.ws-kinds button{transition:none}}
html.dk .ws-meter.is-short i{background:#E0A13A}

/* 5.51: أهداف لمس أكبر على الجوال (تدقيق ui_design_audit — SMALL_TAP) */
.ws-views a{min-height:34px}
@media (pointer:coarse),(max-width:640px){
  .fc-mb{gap:4px}
  .fc-mb button{width:34px; height:32px}
  .pl-tg{min-height:32px; padding:4px 6px}
  .ops-r .msn-eng,.ops-r > a,.msn-vh > a{display:inline-flex; align-items:center; min-height:32px}
  .edv-savedf-add{min-height:32px}
  th.emp-sort > a{display:inline-flex; align-items:center; min-height:32px}
  .edv-toast-x{min-width:36px}
}
/* 5.51: تباين الوضع الداكن — نص أبيض فوق لون فاتح في بطاقة المواقع الحية، وعدّاد جدول التوزيع الأحمر الداكن */
html.dk .lv-ps .lv-pt-h em,html.dk .lv-ps .lv-gd i{color:#10131a}
html.dk .ro-cell.is-short .ro-cnt,html.dk .ro-cell.is-was-short .ro-cnt{color:#F97066}
html.dk .ro-cell.is-ok .ro-cnt{color:#47CD89}

/* 5.51: حقل الموقع وتعليماته لتابلت الكراج أيضاً (كان مخفياً، وعنوانه يظهر بنصّي المشجب والكراج معاً) */
.scr-form:has(input[name=type][value=garage]:checked) .scr-arm{display:block}
.scr-form .scr-arm-v{display:none}
.scr-form:has(input[name=type][value=garage]:checked) .scr-arm-w{display:none}
.scr-form:has(input[name=type][value=garage]:checked) .scr-arm-v{display:revert}
/* 5.51.5: الكراج — الخطوة 2 (QR العجلة): إطار مربع بلا خط الباركود */
.am-side .am-qr .am-frame, .am-qr .am-side .am-frame{aspect-ratio:1/1; width:auto; height:78%}
.am-qr .am-side .am-frame-bar{display:none}
/* 5.51.6: زر قلب الكاميرا (أمامية / خلفية) فوق المعاينة */
.am-flip{position:absolute; top:10px; inset-inline-end:10px; z-index:3; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; border-radius:999px; border:1px solid rgba(255,255,255,.35); background:rgba(10,14,22,.62); color:#fff; font:inherit; font-size:14px; font-weight:600; cursor:pointer; backdrop-filter:blur(6px)}
.am-flip svg{width:22px; height:22px}
.am-flip:hover{background:rgba(10,14,22,.8)}
.am-flip:focus-visible{outline:3px solid var(--edv-a,#2b6cff); outline-offset:2px}
.am-flip:disabled{opacity:.5; cursor:progress}
.am-flip[hidden]{display:none}
/* 5.51.8: تسليم/استرجاع عدة عهد دفعة واحدة */
.cu-find-row{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.cu-find-row input{flex:1 1 240px; min-height:var(--h-ctl,40px)}
.cu-kinds{display:flex; gap:6px; flex-wrap:wrap}
.cu-kinds button{min-height:34px; padding:0 12px; border-radius:999px; border:1px solid var(--edv-line,#d6dbe4); background:transparent; color:inherit; font:inherit; font-size:13px; cursor:pointer}
.cu-kinds button.is-on{background:var(--edv-a,#2b6cff); border-color:var(--edv-a,#2b6cff); color:#fff}
.cu-list{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:8px; max-height:420px; overflow:auto; padding:2px}
.cu-it{display:flex; align-items:center; gap:10px; min-height:52px; padding:8px 10px; border:1px solid var(--edv-line,#d6dbe4); border-radius:10px; cursor:pointer}
.cu-it[hidden]{display:none}
.cu-it.is-on{border-color:var(--edv-a,#2b6cff); background:color-mix(in srgb,var(--edv-a,#2b6cff) 8%,transparent)}
.cu-it input{width:20px; height:20px; flex:none}
.cu-it-ic{flex:none; display:inline-flex}
.cu-it-m{display:flex; flex-direction:column; min-width:0}
.cu-it-m b{font-size:14px} .cu-it-m small{color:var(--edv-muted,#6b7280); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.cu-count{display:flex; gap:6px; align-items:center; margin:0}
.cu-miss{color:var(--edv-bad,#c0392b); margin-inline-start:12px}
.cu-miss[hidden],.cu-empty[hidden]{display:none}

/* 5.53: المشجب — «تسليم السلاح إلى» الموظف أو موقع عمل (مجموعة عبر المشرف) */
.am-to{margin:14px 0 0; padding-top:12px; border-top:1px solid var(--line-2,var(--line))}
.am-seg{display:flex; flex-wrap:wrap; gap:8px; border:0; margin:0; padding:0}
.am-seg legend{width:100%; margin:0 0 8px; padding:0; font-size:13px; font-weight:600; color:var(--muted)}
.am-seg label{position:relative; flex:1 1 140px; cursor:pointer}
.am-seg input{position:absolute; inset:0; opacity:0; margin:0; cursor:pointer}
.am-seg label span{display:flex; align-items:center; justify-content:center; min-height:44px; padding:0 14px; border:1px solid var(--line); border-radius:10px; background:var(--card,#fff); color:var(--ink); font-size:14px; text-align:center; transition:background-color .15s, border-color .15s}
.am-seg label:hover span{border-color:var(--p)}
.am-seg input:checked + span{background:var(--p-soft-2); border-color:var(--p); color:var(--p); font-weight:700}
.am-seg input:focus-visible + span{outline:3px solid var(--a); outline-offset:2px}
.am-to-site{margin-top:10px; display:grid; gap:6px}
.am-to-site[hidden]{display:none}
.am-to-site > label{font-size:13px; font-weight:600; color:var(--muted)}
.am-to-site select{min-height:44px; padding:0 12px; border:1px solid var(--line); border-radius:10px; background:var(--card,#fff); color:var(--ink); font:inherit; font-size:15px}
.am-to-hint{margin:0; font-size:12.5px; color:var(--muted)}
.am-grp{margin-top:6px; padding:10px 12px; border:1px solid color-mix(in srgb,var(--ok,#16a34a) 45%,var(--line)); border-radius:10px; background:color-mix(in srgb,var(--ok,#16a34a) 7%,transparent)}
.am-grp[hidden]{display:none}
.am-grp h3{display:flex; align-items:center; justify-content:space-between; margin:0 0 8px; font-size:14px; color:var(--ink)}
.am-grp h3 b{min-width:28px; height:28px; display:inline-grid; place-items:center; border-radius:99px; background:var(--ok-solid,var(--ok,#16a34a)); color:#fff; font-size:14px}
.am-grp ol{margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:4px; max-height:220px; overflow:auto}
.am-grp li{display:flex; justify-content:space-between; gap:8px; font-size:13.5px; padding:4px 0; border-bottom:1px dashed var(--line)}
.am-grp li:last-child{border-bottom:0}
.am-grp li span{color:var(--muted)}

/* 5.54: الاسم الطويل في جدول الموظفين ينزل لسطر ثانٍ داخل عموده بدل أن يغطي عمود الموقع */
.edv-app .emp-table td .bdg-person strong{white-space:normal; overflow-wrap:anywhere; text-wrap:balance; line-height:1.35}
.edv-app .emp-table td .bdg-person{min-width:0}

/* ================= 5.54: عرض «بطاقات / جدول» لكل القوائم (admin-ux.js) ================= */
.edv-views{display:inline-flex; padding:3px; border:1px solid var(--line); border-radius:var(--r-ctl,8px); background:var(--bg); gap:2px}
.edv-views button{display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:0 12px; border:0; border-radius:6px; background:none; color:var(--muted); font:inherit; font-size:13px; font-weight:600; cursor:pointer}
.edv-views button svg{width:16px; height:16px}
.edv-views button:hover{color:var(--ink)}
.edv-views button.is-on{background:#fff; color:var(--p); box-shadow:0 1px 3px rgba(0,0,0,.12)}
.edv-views button:focus-visible{outline:3px solid var(--a); outline-offset:1px}
.edv-views.is-in-bar{margin-inline-start:auto}
.edv-toolbar .edv-toolbar-meta ~ .edv-views.is-in-bar, .edv-views.is-in-bar + .edv-toolbar-meta{margin-inline-start:0}
.edv-vbar{display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:10px 16px 0}
.edv-vbar .edv-colpick{margin:0}
html.dk .edv-views{background:#191c25; border-color:#303648}
html.dk .edv-views button.is-on{background:#2a2f3c; color:#e3e5eb}
@media (pointer:coarse){ .edv-views button{min-height:40px} }
@media (max-width:560px){ .edv-views button span{display:none} .edv-views button{padding:0 10px} }

/* البطاقات: كل صف بطاقة، وكل خلية سطر «العنوان … القيمة» */
.vc-v{display:contents}
.edv-scroll.is-cards-wrap{overflow:visible}
.edv-app table.is-cards, .edv-app table.is-cards > tbody{display:block; width:100%; min-width:0 !important}
.edv-app table.is-cards > thead{display:none}
.edv-app table.is-cards > tbody{display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr)); gap:12px; padding:14px 16px}
.edv-app table.is-cards > tbody > tr{display:flex; flex-direction:column; position:relative; min-width:0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--card,#fff); box-shadow:0 1px 2px rgba(16,24,40,.05); transition:border-color .15s, box-shadow .15s}
.edv-app table.is-cards > tbody > tr:hover{border-color:color-mix(in srgb,var(--p) 35%,var(--line)); box-shadow:0 4px 14px rgba(16,24,40,.08)}
.edv-app table.is-cards > tbody > tr > td{display:flex; align-items:baseline; justify-content:space-between; gap:12px; width:auto !important; min-width:0 !important; max-width:none !important; height:auto; padding:7px 0 !important; border:0 !important; border-top:1px dashed var(--line-2,var(--line)) !important; background:none !important; box-shadow:none !important; position:static !important; text-align:start !important; white-space:normal !important; font-size:13.5px}
.edv-app table.is-cards > tbody > tr > td::before{content:attr(data-label); flex:0 0 auto; max-width:45%; color:var(--muted); font-size:12.5px; font-weight:600}
.edv-app table.is-cards > tbody > tr > td > .vc-v{display:block; flex:1 1 auto; min-width:0; text-align:end; overflow-wrap:anywhere}
.edv-app table.is-cards > tbody > tr > td.vc-nil{display:none}
.edv-app table.is-cards > tbody > tr > td.vc-main{order:-2; border-top:0 !important; padding:0 0 10px !important; font-size:15px}
.edv-app table.is-cards > tbody > tr > td.vc-main::before{display:none}
.edv-app table.is-cards > tbody > tr > td.vc-main > .vc-v{text-align:start}
.edv-app table.is-cards > tbody > tr > td.vc-main + td{border-top:1px solid var(--line-2,var(--line)) !important}
.edv-app table.is-cards > tbody > tr > td.vc-chk{order:-3; position:absolute !important; top:10px; inset-inline-end:12px; padding:0 !important; border:0 !important; z-index:1}
.edv-app table.is-cards > tbody > tr > td.vc-chk::before{display:none}
.edv-app table.is-cards > tbody > tr:has(> td.vc-chk) > td.vc-main{padding-inline-end:30px !important}
.edv-app table.is-cards > tbody > tr > td.vc-act{order:99; margin-top:auto; padding-top:10px !important; border-top:1px solid var(--line-2,var(--line)) !important; justify-content:flex-end}
.edv-app table.is-cards > tbody > tr > td.vc-act::before{display:none}
.edv-app table.is-cards > tbody > tr > td.vc-act > .vc-v{display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px}
.edv-app table.is-cards > tbody > tr > td .edv-tags{justify-content:flex-end}
.edv-app table.is-cards > tbody > tr > td.vc-main .edv-tags{justify-content:flex-start}
.edv-app table.is-cards > tbody > tr > td .edv-tags.is-stack{align-items:flex-end}
.edv-app table.is-cards > tbody > tr > td :is(.bdg-person,.cu-name) strong{white-space:normal}
.edv-app table.is-cards > tbody > tr > td[colspan]{grid-column:1/-1; justify-content:center; border-top:0 !important}
.edv-app table.is-cards > tbody > tr:has(> td[colspan]){grid-column:1/-1}
.edv-app table.is-cards > tbody > tr > td[colspan]::before{display:none}
.edv-app table.is-cards > tfoot{display:block; padding:0 16px 14px}
.edv-app table.is-cards > tfoot > tr{display:flex; flex-wrap:wrap; gap:8px 16px; justify-content:space-between}
.edv-app table.is-cards > tfoot > tr > *{border:0 !important; padding:0 !important}
html.dk .edv-app table.is-cards > tbody > tr{background:#20242f; border-color:#2e3442}
@media (prefers-reduced-motion:reduce){ .edv-app table.is-cards > tbody > tr{transition:none} }
@media print{ .edv-views,.edv-vbar{display:none !important} }

/* 5.54: العجلات — زر بطاقات/جدول وجدول العجلات */
.fl-views{margin-inline-start:0}
.fl-table{margin:0}
.fl-table td{vertical-align:middle}
.fl-table td small{display:block; color:var(--muted)}
.fl-table .vc-plate{transform:scale(.86); transform-origin:center inline-start; margin:-4px 0}
.fl-table .fl-tr-n{color:var(--ink); text-decoration:none}
.fl-table .fl-tr-n:hover strong{color:var(--p); text-decoration:underline}
.fl-table .fl-tr-w{display:inline-flex; align-items:center; gap:6px; font-weight:600; white-space:nowrap}
.fl-table .fl-tr-w::before{content:""; width:8px; height:8px; border-radius:50%; background:var(--ok,#16a34a)}
.fl-table .fl-tr-w.is-driver::before{background:var(--warn,#d97706)}
.fl-table .fl-tr-w.is-workshop::before{background:var(--p)}
.fl-table .fl-tr-open{color:var(--bad,#b42318) !important}
.fl-table tr.is-due td:first-child{box-shadow:inset -3px 0 0 var(--bad,#b42318)}
[dir=ltr] .fl-table tr.is-due td:first-child{box-shadow:inset 3px 0 0 var(--bad,#b42318)}
.fl-table .vc-acts{display:inline-flex; gap:6px; flex-wrap:nowrap}
.fl-model .edv-scroll, .fl-group .edv-scroll{margin-top:8px; border:1px solid var(--line); border-radius:10px; background:var(--card,#fff)}
html.dk .fl-model .edv-scroll, html.dk .fl-group .edv-scroll{background:#20242f; border-color:#2e3442}
.fl-views svg{width:16px; height:16px; flex:0 0 auto}
.fl-table td.edv-num small{display:inline}
.fl-catgrp > .edv-scroll{margin-top:12px; border:1px solid var(--line); border-radius:10px}
html.dk .fl-catgrp > .edv-scroll{border-color:#2e3442}

/* 5.54: عروض الأسعار — جدول */
.edv-vtog svg{width:16px; height:16px; flex:0 0 auto}
.qt-top .qt-views{margin-inline-start:0}
.qt-table td small{display:block; color:var(--muted)}
.qt-table .qt-tn{color:var(--ink); text-decoration:none}
.qt-table .qt-tn:hover strong{color:var(--p); text-decoration:underline}
.qt-table .qt-kind-tag{position:static; margin:0}
.qt-table .qt-tacts{display:inline-flex; gap:6px; flex-wrap:nowrap; align-items:center}
.qt-table .qt-tacts form{display:inline}
.qt-table .qt-kind-tag,.qt-table .qt-margin{white-space:nowrap}
.qt-table td:nth-child(2){min-width:220px}
.qt-table td small{white-space:normal}

/* 5.54: قوائم الصفوف بعرض «بطاقات» (الواجبات، الشكاوى) */
.msn-bar .edv-views.is-in-bar{margin-inline-start:0}
.msn-cards.is-vgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr)); gap:12px}
.msn-cards.is-vgrid .msn-row{grid-template-columns:58px minmax(0,1fr); gap:10px 12px; align-content:start}
.msn-cards.is-vgrid .msn-row-res, .msn-cards.is-vgrid .msn-row-money{grid-column:1/-1}
.msn-cards.is-vgrid .msn-row-res{grid-template-columns:repeat(4,auto); justify-content:start; padding-top:8px; border-top:1px dashed var(--line)}
.msn-cards.is-vgrid .msn-row-st{grid-column:2; grid-row:auto; justify-self:start}
.msn-cards.is-vgrid .msn-empty{grid-column:1/-1}
.edv-table-panel > .edv-toolbar .edv-views.is-in-bar{margin-inline-start:auto}
.cp-list.is-vgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr)); gap:12px; padding:14px 16px}
.cp-list.is-vgrid .cp-row{flex-wrap:wrap; align-items:flex-start; border-top:1px solid var(--line); border-bottom:1px solid var(--line); border-inline-end:1px solid var(--line); border-radius:12px; background:var(--card,#fff)}
.cp-list.is-vgrid .cp-row-m{flex:1 1 0; min-width:0}
.cp-list.is-vgrid .edv-empty{grid-column:1/-1}
html.dk .cp-list.is-vgrid .cp-row{background:#20242f; border-top-color:#2e3442; border-bottom-color:#2e3442; border-inline-end-color:#2e3442}
.edv-app .qt-table :is(.qt-kind-tag,.qt-badge,.qt-margin){display:inline-flex; align-items:center; gap:4px; height:22px; padding:0 9px; font-size:11.5px; font-weight:600; border-radius:999px; line-height:1}
.edv-app .qt-table .qt-kind-tag svg{width:13px; height:13px}
