.toast-msg {
  font-weight: 500;
  pointer-events: none;
  /* Efectos de entrada y salida */
  opacity: 0;
  transform: translateX(-50%) translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  /* El posicionamiento lo maneja JavaScript */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* Tamaño controlado */
  max-width: 400px;
  min-width: 250px;
  width: auto;
  /* Centrado del texto */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Estados del toast */
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.toast-msg.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(20px) scale(0.8);
}

/* Colores con gradientes sutiles */
.toast-success { 
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.toast-error { 
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toast-warning { 
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.toast-info { 
  background: linear-gradient(135deg, #3498db, #2980b9);
}

/* Animación de entrada desde abajo */
@keyframes slideInBottom {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(100%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Animación de salida hacia abajo */
@keyframes slideOutBottom {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(100%) scale(0.8);
  }
}

/* Aplicar animaciones */
.toast-msg.animate-in {
  animation: slideInBottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-msg.animate-out {
  animation: slideOutBottom 0.3s ease-in-out;
}

/* Efecto hover sutil (aunque sea pointer-events: none) */
.toast-msg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.2s ease;
}

/* Efecto de progreso opcional */
.toast-msg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0 0 8px 8px;
  animation: progress 3s linear;
}

@keyframes progress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Estilos para inputs con error (mejorados) */
.input-error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 20%, 40%, 60%, 80%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
}