function showToast(message, bgColor = 'bg-primary') { const toastElement = document.getElementById('liveToast'); const toastBody = toastElement.querySelector('.toast-body'); toastBody.textContent = message; toastElement.className = `toast align-items-center text-white ${bgColor} border-0`; toastElement.style.display = 'block'; // Asegurar que sea visible antes de mostrar const toast = new bootstrap.Toast(toastElement); toast.show(); }