<?php
// File: forgot-password.php (Final Version)
include 'header.php';
?>

<div class="min-h-screen flex items-center justify-center bg-stone-100 py-12 px-4 sm:px-6 lg:px-8">
    <div class="max-w-md w-full space-y-8 bg-white p-10 rounded-xl shadow-lg">
        <div>
            <h2 class="mt-6 text-center text-3xl font-extrabold text-ucf-charcoal">
                Forgot Your Password?
            </h2>
            <p class="mt-2 text-center text-sm text-gray-600">
                Enter your email and we'll send you a link to reset your password.
            </p>
        </div>

        <?php if (isset($_GET['status']) && $_GET['status'] == 'success'): ?>
            <div class="bg-green-100 border-l-4 border-green-500 text-green-700 p-4" role="alert">
                <p class="font-bold">Check your email</p>
                <p>If an account with that email exists, a reset link has been sent.</p>
            </div>
        <?php endif; ?>

        <form class="mt-8 space-y-6" action="forgot-password-handler.php" method="POST">
            <div class="rounded-md shadow-sm">
                <div>
                    <label for="email-address" class="sr-only">Email address</label>
                    <input id="email-address" name="email" type="email" autocomplete="email" required class="appearance-none rounded-lg relative block w-full px-4 py-3 border border-gray-300" placeholder="Enter your email address">
                </div>
            </div>
            <div>
                <button type="submit" class="group relative w-full flex justify-center py-3 px-4 text-sm font-medium rounded-lg text-white bg-ucf-green hover:bg-ucf-green-dark">
                    Send Reset Link
                </button>
            </div>
        </form>
         <div class="text-sm text-center">
            <a href="login.php" class="font-medium text-ucf-green hover:text-ucf-green-dark">
                Back to Log in
            </a>
        </div>
    </div>
</div>

<?php include 'footer.php'; ?>

