{% extends 'chat/base.html' %}
{% block title %}Login — DiscordClone{% endblock %}
{% block body %}
<div class="auth-wrapper">
  <div class="auth-card">
    <h1>👾 DiscordClone</h1>
    <p class="sub">Welcome back! Sign in to continue.</p>
    {% if error %}
    <div class="alert alert-danger py-2" style="font-size:.85rem;">{{ error }}</div>
    {% endif %}
    <form method="post" action="{% url 'login' %}">
      {% csrf_token %}
      <div class="mb-3">
        <label class="form-label" style="font-size:.8rem;font-weight:600;color:#b5bac1;text-transform:uppercase;letter-spacing:.5px;">Username</label>
        <input type="text" name="username" class="form-control" id="id_username_login" required autofocus>
      </div>
      <div class="mb-4">
        <label class="form-label" style="font-size:.8rem;font-weight:600;color:#b5bac1;text-transform:uppercase;letter-spacing:.5px;">Password</label>
        <input type="password" name="password" class="form-control" id="id_password_login" required>
      </div>
      <button type="submit" class="btn btn-primary w-100 fw-600" id="btn_login">Log In</button>
    </form>
    <p class="text-center mt-3" style="font-size:.85rem;color:#b5bac1;">
      No account? <a href="{% url 'register' %}" style="color:#00b0f4;">Register</a>
    </p>
  </div>
</div>
{% endblock %}
