Modal functions for adding a new member
        function openAddMemberModal() {
            document.getElementById('addMemberModal').style.display = "block";
        }

        function closeAddMemberModal() {
            document.getElementById('addMemberModal').style.display = "none";
        }

        // Close the modal when clicking outside of it
        window.onclick = function(event) {
            const modal = document.getElementById('addMemberModal');
            if (event.target == modal) {
    