<?php
 
?>

<div class="auth-page">
    <div class="auth-card">
        <h1 class="auth-card__title"><?php echo __('login'); ?></h1>

        <?php if (!empty($error)): ?>
            <div class="form-error"><?php echo htmlspecialchars($error); ?></div>
        <?php endif; ?>

        <form action="<?php echo url('/login'); ?>" method="POST">
            <?php echo Router::csrfField(); ?>

            <div class="form-group">
                <label for="login"><?php echo __('email_or_username'); ?></label>
                <input type="text" id="login" name="login" required autocomplete="username">
            </div>

            <div class="form-group">
                <label for="password"><?php echo __('password'); ?></label>
                <input type="password" id="password" name="password" required autocomplete="current-password">
            </div>

            <button type="submit" class="btn btn-primary" style="width:100%;"><?php echo __('log_in'); ?></button>
        </form>

        <div class="auth-footer">
            <?php echo __('no_account'); ?> <a href="<?php echo url('/register'); ?>"><?php echo __('sign_up'); ?></a>
        </div>
    </div>
</div>
