/* ==========================================================================
   notifications.css — Enterprise Notification System Styles
   AR: أنماط نظام الإشعارات المتكامل — Toast، مركز الإشعارات، التنبيهات الحرجة.
   EN: Full notification system styles — Toast, Center, Critical Alerts, Activity.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Toast Notifications — إشعارات منبثقة
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 80px;
  inset-inline-start: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg, 12px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  cursor: default;
  animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: translateX(-120%);
  opacity: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

[dir="rtl"] .toast-item {
  transform: translateX(120%);
}

.toast-item.removing {
  animation: toastSlideOut 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(-120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

[dir="rtl"] .toast-item:not(.removing) {
  animation-name: toastSlideInRtl;
}

@keyframes toastSlideInRtl {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-120%); opacity: 0; }
}

[dir="rtl"] .toast-item.removing {
  animation-name: toastSlideOutRtl;
}

@keyframes toastSlideOutRtl {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* Toast Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  height: 3px;
  border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
  animation: toastProgress linear forwards;
  transform-origin: left;
}

[dir="rtl"] .toast-progress {
  transform-origin: right;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Toast Type Colors */
.toast-item.info { border-inline-start: 4px solid var(--color-primary, #0F4C81); }
.toast-item.info .toast-icon { color: var(--color-primary, #0F4C81); }
.toast-item.info .toast-progress { background: var(--color-primary, #0F4C81); }

.toast-item.success { border-inline-start: 4px solid var(--color-success, #2A9D8F); }
.toast-item.success .toast-icon { color: var(--color-success, #2A9D8F); }
.toast-item.success .toast-progress { background: var(--color-success, #2A9D8F); }

.toast-item.warning { border-inline-start: 4px solid var(--color-warning, #E9C46A); }
.toast-item.warning .toast-icon { color: #b8860b; }
.toast-item.warning .toast-progress { background: var(--color-warning, #E9C46A); }

.toast-item.error { border-inline-start: 4px solid var(--color-danger, #E76F51); }
.toast-item.error .toast-icon { color: var(--color-danger, #E76F51); }
.toast-item.error .toast-progress { background: var(--color-danger, #E76F51); }

.toast-item.critical {
  border-inline-start: 4px solid #dc2626;
  background: rgba(254, 242, 242, 0.98);
  animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, criticalPulse 2s ease-in-out infinite 0.5s;
}

[dir="rtl"] .toast-item.critical:not(.removing) {
  animation: toastSlideInRtl 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, criticalPulse 2s ease-in-out infinite 0.5s;
}

.toast-item.critical .toast-icon { color: #dc2626; }
.toast-item.critical .toast-progress { background: #dc2626; }

@keyframes criticalPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(220, 38, 38, 0.15); }
}

/* Toast Parts */
.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-top: 1px;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-primary, #1a1a2e);
  line-height: 1.4;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
  line-height: 1.5;
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #94a3b8);
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-primary, #1a1a2e);
}

/* --------------------------------------------------------------------------
   Notification Bell — جرس الإشعارات
   -------------------------------------------------------------------------- */
.notification-bell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #64748b);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.notification-bell:hover {
  background: rgba(15, 76, 129, 0.08);
  color: var(--color-primary, #0F4C81);
}

.notification-bell svg {
  width: 22px;
  height: 22px;
}

.notification-bell.has-unread {
  animation: bellSwing 0.6s ease-in-out;
}

@keyframes bellSwing {
  0% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(6deg); }
  60% { transform: rotate(-3deg); }
  75% { transform: rotate(1deg); }
  100% { transform: rotate(0); }
}

/* Badge */
.notification-badge {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--color-surface, #fff);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notification-badge.bounce {
  animation: badgeBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgeBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.notification-badge:empty,
.notification-badge[data-count="0"] {
  display: none;
}

/* --------------------------------------------------------------------------
   Notification Center Dropdown — مركز الإشعارات
   -------------------------------------------------------------------------- */
.notification-center {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 400px;
  max-height: 520px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-xl, 16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: ncSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top right;
}

[dir="rtl"] .notification-center {
  transform-origin: top left;
}

.notification-center.open {
  display: flex;
}

@keyframes ncSlideDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* NC Header */
.nc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nc-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary, #1a1a2e);
  margin: 0;
}

.nc-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nc-action-btn {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  color: var(--color-primary, #0F4C81);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nc-action-btn:hover {
  background: var(--color-primary, #0F4C81);
  color: #fff;
}

.nc-settings-btn {
  padding: 5px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.nc-settings-btn:hover {
  color: var(--color-primary, #0F4C81);
}

/* NC Filters */
.nc-filters {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}

.nc-filter-chip {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  color: var(--color-text-secondary, #64748b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.nc-filter-chip:hover {
  border-color: var(--color-primary, #0F4C81);
  color: var(--color-primary, #0F4C81);
}

.nc-filter-chip.active {
  background: var(--color-primary, #0F4C81);
  color: #fff;
  border-color: var(--color-primary, #0F4C81);
}

/* NC List */
.nc-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.nc-list::-webkit-scrollbar { width: 4px; }
.nc-list::-webkit-scrollbar-track { background: transparent; }
.nc-list::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 2px; }

.nc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--color-text-secondary, #94a3b8);
  text-align: center;
}

.nc-empty svg { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 12px; }
.nc-empty p { font-size: 13px; margin: 0; }

/* NC Item */
.nc-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.nc-item:hover { background: rgba(15, 76, 129, 0.03); }
.nc-item.unread { background: rgba(15, 76, 129, 0.04); }

.nc-item.unread::after {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: 6px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary, #0F4C81);
}

.nc-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nc-item-icon.info { background: rgba(15, 76, 129, 0.1); color: var(--color-primary, #0F4C81); }
.nc-item-icon.success { background: rgba(42, 157, 143, 0.1); color: var(--color-success, #2A9D8F); }
.nc-item-icon.warning { background: rgba(233, 196, 106, 0.15); color: #b8860b; }
.nc-item-icon.error { background: rgba(231, 111, 81, 0.1); color: var(--color-danger, #E76F51); }
.nc-item-icon.critical { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

.nc-item-body { flex: 1; min-width: 0; }

.nc-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a2e);
  line-height: 1.4;
  margin-bottom: 2px;
}

.nc-item-message {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.nc-item-time {
  font-size: 11px;
  color: var(--color-text-secondary, #94a3b8);
  margin-top: 4px;
  white-space: nowrap;
}

.nc-item-delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #cbd5e1);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
  align-self: center;
  padding: 0;
}

.nc-item:hover .nc-item-delete { opacity: 1; }
.nc-item-delete:hover { color: var(--color-danger, #E76F51); background: rgba(231, 111, 81, 0.08); }

/* --------------------------------------------------------------------------
   Critical Alert Modal — نافذة التنبيه الحرج
   -------------------------------------------------------------------------- */
.critical-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.critical-modal {
  width: 90%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--radius-xl, 16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, criticalShake 0.5s ease-in-out 0.6s;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes criticalShake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-3px); }
  30%, 70% { transform: translateX(3px); }
}

.critical-modal-header {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  padding: 24px;
  text-align: center;
  color: #fff;
}

.critical-modal-header .danger-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
  animation: dangerPulse 1.5s ease-in-out infinite;
}

@keyframes dangerPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

.critical-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.critical-modal-body {
  padding: 24px;
}

.critical-modal-message {
  font-size: 14px;
  color: var(--color-text-primary, #1a1a2e);
  line-height: 1.7;
  margin-bottom: 20px;
}

.critical-modal-details {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md, 8px);
  padding: 12px 16px;
  font-size: 12px;
  color: #991b1b;
  line-height: 1.6;
  margin-bottom: 20px;
}

.critical-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 24px 24px;
}

.critical-ack-btn {
  padding: 10px 24px;
  border-radius: var(--radius-md, 8px);
  border: none;
  background: #dc2626;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.critical-ack-btn:hover { background: #b91c1c; }
.critical-ack-btn:active { transform: scale(0.97); }

/* --------------------------------------------------------------------------
   Preferences Panel — لوحة التفضيلات
   -------------------------------------------------------------------------- */
.preferences-panel {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: none;
}

.preferences-panel.open { display: flex; }

.preferences-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.preferences-drawer {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 380px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: drawerSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawerSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

[dir="rtl"] .preferences-drawer {
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
}

[dir="rtl"] @keyframes drawerSlideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.prefs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.prefs-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-primary, #1a1a2e);
}

.prefs-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #94a3b8);
  font-size: 18px;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

.prefs-close:hover { background: rgba(0, 0, 0, 0.05); color: var(--color-text-primary, #1a1a2e); }

.prefs-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.prefs-section {
  margin-bottom: 24px;
}

.prefs-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.prefs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.prefs-row:last-child { border-bottom: none; }

.prefs-label {
  font-size: 13px;
  color: var(--color-text-primary, #1a1a2e);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  inset-inline-start: 3px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary, #0F4C81);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

[dir="rtl"] .toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(-20px);
}

/* Time Inputs */
.prefs-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.prefs-time-row label {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
  min-width: 32px;
}

.prefs-time-row input[type="number"] {
  width: 56px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  color: var(--color-text-primary, #1a1a2e);
  background: var(--color-surface, #fff);
}

/* --------------------------------------------------------------------------
   Activity Feed — تيار الأنشطة
   -------------------------------------------------------------------------- */
.activity-feed-section {
  padding: 0;
}

.activity-feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  animation: activityFadeIn 0.4s ease;
}

@keyframes activityFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.activity-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.activity-icon.info { background: rgba(15, 76, 129, 0.08); color: var(--color-primary, #0F4C81); }
.activity-icon.success { background: rgba(42, 157, 143, 0.08); color: var(--color-success, #2A9D8F); }
.activity-icon.warning { background: rgba(233, 196, 106, 0.1); color: #b8860b; }
.activity-icon.error { background: rgba(231, 111, 81, 0.08); color: var(--color-danger, #E76F51); }
.activity-icon.critical { background: rgba(220, 38, 38, 0.08); color: #dc2626; }

.activity-text {
  flex: 1;
  font-size: 12px;
  color: var(--color-text-primary, #1a1a2e);
  line-height: 1.5;
}

.activity-time {
  font-size: 11px;
  color: var(--color-text-secondary, #94a3b8);
  white-space: nowrap;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Presence Indicators — مؤشرات التواجد
   -------------------------------------------------------------------------- */
.presence-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success, #2A9D8F);
  animation: presencePulse 2s ease-in-out infinite;
}

@keyframes presencePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 157, 143, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(42, 157, 143, 0); }
}

/* --------------------------------------------------------------------------
   Dark Mode — الوضع الداكن
   -------------------------------------------------------------------------- */
[data-theme="dark"] .toast-item,
.dark .toast-item {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .toast-title,
.dark .toast-title { color: #f1f5f9; }

[data-theme="dark"] .toast-message,
.dark .toast-message { color: #94a3b8; }

[data-theme="dark"] .toast-close,
.dark .toast-close { color: #64748b; }

[data-theme="dark"] .toast-close:hover,
.dark .toast-close:hover { background: rgba(255, 255, 255, 0.08); color: #f1f5f9; }

[data-theme="dark"] .toast-item.critical,
.dark .toast-item.critical { background: rgba(60, 20, 20, 0.95); }

[data-theme="dark"] .notification-center,
.dark .notification-center {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .nc-header,
.dark .nc-header { border-color: rgba(255, 255, 255, 0.06); }

[data-theme="dark"] .nc-header h3,
.dark .nc-header h3 { color: #f1f5f9; }

[data-theme="dark"] .nc-item,
.dark .nc-item { border-color: rgba(255, 255, 255, 0.04); }

[data-theme="dark"] .nc-item:hover,
.dark .nc-item:hover { background: rgba(255, 255, 255, 0.04); }

[data-theme="dark"] .nc-item.unread,
.dark .nc-item.unread { background: rgba(15, 76, 129, 0.08); }

[data-theme="dark"] .nc-item-title,
.dark .nc-item-title { color: #f1f5f9; }

[data-theme="dark"] .nc-item-message,
.dark .nc-item-message { color: #94a3b8; }

[data-theme="dark"] .nc-filter-chip,
.dark .nc-filter-chip { border-color: rgba(255, 255, 255, 0.1); color: #94a3b8; }

[data-theme="dark"] .nc-action-btn,
.dark .nc-action-btn { border-color: rgba(255, 255, 255, 0.1); color: #60a5fa; }

[data-theme="dark"] .critical-modal,
.dark .critical-modal { background: #1e293b; }

[data-theme="dark"] .critical-modal-message,
.dark .critical-modal-message { color: #f1f5f9; }

[data-theme="dark"] .critical-modal-details,
.dark .critical-modal-details { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.2); color: #fca5a5; }

[data-theme="dark"] .preferences-drawer,
.dark .preferences-drawer { background: #1e293b; }

[data-theme="dark"] .prefs-header h3,
.dark .prefs-header h3 { color: #f1f5f9; }

[data-theme="dark"] .prefs-label,
.dark .prefs-label { color: #e2e8f0; }

[data-theme="dark"] .prefs-section h4,
.dark .prefs-section h4 { color: #94a3b8; }

[data-theme="dark"] .notification-badge,
.dark .notification-badge { box-shadow: 0 0 0 2px #1e293b; }

/* --------------------------------------------------------------------------
   Responsive — التجاوب
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .toast-container {
    top: auto;
    bottom: 80px;
    inset-inline-start: 12px;
    max-width: calc(100% - 24px);
  }

  .notification-center {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }

  .preferences-drawer {
    width: 100%;
    max-width: 100%;
  }
}
