{{-- Flash success --}} @if(session('success'))
{{ session('success') }}
@endif {{-- Flash error --}} @if(session('error'))
{{ session('error') }}
@endif {{-- Tab navigation --}}
@php $tabs = [ ['id' => 'login', 'label' => __('Login Security'), 'icon' => 'M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'], ['id' => 'password', 'label' => __('Password Policy'), 'icon' => 'M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z'], ['id' => 'session', 'label' => __('Session'), 'icon' => 'M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z'], ['id' => 'twofactor','label' => __('Two-Factor Auth'), 'icon' => 'M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z'], ['id' => 'blocking', 'label' => __('IP / Location'), 'icon' => 'M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636'], ]; @endphp @foreach($tabs as $tab) @endforeach
@php $s = fn(string $key, string $default = '') => $settings[$key] ?? $default; @endphp {{-- TAB 1: LOGIN SECURITY --}}
@csrf

{{ __('Login Security') }}

{{ __('Configure login attempt limits, lockout, and CAPTCHA protection.') }}

{{ __('Number of failed attempts before account lockout.') }}

@error('max_login_attempts')

{{ $message }}

@enderror

{{ __('How long the account stays locked after too many attempts.') }}

@error('lockout_minutes')

{{ $message }}

@enderror
@include('admin.settings._toggle', [ 'name' => 'captcha_enabled', 'label' => 'CAPTCHA Protection', 'description' => 'Show CAPTCHA challenge on login after failed attempts.', 'value' => $s('captcha_enabled', 'false'), 'color' => 'green', 'icon' => 'M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z', ])
@error('captcha_site_key')

{{ $message }}

@enderror
@error('captcha_secret_key')

{{ $message }}

@enderror
{{-- TAB 2: PASSWORD POLICY --}}
@csrf

{{ __('Password Policy') }}

{{ __('Set minimum password requirements for all user accounts.') }}

{{ __('Minimum number of characters required.') }}

@error('password_min_length')

{{ $message }}

@enderror
@include('admin.settings._toggle', [ 'name' => 'password_require_uppercase', 'label' => 'Require Uppercase', 'description' => 'Passwords must contain at least one uppercase letter.', 'value' => $s('password_require_uppercase', 'true'), 'color' => 'blue', 'icon' => 'M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21', ]) @include('admin.settings._toggle', [ 'name' => 'password_require_numbers', 'label' => 'Require Numbers', 'description' => 'Passwords must contain at least one numeric digit.', 'value' => $s('password_require_numbers', 'true'), 'color' => 'indigo', 'icon' => 'M7 20l4-16m2 16l4-16M6 9h14M4 15h14', ]) @include('admin.settings._toggle', [ 'name' => 'password_require_symbols', 'label' => 'Require Symbols', 'description' => 'Passwords must contain at least one special character (!@#$%^&*).', 'value' => $s('password_require_symbols', 'false'), 'color' => 'violet', 'icon' => 'M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z', ])
{{-- TAB 3: SESSION --}}
@csrf

{{ __('Session Configuration') }}

{{ __('Control session lifetime and concurrent session behavior.') }}

{{ __('How long a session stays active without activity.') }}

@error('session_lifetime')

{{ $message }}

@enderror
@include('admin.settings._toggle', [ 'name' => 'single_session', 'label' => 'Single Session Only', 'description' => 'Allow only one active session per user. New logins will invalidate previous sessions.', 'value' => $s('single_session', 'false'), 'color' => 'green', 'icon' => 'M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z', ])
{{-- TAB 4: TWO-FACTOR AUTH --}}
@csrf

{{ __('Two-Factor Authentication') }}

{{ __('Configure two-factor authentication requirements.') }}

@include('admin.settings._toggle', [ 'name' => 'two_factor_enabled', 'label' => 'Enable Two-Factor Authentication', 'description' => 'Allow users to set up two-factor authentication for their accounts.', 'value' => $s('two_factor_enabled', 'true'), 'color' => 'green', 'icon' => 'M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z', ]) @include('admin.settings._toggle', [ 'name' => 'two_factor_admin_only', 'label' => 'Required for Admins Only', 'description' => 'Only require two-factor authentication for admin accounts.', 'value' => $s('two_factor_admin_only', 'false'), 'color' => 'indigo', 'icon' => 'M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z', ])
{{-- TAB 5: IP / LOCATION BLOCKING --}}
@csrf

{{ __('IP & Location Blocking') }}

{{ __('Enable or disable IP and geographic location blocking.') }}

@include('admin.settings._toggle', [ 'name' => 'ip_blocking_enabled', 'label' => 'IP Blocking', 'description' => 'Block access from specific IP addresses. Manage blocked IPs from the Blocked IPs page.', 'value' => $s('ip_blocking_enabled', 'true'), 'color' => 'red', 'icon' => 'M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636', ]) @include('admin.settings._toggle', [ 'name' => 'location_blocking_enabled', 'label' => 'Location Blocking', 'description' => 'Block access from specific countries, states, or cities. Manage from the Blocked Locations page.', 'value' => $s('location_blocking_enabled', 'false'), 'color' => 'red', 'icon' => 'M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z', ])