/* HR MASTER — الهوية البصرية (v28.2: مقاسات 27.2 كما هي + ألوان «سلّم الكحلي» ومسطّحات من غير ظلال — v26.9: طبقة واحدة)
   ملف واحد بترتيب واحد: المتغيرات → الأساس → الهيكل (هيدر/قائمة/محتوى) → المكوّنات → الشاشات الخاصة → الاتجاه الإنجليزي → الكيبورد.
   كل قاعدة مكتوبة مرة واحدة بقيمتها النهائية؛ مفيش طبقة بتلغي طبقة قبلها. */

/* ============ 1) المتغيرات ============ */
:root{   /* (v28.2) الفاتح هو الأساسي، قائمة كحلي، الكحلي للإجراء والبيانات، خط Cairo — المقاسات زي 27.2 */
  --bg:#f7f8fb; --bg2:#f1f3f8; --card:#ffffff; --line:#e6e9f0; --line2:#eef0f5; --ctl:#cdd3df;
  --txt:#101828; --mut:#5d6b82; --acc:#1c3272; --acc2:#14244f; --acc-soft:#e1e7f4; --t50:#f0f3fa; --t200:#c5d0ea; --t300:#9fb0d8; --amb:#d99a00;
  --ok:#1f8a4c; --warn:#a86500; --err:#c4242a; --info:#2d66c4;
  --rad:14px; --hdrh:64px; --sbw:250px;
  --shadow:none;   /* (v28.2) مفيش ظلال على الكروت الساكنة */
  --font:"Cairo","Segoe UI","Tahoma",Arial,sans-serif;
  --font-nav:"Cairo","Segoe UI",Tahoma,Arial,sans-serif;
  /* القائمة الجانبية — الزيتوني (البديل) */
  --sb:#2f3a1c; --sb2:#46562a; --sb-txt:#f1f4e6; --sb-it:#eef2e0; --sb-arw:#d5ddb8; --sb-on:#c5d68a;
  --btn:#1c3272; --btn2:#14244f;   /* (v28.2) الزرار الأساسي كحلي — أبيض عليه 10:1 */
}
[data-theme="dark"]{
  --bg:#111111; --bg2:#1a1a1a; --card:#161616; --line:#2e2e2e; --line2:#242424; --ctl:#444444;
  --txt:#ffffff; --mut:#b4b4b4; --acc:#8fa8e8; --acc2:#b7c6f0; --acc-soft:#1e2740; --t50:#1a1f2e; --t200:#2b3550; --t300:#3f4c75; --amb:#f0b43c;
  --ok:#4cc47c; --warn:#f0b43c; --err:#f07367; --info:#6ea3ff;
  --btn:#ffffff; --btn2:#dddddd;
}
[data-theme="dark"] .btn{color:#111} [data-theme="dark"] .btn.gh, [data-theme="dark"] .btn.dg, [data-theme="dark"] .btn.warn{color:#fff}
/* القائمة الكحلي (الأساسي) — زرار 🎨 بيبدّل بينها وبين الزيتوني */
html.sb-blue{--sb:#0f1d3d; --sb2:#182a55; --sb-txt:#dbe3f5; --sb-it:#dbe3f5; --sb-arw:#8a98b8; --sb-on:#2bb3af}

/* (v26.74) الخطوط كلها في fonts.css (Cairo + Tajawal) من السيرفر نفسه — من غير خطوط جوجل */

/* ============ 2) الأساس والخطوط ============ */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--bg); color:var(--txt); direction:rtl; font-family:var(--font); font-weight:500; font-size:14.5px; line-height:1.55}
a{color:var(--acc2); text-decoration:none}
a:hover{text-decoration:underline}
b,strong,th,h1,h2,h3{font-weight:700}
h1{font-size:24px; font-weight:800; color:var(--txt); margin:0 0 4px; letter-spacing:-.2px}
h2{font-size:16.5px; color:var(--txt); margin:22px 0 10px}
.sub{color:var(--mut); font-size:13.5px; margin-bottom:16px}
/* (v26.16) رأس الصفحة: العنوان والوصف يمين، والأزرار شمال */
.ph{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px}
.ph h1{margin:0} .ph .sub{margin:2px 0 0}
.ph-acts{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.mut{color:var(--mut)}
.sep{height:1px; background:var(--line); margin:14px 0}
.right{text-align:left}
.nowrap{white-space:nowrap}
.num{font-variant-numeric:tabular-nums; direction:ltr; text-align:right; display:inline-block}
td.num, th.num{display:table-cell}   /* .num على الخانة نفسها لازم تفضل table-cell */
/* أدوات صغيرة بتستبدل أكتر الأنماط المكتوبة جوه الصفحات */
.small{font-size:12px}
.hint{font-size:12.5px; margin-top:8px}
.self-end{align-self:flex-end}

/* ============ 3) الهيكل: الهيدر ============ */
header.top{display:flex; align-items:center; gap:16px; padding:0 22px; height:var(--hdrh); min-height:var(--hdrh);
  background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:60}
.logotile{width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:#0f1d3d; color:#fff; font-size:22px; text-decoration:none; flex:0 0 auto}
.logotile:hover{text-decoration:none}
/* (v26.75) الشعار بعرض الشريط الكحلي (القائمة الجانبية) بالظبط، والبحث بيبدأ عند حافته — 38px = هامش الهيدر 22 + المسافة 16 */
.logotile.has-logo{background:#fff; padding:4px 12px; overflow:hidden; width:calc(var(--sbw) - 38px); min-width:44px; max-width:none; height:56px; border-radius:10px; border:1px solid var(--line)}
.logotile:not(.has-logo){margin-inline-end:calc(var(--sbw) - 38px - 44px)}
.logotile.has-logo img{height:100%; max-width:100%; width:auto; object-fit:contain; display:block}
header.top .controls{display:flex; align-items:center; gap:8px; flex-wrap:nowrap; margin-inline-start:auto}
.pill{display:inline-flex; align-items:center; gap:6px; white-space:nowrap; background:var(--bg2); color:var(--txt);
  border:1px solid transparent; border-radius:10px; padding:8px 12px; font-size:13.5px; font-weight:600; text-decoration:none; transition:background .12s, border-color .12s}
.pill small{color:var(--mut); font-weight:600; font-size:12.5px}
button.pill{font:inherit; font-weight:600; cursor:pointer}
.pill:hover{text-decoration:none; border-color:var(--acc); color:var(--txt)}
.pill.out{color:var(--mut)}
.pill.me .av{width:26px; height:26px; border-radius:50%; background:var(--acc-soft); color:var(--acc2); display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700}
.pill.brand{display:none}   /* (v26.15) الشعار بيكفي — كبسولة «HR MASTER» الطويلة اتشالت من الهيدر */
.thm-d{display:none} .thm-l{display:inline} [data-theme="dark"] .thm-d{display:inline} [data-theme="dark"] .thm-l{display:none}

/* ============ 3) الهيكل: القائمة الجانبية ============ */
.shellwrap{display:flex; align-items:stretch; min-height:calc(100vh - var(--hdrh))}
#sbNav{width:var(--sbw); min-width:var(--sbw); flex:0 0 var(--sbw); background:var(--sb); padding:44px 0 30px;
  position:sticky; top:var(--hdrh); height:calc(100vh - var(--hdrh)); overflow-y:auto; scrollbar-width:thin; order:0; font-family:var(--font-nav)}
#sbNav::-webkit-scrollbar{width:6px}
#sbNav::-webkit-scrollbar-thumb, #sbNav:hover::-webkit-scrollbar-thumb{background:rgba(255,255,255,.22); border-radius:3px}
#sbNav .emo{display:none}
#sbNav .sico{display:block; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round}
/* رأس المجموعة: زرار حقيقي (v26.8) بيتوصل بالكيبورد */
#sbNav .grp{
  width:100%; background:none; border:0; font-family:inherit; text-align:start; line-height:inherit;   /* (v26.8) زرار */
  display:flex; align-items:center; justify-content:flex-start; gap:12px; margin:0; padding:11px 18px;
  font-size:13.5px; font-weight:700; color:var(--sb-txt); cursor:pointer; user-select:none;
  border-top:1px solid rgba(255,255,255,.05); transition:color .12s;
}
#sbNav .grp .gico{display:flex; align-items:center; justify-content:center; width:20px; flex:0 0 auto}
#sbNav .grp .gname{flex:1 1 auto}
#sbNav .grp .side{display:flex; align-items:center; gap:8px}
#sbNav .grp:hover, #sbNav .grp.cur{color:#fff; background:rgba(255,255,255,.06)}
#sbNav .grp.open{color:#fff}
/* سهم المجموعة مرسوم: لتحت وهي مقفولة، لفوق وهي مفتوحة */
#sbNav .grp .arw{font-size:0; width:8px; height:8px; border:solid currentColor; border-width:0 2px 2px 0; color:var(--sb-arw);
  transform:rotate(45deg); margin:-4px 4px 0; opacity:1; flex:0 0 auto; display:inline-block; transition:transform .15s}
#sbNav .grp.open .arw{transform:rotate(-135deg); margin-top:4px}
#sbNav .gwrap{background:var(--sb2); padding:4px 0 6px}
#sbNav .it{display:flex; align-items:center; justify-content:space-between; gap:9px; margin:2px 8px; padding:9px 14px; border-radius:10px;
  font-size:14px; font-weight:600; color:var(--sb-it); text-decoration:none; white-space:nowrap; line-height:1.6;
  transition:background .15s, color .12s}
#sbNav .it .lbl{display:flex; align-items:center; gap:12px}
#sbNav .it .ico{display:flex; align-items:center; justify-content:center; width:20px; flex:0 0 auto}
#sbNav .it .sico{width:15px; height:15px}
#sbNav .it:hover{text-decoration:none; background:rgba(255,255,255,.09); color:#fff}
#sbNav .it.on{background:var(--sb-on); color:#fff; font-weight:700}
/* (v28.8) أقسام القائمة فوق المجموعات: الشؤون الإدارية / الشؤون المالية (حسابات 2) / النظام — (v28.11) شكل مستقل عن المجموعات:
   شريط غامق أطول بخط أكبر، أيقونة بلون التمييز، وخط تمييز على الحافة لما القسم يكون مفتوح، والمجموعات جوّاه على نفس الخط */
#sbNav .sec{width:100%; background:rgba(0,0,0,.28); border:0; border-top:1px solid rgba(255,255,255,.12); border-inline-start:4px solid transparent; font-family:inherit; text-align:start; line-height:inherit;
  display:flex; align-items:center; gap:12px; margin:0; padding:16px 18px 16px 14px; font-size:16px; font-weight:800; color:#fff; cursor:pointer; user-select:none; letter-spacing:.2px; transition:background .12s}
#sbNav .sec:hover{background:rgba(0,0,0,.38)} #sbNav .sec.open{border-inline-start-color:var(--sb-on)}
#sbNav .sec .gico{display:flex; align-items:center; justify-content:center; width:20px; flex:0 0 auto; color:var(--sb-on)} #sbNav .sec .sico{width:19px; height:19px; stroke-width:1.9}
#sbNav .sec .gname{flex:1 1 auto} #sbNav .sec .side{display:flex; align-items:center} #sbNav .sec .arw{font-size:0; width:9px; height:9px; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(45deg); margin:-4px 4px 0; flex:0 0 auto; display:inline-block; transition:transform .15s}
#sbNav .sec.open .arw{transform:rotate(-135deg); margin-top:4px}
#sbNav .swrap{padding-bottom:6px; background:var(--sb2)}   /* (v28.27) من غير الشريط الجانبي — (v28.28) جسم القسم كله باللون الفاتح زي «النظام» */
#sbNav .swrap .grp{padding-inline-start:22px; font-size:13px; color:var(--sb-txt)} #sbNav .swrap .grp.open, #sbNav .swrap .gwrap:not(.flat){background:rgba(255,255,255,.07); border-top-color:transparent}   /* (v28.28) المجموعة المفتوحة أفتح سنة */   /* (v28.27) المجموعة المفتوحة: رأسها وبنودها كتلة واحدة */
#sbNav .swrap .it{margin-inline-start:14px} #sbNav .swrap .gwrap.flat{padding-top:6px} h2.pm-area{font-size:18px; margin:22px 4px 10px; padding-bottom:6px; border-bottom:2px solid var(--acc)}
/* زرار إخفاء/إظهار القائمة */
.sbtog{position:absolute; top:10px; inset-inline-end:10px; width:30px; height:30px; border-radius:50%; border:1px solid var(--line);
  background:var(--card); color:var(--mut); cursor:pointer; font-size:18px; font-weight:900; line-height:1; padding:0; font-family:inherit; z-index:5;
  box-shadow:0 2px 6px rgba(0,0,0,.12); transition:color .12s, border-color .12s}
.sbtog:hover{color:var(--acc2); border-color:var(--acc)}
#sbNav #sbHideBtn{position:absolute; background:var(--sb); color:var(--sb-txt); border-color:rgba(255,255,255,.28); box-shadow:none}
#sbNav #sbHideBtn:hover{color:#fff; border-color:#fff}
#sbShow{display:none; position:fixed; top:calc(var(--hdrh) + 10px); inset-inline-start:10px}
html.sb-hide #sbNav{display:none}
html.sb-hide #sbShow{display:block}
.badge{background:var(--amb); color:#1a1200; border-radius:99px; min-width:0; padding:1px 8px; font-size:11.5px; font-weight:800; line-height:1.6; text-align:center}
.navbadge{background:var(--err); color:#fff; border-radius:20px; padding:1px 7px; font-size:12px; font-weight:700; margin-right:5px; vertical-align:middle}

/* ============ 3) الهيكل: المحتوى وشريط البحث وشريط الحالة ============ */
.maincol{flex:1 1 auto; min-width:0}
main{flex:1 1 auto; min-width:0; padding:18px 22px 30px}
main.bare{max-width:1900px; margin:0 auto}
.searchbar{position:relative; flex:1 1 auto; max-width:560px; min-width:180px; background:var(--bg2); border:1px solid transparent; border-radius:12px; padding:0; margin:0; display:flex; align-items:center}
.searchbar:focus-within{border-color:var(--acc)}
.searchbar .searchbox{flex:1; min-width:0; width:100%; padding:10px 14px; font-size:14px; border:0; border-radius:12px; background:transparent; font-weight:500}
.searchbar .searchbox:focus{outline:none; box-shadow:none; border-color:transparent}
.searchbar .kbdhint{flex:none; margin-inline-end:8px; padding:2px 7px; font:600 11px/1.6 system-ui, sans-serif; color:var(--mut, #888); background:var(--bg, transparent); border:1px solid var(--line, #ccc); border-radius:6px; cursor:pointer; direction:ltr; white-space:nowrap} .searchbar:focus-within .kbdhint{display:none} @media (max-width: 760px){ .searchbar .kbdhint{display:none} }
.pagetop{display:flex; align-items:center; gap:10px; margin-bottom:12px}
.pagetop .backbtn{white-space:nowrap}
#navSug, #hmSug{position:absolute; top:calc(100% + 6px); inset-inline-start:0; width:min(460px, 100%); max-height:340px; overflow-y:auto; z-index:400; display:none;
  background:var(--card); border:1px solid var(--acc2); border-radius:12px; box-shadow:0 14px 40px rgba(0,0,0,.3); padding:6px; margin-top:4px}
#navSug.on, #hmSug.on{display:block}
#navSug .ns-it, #hmSug .ns-it{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:11px 14px; margin-bottom:6px; border-radius:11px;
  cursor:pointer; font-weight:600; font-size:14px; color:var(--txt); background:var(--bg2); border:1px solid var(--line)}
#navSug .ns-it:last-child, #hmSug .ns-it:last-child{margin-bottom:0}
#navSug .ns-it small, #hmSug .ns-it small{color:var(--mut); font-weight:700; font-size:12px}
#navSug .ns-it:hover, #navSug .ns-it.sel, #hmSug .ns-it:hover, #hmSug .ns-it.sel{border-color:var(--acc); color:var(--acc2)}
#navSug .ns-it.alt, #hmSug .ns-it.alt{opacity:.85}
footer{color:var(--mut); font-size:12px; text-align:center; padding:22px}
footer.statusbar{display:flex; align-items:stretch; justify-content:space-between; padding:0; font-size:12px; text-align:start;
  background:var(--card); border-top:1px solid var(--line); color:var(--mut)}
footer.statusbar .sb-info{padding:6px 16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
footer.statusbar .sb-ver{padding:6px 22px; border-inline-start:1px solid var(--line); color:var(--txt); white-space:nowrap; text-decoration:none}
footer.statusbar .sb-ver:hover{background:var(--bg2)}
footer.statusbar .sb-ver b{color:var(--acc2)}
/* الشاشات العريضة: المحتوى هو اللي بيتمرّر (مش الصفحة)، وشريط الحالة ثابت تحته */
@media screen and (min-width:981px){
  body.shell{height:100vh; overflow:hidden; display:flex; flex-direction:column}
  body.shell > header.top{flex:0 0 auto}
  body.shell .shellwrap{flex:1 1 auto; min-height:0}
  body.shell #sbNav{position:relative; top:auto; height:auto; direction:ltr}
  body.shell #sbNav > *{direction:rtl}
  body.shell #sbNav #sbHideBtn{inset-inline-end:auto; inset-inline-start:10px}
  body.shell main{overflow-y:auto; height:100%; outline:0; padding:9px 11px 12px}
  body.shell .maincol{display:flex; flex-direction:column; min-height:0}
  body.shell .maincol > main{flex:1 1 auto; height:auto; min-height:0}
  body.shell .maincol > footer{flex:0 0 auto}
}
/* زرار القائمة (الموبايل بس) */
.sbmenu{display:none; width:40px; height:40px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--txt); cursor:pointer; padding:0; align-items:center; justify-content:center; flex:0 0 auto}
.sbmenu svg{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round}
.sb-backdrop{display:none; position:fixed; inset:0; background:rgba(16,24,40,.45); z-index:79}
/* (v26.19) الشاشة الضيقة: هيدر مضغوط سطرين (الأزرار + البحث)، والقائمة الجانبية درج بيتفتح من ☰ فوق المحتوى */
@media (max-width:980px){
  :root{--hdrh:auto}
  header.top{position:sticky; top:0; padding:8px 12px; height:auto; gap:8px; flex-wrap:wrap}
  .sbmenu{display:inline-flex}
  .logotile.has-logo{height:40px; width:auto; max-width:150px; padding:3px 8px}
  .logotile{width:40px; height:40px}
  .logotile:not(.has-logo){margin-inline-end:0}
  .searchbar{order:3; flex-basis:100%; max-width:none}
  .searchbar .searchbox{padding:9px 12px; font-size:13.5px}
  header.top .controls{margin-inline-start:auto; gap:6px}
  .pill{padding:6px 9px; font-size:12.5px; gap:4px}
  .pill.pal{display:none}
  .pill.me small{display:none}
  .shellwrap{flex-direction:column}
  #sbNav{position:fixed; top:0; bottom:0; inset-inline-start:0; width:min(300px, 86vw); min-width:0; height:100vh; flex:none; z-index:80; border:0; padding:52px 0 30px;
    transform:translateX(100%); transition:transform .22s ease-out; box-shadow:-8px 0 30px rgba(0,0,0,.25); display:block}
  html[dir="ltr"] #sbNav{transform:translateX(-100%)}
  html.sb-open #sbNav{transform:none}
  html.sb-open .sb-backdrop{display:block}
  html.sb-hide #sbNav{display:block}
  #sbNav #sbHideBtn, #sbShow{display:none}
  #sbNav .grp{padding:11px 16px} #sbNav .it{margin:2px 10px}
  main{padding:14px 12px 24px}
  .ph{flex-direction:column; align-items:stretch; gap:10px}
  .ph-acts{justify-content:flex-start}
  .ph-acts .btn{flex:1 1 auto; text-align:center}
  .vtabs{grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px}
  .vtabs .cnt{font-size:22px}
  .ehero{padding:16px; gap:14px}
  .ehero .picbox{width:64px; height:64px; border-radius:16px}
  .ehero h1{font-size:19px} .ehero .eh-ar{font-size:15px}
  .ehero .eh-side{width:100%; max-width:none; align-items:stretch}
  .ehero .eh-acts{justify-content:flex-start}
  footer.statusbar .sb-info{display:none}
}
@media (prefers-reduced-motion: reduce){ #sbNav{transition:none} }

/* ============ 4) المكوّنات: الكروت والشبكة والبلاطات ============ */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--rad); padding:16px; margin-bottom:16px; box-shadow:var(--shadow)}
.grid{display:grid; gap:14px}
.g4{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.g3{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.g2{grid-template-columns:repeat(auto-fit,minmax(340px,1fr))}
/* (v26.16) البلاطة = بطاقة رقم: الرقم كبير بلون الحالة فوق والاسم تحته — نفس شكل بطاقات الحالات في السجل */
.grid:has(> .tile){grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:12px; margin-bottom:14px}
.grid:has(> .tile .t b){grid-template-columns:repeat(auto-fill, minmax(250px, 1fr))}   /* بطاقات فيها عنوان + شرح (التنبيهات) */
.tile{--dot:var(--acc); display:flex; flex-direction:column; gap:2px; min-width:0; padding:12px 16px; background:var(--card); color:var(--txt);
  border:1px solid var(--line); border-radius:var(--rad); box-shadow:var(--shadow); text-decoration:none; transition:border-color .15s, transform .15s}
.tile .n{order:1; font-size:26px; font-weight:800; line-height:1.1; color:var(--dot); font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate; text-align:start; white-space:nowrap}
.tile .t{order:2; font-size:13px; color:var(--mut); font-weight:600; line-height:1.45}
.tile .t br{display:none}
.tile .t b{display:block; color:var(--txt); font-weight:700}
.tile:hover{text-decoration:none}
a.tile:hover{border-color:var(--dot); transform:translateY(-2px)}
.tile.ok{--dot:var(--ok)} .tile.warn{--dot:var(--warn)} .tile.err{--dot:var(--err)} .tile.info{--dot:var(--info)}
.tile.need{--dot:#7c3aed} .tile.dis{--dot:#6d4c41}
.tile.sel{border-color:var(--dot); box-shadow:inset 0 0 0 1px var(--dot)}

/* ============ 4) المكوّنات: الجداول ============ */
.tw{overflow-x:auto; border:1px solid var(--line); border-radius:var(--rad); background:var(--card); box-shadow:var(--shadow)}
table{border-collapse:collapse; width:100%; font-size:14.5px}
th,td{text-align:right; border-bottom:1px solid var(--line); white-space:nowrap}
th{background:var(--card); color:var(--mut); font-weight:700; font-size:12.5px; padding:13px 16px; position:sticky; top:0; z-index:5; border-bottom-color:var(--line)}
th a{color:var(--mut)}
td{padding:11px 16px; font-size:14px}
td a{color:var(--acc2); font-weight:700}
tbody tr:hover{background:var(--t50)}
td.wrap,th.wrap{white-space:normal; min-width:170px} td.wname{white-space:normal; min-width:190px; max-width:380px} a.fcut{display:inline-block; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle} table.tight th,table.tight td{padding-inline:10px} th{white-space:normal; line-height:1.35} td:has(> a[href^="/emp/"]){white-space:normal; min-width:180px}   /* (v31.24) ترتيب الجداول · (v31.56) عناوين الأعمدة وخانة الاسم تلتفّ */
/* عمودا التعديل والاسم ملزوقين أول الصف عشان يفضلوا ظاهرين مع السحب الأفقي */
td.act,th.act{position:sticky; right:0; z-index:6; width:118px; min-width:118px; padding:6px 9px; background:var(--card)}
th.act{z-index:8}
td.nm,th.nm{position:sticky; right:118px; z-index:6; background:var(--card); min-width:210px; white-space:normal; border-left:1px solid var(--line)}
th.nm{z-index:8}
tbody tr:hover td.act, tbody tr:hover td.nm{background:var(--bg2)}
/* (v26.15) خلية الاسم: صورة رمزية بأول حرف + الرقم والجنسية تحت الاسم */
.who{display:inline-flex; align-items:center; gap:10px; color:var(--txt); text-decoration:none}
.who:hover{text-decoration:none} .who:hover b{color:var(--acc2)}
.who .av{width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px; flex:0 0 auto}
.who img.av{object-fit:cover} .who .av[hidden]{display:none}
.who b{display:block; font-weight:700; line-height:1.3} .who small{display:block; color:var(--mut); font-size:12px; font-weight:500}
.av0{background:#dbe3f5; color:#1c3272} .av1{background:#dcfae5; color:#0f5132} .av2{background:#ede4fb; color:#4c2a85} .av3{background:#fff1dc; color:#7a4a00} .av4{background:#e0ecfb; color:#1d4f8f} .av5{background:#fde8e6; color:#7a2420}
td.act input[type=checkbox], th.act input[type=checkbox]{width:16px; height:16px; vertical-align:middle; margin-left:7px; cursor:pointer; accent-color:var(--acc)}
td.act .btn.sm{padding:3px 10px; font-size:12.5px; border-radius:6px}
/* من غير زرار «تعديل»: عمود التحديد ضيّق والاسم لازق جنبه */
td.act.chk, th.act.chk{width:40px; min-width:40px; text-align:center; display:table-cell; vertical-align:middle}   /* (v28.27) .chk العامة flex كانت بتقصّر الخانة فخطها يقع في نص الصف */
.act.chk ~ td.nm, .act.chk ~ th.nm{right:40px}
td.nm.nm0, th.nm.nm0{right:0}
@media (max-width:900px){ td.nm,th.nm{position:static; min-width:150px} }
/* جدول موظفين خطاب نقل الكفالة: خانات أضيق عشان يبان كله من غير تمرير */
#empTbl td, #empTbl th{padding:3px 3px}
#empTbl input, #empTbl select{padding:4px 6px; min-width:58px !important; width:100%}
#empTbl input[name="r_name"]{min-width:150px !important}
#empTbl input[name="r_iqama_profession"]{min-width:100px !important}
#empTbl input[name="r_iqama_no"]{min-width:98px !important}
#empTbl select[name="r_status"]{min-width:140px !important}
#empTbl .btn.sm{padding:4px 8px}
#empTbl th:nth-child(2), #empTbl td:nth-child(2){width:24%}
#empTbl th:nth-child(4), #empTbl td:nth-child(4){width:13%}

/* ============ 4) المكوّنات: التبويبات والشارات ============ */
/* (v26.15) تبويبات الحالات بقت بطاقات أرقام: الرقم كبير فوق والاسم تحته، والمختارة بإطار تركواز */
.vtabs{display:grid; grid-template-columns:repeat(auto-fit, minmax(118px, 1fr)); gap:12px; margin-bottom:16px}
.vtabs a{display:flex; flex-direction:column-reverse; align-items:flex-start; gap:2px; padding:12px 16px; border:1px solid var(--line); border-radius:var(--rad);
  background:var(--card); color:var(--mut); font-weight:600; font-size:13px; box-shadow:var(--shadow); transition:border-color .15s, transform .15s}
.vtabs a:hover{border-color:var(--acc); text-decoration:none; transform:translateY(-2px)}
.vtabs a.on, .vtabs a.btn:not(.gh){border-color:var(--acc); box-shadow:inset 0 0 0 1px var(--acc); color:var(--txt)}   /* (v30.71) التبويب المفتوح (زرار من غير gh) كان نصه غامق على خلفية غامقة في الوضع الليلي */
.vtabs .cnt{background:none; padding:0; border-radius:0; font-size:26px; font-weight:800; color:var(--txt); line-height:1.1; font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate}
.vtabs a.on .cnt{color:var(--acc)}
.vtabs a.pend .cnt{color:var(--warn)} .vtabs a.out .cnt{color:var(--info)} .vtabs a.need .cnt{color:#7c3aed} .vtabs a.dis .cnt{color:#6d4c41}
/* (v26.15) الشارات مليانة بلون الحالة ونص أبيض */
.b{display:inline-block; padding:3px 11px; border-radius:8px; font-size:12.5px; font-weight:700; line-height:1.6; white-space:nowrap; background:#eeeeee; color:#3d3d3d}
.b.work,.b.new,.b.ok{background:#dcfae5; color:#04250e}
.b.rem,.b.gone{background:#ffedea; color:#831c1e}
.b.pend,.b.rep{background:#fffbeb; color:#92400e}
.b.out{background:var(--acc-soft); color:var(--acc2)}
.b.chg{background:#e0ecfb; color:#1d4f8f}
.b.grey{background:var(--bg2); color:var(--mut)}
.b.need{background:#ede4fb; color:#4c2a85}
.b.dis{background:#efebe9; color:#4e342e}
.b.cf{margin-inline-start:5px} .b.kindb{min-width:112px; text-align:center; white-space:nowrap}  /* (v26.60) شارة النوع في جداول السلف/المخالفات: مقاس واحد في نص العمود */
.b.cf.new{background:#e0ecfb; color:#1d4f8f}   /* عقد قوى جديد: أزرق عشان ما يتشابهش مع «على رأس العمل» */
.b.cf.old{background:#fffbeb; color:#92400e}
.exp{color:var(--err); font-weight:700}
.soon{color:var(--warn); font-weight:700}
.chips{display:flex; gap:6px; flex-wrap:wrap; margin:8px 0}
.chip{background:var(--bg2); border:1px solid var(--line); border-radius:20px; padding:4px 12px; font-size:12px; font-weight:700; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px}
.chip a{color:var(--mut)}
.chip.on{border-color:var(--acc2); color:var(--acc2); background:var(--acc-soft)}
.chip input{margin:0; accent-color:var(--acc)}
.langsw{border:1px solid var(--line); border-radius:6px; padding:2px 9px; font-size:12px; font-weight:700; color:var(--acc2); line-height:1.6}
.langsw:hover{border-color:var(--acc); text-decoration:none}

/* ============ 4) المكوّنات: النماذج والأزرار ============ */
label{display:block; font-size:13px; color:var(--mut); margin-bottom:3px}
input,select,textarea{background:var(--card); color:var(--txt); border:1px solid var(--line); border-radius:10px; padding:9px 12px;
  font-family:inherit; font-size:14px; width:100%; transition:border-color .14s, box-shadow .14s}
input:focus,select:focus,textarea:focus{outline:2px solid var(--acc2); outline-offset:1px; border-color:var(--acc2); box-shadow:none}
input[type=checkbox]{width:auto; border-radius:4px; padding:0}
.fld{margin-bottom:11px}
.row{display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end}
.row > *{flex:1; min-width:145px}
.row > .shrink{flex:0 0 auto; min-width:0}
/* زرار واحد بمقاسين (عادي / .sm) وأربع أدوار: أساسي (لون القائمة) · ثانوي .gh · تحذير .warn · خطر .dg */
.btn{display:inline-block; width:auto; border:1px solid transparent; border-radius:12px; padding:10px 16px; font-family:inherit; font-weight:700; font-size:14px;
  cursor:pointer; background:var(--btn); color:#fff; box-shadow:none; transition:transform .1s, background .14s}
.btn:hover{background:var(--btn2); color:#fff; text-decoration:none; transform:none}
.btn:active{transform:translateY(1px); box-shadow:none}
.btn.sm{padding:7px 13px; font-size:13.5px; border-radius:10px; box-shadow:none}
.btn.gh{background:var(--card); color:var(--txt); border:1px solid var(--line); box-shadow:none}
.btn.gh:hover{background:var(--bg2); color:var(--txt); border-color:var(--acc)}
.btn.gh.on{border-color:var(--acc2); color:var(--acc2); background:var(--acc-soft)}
.btn.warn{background:#fff1dc; border-color:#f3cf8a; color:#7a4a00}
.btn.warn:hover{background:#f7dfb5; border-color:#e5b45a; color:#5c3700}
.btn.dg, .btn.dg:hover{background:var(--err); color:#fff}
.btn.need{background:#9b59b6; color:#fff} .btn.need:hover{background:#8e44ad; color:#fff}
.btn.dis{background:#5d4037; color:#fff} .btn.dis:hover{background:#4e342e; color:#fff}
.btn.c-info{background:#2471a3; color:#fff} .btn.c-info:hover{background:#1d5c86; color:#fff}
.btn.c-teal{background:#12857a; color:#fff} .btn.c-teal:hover{background:#0e6c63; color:#fff}
.btn.c-slate{background:#56616d; color:#fff} .btn.c-slate:hover{background:#454e58; color:#fff}
.btn.c-ok{background:#2e8b4f; color:#fff} .btn.c-ok:hover{background:#25713f; color:#fff}

/* ============ 4) المكوّنات: الرسايل والترقيم والأشرطة ============ */
.msg{padding:12px 16px; border-radius:12px; margin-bottom:12px; font-weight:600; border:1px solid}
.msg.ok{background:#dcfae5; border-color:#b7edc9; color:#04250e}
.msg.err{background:#ffedea; border-color:#f5c6c0; color:#831c1e}
.msg.info{background:#e0ecfb; border-color:#bdd3f2; color:#1d4f8f}
.msg.warn{background:#fffbeb; border-color:#fde68a; color:#92400e}
.pg{display:flex; gap:5px; align-items:center; justify-content:center; margin:14px 0; flex-wrap:wrap}
.pg a,.pg span{padding:5px 11px; border:1px solid var(--line); border-radius:9px; background:var(--card); font-size:13px}
.pg a:hover{border-color:var(--acc); text-decoration:none}
.pg .cur{background:var(--acc); color:#fff; border-color:var(--acc); font-weight:700}
.pgbar{display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin:14px 0 4px}
.pgbar .pg{margin:0}
.perbox{display:flex; align-items:center; gap:8px}
.perbox label{margin:0; white-space:nowrap}
.perbox select{width:auto; padding:5px 10px}
.bar{height:8px; background:var(--bg2); border-radius:5px; overflow:hidden; min-width:70px}
.bar i{display:block; height:100%; background:var(--acc); border-radius:5px}
.livedot{display:inline-block; color:var(--ok); font-size:15px; line-height:1; padding-bottom:9px; transition:color .2s, transform .2s}
.livedot.busy{color:var(--acc); animation:pulse .7s infinite}
@keyframes pulse{50%{opacity:.25; transform:scale(1.35)}}
details summary{cursor:pointer; color:var(--acc2); font-weight:600; padding:6px 0}

/* ============ 4) المكوّنات: شريط التحديد الجماعي وشريط التنفيذ ============ */
.selbar{display:flex; align-items:center; gap:14px; flex-wrap:wrap; background:var(--card); border:1px solid var(--line); border-radius:10px;
  padding:9px 14px; margin-bottom:10px; font-size:13px}
.selbar.has{border-color:var(--acc2); background:var(--acc-soft)}
.selbar b{color:var(--acc2); font-size:15px}
/* (v26.22) شريط التحديد: المعلومة يمين والإجراءات شمال، وأنواع النقل في قائمة واحدة */
.selbar.selgrid{display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px}
.selbar.selgrid .selinfo{flex:1 1 auto; display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.selacts{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.selacts .btn{box-shadow:none}
details.menu{position:relative}
details.menu > summary{list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:6px}
details.menu > summary::-webkit-details-marker{display:none}
details.menu[open] > summary{background:var(--sb); color:#fff; border-color:var(--sb)}
.menu-list{position:absolute; top:calc(100% + 6px); inset-inline-start:0; min-width:270px; background:var(--card); border:1px solid var(--line); border-radius:12px;
  box-shadow:0 14px 40px rgba(16,24,40,.18); padding:6px; z-index:60; display:flex; flex-direction:column; gap:2px}
.menu-list .btn.mi{width:100%; text-align:start; background:var(--card); color:var(--txt); border:0; border-radius:8px; padding:9px 12px 9px 12px; display:flex; align-items:center; gap:10px; font-weight:600}
.menu-list .btn.mi::before{content:""; width:9px; height:9px; border-radius:50%; background:var(--acc); flex:0 0 auto}
.menu-list .btn.mi.ok::before{background:var(--ok)} .menu-list .btn.mi.warn::before{background:var(--warn)} .menu-list .btn.mi.dg::before{background:var(--err)}
.menu-list .btn.mi.dis::before{background:#6d4c41} .menu-list .btn.mi.need::before{background:#7c3aed} .menu-list .btn.mi.c-info::before{background:var(--info)} .menu-list .btn.mi.c-teal::before{background:#12857a}
.menu-list .btn.mi:hover{background:var(--bg2); color:var(--txt)}
@media (max-width:700px){ .selacts{width:100%} .selacts .btn, .selacts details.menu{flex:1 1 auto} .selacts details.menu > summary{width:100%; justify-content:center} }
.actbar{position:sticky; bottom:0; z-index:40; display:flex; align-items:center; gap:12px; flex-wrap:wrap; background:var(--card);
  border:1px solid var(--line); border-radius:12px; padding:12px 16px; margin-top:12px; box-shadow:0 -4px 18px rgba(0,0,0,.10)}

/* ============ 4) المكوّنات: كارت الفلاتر ============ */
.fcard{padding:14px 16px}
.fbar{display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap}
.fsearch{position:relative; flex:1 1 380px; min-width:260px}
.fsearch input{padding-right:34px; padding-left:30px; height:42px; font-size:14px}
.fsearch .fico{position:absolute; right:11px; top:50%; transform:translateY(-50%); font-size:14px; opacity:.55; pointer-events:none}
.fsearch .livedot{position:absolute; left:11px; top:50%; transform:translateY(-50%); padding:0; font-size:12px}
.fsearch .livedot.busy{animation:pulse .7s infinite}
.fsel{flex:0 0 auto; width:172px}
.fsel label{font-size:12px; margin-bottom:2px}
.fsel select{height:42px; padding:0 9px}
.fclear{height:42px; display:flex; align-items:center; flex:0 0 auto}
.fmeta{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px solid var(--line)}
.ftog{background:var(--card); color:var(--txt); border:1px solid var(--line); border-radius:10px; padding:7px 13px; font-size:13.5px; font-weight:700;
  cursor:pointer; font-family:inherit; display:flex; align-items:center; gap:7px}
.ftog:hover{border-color:var(--acc); color:var(--acc2)}
.ftog.on{border-color:var(--sb); color:#fff; background:var(--sb)}
.ftog.on .cnt{background:rgba(255,255,255,.22); color:#fff}
.ftog::after{content:'▾'; font-size:10px; opacity:.6}
.ftog.open::after{content:'▴'}
.ftog .cnt{background:var(--acc-soft); color:var(--acc2); border-radius:20px; padding:0 7px; font-size:12px}
.fpanel{display:none; margin-top:12px; padding-top:12px; border-top:1px dashed var(--line)}
.fpanel.open{display:block}
.fgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(172px,1fr)); gap:10px}
.fgrid .fsel{width:auto}
.daterange{padding:12px 14px; margin-bottom:12px}
.daterange .fsel{width:180px}
.quick{display:flex; align-items:center; gap:6px; flex-wrap:wrap}
.quick .ftog{padding:5px 12px}
.quick .ftog::after{content:''}
.impbox{padding:12px 16px; border-right:4px solid var(--info)}

/* ============ 4) المكوّنات: الأيقونات الخطّية بدل الإيموجي (v26.13) ============ */
.hico{width:1.05em; height:1.05em; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;
  display:inline-block; vertical-align:-.18em; margin-inline-end:.4em; flex:0 0 auto}
h1 .hico, h2 .hico, h3 .hico{color:var(--acc2)}
button .hico, .btn .hico, .pill .hico{width:1em; height:1em; vertical-align:-.15em; margin-inline-end:.35em}
.ico-only .hico{margin:0}
/* (v26.59) زرار أيقونة بس (✏ / 🗑): مربع صغير بنفس المقاس في كل الشاشات — الحذف أحمر فاتح وبيتملي أحمر مع الماوس بس */ .btn.ico-only{display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; padding:0; border-radius:9px; vertical-align:middle; box-shadow:none} .btn.ico-only .hico{width:16px; height:16px; vertical-align:0} td > :is(.btn.ico-only, span) + .btn.ico-only, .btn.ico-only + .btn.ico-only{margin-inline-start:4px} .btn.gh.ico-only{color:var(--acc2)} .btn.gh.ico-only:hover{background:var(--acc-soft); border-color:var(--acc2); color:var(--acc2)} .btn.dg.ico-only{background:color-mix(in srgb, var(--err) 9%, var(--card)); color:var(--err); border:1px solid color-mix(in srgb, var(--err) 30%, var(--card))} .btn.dg.ico-only:hover{background:var(--err); border-color:var(--err); color:#fff} .btn.ico-only:disabled{opacity:.4; cursor:not-allowed; background:var(--card); color:var(--mut); border-color:var(--line)}
.hico.dot{fill:currentColor; stroke:none}
.hico.ok{color:var(--ok)} .hico.err{color:var(--err)} .hico.warn{color:var(--warn)} .hico.info{color:var(--info)} .hico.mut{color:var(--mut)}
html[dir="rtl"] .hico{transform:none}

/* ============ 4) المكوّنات: نافذة التأكيد الموحّدة (v26.12) ============ */
.hdlg{border:1px solid var(--line); border-radius:14px; padding:0; background:var(--card); color:var(--txt); width:min(460px, 92vw);
  box-shadow:0 24px 60px rgba(0,0,0,.35); direction:inherit}
.hdlg::backdrop{background:rgba(0,0,0,.55); backdrop-filter:blur(2px)}
.hdlg form{margin:0; padding:20px 22px 18px}
.hdlg h3{margin:0 0 10px; font-size:16px; font-weight:700; display:flex; align-items:center; gap:10px}
.hdlg .hdlg-ic{width:32px; height:32px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex:0 0 auto;
  color:var(--warn); background:color-mix(in srgb, var(--warn) 16%, transparent)}
.hdlg .hdlg-ic svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.hdlg.danger .hdlg-ic{color:var(--err); background:color-mix(in srgb, var(--err) 16%, transparent)}
.hdlg p{margin:0 0 18px; font-size:14px; line-height:1.75; white-space:pre-line; color:var(--txt)}
.hdlg-field{margin:-6px 0 16px}
.hdlg-field input{width:100%}
.hdlg-acts{display:flex; gap:8px}
/* (v26.21) الإشعار المنبثق بدل alert() */
.toasts{position:fixed; bottom:18px; inset-inline-start:50%; transform:translateX(-50%); z-index:10000; display:flex; flex-direction:column; gap:8px; width:min(520px, 92vw); pointer-events:none}
html[dir="rtl"] .toasts{transform:translateX(50%)}
.toast{pointer-events:auto; display:flex; align-items:flex-start; gap:12px; padding:12px 14px; border-radius:12px; background:#101828; color:#fff; font-size:14px; font-weight:600;
  line-height:1.6; box-shadow:0 12px 32px rgba(0,0,0,.3); border-inline-start:4px solid var(--acc); animation:toast-in .18s ease-out; white-space:pre-line}
.toast span{flex:1 1 auto; min-width:0}
.toast.ok{border-inline-start-color:var(--ok)} .toast.err{border-inline-start-color:var(--err)}
.toast.hide{opacity:0; transition:opacity .3s}
.toast-x{all:unset; cursor:pointer; color:#b7c3e0; font-size:14px; padding:0 4px; line-height:1.4} .toast-x:hover{color:#fff}
[data-theme="dark"] .toast{background:#1c2a47}
@keyframes toast-in{from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none}}
.hdlg[open]{animation:hdlg-in .14s ease-out}
@keyframes hdlg-in{from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none}}

/* ============ 4) المكوّنات: الدخول ============ */
.loginwrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px}
.loginbox{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:32px; width:100%; max-width:390px}
.loginbox h1{color:var(--txt); text-align:center; margin-bottom:4px}
.loginbox .sub{text-align:center}

/* ============ 5) الشاشات الخاصة: النماذج والعرض الوظيفي (.gh) ============ */
.gh{--panel:var(--card); --panel2:var(--bg2); --gold:var(--acc2); --gold-soft:var(--acc); --text:var(--txt); --muted:var(--mut); --green:var(--ok); --red:var(--err); --blue:var(--info)}
.gh h3{font-weight:900}
.gh .panel{background:var(--panel); border:1px solid var(--line); border-radius:16px; box-shadow:none; overflow:visible}
.gh .tag{display:inline-block; padding:3px 10px; font-size:12px; font-weight:700; border:1px solid}
.gh .tag.in{color:var(--green); border-color:var(--green)}
.gh .tag.out{color:var(--red); border-color:var(--red)}
.gh .empty{padding:26px; text-align:center; color:var(--text); opacity:.75; font-size:13.5px; font-weight:800}
.gh .del{background:none; border:1.5px solid var(--red); color:var(--red); cursor:pointer; padding:6px 14px; font-size:12.5px; font-weight:800; font-family:inherit; transition:.2s}
.gh .del:hover{background:var(--red); color:#fff}
.gh .emp-input{background:var(--panel2); border:1px solid var(--line); color:var(--text); font-family:inherit; font-weight:700; font-size:13px; padding:6px 8px; width:130px; border-radius:8px}
.gh .emp-input:focus{border-color:var(--gold); outline:none}
.gh .picker{position:relative; display:inline-block}
.gh .picker input{background:var(--panel2); border:1px solid var(--line); color:var(--text); font-family:inherit; font-weight:700; font-size:13px; padding:6px 8px; width:100%; border-radius:8px}
.gh .picker input:focus{border-color:var(--gold); outline:none}
.gh .picker input{background:var(--card)}
.gh .picker .pkclear{position:absolute; left:6px; top:50%; transform:translateY(-50%); color:var(--muted); cursor:pointer; font-size:14px; display:none;
  background:none; border:none; width:auto; padding:0; box-shadow:none}
.gh .picker.has .pkclear{display:block}
/* (v26.46) خالد: «عيني مش جايبة البحث عن موظف» — كل خانة بحث عن موظف في المنصة (class esearch: اختيار موظف، بحث القوائم، الإدخال السريع)
   بتبان من بعيد: إطار ملوّن 2px، أرضية مظلّلة، نص أكبر وأغمق، وعنوانها فوقها غامق */
.gh .picker{min-width:300px; max-width:100%}
input.esearch, .gh .picker input{border:1.5px solid var(--acc); background:var(--t50); font-size:14.5px; font-weight:700; padding-top:9px; padding-bottom:9px; min-height:44px; border-radius:10px}
input.esearch::placeholder, .gh .picker input::placeholder{color:var(--txt); opacity:.62; font-weight:700}
input.esearch:focus, .gh .picker input:focus{outline:none; border-color:var(--acc2); box-shadow:0 0 0 3px var(--acc-soft)}
.gh .picker.has input{background:var(--card); border-color:var(--ok)}
.fsearch:has(> input.esearch) .fico{opacity:.9}
.gh div:has(> .picker) > .rephint, .fsel:has(> input.esearch) > label, .fsearch:has(> input.esearch) > label{color:var(--txt); font-size:13.5px; font-weight:800}
@media (max-width:700px){ .gh .picker{min-width:0; width:100% !important} }
.gh .pklist{position:absolute; z-index:3000; top:100%; right:0; left:0; max-height:260px; overflow:auto; background:var(--panel); border:1px solid var(--gold); display:none;
  box-shadow:0 8px 24px rgba(0,0,0,.45)}
.gh .pklist.on{display:block}
.gh .pkitem{padding:8px 11px; font-size:13px; cursor:pointer; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:8px; text-align:right}
.gh .pkitem:hover, .gh .pkitem.sel{background:var(--panel2); color:var(--gold)}
.gh .pkitem small{color:var(--muted); font-weight:700; font-size:12px}
.gh .pkempty{padding:10px; color:var(--muted); font-size:12.5px}
.gh .ebtn{border:none; font-family:inherit; font-weight:600; font-size:13px; padding:6px 12px; cursor:pointer; margin:0 2px; text-decoration:none; display:inline-block;
  border-radius:7px; box-shadow:none; width:auto}
.gh .ebtn.save{background:var(--acc); border-color:var(--acc); color:#fff}
.gh .ebtn.cancel{background:var(--panel2); color:var(--text); border:1px solid var(--line)}
.gh .ebtn.report{background:var(--panel2); color:var(--blue); border:1px solid var(--blue)}
.gh .repbar{padding:14px 18px; border-bottom:1px solid var(--line); font-size:13px; color:var(--text); display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.gh .repbar label{color:var(--text); font-size:13px; margin-right:10px; cursor:pointer}
.gh .rephint{color:var(--muted); font-size:12px; font-weight:700; margin-right:8px}
.gh .formcard{color:var(--text); font-family:inherit; font-weight:700; font-size:15px; padding:18px 14px; cursor:pointer; border-radius:var(--rad); width:auto;
  display:flex; flex-direction:column; gap:6px; align-items:center; text-align:center; background:var(--card); border:1px solid var(--line);
  box-shadow:var(--shadow); transition:color .18s, box-shadow .16s, transform .12s, border-color .18s}
.gh .formcard small{color:var(--muted); font-weight:600; font-size:12.5px; line-height:1.55}
.gh .formcard .hico{width:30px; height:30px; margin:0 0 2px; color:var(--acc)}
.gh .formcard:hover{color:var(--acc2); border-color:var(--acc); background:var(--t50)}
.gh .formcard:active{transform:translateY(0); box-shadow:var(--shadow)}
/* (v26.39) نجمة المفضلة في ركن الكارت — مفرغة، وذهبية لما الكارت في المفضلة */
.gh .formcard{position:relative}
.gh .formcard .favstar{position:absolute; top:6px; left:8px; font-size:21px; line-height:1; color:#b9b2a0; padding:3px 6px; border-radius:8px; cursor:pointer; transition:color .15s, transform .12s}
.gh .formcard .favstar:hover{color:#d4a017; transform:scale(1.2); background:rgba(212,160,23,.1)}
.gh .formcard.fav .favstar{color:#e0a800}
.gh .ddwrap{position:relative; display:inline-block}
.gh .ddbtn{width:240px; text-align:right; cursor:pointer; font-weight:800}
.gh .ddbtn:hover{border-color:var(--gold); color:var(--gold)}
.gh .ddlist{display:none; position:absolute; top:calc(100% + 4px); right:0; z-index:80; background:var(--panel2); border:1px solid var(--gold); min-width:240px; padding:6px;
  box-shadow:0 8px 24px rgba(0,0,0,.35)}
.gh .ddlist.open{display:block}
.gh .ddlist label{display:flex; align-items:center; gap:10px; padding:9px 12px; cursor:pointer; font-weight:800; font-size:13.5px; user-select:none; color:var(--text); margin:0}
.gh .ddlist label:hover{background:rgba(212,175,55,.1); color:var(--gold)}
.gh .ddlist input{width:auto; accent-color:var(--gold)}
.gh .ddlist .natitem{padding:8px 12px; cursor:pointer; font-size:13.5px; font-weight:700}
.gh .ddlist .natitem:hover{background:rgba(212,175,55,.12); color:var(--gold)}
.gh .ofcur{font-size:12.5px; font-weight:800; color:var(--gold); white-space:nowrap}
.gh .ofgrid{display:grid; grid-template-columns:repeat(3, 1fr); gap:18px 20px; padding:6px 20px 4px}
@media (max-width:1000px){ .gh .ofgrid{grid-template-columns:repeat(2, 1fr)} }
@media (max-width:640px){  .gh .ofgrid{grid-template-columns:1fr} }
.gh .ofgrid > div{background:var(--panel2); border:1px solid var(--line); border-radius:12px; padding:12px 14px; transition:border-color .18s}
.gh .ofgrid > div:focus-within{border-color:var(--gold)}
.gh .ofgrid .emp-input, .gh .ofgrid textarea{font-size:15px; padding:11px 13px; height:auto}
.gh .ofgrid input[type=date]{font-size:15px; padding:10px 13px}
.gh .oflbl{display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:900; color:var(--text); margin-bottom:8px; cursor:pointer; user-select:none}
.gh .oflbl input[type=checkbox]{width:18px; height:18px; accent-color:var(--gold); cursor:pointer; flex:0 0 auto}
.gh .oflbl .rephint{font-weight:700; font-size:12px}
.gh .latin-sub{font-size:12px; font-weight:700; color:var(--muted); direction:ltr; text-align:start; margin-top:2px; letter-spacing:.2px; text-transform:uppercase}
.gh .ofhint{font-size:12px; font-weight:800; margin-top:5px; line-height:1.6; min-height:17px; word-break:break-word}
.gh .ofhint.ok{color:var(--green)} .gh .ofhint.warn{color:#e0a800} .gh .ofhint.bad{color:var(--red)}

/* ============ 5) الشاشات الخاصة: ملف الموظف (الصورة والمستندات والحالة والاكتمال) ============ */
/* (v26.17) رأس الملف: شريط كحلي */
.ehero{display:flex; align-items:center; gap:20px; padding:20px 24px; margin-bottom:16px; border-radius:var(--rad); color:#fff;
  background:var(--t50); border:1px solid var(--line); color:var(--txt)}
.ehero .picbox{width:84px; height:84px; border-radius:20px; border:1px solid var(--line); background:var(--card)}
.ehero .picbox .nopic{font-size:34px; font-weight:800; color:var(--acc)}
.ehero .eh-main{flex:1 1 auto; min-width:0}
.ehero h1{color:var(--txt); margin:0; font-size:24px; line-height:1.3}
.ehero .eh-ar{font-weight:600; font-size:18px; opacity:.85}
.ehero .eh-ar::before{content:"· "}
.ehero .eh-meta{display:flex; gap:14px; flex-wrap:wrap; color:var(--mut); font-size:13.5px; margin-top:4px}
.ehero .eh-meta .eh-who{color:var(--txt); font-weight:800}
.ehero .eh-chips{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:12px}
.ehero .statebox{display:inline-flex; flex-direction:row; align-items:center; gap:10px; margin:0; padding:6px 12px; border-radius:10px; border:0; min-width:0; background:rgba(255,255,255,.14); color:#fff}
.ehero .statebox .sb-main{font-size:15px; font-weight:800; color:#fff; line-height:1.4}
.ehero .statebox .sb-sub{font-size:12.5px; color:rgba(255,255,255,.85)}
.ehero .statebox.work{background:var(--ok)} .ehero .statebox.rem{background:var(--err)} .ehero .statebox.pend{background:#b26a00}
.ehero .statebox.out{background:var(--acc)} .ehero .statebox.need{background:#7c3aed} .ehero .statebox.rep{background:#d97706} .ehero .statebox.dis{background:#6d4c41}
.ehero .eh-side{display:flex; flex-direction:column; align-items:flex-end; gap:8px; max-width:440px; flex:0 1 auto}
.ehero .eh-acts{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end}
.ehero .btn.gh{background:var(--card); border-color:var(--line); color:var(--txt)}
.ehero .btn.gh:hover{background:var(--acc-soft); border-color:var(--acc); color:var(--acc2)}
.ehero .eh-msg{font-size:12.5px; color:var(--mut); min-height:1em}
.ehero .cbar.big{margin:0; padding:10px 14px; max-width:none; width:100%; background:var(--card); border-color:var(--line); color:var(--txt)}
.ehero .cbar .cbar-track{background:var(--t50)}
.ehero .cbar b{background:none; color:var(--txt)}
.ehero .cbar .mut, .ehero .cbar-miss{color:var(--mut)}
.ehero .cbar-miss.ok{color:var(--ok)}
.ehero .cbar.work .cbar-fill{background:#4cc47c} .ehero .cbar.pend .cbar-fill{background:#f0b43c} .ehero .cbar.rem .cbar-fill{background:#f07367}
@media (max-width:900px){ .ehero{flex-wrap:wrap} .ehero .eh-side{align-items:stretch; max-width:none; width:100%} .ehero .eh-acts{justify-content:flex-start} }

.emphead{display:flex; gap:18px; align-items:flex-start; margin-bottom:8px}
.picbox{position:relative; width:112px; height:112px; border-radius:50%; overflow:hidden; border:2px solid var(--line); background:var(--bg2); flex:none}
.picbox .pic{width:100%; height:100%; object-fit:cover; object-position:50% 12%; display:block}   /* (v30.8) صورة مقيم طولية: الخانة المربعة كانت بتقص من فوق (الراس) — بقت بتاخد من أعلى الصورة */
.picbox .nopic{width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:44px; color:var(--mut)}
.picbox .over{position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,.55); color:#fff; font-size:12px; text-align:center; padding:4px 0; cursor:pointer; display:none}
.picbox:hover .over{display:block}
.picbtns{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px}
.uprow{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px}
.uprow select,.uprow input[type=file]{width:auto}
.chk{display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--mut); cursor:pointer; margin:0}
.chk input{width:auto}
.doc-thumb{width:52px; height:36px; object-fit:cover; border:1px solid var(--line); border-radius:4px; cursor:pointer}
.modal{position:fixed; inset:0; background:rgba(0,0,0,.72); z-index:9999; display:none; align-items:center; justify-content:center; padding:16px}
.modal.on{display:flex}
.mbox{background:var(--card); color:var(--txt); border-radius:12px; padding:18px 20px; width:min(860px,96vw); max-height:92vh; overflow:auto; box-shadow:0 14px 40px rgba(0,0,0,.4)}
.gal{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; margin-top:10px}
.gcard{border:2px solid var(--line); border-radius:8px; padding:8px; cursor:pointer; text-align:center; background:var(--bg2)}
.gcard:hover{border-color:var(--acc)}
.gcard img{width:100%; aspect-ratio:1/1; object-fit:cover; display:block; border-radius:6px}
.gcard .src{color:var(--mut); font-size:12px; margin-top:6px; line-height:1.5}
.gcard .pickb{margin-top:7px; width:100%; background:var(--acc); color:#fff; border:none; border-radius:6px; padding:6px; cursor:pointer; font-weight:700}
.croptools{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:10px 0}
.cropwrap{position:relative; display:inline-block; max-width:100%; user-select:none; touch-action:none; direction:ltr}
.cropwrap img{max-width:100%; max-height:62vh; display:block}
.cropsel{position:absolute; border:2px solid var(--acc); box-shadow:0 0 0 9999px rgba(0,0,0,.45); cursor:move; display:none}
.cropsel .ch{position:absolute; width:12px; height:12px; background:var(--acc); border:2px solid #fff; border-radius:50%}
.cropsel .ch[data-h=nw]{left:-7px; top:-7px; cursor:nwse-resize} .cropsel .ch[data-h=n]{left:calc(50% - 6px); top:-7px; cursor:ns-resize}
.cropsel .ch[data-h=ne]{right:-7px; top:-7px; cursor:nesw-resize} .cropsel .ch[data-h=w]{left:-7px; top:calc(50% - 6px); cursor:ew-resize}
.cropsel .ch[data-h=e]{right:-7px; top:calc(50% - 6px); cursor:ew-resize} .cropsel .ch[data-h=sw]{left:-7px; bottom:-7px; cursor:nesw-resize}
.cropsel .ch[data-h=s]{left:calc(50% - 6px); bottom:-7px; cursor:ns-resize} .cropsel .ch[data-h=se]{right:-7px; bottom:-7px; cursor:nwse-resize}
.cropsel .cdim{position:absolute; left:0; bottom:-22px; font-size:12px; color:#fff; background:rgba(0,0,0,.6); padding:1px 6px; border-radius:4px; white-space:nowrap}
/* صندوق حالة الموظف */
.statebox{display:inline-flex; flex-direction:column; gap:4px; margin:8px 0 6px; padding:10px 16px; border-radius:12px; border:2px solid var(--line); background:var(--card); min-width:260px; max-width:100%}
.statebox .sb-main{font-size:22px; font-weight:800; line-height:1.2}
.statebox .sb-sub{font-size:12.5px; color:var(--mut)}
.statebox.work{border-color:#2e7d32; background:#e8f5e9} .statebox.work .sb-main{color:#1b5e20}
.statebox.rem{border-color:#c0392b; background:#fdecea} .statebox.rem .sb-main{color:#a93226}
.statebox.out{border-color:#b7770d; background:#fff4e0} .statebox.out .sb-main{color:#8a5a00}
.statebox.pend{border-color:#c98a00; background:#fff8e1} .statebox.pend .sb-main{color:#8a5a00}
.statebox.rep{border-color:#8e24aa; background:#f3e5f5} .statebox.rep .sb-main{color:#6a1b9a}
.statebox.need{border-color:#1565c0; background:#e3f2fd} .statebox.need .sb-main{color:#0d47a1}
.statebox.dis{border-color:#5d4037; background:#efebe9} .statebox.dis .sb-main{color:#4e342e}
/* شريط اكتمال البيانات */
.cbar{display:flex; align-items:center; gap:6px; min-width:110px; font-variant-numeric:tabular-nums; flex-wrap:wrap}
.cbar .cbar-track{flex:1; min-width:56px; height:7px; background:var(--line); border-radius:4px; overflow:hidden}
.cbar .cbar-fill{height:100%; border-radius:4px}
.cbar b{font-size:12px} .cbar .mut{font-size:12px}
.cbar.work .cbar-fill, .cbar.work b{background:#2e8b4f; color:#2e8b4f} .cbar.work .cbar-fill{color:inherit}
.cbar.pend .cbar-fill{background:#c9a000} .cbar.pend b{color:#a97600}
.cbar.rem .cbar-fill{background:#c0392b} .cbar.rem b{color:#c0392b}
.cbar.big{margin:6px 0 8px; padding:10px 14px; border:1px solid var(--line); border-radius:10px; background:var(--card); max-width:520px}
.cbar.big .cbar-track{height:10px; min-width:160px} .cbar.big b{font-size:16px}
.cbar-miss{flex-basis:100%; font-size:12px; color:var(--mut); line-height:1.6}
.cbar-miss.ok{color:#2e8b4f}
/* كارتا رصيد الإجازات ونهاية الخدمة */
.card.ben .ben-big{font-size:28px; font-weight:800; line-height:1.2; font-variant-numeric:tabular-nums}
.card.ben .ben-big small{font-size:14px; font-weight:600; color:var(--mut)}
.card.ben .ben-val{color:var(--mut); font-size:13px; margin-bottom:8px}
.card.ben .ben-t{width:100%; table-layout:fixed; border-collapse:collapse; font-size:13px; margin-bottom:8px}
.card.ben .ben-t td{padding:4px 0; border-bottom:1px dashed var(--line); overflow-wrap:anywhere}
.card.ben .ben-t td:first-child{width:60%; padding-inline-end:8px}
.card.ben .ben-t td.sub{padding-inline-start:14px; color:var(--mut)}
.card.ben .ben-t td.num{text-align:left; font-variant-numeric:tabular-nums; white-space:nowrap}
.card.ben .ben-t td.svc{direction:rtl; unicode-bidi:isolate}
[lang="en"] .card.ben .ben-t td.svc, html[dir="ltr"] .card.ben .ben-t td.svc{direction:ltr}
.card.ben .btn{margin-top:6px}
/* كروت عقود أجير */
.ajc{display:grid; grid-template-columns:repeat(auto-fill, minmax(255px, 1fr)); gap:8px}
.ajcard{display:block; background:var(--bg2); border:1px solid var(--line); border-inline-start:3px solid var(--ok); border-radius:8px; padding:8px 10px;
  font-size:12.5px; color:inherit; text-decoration:none; transition:.15s}
#ajcBody.hide{display:none}
.ajwrap{position:relative}
.ajdel{position:absolute; top:6px; inset-inline-end:6px; margin:0}
.ajdel button{border:0; background:transparent; color:var(--mut); cursor:pointer; font-size:12px; line-height:1; padding:3px 5px; border-radius:4px; opacity:.55}
.ajdel button:hover{opacity:1; color:#fff; background:var(--err)}
.ajcard:hover{border-color:var(--acc); text-decoration:none; transform:translateY(-1px)}
.ajcard.gone{border-inline-start-color:var(--err); background:rgba(192,57,43,.05)}
.ajcard .nm{font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:3px}
.ajcard .dt{color:var(--mut); display:flex; align-items:center; gap:4px; flex-wrap:wrap}
.ajcard .dt .sep{opacity:.5}
.ajcard .no{color:var(--mut); opacity:.85; font-size:12px; margin-top:2px}

/* ============ 5) الشاشات الخاصة: الرئيسية (v28.0 — سلّم الإقامات) ============ */
.hm{display:flex; flex-direction:column; gap:20px}
.hm-head{display:flex; align-items:flex-end; justify-content:space-between; gap:14px; flex-wrap:wrap}
.hm-head h1{margin:0} .hm-head .sub{margin:4px 0 0; font-size:14.5px} .hm-head .sub b{color:var(--txt)}
.hm-actions{display:flex; gap:8px; flex-wrap:wrap}
.hm-search .fsearch input{width:100%; height:44px} /* (v27.2) بحث الرئيسية في كل الموظفين — اقتراحاته بنفس شكل #navSug */
.hm h2{margin:0; font-size:16px; display:flex; align-items:baseline; gap:8px} .hm h2 small{color:var(--mut); font-weight:500; font-size:12px}
.hm .ch{display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px} .hm .ch small{color:var(--mut); font-size:12px}
.hm .ch a{font-size:13px; font-weight:700; color:var(--acc2)}
.hm .card{margin:0}
/* بطاقات الحالات: 8 بطاقات منفصلة — عنوان رمادي فوق، الرقم كبير بلون الحالة، سطر صغير تحته */
.hm-kpis{display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:12px}   /* (v32.45) 6 بطاقات في صف واحد بدل صف ناقص */ .hm-kpis.n4{grid-template-columns:repeat(4, minmax(0,1fr))} .hm-todo h2{margin:0 0 8px} .hm-more .trk{flex:1; height:8px; background:var(--t50); border-radius:4px; overflow:hidden} .hm-more .trk i{display:block; height:100%; border-radius:4px; background:var(--acc)} .hm-more .trk.in i{background:var(--ok)} .hm-more .trk.out i{background:var(--err)} .hm-more .nm{flex:0 0 76px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .hm-more .row.mv .v{flex:0 0 40px; font-size:14px; text-align:end} .hm-more .row.mv .v.in{color:var(--ok)} .hm-more .row.mv .v.out{color:var(--err)} .hm-more .row{min-height:42px} .hm-more .row.cyc .nm{flex:0 0 250px} .hm-more .row.cyc .nm small{color:var(--mut); font-size:12px; margin-inline-start:6px} .hm-more .row.cyc .v{flex:0 0 96px; font-size:14px; text-align:end} @media (max-width:1200px){ .hm-kpis{grid-template-columns:repeat(3, minmax(0,1fr))} .hm-kpis.n4{grid-template-columns:repeat(2, minmax(0,1fr))} } .hm .legend i.lg-ok{background:var(--ok)} .hm .legend i.lg-err{background:var(--err)}
.kpi{--c:var(--acc2); display:flex; flex-direction:column; gap:2px; padding:14px 18px 12px; background:var(--card); border:1px solid var(--line); border-radius:var(--rad); color:var(--txt); text-decoration:none; transition:border-color .15s, background .15s}
.kpi-t{font-size:13.5px; font-weight:700; color:var(--mut)}
.kpi-n{font-size:30px; font-weight:800; line-height:1.15; color:var(--c); font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate; text-align:start}
.kpi-s{font-size:12px; color:var(--mut)}
a.kpi:hover{border-color:var(--c); background:var(--t50); text-decoration:none}
.kpi.ok{--c:var(--ok)} .kpi.warn{--c:var(--warn)} .kpi.err{--c:var(--err)} .kpi.info{--c:var(--info)} .kpi.need{--c:#7c3aed} .kpi.dis{--c:#6d4c41}
/* (v28.5) الرئيسية شبكة 3 أعمدة متوازنة: كل كروت الصف بنفس الارتفاع، والعناوين كلها جوّه الكروت بنفس الشكل (.ch) */
.hm-grid{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:24px; align-items:stretch}   /* (v28.7) مسافة أوسع بين الكروت */
.hm-grid > *{min-width:0} .hm-grid .span2{grid-column:span 2} .hm-grid .span3{grid-column:1 / -1}
.hm-stack{display:grid; gap:24px; align-content:stretch}
.hm .row > *{min-width:0} .hm .row .v{flex:0 0 auto}   /* «.row > *» بتاعة الفورمات بتفرض 145px */
/* سلّم الإقامات: 12 شهر — أول 3 شهور كحلي كامل، التلاتة بعدهم أفتح، والنص التاني أفتح، والمنتهية بالفعل أحمر فوق الشهر الحالي */
.ladder{display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:16px; align-items:end; height:230px; padding-top:18px; position:relative}
.ladder::before{content:""; position:absolute; inset:18px 0 28px; background:repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--line2) calc(25% - 1px) 25%); pointer-events:none}
.mo{display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:6px; position:relative; color:var(--txt); text-decoration:none}
.mo:hover{text-decoration:none} .mo:hover .bar{filter:brightness(.92)}
.mo .bar{width:58%; min-height:2px;   /* (v28.7) العمود أضيق من خانته — الشهور ما تلتصقش ببعض */ border-radius:3px 3px 0 0; background:var(--t200); position:relative} .mo.q1 .bar{background:var(--acc)} .mo.q2 .bar{background:var(--t300)}
.mo .bar .exp{position:absolute; inset-inline:0; bottom:0; background:var(--err)}
.mo .n{font-size:12px; line-height:14px; font-variant-numeric:tabular-nums; direction:ltr; white-space:nowrap} .mo.q1 .n{font-weight:700} .mo .m{font-size:12px; color:var(--mut); line-height:14px; max-width:100%; overflow:hidden; white-space:nowrap}
.hm .legend{display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--mut); margin-top:12px} .hm .legend i{display:inline-block; width:10px; height:10px; border-radius:2px; vertical-align:-1px; margin-inline-end:6px}
.hm-soon th{position:static; padding:0 0 8px; background:transparent} .hm-soon td{height:52px; padding:6px 0} .hm-soon th.n, .hm-soon td.n{text-align:end}
.hm-soon tr:last-child td{border-bottom:0} .hm-soon tbody tr:hover{background:transparent}
.lnk{height:30px; padding:0 12px; border:1px solid var(--ctl); border-radius:var(--rad2); display:inline-flex; align-items:center; font-size:13px; font-weight:700; color:var(--acc2); background:var(--t50); text-decoration:none; white-space:nowrap}
.lnk:hover{text-decoration:none; border-color:var(--acc)}
/* الطرف: عناوين برّه الكروت وقوائم بخطوط */
.rows{display:grid} .row{display:flex; align-items:center; gap:12px; min-height:46px; border-top:1px solid var(--line2); color:var(--txt); text-decoration:none} .row:first-child{border:0} a.row:hover{text-decoration:none} a.row:hover .v{color:var(--acc2)}
.row .t{flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .row .t small{display:block; color:var(--mut); font-size:12px; line-height:16px}
.row .v{font-size:17px; font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate} .row .v.neg{color:var(--err); font-weight:700}
.pay .big{font-size:28px; line-height:36px; font-weight:700; font-variant-numeric:tabular-nums} .pay .big small{font-size:13px; color:var(--mut); font-weight:500} .pay .big small b{color:var(--txt)}
.pay .pbar{height:8px; border-radius:4px; background:var(--t50); margin:12px 0 6px; overflow:hidden} .pay .pbar i{display:block; height:100%; background:var(--acc); border-radius:4px}
.pay .kv{display:grid; grid-template-columns:1fr auto; gap:0 12px} .pay .kv span,.pay .kv b{height:32px; display:flex; align-items:center; border-top:1px solid var(--line2)} .pay .kv span{color:var(--mut)} .pay .kv b{justify-content:flex-end; font-weight:500; font-variant-numeric:tabular-nums} .pay .kv b.neg{color:var(--err); font-weight:700}
.pay a.kv-row{display:contents} .pay a.kv-row:hover b{color:var(--acc2)}
.rank .trk{flex:1; height:8px; background:var(--t50); border-radius:4px; overflow:hidden} .rank .trk i{display:block; height:100%; background:var(--t200); border-radius:4px} .rank .row:first-child .trk i{background:var(--acc)}
.rank .nm{flex:0 0 150px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .rank .row{min-height:40px}
.rank .tot{display:flex; gap:8px; margin-bottom:8px} .rank .tot a, .rank .tot span{flex:1; display:flex; flex-direction:column; gap:1px; padding:8px 12px; border-radius:var(--rad2); background:var(--t50); color:var(--txt); text-decoration:none} .rank .tot b{font-size:18px; font-weight:700} .rank .tot small{font-size:12px; color:var(--mut)}
.rank .split{display:flex; height:6px; border-radius:3px; overflow:hidden; margin-bottom:10px; background:var(--t50)} .rank .split i{display:block; height:100%} .rank .split .f{background:var(--acc)} .rank .split .s{background:var(--ok)}
@media (max-width:1100px){ .hm-grid{grid-template-columns:1fr} .hm-grid .span2{grid-column:auto} }
@media (max-width:760px){ .hm-kpis{grid-template-columns:repeat(2, minmax(0,1fr))} .ladder{height:160px; gap:4px} .mo .n{display:none} .mo:nth-child(even) .m{visibility:hidden} .hm-soon .cl{display:none} .hm-head{flex-direction:column; align-items:stretch} }
/* ============ 6) الاتجاه الإنجليزي (LTR) ============ */
html[dir="ltr"] body{direction:ltr}
html[dir="ltr"] body.shell #sbNav{direction:rtl}
html[dir="ltr"] body.shell #sbNav > *{direction:ltr}
html[dir="ltr"] .sbtog{transform:scaleX(-1)}
html[dir="ltr"] th,html[dir="ltr"] td{text-align:left}
html[dir="ltr"] td.act,html[dir="ltr"] th.act{right:auto; left:0}
html[dir="ltr"] td.nm,html[dir="ltr"] th.nm{right:auto; left:118px; border-left:0; border-right:1px solid var(--line)}
html[dir="ltr"] .act.chk ~ td.nm, html[dir="ltr"] .act.chk ~ th.nm{right:auto; left:40px}
html[dir="ltr"] td.nm.nm0, html[dir="ltr"] th.nm.nm0{right:auto; left:0}
@media (max-width:900px){ html[dir="ltr"] td.nm,html[dir="ltr"] th.nm{position:static} }
html[dir="ltr"] .impbox{border-right:0; border-left:4px solid var(--info)}
html[dir="ltr"] .fsearch .fico{right:auto; left:11px}
html[dir="ltr"] .fsearch .livedot{left:auto; right:11px}
html[dir="ltr"] .fsearch input{padding-right:30px; padding-left:34px}
html[dir="ltr"] .navbadge{margin-right:0; margin-left:5px}
html[dir="ltr"] td.act input[type=checkbox], html[dir="ltr"] th.act input[type=checkbox]{margin-left:0; margin-right:7px}
html[dir="ltr"] .num{direction:ltr; text-align:left}

/* ============ 7) الكيبورد وقارئ الشاشة (v26.8) ============ */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, [tabindex]:focus-visible, summary:focus-visible{outline:2px solid var(--acc2); outline-offset:2px; border-radius:6px}
input:focus-visible, select:focus-visible, textarea:focus-visible{outline:2px solid var(--acc2); outline-offset:1px}
.skip{position:absolute; top:-200px; inset-inline-start:12px; z-index:999; background:var(--card); color:var(--txt); border:1px solid var(--acc2); border-radius:8px; padding:8px 14px; font-weight:700}
.skip:focus{top:12px}
@media (prefers-reduced-motion: reduce){ *, *::before, *::after{animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important} }

/* ============ 8) (v26.25) فئات صغيرة بدل style="…" المتكررة جوه الصفحات — !important عشان تساوي الأسلوب المكتوب اللي حلّت محله ============ */
.mt0{margin-top:0!important} .m0{margin:0!important} .mt6{margin-top:6px!important} .mt8{margin-top:8px!important} .mt10{margin-top:10px!important} .mt12{margin-top:12px!important} .mt14{margin-top:14px!important} .mtn6{margin-top:-6px!important} .mb10{margin-bottom:10px!important} .mb14{margin-bottom:14px!important}
.fx1{flex:1!important} .fx2{flex:2!important} .inl{display:inline!important} .tc{text-align:center!important} .wfull{width:100%!important} .p22{padding:22px!important} .w110{width:110px!important} .w120{width:120px!important} .w130{width:130px!important} .w150{width:150px!important} .w160{width:160px!important} .w170{width:170px!important}
.gold{color:var(--gold)!important} .red{color:var(--err)!important} .t125{font-size:12.5px!important} .t13{font-size:13px!important} .t14{font-size:14px!important} .t16{font-size:16px!important} .light13{font-weight:400!important; font-size:13px!important}
.hrow{display:flex; gap:6px; align-items:center} .frow{display:flex!important; gap:10px!important; flex-wrap:wrap!important; align-items:flex-end!important} .mt4{margin-top:4px!important} .clrCards .clrGo{flex:0 0 100%; margin-top:4px}   /* (v26.26) زرار «ابدأ التصفية» على سطر لوحده في الكارتين */ .ajK{display:inline-flex; gap:5px; align-items:center; font-weight:600} .ajKs{display:flex; gap:14px; flex-wrap:wrap; align-items:center; min-height:40px}
