<div class="auth-wrap">
    <div class="auth-card">
        <div class="auth-card-header">
            <span class="eyebrow">Welcome back</span>
            <h1 class="auth-card-title">Sign in</h1>
            <p class="auth-card-subtitle">Enter your credentials to access your account.</p>
        </div>

        <?php if (!empty($error)): ?>
            <div class="alert alert-error" role="alert">
                <?= e($error) ?>
            </div>
        <?php endif; ?>

        <form class="auth-form" method="POST" action="/login" novalidate>
            <?= csrf_field() ?>

            <div class="field">
                <label for="email">Email address</label>
                <input
                    class="input"
                    type="email"
                    id="email"
                    name="email"
                    value="<?= e($_POST['email'] ?? '') ?>"
                    autocomplete="email"
                    required
                    autofocus
                >
            </div>

            <div class="field">
                <label for="password">Password</label>
                <input
                    class="input"
                    type="password"
                    id="password"
                    name="password"
                    autocomplete="current-password"
                    required
                >
            </div>

            <div class="auth-remember">
                <input type="checkbox" id="remember" name="remember" value="1">
                <label for="remember">Keep me signed in</label>
            </div>

            <button class="button button-primary auth-submit" type="submit">Sign in</button>
        </form>
    </div>
</div>
