<%- include("../../includes/head.ejs") %>
<div class="w-[300px] sm:w-[500px] mx-auto">
  <%- include("../../components/form-errors.ejs") %>
  <form
    action="/login"
    method="post"
    enctype="application/x-www-form-urlencoded"
  >
    <% if (locals.csrfToken) { %>
    <input type="hidden" name="_csrf" value="<%= locals.csrfToken %>" />
    <% } %>
    <div class="mb-6">
      <label
        for="email"
        class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
        >Your email</label
      >
      <input
        type="email"
        id="email"
        name="email"
        class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-green-500 focus:border-green-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-green-500 dark:focus:border-green-500"
        placeholder="example@localhost.com"
        value="<%= locals.values?.email %>"
        required
      />
    </div>
    <div class="mb-1">
      <label
        for="password"
        class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
        >Your password</label
      >
      <input
        type="password"
        id="password"
        name="password"
        class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-green-500 focus:border-green-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-green-500 dark:focus:border-green-500"
        required
      />
    </div>
    <div class="flex items-start mb-6">
      <a
        href="/reset-password"
        class="text-sm font-medium text-gray-900 dark:text-gray-300 underline"
        >Forgot Password!</a
      >
    </div>
    <button
      type="submit"
      class="text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800"
    >
      Login
    </button>
  </form>
</div>
<%- include("../../includes/end.ejs") %>
