<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Ingresar | <%= negocio.nombreNegocio %></title>
  <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Outfit:wght@600;700;800&display=swap" rel="stylesheet" />
  <link rel="stylesheet" href="/css/estilos.css" />
</head>
<body style="--brand: <%= negocio.colorPrincipal %>;">
  <div class="auth-shell">
    <main class="login-card">
      <h1><%= negocio.nombreNegocio %></h1>
      <p class="login-sub">Acceso para el dueño del negocio.</p>

      <% if (error) { %><p class="login-error"><%= error %></p><% } %>

      <form action="/login" method="POST" class="login-form">
        <input type="hidden" name="_csrf" value="<%= csrfToken %>" />
        <label for="correo">Correo</label>
        <input type="email" id="correo" name="correo" required autofocus />

        <label for="clave">Contraseña</label>
        <input type="password" id="clave" name="clave" required />

        <button type="submit" class="btn btn-primary btn-full" style="margin-top: 18px;">Entrar</button>
      </form>
      <p style="text-align:center; margin-top: 1.4rem; font-size: 0.75rem; color: var(--ink-faint);">
        <a href="/">← Volver a la tienda</a> · con tecnología de Trokkmart
      </p>
    </main>
  </div>
</body>
</html>
