// Shared functions function showToast(message, type = 'success') { const toast = document.createElement('div'); toast.className = `fixed top-4 right-4 px-4 py-2 rounded-lg shadow-lg text-white ${ type === 'success' ? 'bg-green-500' : 'bg-red-500' }`; toast.textContent = message; document.body.appendChild(toast); setTimeout(() => { toast.classList.add('opacity-0', 'transition-opacity', 'duration-300'); setTimeout(() => toast.remove(), 300); }, 3000); }