/* «المحذوفات» وحذف الملفات: صفحة المحذوفات وسجل الحذف، نافذة الحذف (تحذير المبالغ)، وضع التحديد بقائمة الطلاب.
   أسماء خاصة بالوحدة (dlrow، del-، sel-) فوق رموز نظام التصميم في app.css — بلا إعادة تعريف لأصناف الأساس. */

/* ---------- صفوف المحذوفات ---------- */
.dlrow{--cols:minmax(210px,1.5fr) minmax(150px,1.1fr) minmax(220px,1.6fr) 118px auto;display:grid;grid-template-columns:var(--cols);gap:14px;align-items:center;min-height:62px;padding:10px 18px;border-bottom:1px solid var(--line)}
.dlrow:hover{background:var(--surface-2)}
.dlrow>span{min-width:0}
.dlrow b{font-weight:500;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dlrow small{display:block;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dlrow.thead{position:sticky;top:calc(var(--top-h) + env(safe-area-inset-top,0px));z-index:3;min-height:38px;padding-block:0;font-size:12px;color:var(--muted);font-weight:500;background:var(--surface-2)}
.dlrow.thead:hover{background:var(--surface-2)}
.t-why{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.t-why .t-reason{max-width:100%;color:var(--ink-2)}
.dlrow .t-money{display:flex;align-items:flex-start;gap:5px;white-space:normal;color:var(--warn);line-height:1.6}
.t-money svg.i{width:13px;height:13px;flex:none;margin-top:3px}
.t-acts{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.dlrow.tomb .t-acts{display:none}
.dlrow.tomb{--cols:minmax(210px,1.5fr) minmax(150px,1.1fr) minmax(240px,1.8fr) 118px}
.trash .arch-bar .seg svg.i{width:15px;height:15px}
/* تبويب «الاستيرادات»: على الهاتف زر الحذف بسطر تحت اسم الملف (بلا ضغط النص) */
.trash .imp-hist{padding-top:4px}
.trash .imp-hist li:first-child{border-top:0}
@media (max-width:760px){
  .trash .imp-hist{padding-inline:16px}
  .trash .imp-hist li{flex-wrap:wrap;row-gap:4px}
  .trash .imp-hist li>div{flex:1 1 calc(100% - 44px)}
  .trash .imp-hist [data-act=del-batch]{margin-inline-start:40px}
}
/* الهاتف: التبويبات الثلاثة (المحذوفة، سجل الحذف، الاستيرادات) بسطر واحد بلا قص */
@media (max-width:420px){ .trash .arch-bar .seg svg.i{display:none} .trash .arch-bar .seg button{padding:0 6px} }

@media (max-width:1100px){
  .dlrow{--cols:minmax(170px,1.4fr) minmax(110px,1fr) minmax(180px,1.5fr) 104px auto;gap:12px;padding-inline:16px}
  .dlrow.tomb{--cols:minmax(170px,1.4fr) minmax(110px,1fr) minmax(200px,1.6fr) 104px}
}
@media (max-width:760px){
  .dlrow.thead{display:none}
  .dlrow,.dlrow.tomb{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name when" "uni uni" "why why" "acts acts";row-gap:8px;padding:14px 16px}
  .dlrow .c-name{grid-area:name}
  .dlrow .a-when{grid-area:when;align-self:start;font-size:12.5px}
  .dlrow .c-uni{grid-area:uni;padding-inline-start:38px}
  .dlrow .t-why{grid-area:why;padding-inline-start:38px}
  .dlrow .t-acts{grid-area:acts;justify-content:flex-start;padding-inline-start:38px}
  .dlrow .t-why .t-reason{white-space:normal}
}

/* ---------- نافذة الحذف: المبالغ وقائمة الأسماء ---------- */
.del-names{max-height:170px;overflow:auto;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.del-names small{color:var(--muted);font-size:11.5px}
.del-names li>span{min-width:0;display:flex;flex-direction:column}
.del-names .bt-last{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.del-money{display:grid;gap:8px;padding:10px 12px;border-radius:12px;background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn) 28%,transparent);font-size:13px}
.del-money .dm-h{display:flex;align-items:flex-start;gap:8px;color:var(--ink)}
.del-money .dm-h b{font-weight:500;line-height:1.7}
.del-money .dm-h svg.i{width:16px;height:16px;color:var(--warn);flex:none;margin-top:3px}
.dm-tot{display:flex;flex-wrap:wrap;gap:8px}
.dm-tot>span{flex:1 1 120px;display:grid;gap:2px;background:var(--surface);border-radius:9px;padding:6px 10px;font-variant-numeric:tabular-nums}
.dm-tot b{font-weight:600;font-size:14px}
.dm-tot small{font-size:11px;color:var(--muted);font-weight:400}
.dm-list{list-style:none;margin:0;padding:0;display:grid;gap:4px;font-size:12.5px}
.dm-list li{display:grid;gap:1px;padding:5px 8px;border-radius:8px;background:color-mix(in srgb,var(--surface) 70%,transparent)}
.dm-list li>span:first-child{min-width:0}
.dm-list small{white-space:nowrap}
.dm-list .dm-a{color:var(--ink-2);font-size:12px;font-variant-numeric:tabular-nums}
.dm-list li.more{color:var(--muted);background:none}
/* عنوان نافذة حذف طلاب استيراد: التاريخ واسم الموظف ما ينكسرون */
.mh .nowrap{white-space:nowrap}
.bt-sum{display:flex;flex-wrap:wrap;gap:8px}
.bt-sum>span{flex:1 1 0;min-width:110px;display:grid;gap:2px;padding:8px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2)}
.bt-sum b{font:600 20px var(--f-disp);font-variant-numeric:tabular-nums}
.bt-sum small{font-size:12px;color:var(--muted)}
.bt-sum .w b{color:var(--warn)}

/* ---------- وضع التحديد بقائمة الطلاب ---------- */
.selbar{position:sticky;top:calc(var(--top-h) + env(safe-area-inset-top,0px));z-index:4;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;background:var(--brand-soft);border-bottom:1px solid var(--line)}
.selbar .sb-n{font-size:13px;color:var(--ink-2);padding-inline:4px}
.selbar .sb-n b{font:600 14px var(--f-disp);color:var(--brand-text)}
.selbar .sb-sp{flex:1}
.list.selecting .srow.shead{top:calc(var(--top-h) + env(safe-area-inset-top,0px) + 48px)}
.sel-ck{width:22px;height:22px;flex:none;border-radius:7px;border:1.5px solid var(--line-3);background:var(--surface);display:grid;place-items:center;cursor:pointer;padding:0;color:transparent}
.sel-ck svg.i{width:13px;height:13px}
.sel-ck.on{background:var(--brand);border-color:var(--brand);color:#fff}
.sel-ck:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.srow.picked{background:color-mix(in srgb,var(--brand-soft) 70%,transparent)}
.list.selecting .srow{cursor:pointer}
.btn.on-sel{background:var(--brand-soft);color:var(--brand-text);border-color:color-mix(in srgb,var(--brand) 30%,var(--line-2))}
.selbar .sb-tools{display:contents}
@media (max-width:760px){
  /* سطر أول: العدد + «حذف المحدد»؛ سطر ثانٍ صغير: تحديد الكل / مسح التحديد */
  .selbar{padding:6px 10px;row-gap:2px}
  .selbar .sb-n{order:0}
  .selbar .sb-sp{order:1}
  .selbar .btn.danger{order:2;flex:none}
  .selbar .sb-tools{order:3;display:flex;flex:1 1 100%;gap:4px;margin-inline-start:-8px}
  .selbar .sb-tools .btn{min-height:30px;padding-block:2px}
  .list.selecting .srow.shead{top:auto}
  /* بوضع التحديد: الخانة تأخذ مكان رقم الهاتف/الجواز بالسطر الفرعي (يبقى الكود) */
  .list.selecting .srow .nm-sub .ph{display:none}
}

/* نشاط الحذف بآخر الحركات: الحذف أحمر، الاسترجاع أخضر، منح الصلاحية وسحبها عادي */
.feed li.fdel .fx{color:var(--bad)}
.feed li.frest .fx{color:var(--ok)}
/* الحذف النهائي: تنبيه واضح فوق خانة الكود */
.pg-warn{display:flex;align-items:flex-start;gap:8px;padding:9px 12px;border-radius:11px;background:var(--bad-soft);color:var(--bad);font-size:13px;line-height:1.7}
.pg-warn svg.i{width:16px;height:16px;flex:none;margin-top:3px}
.pg-warn b{font-weight:600}

/* الإعدادات ← الموظفون: «صلاحيات خاصة» (تنزيل النسخة، حذف الملفات) بعمود واحد */
.xperms{display:grid;gap:6px}
.xperms .xp{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--ink-2);cursor:pointer;white-space:nowrap}
.xperms .xp input.sw{margin:0}
