{% extends "base.html" %}

{% block content %}
<div class="auth-page d-flex align-items-center justify-content-center min-vh-100 position-relative overflow-hidden">
    <!-- Decorative 3D-like shapes -->
    <div class="shape shape-sphere top-left"></div>
    <div class="shape shape-cube bottom-right"></div>
    
    <div class="container py-5 z-1">
        <div class="row justify-content-center">
            <div class="col-md-5 col-lg-4">
                <div class="card glass-card border-0 text-center p-4 p-md-5">
                    <h2 class="mb-4 fw-bold text-dark">Welcome Back</h2>
                    <form method="post" class="auth-form text-start">
                        {% csrf_token %}
                        {% for field in form %}
                            <div class="mb-3">
                                <label for="{{ field.id_for_label }}" class="form-label text-muted small fw-bold text-uppercase">{{ field.label }}</label>
                                {{ field }}
                                {% if field.help_text %}
                                    <div class="form-text small text-muted">{{ field.help_text }}</div>
                                {% endif %}
                                {% for error in field.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>
                        {% endfor %}
                        
                        <button type="submit" class="btn btn-primary w-100 py-3 mt-4 btn-glass fw-bold shadow-sm">Log In</button>
                    </form>
                    
                    <div class="mt-4 pt-3 border-top">
                        <p class="mb-0 text-muted small">New here? <a href="{% url 'signup' %}" class="fw-bold text-primary text-decoration-none">Create an account</a></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}