/* Copiado do notification-system/frontend/css/notifications.css */
/* Badge contador */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #DC2626;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

#notification-popup-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
}

.notification-popup {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  border-left: 4px solid #4F46E5;
}

.notification-popup.show { opacity: 1; transform: translateX(0); }
.notification-popup.notification-info { border-left-color: #3B82F6; }
.notification-popup.notification-success { border-left-color: #10B981; }
.notification-popup.notification-warning { border-left-color: #F59E0B; }
.notification-popup.notification-error { border-left-color: #EF4444; }
.notification-popup.notification-system { border-left-color: #6B7280; }

.notification-popup.priority-urgente {
  animation: urgentPulse 1s infinite;
  border-left-width: 6px;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.6); }
}

.notification-icon { font-size: 24px; flex-shrink: 0; }
.notification-content { flex: 1; }
.notification-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: #1F2937; }
.notification-message { font-size: 13px; color: #4B5563; line-height: 1.4; }
.notification-meta { font-size: 11px; color: #9CA3AF; margin-top: 6px; }
.notification-close { background: none; border: none; font-size: 20px; color: #9CA3AF; cursor: pointer; padding: 0; width: 24px; height: 24px; flex-shrink: 0; }
.notification-close:hover { color: #EF4444; }

.notification-modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.notification-modal-content { background: white; margin: 5% auto; width: 90%; max-width: 700px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); max-height: 80vh; display: flex; flex-direction: column; }
.notification-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #E5E7EB; }
.notification-modal-header h3 { margin: 0; font-size: 20px; }
.notification-modal-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #9CA3AF; padding: 0; width: 32px; height: 32px; }
.notification-modal-close:hover { color: #EF4444; }
.notification-modal-actions { padding: 15px 20px; border-bottom: 1px solid #E5E7EB; display: flex; gap: 10px; }
.notification-modal-actions button { padding: 8px 16px; border: 1px solid #D1D5DB; background: white; border-radius: 6px; cursor: pointer; font-size: 13px; }
.notification-modal-actions button:hover { background: #F3F4F6; }
.notification-modal-body { flex: 1; overflow-y: auto; padding: 20px; }

.notification-item { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid #E5E7EB; transition: background 0.2s; }
.notification-item:hover { background: #F9FAFB; }
.notification-item.unread { background: #EFF6FF; border-left: 4px solid #3B82F6; }
.notification-item-icon { font-size: 24px; flex-shrink: 0; }
.notification-item-content { flex: 1; }
.notification-item-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.notification-item-message { font-size: 13px; color: #4B5563; line-height: 1.4; }
.notification-item-meta { font-size: 11px; color: #9CA3AF; margin-top: 6px; }
.notification-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.notification-item-actions button { background: none; border: 1px solid #D1D5DB; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.notification-item-actions button:hover { background: #F3F4F6; }
.loading { text-align: center; padding: 40px; color: #9CA3AF; }
#notification-status { font-size: 12px; padding: 4px 10px; border-radius: 12px; background: #FEE2E2; color: #991B1B; }

@media (max-width: 640px) {
  #notification-popup-container { right: 10px; left: 10px; max-width: none; }
  .notification-modal-content { width: 95%; margin: 10px auto; max-height: 90vh; }
}
/* Resumo agregado de solicitações/pedidos */
.notification-aggregate { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.aggregate-pill { background: #EEF2FF; color: #4338CA; border: 1px solid #E0E7FF; padding: 2px 8px; border-radius: 9999px; font-size: 11px; }
/* Responsividade estendida do sino, badge e modal */
#notification-bell,
[data-notification-bell] {
  width: clamp(24px, 4vw, 36px);
  height: clamp(24px, 4vw, 36px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#notification-bell i,
[data-notification-bell] i { font-size: clamp(16px, 3.5vw, 22px); }
.notification-badge {
  top: -4px; right: -4px;
  min-width: clamp(16px, 3vw, 20px);
  height: clamp(16px, 3vw, 20px);
  line-height: clamp(16px, 3vw, 20px);
  padding: 0 4px;
  font-size: clamp(10px, 2.6vw, 12px);
}
.notification-modal-body { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.notification-modal-content { width: min(92vw, 700px); max-height: 82vh; }
.notification-modal-header h3 { font-size: clamp(18px, 3.8vw, 20px); }
.notification-item-title { font-size: clamp(13px, 3.5vw, 14px); }
.notification-item-message { font-size: clamp(12px, 3.2vw, 13px); }
.notification-item-meta { font-size: clamp(10px, 2.8vw, 11px); }

@media (max-width: 768px) {
  .notification-modal-content { width: 95vw; max-height: 88vh; }
  .notification-modal-actions { flex-wrap: wrap; gap: 8px; }
  #notification-popup-container { top: 72px; right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 480px) {
  #notification-popup-container { top: 64px; right: 8px; left: 8px; }
  .notification-modal-content { width: 96vw; margin: 8px auto; max-height: 92vh; }
  .notification-modal-actions button { font-size: 12px; padding: 8px 12px; }
  .notification-item { flex-direction: column; gap: 8px; }
  .notification-item-actions { justify-content: flex-end; }
}

@media (orientation: landscape) {
  #notification-popup-container { top: 56px; }
  .notification-modal-content { max-height: 86vh; }
}