function togglePassword() {
    const passwordField = document.getElementById("contraseña");
    const iconEye = document.getElementById("icon-eye");
    const iconEyeOff = document.getElementById("icon-eye-off");

    const isPassword = passwordField.type === "password";
    passwordField.type = isPassword ? "text" : "password";

    iconEye.style.display = isPassword ? "none" : "inline";
    iconEyeOff.style.display = isPassword ? "inline" : "none";
}