 data.attemptsLeft > 0 
                            ? `Incorrect PIN. ${data.attemptsLeft} attempts remaining.` 
                            : 'Incorrect PIN. Last attempt before lockout.';
                        
                        errorDisplay.textContent = message;
                        errorDisplay.setAttribute('aria-hidden', 'false');
                        inputs.forEach(input => {
                            input.value = '';
                            input.classList.remove('has-value');
 