{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans "Login" %} | masarX{% endblock %}

{% block content %}
<section class="py-5 bg-light" style="min-height: 80vh;">
    <div class="container py-5">
        <div class="row justify-content-center">
            <div class="col-md-5">
                <div class="card shadow-sm border-0">
                    <div class="card-body p-5">
                        <h2 class="fw-bold mb-4 text-center">{% trans "Login to masarX" %}</h2>
                        <form method="post">
                            {% csrf_token %}
                            {% for field in form %}
                                <div class="mb-3">
                                    <label class="form-label">{{ field.label }}</label>
                                    {{ field }}
                                    {% if field.errors %}
                                        <div class="text-danger small">{{ field.errors }}</div>
                                    {% endif %}
                                </div>
                            {% endfor %}
                            <button type="submit" class="btn btn-masarx-primary w-100 py-2 mt-3">{% trans "Login" %}</button>
                        </form>
                        <div class="text-center mt-4">
                            <p class="mb-0 text-muted">{% trans "Don't have an account?" %} <a href="{% url 'register' %}" class="text-masarx-orange">{% trans "Register here" %}</a></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
    .form-control {
        border-radius: 8px;
        padding: 10px 15px;
    }
    .btn-masarx-primary {
        background-color: var(--accent-orange);
        border-color: var(--accent-orange);
        color: white;
        font-weight: 600;
        border-radius: 8px;
    }
</style>
{% endblock %}
