/* ---------------------------------------------------------------------------
   Drawer سجل التعديلات ("تم التعديل") - جزء من مبادرة التحديث الكبرى (V25).
   الألوان كلها متغيرات التصميم الموحّدة للنظام (--nile-*, --surface, --border, ...)
   من static/style.css - ملتزمين بالتوجيه الصريح بعدم استخدام ألوان عشوائية خارج نظام
   العلامة الموحّد.
--------------------------------------------------------------------------- */
.audit-edited-badge{
  display:inline-flex; align-items:center; gap:4px;
  font-size:0.6875rem; font-weight:800; padding:2px 9px; border-radius:20px;
  background:var(--surface-alt); color:var(--text-dim);
  border:1px solid var(--border-soft); cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.audit-edited-badge:hover{
  background:rgba(46,168,78,.12); color:var(--num-ok); border-color:rgba(46,168,78,.35);
}
.audit-edited-badge i{ font-size:0.6875rem; }

.audit-drawer-overlay{
  position:fixed; inset:0; background:transparent; z-index:9990;
  opacity:0; pointer-events:none; transition:opacity .18s;
}
.audit-drawer-overlay.open{ opacity:1; pointer-events:auto; }

.audit-drawer{
  position:fixed; top:0; bottom:0; inset-inline-end:0; width:min(420px,92vw);
  background:var(--surface); box-shadow:var(--shadow-dropdown);
  z-index:9991; transform:translateX(100%); transition:transform .22s ease;
  display:flex; flex-direction:column;
}
[dir="rtl"] .audit-drawer, html[dir="rtl"] .audit-drawer{ transform:translateX(-100%); }
.audit-drawer.open{ transform:translateX(0); }

.audit-drawer-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:14px 16px; border-bottom:1px solid var(--border-soft);
}
.audit-drawer-head h3{ font-size:13.5px; font-weight:900; margin:0; color:var(--text); }
.audit-drawer-close{
  border:none; background:var(--surface-alt); color:var(--text-dim); width:28px; height:28px;
  border-radius:50%; cursor:pointer; font-size:14px; line-height:1;
}
.audit-drawer-body{ flex:1; overflow-y:auto; padding:12px 16px; }
.audit-drawer-empty{ color:var(--text-faint); font-size:12px; text-align:center; padding:30px 10px; }

.audit-event{
  border:1px solid var(--border-soft); border-radius:var(--radius-md); padding:10px 12px;
  margin-bottom:10px; background:var(--surface-alt);
}
.audit-event-head{ display:flex; justify-content:space-between; gap:8px; align-items:baseline; margin-bottom:6px; }
.audit-event-action{ font-size:11.5px; font-weight:900; color:var(--num-ok); }
.audit-event-meta{ font-size:0.6875rem; color:var(--text-faint); font-weight:700; }
.audit-event-summary{ font-size:11.5px; color:var(--text); margin-bottom:6px; }
.audit-diff-table{ width:100%; border-collapse:collapse; font-size:0.6875rem; }
.audit-diff-table td{ padding:3px 4px; border-bottom:1px dashed var(--border-soft); vertical-align:top; }
.audit-diff-field{ font-weight:800; color:var(--text-dim); white-space:nowrap; }
.audit-diff-old{ color:var(--num-bad); text-decoration:line-through; opacity:.85; }
.audit-diff-new{ color:var(--num-ok); font-weight:800; }
.audit-drawer-loading{ text-align:center; padding:30px 10px; color:var(--text-faint); font-size:12px; }
