{% extends "base.html" %}
{% block title %}Login — Quartermaster{% endblock %}
{% block flash %}{% endblock %}
{% block content %}
<div class="card auth-card auth-center">
    <h2>Login</h2>
    {% if let Some(f) = flash %}
    <div class="toast toast-{{ f.flash_type }}">{{ f.message }}</div>
    {% endif %}
    {% if let Some(error) = error %}
    <div class="alert alert-error">{{ error }}</div>
    {% endif %}
    <form method="post" action="/login">
        <input type="hidden" name="csrf_token" value="{{ csrf_token }}">
        <label for="username">Username</label>
        <input type="text" id="username" name="username" required autofocus>
        <label for="password">Password</label>
        <input type="password" id="password" name="password" required>
        <button type="submit" class="btn">Login</button>
    </form>
</div>
{% endblock %}
