{% extends "base.html" %}

{% block title %}Organizer login | Northstar Events{% endblock %}
{% block meta_description %}Sign in to the Northstar Events organizer dashboard and admin workspace.{% endblock %}

{% block content %}
<main class="section-space">
  <div class="container">
    <section class="success-shell card-surface mx-auto" style="max-width: 36rem;">
      <span class="eyebrow-pill">Organizer access</span>
      <h1 class="hero-title mt-4">Sign in to manage events.</h1>
      <p class="hero-copy mt-3">Use your organizer account to open the protected dashboard, export attendee lists, and jump into Django Admin for event editing.</p>
      <form method="post" class="mt-4">
        {% csrf_token %}
        {% if form.non_field_errors %}
        <div class="alert alert-danger app-alert">{{ form.non_field_errors }}</div>
        {% endif %}
        <div class="mb-3">
          <label class="form-label" for="id_username">Username</label>
          <input type="text" name="username" autofocus autocapitalize="none" autocomplete="username" maxlength="150" class="form-control" required id="id_username">
        </div>
        <div class="mb-3">
          <label class="form-label" for="id_password">Password</label>
          <input type="password" name="password" autocomplete="current-password" class="form-control" required id="id_password">
        </div>
        {% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
        <div class="d-grid gap-3">
          <button class="btn btn-primary btn-lg" type="submit">Sign in</button>
          <a class="btn btn-ghost" href="/admin/">Open Django Admin</a>
        </div>
      </form>
    </section>
  </div>
</main>
{% endblock %}
