@php $brand = app(\App\Domain\Shared\Services\BrandingService::class)->forCurrentAcademy(); @endphp
<!DOCTYPE html>
<html dir="rtl" lang="{{ app()->getLocale() }}" class="h-full">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
    <meta name="theme-color" content="{{ $brand->themeColor }}">
    <title>{{ __('لا يوجد اتصال') }} — {{ $brand->academyName }}</title>
    {{-- Static, session-free and carrying no CSRF token, on purpose: this page
         is cached by the service worker and served to whoever opens the app
         next. A cached token would be wrong the moment the session rotates, and
         a cached session fragment would belong to somebody else. --}}
    <style>
        :root { color-scheme: light; }
        body {
            margin: 0; min-height: 100dvh; display: grid; place-items: center; padding: 24px;
            background: #f8fafc; color: #0f172a;
            font-family: 'Cairo', ui-sans-serif, system-ui, sans-serif;
        }
        .card { max-width: 22rem; text-align: center; }
        h1 { font-size: 1.125rem; font-weight: 800; margin: 0 0 8px; }
        p { color: #64748b; line-height: 1.7; margin: 0 0 20px; font-size: .875rem; }
        button {
            border: 0; border-radius: 12px; padding: 12px 24px; font-weight: 700; font-size: .875rem;
            background: {{ $brand->themeColor }}; color: #fff; cursor: pointer;
        }
        svg { width: 48px; height: 48px; color: #94a3b8; margin-bottom: 12px; }
    </style>
</head>
<body>
    <main class="card">
        <svg fill="none" stroke="currentColor" stroke-width="1.4" viewBox="0 0 24 24" aria-hidden="true">
            <path stroke-linecap="round" stroke-linejoin="round"
                  d="M12 18.75a.75.75 0 100-1.5.75.75 0 000 1.5zM3 8.25a15 15 0 0118 0M6 11.25a10.5 10.5 0 0112 0M9 14.25a6 6 0 016 0M3 3l18 18"/>
        </svg>
        <h1>{{ __('لا يوجد اتصال بالإنترنت') }}</h1>
        <p>{{ __('هذه الشاشة محفوظة على جهازك. بمجرد عودة الاتصال ستعمل البوابة كالمعتاد.') }}</p>
        <button type="button" onclick="location.reload()">{{ __('إعادة المحاولة') }}</button>
    </main>
</body>
</html>
