/* ── Notification Bell & Panel ─────────────────────────────────────────── */
.rifd-notif-bell-wrap {
  position: fixed;
  top: 14px;
  left: 20px;
  z-index: 8000;
}
[dir="rtl"] .rifd-notif-bell-wrap { left: auto; right: 20px; }

.rifd-notif-bell {
  position: relative;
  width: 40px; height: 40px;
  background: rgba(7, 23, 80, 0.85);
  border: 1.5px solid rgba(168, 216, 234, 0.25);
  border-radius: 50%;
  color: #a8d8ea;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rifd-notif-bell:hover { background: rgba(23, 169, 140, 0.25); border-color: rgba(23, 169, 140, .5); color: #5eead4; }

.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid #071750;
  line-height: 1;
}
.notif-badge-pulse { animation: notifPulse 1.8s ease-in-out infinite; }
@keyframes notifPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* Panel */
.rifd-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 340px;
  max-height: 480px;
  background: #0f2044;
  border: 1px solid rgba(168,216,234,.2);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: top left;
  transition: opacity .18s, transform .18s;
}
[dir="rtl"] .rifd-notif-panel { left: auto; right: 0; transform-origin: top right; }
.notif-panel-hidden { opacity: 0; transform: scale(.95); pointer-events: none; }
.notif-panel-visible { opacity: 1; transform: scale(1); pointer-events: all; }

.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.notif-panel-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: #e2e8f0; display: flex; align-items: center; gap: 8px; }
.notif-count-badge { background: #ef4444; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.notif-panel-actions { display: flex; align-items: center; gap: 8px; }
.notif-mark-all-btn { background: none; border: 1px solid rgba(23,169,140,.4); color: #5eead4; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; transition: background .15s; }
.notif-mark-all-btn:hover { background: rgba(23,169,140,.15); }
.notif-close-btn { background: none; border: none; color: #64748b; font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: color .15s; }
.notif-close-btn:hover { color: #e2e8f0; }

/* List */
.notif-list { overflow-y: auto; flex: 1; }
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.notif-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 10px; color: #475569; }
.notif-empty svg { opacity: .5; }
.notif-empty p { margin: 0; font-size: 13px; }

.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .12s;
  position: relative;
}
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-unread { background: rgba(23,169,140,.06); }
.notif-unread::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 3px; background: #17a98c; border-radius: 0 3px 3px 0; }
[dir="rtl"] .notif-unread::before { right: auto; left: 0; }

.notif-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.notif-icon-success { background: rgba(16,185,129,.2); color: #10b981; }
.notif-icon-warning { background: rgba(245,158,11,.2); color: #f59e0b; }
.notif-icon-error { background: rgba(239,68,68,.2); color: #ef4444; }
.notif-icon-info { background: rgba(59,130,246,.2); color: #3b82f6; }

.notif-body { flex: 1; min-width: 0; }
.notif-title { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; line-height: 1.4; word-break: break-word; }
.notif-read .notif-title { color: #94a3b8; font-weight: 400; }
.notif-text { margin: 3px 0 0; font-size: 12px; color: #64748b; line-height: 1.5; }
.notif-age { display: block; font-size: 11px; color: #475569; margin-top: 4px; }

.notif-read-btn { background: none; border: none; color: #17a98c; font-size: 14px; cursor: pointer; padding: 2px 4px; opacity: .6; transition: opacity .15s; align-self: center; }
.notif-read-btn:hover { opacity: 1; }

@media (max-width: 400px) {
  .rifd-notif-panel { width: calc(100vw - 24px); }
}
