{% extends "core/base.html" %}
{% block title %}Log In{% endblock %}

{% block content %}
<div class="container mt-4" style="max-width: 400px;">
  <h2 class="mb-3">Log In</h2>
  <form method="POST" action="{{ url_for('auth.login') }}">
    {{ form.hidden_tag() }}

    <div class="mb-3">
      {{ form.email.label(class="form-label") }}
      {{ form.email(class="form-control", placeholder="you@example.com") }}
      {% for e in form.email.errors %}
        <div class="text-danger small">{{ e }}</div>
      {% endfor %}
    </div>

    <div class="mb-3">
      {{ form.password.label(class="form-label") }}
      {{ form.password(class="form-control", placeholder="Password") }}
      {% for e in form.password.errors %}
        <div class="text-danger small">{{ e }}</div>
      {% endfor %}
    </div>

    <div class="mb-3 form-check">
      {{ form.remember_me(class="form-check-input") }}
      {{ form.remember_me.label(class="form-check-label") }}
    </div>

    <button type="submit" class="btn btn-primary w-100">{{ form.submit.label.text }}</button>
  </form>
</div>
{% endblock %}
