<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>{{config.API_TITLE}} docs login</title>
    {% if docs_style == "swagger" %}
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.17.14/swagger-ui.css" />
    <style>.swagger-ui .topbar{display:none}</style>
    {% else %}
    <style>
        body {font-family: sans-serif; margin: 40px; background: #fafafa;}
        .container {max-width: 400px; margin: auto;}
        input {width: 100%; padding: 8px; margin: 8px 0;}
        button {padding: 8px 16px;}
    </style>
    {% endif %}
</head>
<body>
    <div class="container">
        <h1>API Documentation Login</h1>
        {% if error %}<p style="color: red;">{{ error }}</p>{% endif %}
        <form method="post">
            {% if allow_username %}
            <input type="text" name="username" placeholder="Username" />
            {% endif %}
            <input type="password" name="password" placeholder="Password" />
            <button type="submit">Login</button>
        </form>
    </div>
</body>
</html>
