<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Login · IO Studio</title>
    <link rel="stylesheet" href="https://dr.eamer.dev/design/swiss/swiss-design.css">
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        /* Swiss Login Styling */
        body {
            font-family: var(--swiss-font-sans);
            background: var(--swiss-gray-100);
            color: var(--swiss-black);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .login-container {
            background: var(--swiss-white);
            border: var(--swiss-border-width-thick) solid var(--swiss-black);
            padding: var(--swiss-unit-8);
            width: 100%;
            max-width: 400px;
        }

        h1 {
            font-size: var(--swiss-text-3xl);
            font-weight: var(--swiss-weight-bold);
            letter-spacing: var(--swiss-tracking-tight);
            text-transform: uppercase;
            color: var(--swiss-black);
            margin-bottom: var(--swiss-unit);
        }

        .subtitle {
            color: var(--swiss-text-secondary);
            text-transform: uppercase;
            letter-spacing: var(--swiss-tracking-wide);
            font-size: var(--swiss-text-sm);
            margin-bottom: var(--swiss-unit-6);
        }

        .form-group {
            margin-bottom: var(--swiss-unit-4);
            text-align: left;
        }

        label {
            display: block;
            color: var(--swiss-text-secondary);
            font-weight: var(--swiss-weight-medium);
            font-size: var(--swiss-text-sm);
            text-transform: uppercase;
            letter-spacing: var(--swiss-tracking-wide);
            margin-bottom: var(--swiss-unit);
        }

        input[type="password"] {
            width: 100%;
            padding: var(--swiss-unit-2);
            background: var(--swiss-white);
            border: var(--swiss-border-width) solid var(--swiss-black);
            color: var(--swiss-black);
            font-family: var(--swiss-font-sans);
            font-size: var(--swiss-text-base);
        }

        input[type="password"]:focus {
            outline: none;
            border-color: var(--swiss-red);
            box-shadow: 0 0 0 var(--swiss-border-width-thick) var(--swiss-red);
        }

        .btn {
            width: 100%;
            padding: var(--swiss-unit-2) var(--swiss-unit-4);
            background: var(--swiss-black);
            color: var(--swiss-white);
            border: none;
            font-family: var(--swiss-font-sans);
            font-size: var(--swiss-text-base);
            font-weight: var(--swiss-weight-medium);
            text-transform: uppercase;
            letter-spacing: var(--swiss-tracking-wide);
            cursor: pointer;
            transition: var(--swiss-transition);
        }

        .btn:hover {
            background: var(--swiss-gray-800);
        }

        .error-message {
            padding: var(--swiss-unit-2);
            background: var(--swiss-red);
            color: var(--swiss-white);
            margin-bottom: var(--swiss-unit-3);
            text-transform: uppercase;
            font-size: var(--swiss-text-sm);
            letter-spacing: var(--swiss-tracking-wide);
        }
    </style>
</head>
<body>
    <div class="login-container">
        <h1>Studio</h1>
        <p class="subtitle">Enter password to continue</p>
        
        {% with messages = get_flashed_messages(with_categories=true) %}
          {% if messages %}
            {% for category, message in messages %}
              <div class="error-message">{{ message }}</div>
            {% endfor %}
          {% endif %}
        {% endwith %}

        <form method="post">
            <div class="form-group">
                <label for="password">Password</label>
                <input type="password" id="password" name="password" required autofocus>
            </div>
            <button type="submit" class="btn">Login</button>
        </form>
    </div>
    <!-- GoatCounter Analytics -->
    <script data-goatcounter="https://dr.eamer.dev/analytics/count"
            async src="https://dr.eamer.dev/analytics/count.js"></script>
</body>
</html>