<script>
  // Copy referral link helper (used across pages)
  function copyText(id) {
    const el = document.getElementById(id);
    if (!el) return;
    el.select && el.select();
    navigator.clipboard.writeText(el.value || el.textContent)
      .then(() => {
        const btn = document.querySelector('[onclick*="' + id + '"]');
        if (btn) { const orig = btn.innerHTML; btn.innerHTML = '<i class="fas fa-check"></i> Copied!'; setTimeout(() => btn.innerHTML = orig, 2000); }
      });
  }
  function showToast(icon, title) {

    const Toast = Swal.mixin({
      toast: true,
      position: "top-end",
      showConfirmButton: false,
      timer: 2500,
      timerProgressBar: true,
      width: '260px',
      padding: '8px 12px',
      customClass: {
        popup: 'small-toast',
        title: 'small-toast-title'
      },
      didOpen: (toast) => {
        toast.onmouseenter = Swal.stopTimer
        toast.onmouseleave = Swal.resumeTimer
      }
    });

    Toast.fire({
      icon: icon,
      title: title
    });
  }
</script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</body>

</html>