{% extends 'layout.html' %}

{% block title %} Авторизация {% endblock %}


{% block style %}
    .login-form {
      max-width: 400px;
      margin: auto;
      padding: 20px;
      background-color: #f7f7f7;
      border: 1px solid #e0e0e0;
      border-radius: 5px;
      box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    }
    .login-form h2 {
      text-align: center;
      margin-bottom: 20px;
    }
    .login-form .form-group {
      margin-bottom: 15px;
    }
    .login-form input[type="text"],
    .login-form input[type="password"] {
      width: 100%;
      padding: 10px;
      border: 1px solid #e0e0e0;
      border-radius: 5px;
      font-size: 1rem;
    }
    .login-form .btn-primary {
      width: 100%;
      padding: 10px;
      font-size: 1rem;
      background-color: #3498db;
      border: none;
      border-radius: 12px;
      color: #ffffff;
      cursor: pointer;
      margin-bottom: 5px;
    }
{% endblock %}

{% block body %}
  <div class="login-form">
        <h2>Войти</h2>
        <form method="POST" action="{{ url_for('user.login') }}">
          <div class="form-group">
            <label for="username">Имя пользователя</label>
            <input type="text" id="username" name="username" class="form-control" required>
          </div>
          <div class="form-group">
            <label for="password">Пароль</label>
            <input type="password" id="password" name="password" class="form-control" required>
          </div>
          <button type="submit" class="btn btn-primary">Войти</button>
          <a href="/register" class="btn btn-primary">Регистрация</a>
        </form>
  </div>
{% endblock %}
