<?php require APPROOT . '/app/Views/layouts/header.php'; ?>
<div class="max-w-md mx-auto mt-10 mb-10">
    <div class="bg-white dark:bg-gray-800 p-8 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700/50 relative overflow-hidden">
        <div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-primary to-blue-500"></div>

        <div class="text-center mb-8">
            <h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">Create New Password</h2>
            <p class="text-sm text-gray-600 dark:text-gray-400">Please enter and confirm your new strong password below.</p>
        </div>
        
        <form action="<?php echo URLROOT; ?>/users/resetPassword/<?php echo $data['token']; ?>" method="POST" class="space-y-5">
            <?php echo csrfField(); ?>
            
            <div>
                <label class="block text-[10px] font-bold text-gray-500 uppercase tracking-wider mb-2">New Password</label>
                <input type="password" name="password" class="w-full px-4 py-2.5 rounded-lg border <?php echo (!empty($data['password_err'])) ? 'border-red-500' : 'border-gray-300 dark:border-gray-700'; ?> bg-gray-50 dark:bg-gray-900/50 text-gray-900 dark:text-white focus:ring-2 focus:ring-primary focus:outline-none transition-colors" value="<?php echo $data['password']; ?>" autofocus>
                <span class="text-xs text-red-500 mt-1 block"><?php echo $data['password_err']; ?></span>
            </div>
            
            <div>
                <label class="block text-[10px] font-bold text-gray-500 uppercase tracking-wider mb-2">Confirm New Password</label>
                <input type="password" name="confirm_password" class="w-full px-4 py-2.5 rounded-lg border <?php echo (!empty($data['confirm_password_err'])) ? 'border-red-500' : 'border-gray-300 dark:border-gray-700'; ?> bg-gray-50 dark:bg-gray-900/50 text-gray-900 dark:text-white focus:ring-2 focus:ring-primary focus:outline-none transition-colors" value="<?php echo $data['confirm_password']; ?>">
                <span class="text-xs text-red-500 mt-1 block"><?php echo $data['confirm_password_err']; ?></span>
            </div>
            
            <div class="pt-4">
                <button type="submit" class="w-full bg-primary hover:opacity-90 text-white font-bold py-2.5 rounded-lg transition-all focus:ring-4 focus:ring-primary/50 shadow-sm">
                    Reset Password
                </button>
            </div>
        </form>
    </div>
</div>
<?php require APPROOT . '/app/Views/layouts/footer.php'; ?>