<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Acceder — OpenData II</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Sora:wght@400;600;700&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class="login-page">
  <div class="login-box">
    <div class="login-logo">OpenData II</div>
    <div class="login-app">Panel Interno</div>
    <div class="login-sub">Acceso restringido a administradores</div>

    {% if error %}
    <div class="alert alert-error">{{ error }}</div>
    {% endif %}

    <form method="post" action="/login">
      <div class="form-group">
        <label class="form-label" for="username">Usuario o email</label>
        <input id="username" name="username" type="text" class="form-control" placeholder="admin" autofocus required>
      </div>
      <div class="form-group">
        <label class="form-label" for="password">Contraseña</label>
        <input id="password" name="password" type="password" class="form-control" placeholder="••••••••" required>
      </div>
      <button type="submit" class="btn btn-primary btn-block" style="margin-top:8px">
        Acceder →
      </button>
    </form>
  </div>
</div>
</body>
</html>
