       .then(resp => resp.json())
        .then(data => {
          if (data.success) {
            alert("Successfully deleted selected inbound(s).");
            window.location.reload();
          } else {
            alert("Error: " + (data.error || "Unknown error"));
          }
        })
        .catch(err => alert("Fetch error: " + err));
      }

      function copySelected() {
        const selectedTags = getSelectedInboundTags();
        if (selectedTags.length === 0) {
          a