<%= content_for(:canonical_url, new_user_session_url) %>
<div class="max-w-lg mx-auto px-2">
  <%= render 'devise/shared/select_server' if Docuseal.multitenant? %>
  <h1 class="text-4xl font-bold text-center mt-8"><%= t('sign_in') %></h1>
  <%= form_for(resource, as: resource_name, html: { class: 'space-y-6' }, data: { turbo: params[:redir].blank? }, url: session_path(resource_name)) do |f| %>
    <%= render 'hidden_fields' %>
    <div class="space-y-2" dir="auto">
      <div class="form-control">
        <%= f.label :email, t(:email), class: 'label' %>
        <%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'base-input' %>
      </div>
      <div class="form-control">
        <%= f.label :password, t(:password), class: 'label' %>
        <%= f.password_field :password, autocomplete: 'current-password', class: 'base-input' %>
      </div>
    </div>
    <div class="form-control">
      <%= f.button button_title(title: t(:sign_in), disabled_with: t(:signing_in)), class: 'base-button' %>
    </div>
  <% end %>
  <%= render 'omniauthable' %>
  <%= render 'extra_links' %>
  <%= render 'devise/shared/links' %>
</div>
