<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Reset Super Admin Password | TellerPro Platform</title>
    <meta name="csrf-token" content="<?= Security::generateCsrfToken() ?>">
    <link rel="stylesheet" href="<?= APP_URL ?>/assets/css/app.css">
    <link rel="stylesheet" href="<?= APP_URL ?>/assets/css/superadmin.css">
    <style>
        body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #000; }
        .sa-login-card { width: 100%; max-width: 420px; background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: 16px; padding: 40px; box-shadow: 0 40px 80px rgba(0,0,0,0.8); }
    </style>
</head>
<body class="superadmin">
    <div class="sa-login-card">
        <div class="text-center mb-8">
            <div style="background: var(--sa-primary); width: 48px; height: 48px; border-radius: 12px; display: flex; align-items:center; justify-content:center; color:white; font-weight:900; font-size: 1.5rem; margin: 0 auto 20px;">TP</div>
            <h1 class="text-2xl font-bold">Reset Password</h1>
            <p class="text-muted mt-2">Set a new password for the superadmin account.</p>
        </div>

        <?php if ($err = getFlash('error')): ?>
            <div class="alert alert-error mb-6"><?= e($err) ?></div>
        <?php endif; ?>

        <?php if ($success = getFlash('success')): ?>
            <div class="alert alert-success mb-6"><?= e($success) ?></div>
        <?php endif; ?>

        <form action="<?= APP_URL ?>/superadmin/reset-password" method="POST">
            <?= Security::csrfField() ?>
            <div class="form-group">
                <label class="form-label">New Password (minimum 8 characters)</label>
                <input type="password" name="password" class="form-control" placeholder="••••••••" required minlength="8" autofocus>
            </div>
            <button type="submit" class="btn btn-sa-primary w-full mt-4" style="padding: 12px; font-size: 1rem;">
                Reset Password
            </button>
        </form>

        <div class="text-center mt-6">
            <a href="<?= APP_URL ?>/superadmin/login" style="color: var(--text-muted); text-decoration: none; font-size: 0.85rem;">
                Back to Login
            </a>
        </div>
    </div>
</body>
</html>
