<!DOCTYPE html>
<!--
  Familiar - Self-hosted AI Agent
  Copyright (c) 2026 George Scott Foley
  
  Licensed under the MIT License
  For commercial licensing, contact: licensing@familiar.ai
-->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="theme-color" content="#6B21A8">
    
    <title>Check Email - Familiar</title>
    
    <link rel="manifest" href="{{ url_for('pwa.manifest') }}">
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-purple-800 min-h-screen flex items-center justify-center p-4">
    <div class="bg-white rounded-2xl shadow-2xl p-8 w-full max-w-sm text-center">
        <div class="mb-6">
            <span class="text-6xl">📧</span>
        </div>
        
        <h1 class="text-2xl font-bold text-gray-800 mb-2">Check Your Email</h1>
        
        <p class="text-gray-600 mb-6">
            We sent a login link to<br>
            <strong class="text-purple-600">{{ email }}</strong>
        </p>
        
        {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
        <div class="mb-6 text-left">
            {% for category, message in messages %}
            <div class="p-3 rounded-lg mb-2 text-xs break-all
                {% if category == 'error' %}bg-red-100 text-red-700
                {% else %}bg-blue-100 text-blue-700{% endif %}">
                {{ message }}
            </div>
            {% endfor %}
        </div>
        {% endif %}
        {% endwith %}
        
        <p class="text-sm text-gray-500 mb-6">
            Click the link in the email to sign in.<br>
            The link expires in 15 minutes.
        </p>
        
        <a 
            href="{{ url_for('pwa.login') }}"
            class="text-purple-600 hover:text-purple-700 text-sm font-medium"
        >
            ← Try a different email
        </a>
    </div>
</body>
</html>
