{% extends 'base.html' %}

{% block title %}Login - NAIMS Namibia{% endblock %}

{% block content %}
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-md-5">
            <div class="card p-4">
                <h3 class="text-center mb-4">User Login</h3>
                <form method="post">
                    {% csrf_token %}
                    {% for field in form %}
                        <div class="mb-3">
                            <label class="form-label">{{ field.label }}</label>
                            {{ field.errors }}
                            <input type="{{ field.field.widget.input_type }}" name="{{ field.html_name }}" class="form-control" required>
                        </div>
                    {% endfor %}
                    <div class="d-grid mt-4">
                        <button type="submit" class="btn btn-primary btn-lg">Login to NAIMS</button>
                    </div>
                </form>
                <div class="mt-3 text-center">
                    <small class="text-muted">Only authorized Ministry personnel and Extension Officers can access the registration system.</small>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}