<div class="card border-0 shadow-lg p-4 glass-card">
    <div class="card-body">
        <h4 class="fw-bold font-outfit text-dark text-center mb-4">Welcome Back</h4>

        <form action="<?= APP_URL ?>/login" method="POST">
            <?= csrf_field() ?>

            <div class="mb-3">
                <label for="email" class="form-label text-sm fw-medium">Email Address</label>
                <div class="input-group">
                    <span class="input-group-text bg-light border-end-0"><i class="fa-regular fa-envelope text-muted"></i></span>
                    <input type="email" class="form-control bg-light border-start-0 ps-0" id="email" name="email" value="<?= htmlspecialchars($old_email ?? '') ?>" placeholder="name@example.com" required autofocus>
                </div>
            </div>

            <div class="mb-3">
                <div class="d-flex justify-content-between align-items-center mb-1">
                    <label for="password" class="form-label text-sm fw-medium mb-0">Password</label>
                    <a href="<?= APP_URL ?>/forgot-password" class="text-xs text-primary">Forgot Password?</a>
                </div>
                <div class="input-group">
                    <span class="input-group-text bg-light border-end-0"><i class="fa-solid fa-lock text-muted"></i></span>
                    <input type="password" class="form-control bg-light border-start-0 ps-0" id="password" name="password" placeholder="••••••••" required>
                </div>
            </div>

            <div class="mb-3 form-check">
                <input type="checkbox" class="form-check-input" id="remember" name="remember">
                <label class="form-check-label text-xs text-muted" for="remember">Remember me on this device</label>
            </div>

            <div class="mt-4 mb-3">
                <button type="submit" class="btn btn-primary w-100 rounded-pill py-2 font-outfit fw-bold shadow-sm">Sign In</button>
            </div>
        </form>

        <hr class="my-4 text-muted opacity-25">

        <p class="text-center text-sm text-muted mb-0">
            Don't have an account? <a href="<?= APP_URL ?>/register" class="fw-semibold text-primary">Create Account</a>
        </p>
    </div>
</div>
