/* Estilos para Histórico de Notificações */

/* Painel de Notificações */
.notification-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notification-panel.open {
  right: 0;
}

.notification-panel-header {
  background: #26a69a;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-panel-actions {
  display: flex;
  gap: 10px;
}

.btn-icon-small {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-icon-small:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-icon-small i {
  font-size: 20px;
}

.notification-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.notification-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification-history-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.notification-history-empty i {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 15px;
  display: block;
}

.notification-history-empty p {
  margin: 0;
  font-size: 16px;
}

.notification-history-item {
  display: flex;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.notification-history-item:hover {
  background: #f5f5f5;
}

.notification-history-item.read {
  opacity: 0.7;
}

.notification-history-item.read::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #26a69a;
}

.notification-history-item.success {
  border-left: 4px solid #4CAF50;
}

.notification-history-item.error {
  border-left: 4px solid #F44336;
}

.notification-history-item.warning {
  border-left: 4px solid #FF9800;
}

.notification-history-item.info {
  border-left: 4px solid #2196F3;
}

.notification-icon {
  margin-right: 15px;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.notification-icon i {
  font-size: 24px;
}

.notification-history-item.success .notification-icon i {
  color: #4CAF50;
}

.notification-history-item.error .notification-icon i {
  color: #F44336;
}

.notification-history-item.warning .notification-icon i {
  color: #FF9800;
}

.notification-history-item.info .notification-icon i {
  color: #2196F3;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-message {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
  word-wrap: break-word;
}

.notification-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

.notification-source {
  text-transform: uppercase;
  font-weight: 500;
  font-size: 11px;
}

.notification-time {
  color: #bbb;
}

.notification-details {
  margin-top: 8px;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
  font-family: monospace;
  word-break: break-all;
}

.notification-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

.notification-history-item:hover .notification-actions {
  opacity: 1;
}

.notification-actions .btn-icon-small {
  color: #666;
  padding: 4px;
}

.notification-actions .btn-icon-small:hover {
  background: #e0e0e0;
  color: #333;
}

/* Overlay para fechar painel */
.notification-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.notification-overlay.active {
  display: block;
  opacity: 1;
}

/* Botão de notificações no top bar */
.notification-button {
  position: relative;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.notification-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #F44336;
  color: #fff;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
  line-height: 16px;
}

.notification-badge.hidden {
  display: none;
}

/* Status indicators */
.status-online {
  color: #4CAF50;
}

.status-offline {
  color: #F44336;
}

#connection-status,
#database-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 18px;
  margin: 0 5px;
}

/* Responsive */
@media (max-width: 600px) {
  .notification-panel {
    width: 100%;
    right: -100%;
  }
  
  .notification-panel.open {
    right: 0;
  }
}

/* Scrollbar personalizado */
.notification-panel-body::-webkit-scrollbar {
  width: 6px;
}

.notification-panel-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.notification-panel-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.notification-panel-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

