{% extends "base.html" %}

{% block title %}{{ title }}{% endblock %}

{% block styles %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/login.css') }}">
{% endblock %}

{% block content %}
<div class="login-container">
    <div class="login-card">
        <h1 class="title">Iniciar Sesión</h1>
        
        <form method="POST" action="{{ url_for('auth_bp.login') }}">
            {{ form.hidden_tag() }}
            
            <div class="form-group">
                {{ form.login.label }}
                {{ form.login(class="form-control") }}
                {% for error in form.login.errors %}
                <span class="error-message">{{ error }}</span>
                {% endfor %}
            </div>
            
            <div class="form-group">
                {{ form.password.label }}
                {{ form.password(class="form-control") }}
                {% for error in form.password.errors %}
                <span class="error-message">{{ error }}</span>
                {% endfor %}
            </div>
            
            <div class="form-check">
                {{ form.remember_me(class="form-check-input") }}
                {{ form.remember_me.label(class="form-check-label") }}
            </div>
            
            <div class="form-actions">
                {{ form.submit(class="btn btn-primary") }}
            </div>
            
            <div class="auth-links">
                <p>¿No recuerdas tu contraseña? <a href="{{ url_for('auth_bp.reset_password_request') }}">Restablecer</a></p>
                {# <p>¿No tienes cuenta? <a href="{{ url_for('auth_bp.register') }}">Regístrate</a></p> #}
            </div>
        </form>
    </div>
</div>
{% endblock %}
