{% extends 'base.html' %}

{% block content %}
<div class="row justify-content-center align-items-center" style="min-height: 80vh;">
    <div class="col-md-4">
        <div class="card bg-dark text-light border-0 shadow-lg" style="border-radius: 15px;">
            <div class="card-body p-5">
                <h2 class="text-center mb-4" style="color: var(--vibrant-accent);">Login</h2>
                <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 bg-secondary text-light border-0" id="id_username" required>
                    </div>
                    <div class="mb-4">
                        <label for="id_password" class="form-label">Password</label>
                        <input type="password" name="password" class="form-control bg-secondary text-light border-0" id="id_password" required>
                    </div>
                    <div class="d-grid">
                        <button type="submit" class="btn btn-lg" style="background-color: var(--vibrant-accent); color: white; font-weight: bold;">Sign In</button>
                    </div>
                </form>
                {% if form.errors %}
                <div class="alert alert-danger mt-3 bg-danger text-light border-0">
                    Invalid username or password.
                </div>
                {% endif %}
            </div>
        </div>
    </div>
</div>
{% endblock %}
