<!--
  Familiar - Self-hosted AI Agent
  Copyright (c) 2026 George Scott Foley

  Licensed under the MIT License
  For commercial licensing, contact: licensing@familiar.ai
-->
{% extends "base.html" %}

{% block title %}Verifying - Familiar Admin{% endblock %}

{% block content %}
<div class="min-h-[80vh] flex items-center justify-center">
    <div class="bg-white rounded-lg shadow-lg p-8 w-full max-w-md text-center">
        <div class="text-5xl mb-4">🔐</div>
        <h1 class="text-2xl font-bold text-gray-800">Verifying your login...</h1>
        <p class="text-gray-600 mt-4">You will be redirected automatically.</p>

        <form id="verify-form" method="POST" action="{{ url_for('admin.verify') }}">
            <input type="hidden" name="token" value="{{ token }}">
            <noscript>
                <p class="text-sm text-gray-500 mt-4">JavaScript is disabled. Click the button below to continue.</p>
                <button type="submit"
                        class="mt-4 px-6 py-3 bg-purple-600 text-white rounded-lg font-semibold hover:bg-purple-700 transition">
                    Continue to Familiar
                </button>
            </noscript>
        </form>
    </div>
</div>
{% endblock %}

{% block scripts %}
<script>document.getElementById("verify-form").submit();</script>
{% endblock %}
