<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Login - Sentiment Scraper</title>
  <link rel="stylesheet" href="/css/style.css">
</head>
<body>
  <div class="auth-container">
    <div class="auth-card">
      <h1 class="text-center">Welcome Back</h1>
      <p class="text-center">Login to Sentiment Scraper</p>

      <% if (error) { %> <div class="alert alert-error"><%= error %></div> <% } %>
      <% if (success) { %> <div class="alert alert-success"><%= success %></div> <% } %>

      <form action="/login" method="POST">
        <div class="form-group">
          <label>Username</label>
          <input type="text" name="username" required autofocus>
        </div>
        <div class="form-group">
          <label>Password</label>
          <input type="password" name="password" required>
        </div>
        <button type="submit" class="btn">Login</button>
      </form>
      <div class="text-center mt-4">
        <a href="/register" style="color: var(--accent); text-decoration: none; font-size: 14px;">Don't have an account? Register</a>
      </div>
    </div>
  </div>
</body>
</html>
