{% extends 'login_base.html' %}
{% load static %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header text-center">
                    <h3 style="color: #0A2342;">Veracity Real Estate Solutions</h3>
                    <p class="text-muted">Please sign in to continue</p>
                </div>
                <div class="card-body">
                    {% if form.errors %}
                        <div class="alert alert-danger" role="alert">
                            Your username and password didn't match. Please try again.
                        </div>
                    {% endif %}
                    <form method="post" action="{% url 'login' %}">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="id_username" class="form-label">Username</label>
                            <input type="text" name="username" id="id_username" class="form-control" required>
                        </div>
                        <div class="mb-3">
                            <label for="id_password" class="form-label">Password</label>
                            <input type="password" name="password" id="id_password" class="form-control" required>
                        </div>
                        <div class="d-grid">
                            <button type="submit" class="btn btn-primary" style="background-color: #0A2342; border-color: #0A2342;">Login</button>
                        </div>
                        <div class="text-center mt-3">
                            <a href="{% url 'password_reset' %}">Forgot password?</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}