{{ __('Welcome back') }}

{{ __('Sign in to your panel account.') }}

@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif {{-- Social sign-in (only the providers this panel configured) --}}
@csrf
{{ __('Forgot password?') }}
{{-- Hidden when this panel has signups closed. /register already redirects back here, but leaving the invitation on screen sends a visitor down a road that dead-ends — the same "control that does not do what it says" the rest of this screen avoids. Read per panel, so a reseller's storefront follows the reseller's own switch. --}} @unless (panel_signups_disabled())

{{ __("Don't have an account?") }} {{ __('Create one') }}

@endunless {{-- Demo quick-login (only in non-production / when demo mode is on) --}} {{-- OWNER panel only: on a reseller's storefront this would publish the system owner's credentials on a public page that isn't theirs. --}} @if (config('redfamosa.demo_mode', false) && ! current_panel()?->isReseller()) @php $demoPassword = (string) config('redfamosa.demo_password', 'demo1234'); // Resolved from the DATABASE, never a hard-coded list. The addresses // differ in every install — the administrator's is whatever was typed // into the installer, and the rest come from the demo seed — so a fixed // list produced buttons that filled in accounts which do not exist and // bounced off the login form. $demoAccounts = collect([ ['super_admin', __('Super Admin'), '#7c3aed'], ['staff', __('Staff / Support'), '#0891b2'], ['reseller_admin', __('Reseller Admin'), '#16a34a'], ['reseller_staff', __('Reseller Staff'), '#b45309'], ['client', __('Client'), '#e11d48'], ])->map(function (array $row) { [$role, $label, $colour] = $row; // A role that does not exist makes User::role() throw, and this is // the LOGIN page: an exception here locks the operator out of their // own panel with a 500 and no way back except editing files. A // missing role must cost its button, nothing more. try { $email = \App\Models\User::role($role)->orderBy('id')->value('email'); } catch (\Throwable) { return null; } return $email ? [$label, $email, $colour] : null; })->filter()->values(); @endphp @if ($demoAccounts->isNotEmpty())

{{ __('Quick access — demo accounts') }}

@foreach ($demoAccounts as [$label, $email, $color]) @php($pass = $demoPassword) @endforeach
@endif @endif