# templates/registration/login.html
{% extends 'base.html' %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                <h2 class="text-center">Login</h2>
            </div>
            <div class="card-body">
                <form method="post">
                    {% csrf_token %}
                    <div class="mb-3">
                        <label for="username" class="form-label">Username:</label>
                        <input type="text" name="username" class="form-control" required>
                    </div>
                    <div class="mb-3">
                        <label for="password" class="form-label">Password:</label>
                        <input type="password" name="password" class="form-control" required>
                    </div>
                    {% if form.errors %}
                        <div class="alert alert-danger">
                            Your username and password didn't match. Please try again.
                        </div>
                    {% endif %}
                    <div class="d-grid">
                        <button type="submit" class="btn btn-primary">Login</button>
                    </div>
                </form>
                
                <div class="text-center mt-3">
                    Don't have an account? <a href="{% url 'document_collections:signup' %}">Sign Up</a>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}