<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Forgot Password - Admin</title>
    <!-- FontAwesome for Icons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --bg-primary: #f4f6f9;
            --card-bg: #ffffff;
            --accent-color: #3b82f6;
            --accent-hover: #2563eb;
            --text-dark: #0f172a;
            --text-muted: #64748b;
            --border-color: #e2e8f0;
            --success-color: #10b981;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: var(--bg-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            padding: 20px;
        }

        .forgot-container {
            width: 100%;
            max-width: 420px;
            background-color: var(--card-bg);
            padding: 40px 30px;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        }

        .forgot-header {
            text-align: center;
            margin-bottom: 28px;
        }

        .icon-box {
            width: 60px;
            height: 60px;
            background-color: rgba(59, 130, 246, 0.1);
            color: #16264c;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin: 0 auto 16px auto;
        }

        .forgot-header h1 {
            font-size: 1.6rem;
            color: var(--text-dark);
            font-weight: 700;
            margin-bottom: 8px;
        }

        .forgot-header p {
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .form-group {
            margin-bottom: 24px;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            color: var(--text-dark);
            font-size: 0.9rem;
            font-weight: 600;
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-wrapper i.input-icon {
            position: absolute;
            left: 14px;
            color: var(--text-muted);
            font-size: 1rem;
        }

        .form-input {
            width: 100%;
            padding: 12px 14px 12px 42px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.95rem;
            color: var(--text-dark);
            background-color: #fff;
            transition: border-color 0.2s, box-shadow 0.2s;
            outline: none;
        }

        .form-input:focus {
            border-color: #16264c;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        }

        .btn-submit {
            width: 100%;
            padding: 12px;
            background-color: #16264c;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s;
            margin-bottom: 20px;
        }

        .btn-submit:hover {
            background-color: var(--accent-hover);
        }

        .back-to-login {
            text-align: center;
            font-size: 0.9rem;
        }

        .back-to-login a {
            color: var(--text-muted);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: color 0.2s;
        }

        .back-to-login a:hover {
            color: var(--text-dark);
        }

        /* Success Message Panel */
        .success-banner {
            display: none;
            background-color: rgba(16, 185, 129, 0.1);
            border: 1px solid var(--success-color);
            color: #065f46;
            padding: 15px;
            border-radius: 8px;
            font-size: 0.9rem;
            margin-bottom: 24px;
            line-height: 1.4;
        }

        .success-banner i {
            margin-right: 8px;
            color: var(--success-color);
        }
    </style>
</head>
<body style="background-color: #002156 !important;">
    <div class="forgot-container">
        <!-- Success Alert Banner (Initially Hidden) -->
        <div class="success-banner" id="successBanner">
            <i class="fa-solid fa-circle-check"></i>
            A password reset link has been sent to your email address if an account exists.
        </div>

        <div id="requestFormState">
            <div class="forgot-header">
                <div class="icon-box">
                    <i class="fa-solid fa-key"></i>
                </div>
                <h1>Forgot Password?</h1>
                <p>No worries! Enter your registered email address below, and we'll send you instructions to reset your password.</p>
            </div>

            <!-- Form Submission Handler -->
            <form id="forgotPasswordForm" onsubmit="handleResetSubmit(event)">
                <div class="form-group">
                    <label class="form-label" for="email">Email Address</label>
                    <div class="input-wrapper">
                        <i class="fa-solid fa-envelope input-icon"></i>
                        <input
                            type="email"
                            id="email"
                            name="email"
                            class="form-input"
                            placeholder="name@example.com"
                            required
                        >
                    </div>
                </div>

                <button type="submit" class="btn-submit">Reset Password</button>
            </form>
        </div>

        <!-- Navigation back link -->
        <div class="back-to-login">
            <a href="login.php">
                <i class="fa-solid fa-arrow-left"></i> Back to Sign In
            </a>
        </div>
    </div>

    <!-- JavaScript Interactivity -->
    <script>
        function handleResetSubmit(event) {
            event.preventDefault(); // Stop standard form refresh

            // Show the success notification panel
            const banner = document.getElementById('successBanner');
            banner.style.display = 'block';

            // Clear or hide the input element container safely
            const inputField = document.getElementById('email');
            if(inputField) inputField.value = '';
        }
    </script>
</body>
</html>
