{% extends "base.html" %}

{% block title %}Login | {{ project_name }}{% endblock %}

{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-body">
                    <h2 class="card-title text-center mb-4">Login</h2>
                    {% if form.errors %}
                        <div class="alert alert-danger">Invalid username or password.</div>
                    {% endif %}
                    <form method="post">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="id_username" class="form-label">Username</label>
                            <input type="text" name="username" class="form-control" id="id_username" required>
                        </div>
                        <div class="mb-3">
                            <label for="id_password" class="form-label">Password</label>
                            <input type="password" name="password" class="form-control" id="id_password" required>
                        </div>
                        <button type="submit" class="btn btn-primary w-100">Login</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
