/* ========================================
   NOTIFICATION SYSTEM — MINIMALIST
   ======================================== */

/* Bell Button */
.notification-bell-container {
  position: relative;
  margin: 0 4px;
}

.notification-bell {
  position: relative;
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.notification-bell:hover {
  background: var(--surface-light, #f8fafc);
  color: var(--text-primary, #1e293b);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}

/* Panel */
.notification-panel {
  position: fixed;
  top: var(--banner-height, 0px);
  right: -380px;
  width: 360px;
  height: 100vh;
  background: white;
  border-left: 1px solid var(--border-light, #e2e8f0);
  box-shadow: -8px 0 32px rgba(0,0,0,0.08);
  transition: right 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.notification-panel.open {
  right: 0;
}

/* Header */
.notification-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

.notification-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.notification-header h3 i {
  font-size: 13px;
  color: var(--primary, #0f62fe);
}

.notification-actions {
  display: flex;
  gap: 4px;
}

.notification-actions .btn-text {
  background: none;
  border: none;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.notification-actions .btn-text:hover {
  background: var(--surface-light, #f8fafc);
  color: var(--text-primary, #1e293b);
}

/* List */
.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notification-list { scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent; }
.notification-list::-webkit-scrollbar { width: 4px; }
.notification-list::-webkit-scrollbar-track { background: transparent; }
.notification-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* Items */
.notification-item {
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item.read {
  opacity: 0.55;
}

.notification-item + .notification-item {
  border-top: 1px solid #f1f5f9;
}

/* Icon */
.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notification-item.priority-urgent .notification-icon {
  background: #fee2e2;
  color: #ef4444;
}

.notification-item.priority-high .notification-icon {
  background: #fef3c7;
  color: #f59e0b;
}

.notification-item:not(.priority-high):not(.priority-urgent) .notification-icon {
  background: #eff6ff;
  color: #3b82f6;
}

/* Content */
.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 3px;
}

.notification-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary, #1e293b);
  line-height: 1.3;
}

.notification-time {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-message {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.unread-dot {
  position: absolute;
  left: 6px;
  top: 18px;
  width: 5px;
  height: 5px;
  background: var(--primary, #0f62fe);
  border-radius: 50%;
}

.delete-notification {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-item:hover .delete-notification {
  opacity: 1;
}

.delete-notification:hover {
  color: #ef4444;
}

/* Empty State */
.no-notifications {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.no-notifications i {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.25;
  display: block;
}

.no-notifications p {
  margin: 0;
  font-size: 13px;
}

/* Loading */
.notification-loading {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.notification-loading i {
  font-size: 24px;
  margin-bottom: 12px;
  display: block;
}

/* Toast — offset below any stacked UI toasts (which start at top:24px) */
.notification-toast {
  position: fixed;
  top: 80px;
  right: 16px;
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 320px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  z-index: 10000;
  transform: translateX(360px);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.notification-toast.show {
  transform: translateX(0);
}

.notification-toast .toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #3b82f6;
  font-size: 14px;
  flex-shrink: 0;
}

.notification-toast.priority-urgent .toast-icon {
  background: #fee2e2;
  color: #ef4444;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-content strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.toast-content p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.notification-toast .toast-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.notification-toast .toast-close:hover {
  color: #1e293b;
}

/* Dark mode */
body.dark-mode .notification-panel {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .notification-header {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .notification-item:hover {
  background: #273549;
}

body.dark-mode .notification-item + .notification-item {
  border-color: #2d3f55;
}

/* Mobile */
@media (max-width: 768px) {
  .notification-panel {
    width: 100%;
    right: -100%;
  }

  .notification-toast {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}
