<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Access Restricted</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: #f4f7f9;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            color: #333;
            text-align: center;
        }
        .container {
            background: #fff;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            max-width: 400px;
        }
        h1 {
            color: #d9534f;
            margin-bottom: 10px;
        }
        p {
            font-size: 16px;
            line-height: 1.5;
            margin-bottom: 20px;
        }
        .message-box {
            background-color: #f7f7f7;
            padding: 20px;
            border-radius: 6px;
            border: 1px solid #e0e0e0;
        }
        .back-link {
            display: inline-block;
            margin-top: 20px;
            color: #007bff;
            text-decoration: none;
            font-weight: bold;
        }
        .back-link:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Access Restricted 🔒</h1>
        <p style="color:#d9534f;">{% if error %}{{error}} {% endif %}</p>
        <div class="message-box">
            <p>This application is invitation-only.</p>
            <p>Please use a valid invitation link or code to sign in.</p>
        </div>
        <a href="/" class="back-link">Go back to login page</a>
    </div>
</body>
</html>