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

/* ============ 1) المتغيرات ============ */
:root{   /* (v26.15) الاتجاه «ب» أجرأ وأوضح: الفاتح هو الأساسي، قائمة كحلي، تركواز للإجراء، خط Cairo */
  --bg:#eef2f7; --bg2:#f6f8fb; --card:#ffffff; --line:#dde4ee;
  --txt:#101828; --mut:#5d6b82; --acc:#0e8f8c; --acc2:#0b7572; --acc-soft:#e3f3f2; --amb:#d99a00;
  --ok:#1f8a4c; --warn:#a86500; --err:#c8362b; --info:#2d66c4;
  --rad:14px; --hdrh:64px; --sbw:250px;
  --in-bg:#f3faf9; --in-line:#a8d2ce; --in-mark:#0e8f8c; --lbl:#344054;   /* (v3.3/v3.6) الخانات «لمسة الهوية»: فيروزي فاتح بإطار متساوي (من غير الخط التقيل تحت) */
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.06);
  --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:#0b7572; --btn2:#095f5c;   /* (v26.20) أبيض على #0b7572 = 5.5:1 — var(--acc) كان 3.9:1 */
}
[data-theme="dark"]{
  --bg:#0b1220; --bg2:#141d31; --card:#111a2e; --line:#243150;
  --txt:#e8eef8; --mut:#98a6c0; --acc:#2bb3af; --acc2:#5ccfc9; --acc-soft:#123a3b; --amb:#f0b43c;
  --ok:#4cc47c; --warn:#f0b43c; --err:#f07367; --info:#6ea3ff;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  --in-bg:#13263a; --in-line:#2f5d6e; --in-mark:#2bb3af; --lbl:#c3cfe2;
}
/* القائمة الكحلي (الأساسي) — زرار 🎨 بيبدّل بينها وبين الزيتوني */
html.sb-blue{--sb:#0f1d3d; --sb2:#182a55; --sb-txt:#dbe3f5; --sb-it:#dbe3f5; --sb-arw:#8a98b8; --sb-on:#2bb3af; --btn:#0b7572; --btn2:#095f5c}

@font-face{font-family:"Cairo"; font-style:normal; font-weight:400 800; font-display:block;
  src:url(fonts/cairo-arabic.woff2) format("woff2");
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"Cairo"; font-style:normal; font-weight:400 800; font-display:block;
  src:url(fonts/cairo-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ============ 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 */
div.num{display:block}   /* (v2.0) الجوال تحت اسم العميل في سطر لوحده — كان بيلزق جنب الاسم */
/* أدوات صغيرة بتستبدل أكتر الأنماط المكتوبة جوه الصفحات */
.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}
/* (v6.35) زي ماستر: الشعار بعرض القائمة الجانبية بالظبط والبحث بيبدأ بعد خطها — 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.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}
/* (v6.14) بند بقائمة فرعية (الحسابات → كشف الحساب / التكاليف والأرباح) */
#sbNav .it.has-sub .arw{font-size:0; width:8px; height:8px; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(45deg); margin-top:-4px; opacity:.8; transition:transform .15s}
#sbNav .it.has-sub.open .arw{transform:rotate(-135deg); margin-top:4px}
#sbNav .subw{margin:0 8px 4px} #sbNav .it.sub{margin:1px 0; padding:7px 14px 7px 14px; padding-inline-start:38px; font-size:13px; opacity:.92} #sbNav .it.sub .ico{width:12px; font-size:11px}
#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(--acc); color:#fff; font-weight:700}
/* زرار إخفاء/إظهار القائمة */
.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}
.pagetop{display:flex; align-items:center; gap:10px; margin-bottom:12px}
.pagetop .backbtn{white-space:nowrap}
#navSug{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{display:block}
#navSug .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{margin-bottom:0}
#navSug .ns-it small{color:var(--mut); font-weight:700; font-size:12px}
#navSug .ns-it:hover, #navSug .ns-it.sel{border-color:var(--acc); color:var(--acc2)}
#navSug .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; max-width:150px; padding:3px 8px}
  .logotile{width:40px; height:40px}
  .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(--bg2); color:var(--mut); font-weight:700; font-size:12.5px; padding:13px 16px; position:sticky; top:0; z-index:5}
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(--bg2)}
td.wrap,th.wrap{white-space:normal; min-width:170px}
/* عمودا التعديل والاسم ملزوقين أول الصف عشان يفضلوا ظاهرين مع السحب الأفقي */
td.act,th.act{position:sticky; right:0; z-index:6; width:118px; min-width:118px; padding:6px 9px; background:var(--card)}
th.act{background:var(--bg2); 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{background:var(--bg2); 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; color:#fff; font-size:14px; flex:0 0 auto}
.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:#1c3272} .av1{background:#0e8f8c} .av2{background:#7c3aed} .av3{background:#d97706} .av4{background:#2d66c4} .av5{background:#b4342b}
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}
.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{border-color:var(--acc); box-shadow:inset 0 0 0 1px var(--acc); color:var(--txt)}
.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; color:#fff; line-height:1.6}
.b.work,.b.new{background:var(--ok)}
.b.rem,.b.gone{background:var(--err)}
.b.pend,.b.rep{background:var(--warn)}
.b.out{background:var(--acc)}
.b.chg{background:var(--info)}
.b.grey{background:var(--bg2); color:var(--mut)}
.b.need{background:#7c3aed}
.b.dis{background:#6d4c41}
.b.cf{margin-inline-start:5px}
.b.cf.new{background:var(--info)}   /* عقد قوى جديد: أزرق عشان ما يتشابهش مع «على رأس العمل» */
.b.cf.old{background:var(--warn)}
.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(--lbl); font-weight:700; margin-bottom:3px}
input,select,textarea{background:var(--in-bg); color:var(--txt); border:1.5px solid var(--in-line); border-radius:10px; padding:9px 12px;
  font-family:inherit; font-size:14px; width:100%; transition:border-color .14s, box-shadow .14s, background .14s}
input:focus,select:focus,textarea:focus{background:var(--card); outline:none; border-color:var(--acc2); box-shadow:0 0 0 3px var(--acc-soft)}
input[type=checkbox],input[type=radio],input[type=file],input[type=color],input[type=range]{background:transparent; border:0; border-bottom:0}
.ph-acts input, .ph-acts select{background:var(--card)}   /* (v3.5) خانة على خلفية الصفحة الرمادي = بيضا عشان تبان */
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:0 6px 16px rgba(16,24,40,.12); transition:transform .1s, box-shadow .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:var(--warn); color:#1a1206}
.btn.warn:hover{background:#e89a45; color:#1a1206}
.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-right:4px solid}
.msg.ok{background:rgba(46,158,107,.12); border-color:var(--ok); color:var(--ok)}
.msg.err{background:rgba(192,57,43,.12); border-color:var(--err); color:var(--err)}
.msg.info{background:rgba(59,130,196,.12); border-color:var(--info); color:var(--info)}
.msg.warn{background:rgba(232,154,69,.14); border-color:var(--warn); color:var(--warn)}
.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}
.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-top:4px solid var(--acc); 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:0 2px 12px rgba(0,0,0,.08); 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}
.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); transform:translateY(-2px); box-shadow:0 8px 22px rgba(16,24,40,.12)}
.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:linear-gradient(135deg, #0f1d3d, #182a55); box-shadow:var(--shadow)}
.ehero .picbox{width:84px; height:84px; border-radius:20px; border:2px solid rgba(255,255,255,.25); background:rgba(255,255,255,.1)}
.ehero .picbox .nopic{font-size:34px; font-weight:800; color:#fff}
.ehero .eh-main{flex:1 1 auto; min-width:0}
.ehero h1{color:#fff; 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:#b7c3e0; font-size:13.5px; margin-top:4px}
.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:rgba(255,255,255,.12); border-color:rgba(255,255,255,.25); color:#fff}
.ehero .btn.gh:hover{background:rgba(255,255,255,.2); border-color:#fff; color:#fff}
.ehero .eh-msg{font-size:12.5px; color:#b7c3e0; min-height:1em}
.ehero .cbar.big{margin:0; padding:10px 14px; max-width:none; width:100%; background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.18); color:#fff}
.ehero .cbar .cbar-track{background:rgba(255,255,255,.22)}
.ehero .cbar b{background:none; color:#fff}
.ehero .cbar .mut, .ehero .cbar-miss{color:#c9d3ea}
.ehero .cbar-miss.ok{color:#9fe3c4}
.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; display:block}
.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) الشاشات الخاصة: الرئيسية (v26.10) ============ */
.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; font-size:24px}
.hm-head .sub{margin:4px 0 0}
.hm-actions{display:flex; gap:8px; flex-wrap:wrap}
.hm h2{margin:0 0 10px; font-size:15px; display:flex; align-items:baseline; gap:10px}
.hm h2 small{color:var(--mut); font-weight:500; font-size:12.5px}
.hm-ic{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; display:block}
/* بطاقات الحالات */
.hm-kpis{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px}
.kpi{--c:var(--acc2); display:flex; flex-direction:column; gap:4px; padding:16px 18px 14px; background:var(--card); border:1px solid var(--line); border-radius:12px;
  color:var(--txt); text-decoration:none; box-shadow:var(--shadow); transition:border-color .15s, transform .15s, box-shadow .15s}
.kpi-ic{width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; margin-bottom:8px;
  color:var(--c); background:color-mix(in srgb, var(--c) 14%, transparent)}
.kpi-n{font-size:30px; font-weight:800; line-height:1.1; letter-spacing:-.5px; color:var(--txt); font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate; text-align:start}
.kpi-t{font-size:13.5px; font-weight:600; color:var(--txt)}
.kpi-s{font-size:12px; color:var(--mut)}
a.kpi:hover{border-color:var(--c); transform:translateY(-2px); box-shadow:0 8px 22px rgba(0,0,0,.14); 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:#9b59b6} .kpi.dis{--c:#8d6e63}
/* تنبيهات الوثائق */
.hm-alerts{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px}
.al{--c:var(--info); display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:12px; color:var(--txt); text-decoration:none;
  border:1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background:color-mix(in srgb, var(--c) 9%, var(--card)); transition:transform .15s, box-shadow .15s}
.al:hover{transform:translateY(-2px); box-shadow:0 8px 22px rgba(0,0,0,.14); text-decoration:none}
.al-n{font-size:26px; font-weight:800; color:var(--c); min-width:64px; text-align:center; font-variant-numeric:tabular-nums; direction:ltr; line-height:1.1}
.al-t{flex:1 1 auto; font-size:13.5px; font-weight:600; line-height:1.4; min-width:0}
.al-s{display:block; font-size:12px; color:var(--mut); font-weight:500}
.al-go{color:var(--mut); opacity:.7; flex:0 0 auto}
html[dir="rtl"] .al-go .hm-ic{transform:scaleX(-1)}
.al.err{--c:var(--err)} .al.warn{--c:var(--warn)} .al.info{--c:var(--info)}
/* شريط الرواتب */
.hm-pay{display:flex; align-items:center; gap:24px; flex-wrap:wrap; padding:16px 20px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow)}
.hm-pay .pay-main{display:flex; flex-direction:column; gap:2px; padding-inline-end:24px; border-inline-end:1px solid var(--line); color:var(--txt); text-decoration:none}
.hm-pay .pay-main:hover .pay-n{color:var(--acc2)}
.hm-pay .pay-n{font-size:28px; font-weight:800; color:var(--ok); font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate; line-height:1.1; transition:color .15s}
.hm-pay .pay-t{font-size:12.5px; color:var(--mut)}
.hm-pay .pay-t b{color:var(--txt)}
.hm-pay .pay-stat{display:flex; flex-direction:column; gap:2px; min-width:150px; color:var(--txt); text-decoration:none}
.hm-pay .pay-stat b{font-size:20px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.2}
.hm-pay .pay-stat span{font-size:12.5px; color:var(--mut)}
.hm-pay .pay-stat.warn b{color:var(--warn)}
a.pay-stat:hover b{color:var(--acc2)}
/* التوزيعات */
.hm-dist{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px}
.dist{padding:16px 18px; margin:0}
.dist-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px}
.dist-row{display:grid; grid-template-columns:minmax(0,1fr) 96px 56px; align-items:center; gap:10px; font-size:13.5px}
.dist-row .nm{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dist-row .bar{height:7px}
.dist-row .num{text-align:end; font-weight:700; font-variant-numeric:tabular-nums; display:block}
.dist-tot{display:flex; gap:8px; margin-bottom:10px}
.dist-tot a, .dist-tot span{flex:1; display:flex; flex-direction:column; gap:1px; padding:8px 12px; border-radius:10px; background:var(--bg2); color:var(--txt); text-decoration:none}
.dist-tot a:hover{background:var(--acc-soft)}
.dist-tot b{font-size:18px; font-weight:800; font-variant-numeric:tabular-nums}
.dist-tot small{font-size:12px; color:var(--mut)}
.dist-split{display:flex; height:7px; border-radius:5px; overflow:hidden; margin-bottom:14px; background:var(--bg2)}
.dist-split i{display:block; height:100%} .dist-split .f{background:var(--acc)} .dist-split .s{background:var(--ok)}
@media (max-width:1250px){ .hm-kpis, .hm-alerts{grid-template-columns:repeat(2, minmax(0,1fr))} .hm-dist{grid-template-columns:1fr} }
@media (max-width:600px){ .hm-kpis, .hm-alerts{grid-template-columns:1fr} .hm-pay .pay-main{border:0; padding:0} }

/* ============ 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"] .msg{border-right:0; border-left:4px solid}
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}
.clrCards .clrGo{flex:0 0 100%; margin-top:4px}   /* (v26.26) زرار «ابدأ التصفية» على سطر لوحده في الكارتين */

/* ============ 9) نيافة ============ */
/* (v6.36) الشعار زي ما خالد رافعه: خلفية بيضا من غير دايرة ولا أسود — الصورة بتملا الكرت وتحافظ على نسبتها */
.logotile.has-logo.nyf{background:#fff; border-color:var(--line); padding:3px 10px}
.logotile.has-logo.nyf img{border-radius:0; height:100%; width:100%; object-fit:contain}
.hm-kpis{grid-template-columns:repeat(4, minmax(0,1fr))}

/* ============ (v3.8) أزرار الإجراءات في قوائم العروض والعقود — مقاس واحد وكل زرار بلونه ============ */
/* (v2.0) أزرار كل عرض في القائمة */
/* (v3.2) الجدول على قد الشاشة من غير شريط تمرير: خلايا أضيق، والأزرار بتنزل سطر تاني لو المساحة ضاقت */
#qTbl th, #qTbl td, #kTbl th, #kTbl td{padding:10px 7px}
#qTbl td.wr, #kTbl td.wr{white-space:normal}
.qacts{display:flex; gap:5px; align-items:center; flex-wrap:wrap}
.qacts form{margin:0; display:inline-flex}
/* (v2.7) كل الأزرار مقاس واحد، وكل زرار بلونه */
.qacts .btn{--c:#5d6b82; display:inline-flex; align-items:center; justify-content:center; gap:4px; width:72px; height:30px; box-sizing:border-box; padding:0 4px; margin:0; line-height:1; font-size:12px; font-weight:800; border-radius:9px;
  color:var(--c); border:1px solid color-mix(in srgb, var(--c) 35%, transparent); background:color-mix(in srgb, var(--c) 10%, var(--card))}
.qacts .btn:hover{background:color-mix(in srgb, var(--c) 18%, var(--card)); border-color:var(--c)}
.qacts .qview{--c:#1d63c6} .qacts .qedit{--c:#7c3aed} .qacts .qno{--c:#d9480f} .qacts .qopen{--c:#5d6b82} .qacts .qk{--c:#0b7572}
.qacts .qok{--c:#0f8a4b; background:#0f8a4b; color:#fff; border-color:#0f8a4b} .qacts .qok:hover{background:#0c733e}
.qacts .qok:disabled{opacity:.45; cursor:default} .qacts .qok:disabled:hover{background:#0f8a4b}
.qacts form.stf{display:inline-flex; gap:4px; align-items:center} .qacts .stsel{height:30px; padding:0 6px; font-size:12px; font-weight:700; border-radius:8px; width:108px; min-width:0; flex:0 0 auto}   /* (v6.23) قائمة الحالة + حفظ */
.qacts .qdel{--c:#c62828; background:#c62828; color:#fff; border-color:#c62828} .qacts .qdel:hover{background:#a51f1f}
/* (v4.3) خانة الحالة: الحالة واسم اللي عمل العرض/العقد في النص تحت بعض */
#qTbl .stc, #kTbl .stc{text-align:center}
/* (v5.1) «بواسطة» عمود لوحده في آخر الشمال، وكل خانات السطر في النص رأسياً */
#uTbl tr.newrc td{background:color-mix(in srgb, var(--acc) 10%, var(--card))}   /* (v6.25) المستخدم المختار */
#kTbl tr.addrow td{background:var(--bg2); border-top:0; padding-top:6px; padding-bottom:6px}   /* (v6.4) سطر الملحق تحت عقده */
#qTbl td, #kTbl td{vertical-align:middle}
#qTbl .byc, #kTbl .byc{text-align:center; white-space:nowrap}
#qTbl .byu, #kTbl .byu{font-size:12px; color:var(--mut); white-space:nowrap}
/* (v4.6) الشروط زي جدول إكسل (static/termsgrid.js) */
.tgstack > div{margin-bottom:16px} .tgstack > div:last-child{margin-bottom:0}   /* (v4.7) القائمتين تحت بعض بعرض الصفحة */
.tgstack label{font-size:14px; font-weight:800; color:var(--lbl); margin-bottom:6px}
.tg .tgl{border:1.5px solid var(--in-line); border-radius:10px; overflow:hidden; background:var(--card)}
.tg .tgr{display:flex; align-items:stretch; border-bottom:1px solid var(--line)}
.tg .tgr:last-child{border-bottom:0}
.tg .tgn{flex:0 0 38px; display:flex; align-items:center; justify-content:center; background:var(--bg2); color:var(--acc2); font-weight:800; font-size:13px; border-inline-end:1px solid var(--line)}
.tg .tgr textarea{box-sizing:border-box; flex:1; min-width:0; border:0 !important; border-radius:0; box-shadow:none !important; background:var(--in-bg); resize:none; overflow:hidden; min-height:40px; padding:9px 12px; line-height:1.6; font-size:14px}
.tg .tgr textarea:focus{background:var(--card); outline:none}
.tg .tgr textarea[readonly]{background:var(--card)}
.tg .tgx{flex:0 0 36px; border:0; border-inline-start:1px solid var(--line); background:var(--card); color:var(--err); cursor:pointer; font-size:13px}
.tg .tgadd{margin-top:8px}
.tg .tgph{margin-top:6px; font-size:12px; color:var(--mut)}

/* (v4.8) خانة التاريخ نفس ارتفاع باقي الخانات (كانت أطول 2px فبتكسر الخط المستقيم) */
input[type=date]{padding-top:8px; padding-bottom:8px}

/* (v5.3) رمز الريال السعودي (U+20C1) قدام كل مبلغ — من خط صغير (نفس خط ماستر) */
@font-face{font-family:"SARsym"; src:url(fonts/sar.woff) format("woff"); font-weight:100 900; font-display:block; unicode-range:U+20C1}
.sar{direction:ltr; unicode-bidi:isolate; white-space:nowrap}
.sar::before{content:"\20C1"; font-family:"SARsym"; font-weight:700; font-size:1.12em; margin-right:.22em; vertical-align:-.04em; line-height:0}   /* line-height:0 = الرمز ما يعلّيش السطر */

/* (v6.41) تنبيه «نفس اليوم»: صندوق التحذير في شاشة العقد/العرض + الصفوف الوردي في القوائم */
.sdbox{margin-top:12px; border:2px solid #d6336c; background:#ffe3ee; color:#7a1238; border-radius:12px; padding:10px 14px; animation:sdpulse 1s ease-in-out 3}
.sdbox .sdt{font-weight:800; font-size:15px; margin-bottom:4px}
.sdbox .sdn{display:inline-block; min-width:24px; text-align:center; background:#d6336c; color:#fff; border-radius:999px; padding:0 8px; font-size:13px}
.sdbox .sdr{padding:3px 0; font-size:14px} .sdbox .sdr a{color:#a61e4d; text-decoration:underline}
.sdbox .sdb{background:#fff; border:1px solid #f3a6c0; border-radius:6px; padding:0 6px; font-size:12px; font-weight:700}
.sdbox .sdu{font-size:12.5px; opacity:.85}
@keyframes sdpulse{50%{box-shadow:0 0 0 6px rgba(214,51,108,.28)}}
tr.sameday > td{background:#ffe3ee}
tr.sameday > td:first-child{box-shadow:inset 4px 0 0 #d6336c}
[dir="rtl"] tr.sameday > td:first-child{box-shadow:inset -4px 0 0 #d6336c}
.sdbadge{display:inline-block; margin-top:3px; border:1px solid #d6336c; background:#fff; color:#a61e4d; border-radius:999px; padding:0 9px; font:inherit; font-size:12px; font-weight:800; cursor:pointer; white-space:nowrap}
.sdbadge:hover{background:#d6336c; color:#fff}
.sdleg{margin:0 0 8px; padding:6px 12px; border-radius:10px; background:#ffe3ee; border:1px solid #f3a6c0; color:#7a1238; font-size:13px; font-weight:700}
[data-theme="dark"] .sdbox, [data-theme="dark"] .sdleg{background:#4a1f33; color:#ffd0e0; border-color:#d6336c}
[data-theme="dark"] .sdbox .sdr a{color:#ffb3cd} [data-theme="dark"] .sdbox .sdb{background:#2b1220; color:#ffd0e0}
[data-theme="dark"] tr.sameday > td{background:#3d1a2b}
[data-theme="dark"] .sdbadge{background:#2b1220; color:#ffb3cd}
@media print{ tr.sameday > td{background:none; box-shadow:none} .sdbadge, .sdleg, .sdbox{display:none} }
