document.addEventListener("DOMContentLoaded", function () {
  const roleSelect = document.getElementById("roleSelect");
  const arztFields = document.getElementById("arztFields");

  if (!roleSelect || !arztFields) return;

  function toggleArztFields() {
    arztFields.style.display = roleSelect.value === "arzt" ? "block" : "none";
  }

  roleSelect.addEventListener("change", toggleArztFields);

  // Beim Laden prüfen
  toggleArztFields();
});
