{% extends "base.html" %}
{% block body %}
<div class="flex items-center justify-center min-h-[70vh]">
  <div class="card w-96 bg-base-100 shadow-xl border border-base-200">
    <div class="card-body">
      <h2 class="card-title text-2xl font-bold justify-center mb-4">Вход в систему</h2>
      
      {% if error %}
      <div class="alert alert-error text-sm py-2 mb-4">
        <span>{{ error }}</span>
      </div>
      {% endif %}
      
      <form method="post" action="/login" class="flex flex-col gap-4">
        <div class="form-control">
          <label class="label"><span class="label-text font-bold">Логин</span></label>
          <input name="login" autocomplete="username" class="input input-bordered" required>
        </div>
        <div class="form-control">
          <label class="label"><span class="label-text font-bold">Пароль</span></label>
          <input name="password" type="password" autocomplete="current-password" class="input input-bordered" required>
        </div>
        <div class="form-control mt-6">
          <button class="btn btn-primary w-full" type="submit">Войти</button>
        </div>
      </form>
    </div>
  </div>
</div>
{% endblock %}
