{include file="_partials/head.tpl"}
<link rel="stylesheet" href="/public/assets/account/account.css">

<div class="acc-container acc-container--auth">
  <div class="acc-authcard">
    <h1 class="acc-auth__title">Регистрация</h1>
    <p class="acc-auth__sub">Создайте аккаунт, чтобы отслеживать заказы и избранное.</p>

    [if {error}]<div class="acc-flash acc-flash--error">{error}</div>[/if]

    <form method="post" action="/account/register" class="acc-form">
      {csrf}
      <div class="acc-field">
        <label for="acc-name">Имя</label>
        <input id="acc-name" type="text" name="name" value="{old.name}" required maxlength="191" autofocus>
      </div>
      <div class="acc-field">
        <label for="acc-email">Email</label>
        <input id="acc-email" type="email" name="email" value="{old.email}" required autocomplete="email">
      </div>
      <div class="acc-field">
        <label for="acc-pass">Пароль</label>
        <input id="acc-pass" type="password" name="password" required minlength="8" autocomplete="new-password">
        <small class="acc-help">Минимум 8 символов.</small>
      </div>
      <div class="acc-field">
        <label for="acc-pass2">Повторите пароль</label>
        <input id="acc-pass2" type="password" name="password_confirm" required minlength="8" autocomplete="new-password">
      </div>
      <div class="acc-form__actions">
        <button type="submit" class="acc-btn acc-btn--primary acc-btn--block">Создать аккаунт</button>
      </div>
    </form>

    <p class="acc-auth__alt">Уже есть аккаунт? <a href="/account/login">Войти</a></p>
  </div>
</div>

{include file="_partials/foot.tpl"}
