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

{% block extra_head %}
<link rel="stylesheet" href="{% static 'css/auth.css' %}">
<style>
    .top-actions .btn { display: none; }
</style>
{% endblock %}

{% block content %}

<div class="auth-container">
    <div class="auth-box">
        <h2>Login</h2>

        {% if messages %}
            {% for message in messages %}
                <div class="alert alert-success">{{ message }}</div>
            {% endfor %}
        {% endif %}

        {% if error %}
            <div class="alert alert-error">{{ error }}</div>
        {% endif %}

        <form method="POST" class="auth-form">
            {% csrf_token %}

            <div class="form-group">
                <label for="username">Username</label>
                <input type="text" id="username" name="username" placeholder="Enter your username" required>
            </div>

            <div class="form-group">
                <label for="password">Password</label>
                <input type="password" id="password" name="password" placeholder="Enter your password" required>
            </div>

            <button type="submit" class="btn-primary">Login</button>
        </form>

        <p class="auth-link">Don't have an account? <a href="{% url 'register' %}">Register here</a></p>
    </div>
</div>

{% endblock %}