{{-- Full-width impersonation banner — sticky top, visible on every panel (tenant + super admin). Single source of truth for the "you are impersonating" state. Replaces the old pair of banners that both POSTed to the same stop route. --}} @if(session()->has('impersonating_from')) @php $tenantId = session('impersonating_tenant_id'); $tenant = $tenantId ? \App\Models\Tenant::find($tenantId) : null; $tenantName = $tenant?->name ?? __('filament/impersonation_bar.tenant_fallback_name'); $ownerName = $tenant?->owner?->name ?? null; $ownerEmail = $tenant?->owner?->email ?? null; $startedAt = session('impersonating_started_at'); $startedLabel = $startedAt ? \Carbon\Carbon::parse($startedAt)->diffForHumans() : ''; @endphp {{-- Inline styles + bar. Uses :has() to push Filament notifications BELOW the bar so they're not obscured by it. JS fallback tags
with `has-impersonation-bar` for browsers that don't support :has() yet. --}}