document.addEventListener('DOMContentLoaded',()=>{const loader=document.getElementById('appLoader');requestAnimationFrame(()=>loader?.classList.add('is-hidden'));document.querySelectorAll('input[type="password"]').forEach(input=>{const wrap=document.createElement('div');wrap.style.cssText='position:relative';input.parentNode.insertBefore(wrap,input);wrap.appendChild(input);const button=document.createElement('button');button.type='button';button.setAttribute('aria-label','Show password');button.innerHTML='?';button.style.cssText='position:absolute;right:9px;top:50%;transform:translateY(-50%);border:0;background:none;color:#64748b;cursor:pointer;font-size:15px';button.addEventListener('click',()=>{const show=input.type==='password';input.type=show?'text':'password';button.setAttribute('aria-label',show?'Hide password':'Show password');button.innerHTML=show?'?':'?'});wrap.appendChild(button)});document.querySelectorAll('form').forEach(form=>form.addEventListener('submit',()=>loader?.classList.remove('is-hidden')));});