<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Authentication Error - Tetrate Agent Router Service</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
            padding: 20px;
        }
        .container {
            background: white;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            padding: 40px;
            max-width: 400px;
            width: 100%;
            text-align: center;
        }
        .error-icon {
            width: 64px;
            height: 64px;
            margin: 0 auto 20px;
            background: #ef4444;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .error-icon svg {
            width: 32px;
            height: 32px;
            fill: white;
        }
        h1 {
            color: #1f2937;
            font-size: 24px;
            margin: 0 0 10px;
        }
        p {
            color: #6b7280;
            font-size: 16px;
            line-height: 1.5;
            margin: 0 0 20px;
        }
        .error-message {
            background: #fef2f2;
            border: 1px solid #fee2e2;
            border-radius: 8px;
            padding: 12px;
            color: #991b1b;
            font-size: 14px;
            font-family: monospace;
            word-break: break-all;
        }
        .note {
            margin-top: 20px;
            color: #6b7280;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="error-icon">
            <svg viewBox="0 0 24 24">
                <path d="M6 18L18 6M6 6l12 12"/>
            </svg>
        </div>
        <h1>Authentication Failed</h1>
        <p>There was an error during the authentication process.</p>
        <div class="error-message">{{ error }}</div>
        <div class="note">
            Please close this window and try again.
        </div>
    </div>
</body>
</html>