<% content_for :title, "ログイン" %>

<div class="max-w-md mx-auto">
  <h1 class="text-3xl font-bold text-gray-900 mb-6">ログイン</h1>

  <%= form_with url: login_path, class: "space-y-6" do |f| %>
    <div>
      <%= label_tag :email, "メールアドレス", class: "block text-sm font-medium text-gray-700" %>
      <%= email_field_tag :email, params[:email], class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500", autofocus: true %>
    </div>

    <div>
      <%= label_tag :password, "パスワード", class: "block text-sm font-medium text-gray-700" %>
      <%= password_field_tag :password, nil, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500" %>
    </div>

    <div>
      <%= submit_tag "ログイン", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
    </div>
  <% end %>

  <div class="mt-6 text-center">
    <p class="text-sm text-gray-600">
      アカウントをお持ちでないですか？
      <%= link_to "新規登録", signup_path, class: "font-medium text-indigo-600 hover:text-indigo-500" %>
    </p>
  </div>
</div>
