<%- include('../partials/head') %>
<%- include('../partials/offcanvas') %>
<%- include('../partials/header') %>

<main>
   <div class="tp-login-area pt-60 pb-100">
      <div class="container">
         <div class="row justify-content-center">
            <div class="col-lg-5 col-md-8">
               <div style="border:1px solid #eee; border-radius:12px; padding:40px;">
                  <h2 style="font-size:24px; margin-bottom:6px; text-align:center;">Welcome Back</h2>
                  <p style="text-align:center; color:#777; font-size:14px; margin-bottom:25px;">Login to manage your bookings with <%= site.site_name || 'RouteMate' %>.</p>

                  <% if (error) { %>
                     <div class="alert" style="background:#FEE2E2; color:#991B1B; padding:12px 16px; border-radius:8px; margin-bottom:18px; font-size:13px;"><%= error %></div>
                  <% } %>

                  <form action="/login" method="POST">
                     <div class="tp-review-input mb-20">
                        <label class="tp-label mb-5" for="email">Your Email</label>
                        <input class="tp-input" type="email" id="email" name="email" placeholder="you@example.com" required style="width:100%;">
                     </div>
                     <div class="tp-review-input mb-20">
                        <label class="tp-label mb-5" for="password">Password</label>
                        <input class="tp-input" type="password" id="password" name="password" placeholder="Min. 6 characters" required style="width:100%;">
                     </div>
                     <button type="submit" class="tp-btn" style="width:100%;">Login</button>
                  </form>

                  <p style="text-align:center; margin-top:20px; font-size:13px; color:#777;">
                     Don't have an account? <a href="/register" style="color:#DC2626; font-weight:600;">Register</a>
                  </p>
               </div>
            </div>
         </div>
      </div>
   </div>
</main>

<%- include('../partials/footer') %>
<%- include('../partials/scripts') %>
