{{-- Header --}}

{{ __('threats.eyebrow') }}

{{ __('threats.title') }}

{{-- Escalate on ANY hostile activity: red if someone tried the fake login, amber for mere probes, green only when truly quiet. Count = all decoy hits so the pill never reads a calm "0 probes" while login attempts are landing. --}} {{ __('threats.probes_pill', ['count' => $probes_24h + $login_attempts_24h]) }}
{{-- KPI strip: auto-fit — login attempts first (the "someone tried to log in" signal). --}} {{-- Four homogeneous count metrics (even 2-/4-up grid, no orphan). --}}
{{-- Top attacker is a single IP (not a count), so a full-width spotlight reads far better than a lone fifth KPI orphaned on its own grid row. --}}
(bool) $top_ip, 'bg-raised text-ink-4' => ! $top_ip, ])>

{{ __('threats.kpi_top_ip') }}

(bool) $top_ip, 'text-ink-3' => ! $top_ip])>{{ $top_ip ?? '—' }}

{{-- Threat feed --}}
@forelse ($events as $e)
$e->is_error, 'bg-raised text-ink-3' => ! $e->is_error, ])>

$e->is_error, 'text-ink' => ! $e->is_error])>{{ $e->action_label }}

@if ($e->ip)

{{ $e->ip }}

@endif @if ($e->target)

{{ $e->target }}

@endif @php // Attacker-guessed credentials captured on a fake-login POST. Values are // ATTACKER-controlled — rendered via {{ }} so Blade auto-escapes them. $triedUser = data_get($e->meta, 'tried_user'); $triedPass = data_get($e->meta, 'tried_pass'); @endphp @if (! is_null($triedUser) || ! is_null($triedPass))

{{ __('threats.tried_creds') }}: {{ $triedUser ?? '—' }} / {{ $triedPass ?? '—' }}

@endif
{{ $e->created_at->diffForHumans() }}
@empty

{{ __('threats.empty_title') }}

@if (trim($q) !== '') {{ __('threats.empty_filtered', ['query' => $q]) }} @else {{ __('threats.empty_feed') }} @endif

@endforelse
{{-- Pagination — page is deep-linked via ?page= (Livewire WithPagination). --}} @if ($events->lastPage() > 1) @endif
{{-- Banned-IP management --}}
@forelse ($bannedIps as $ban)

{{ $ban->ip }}

{{ $ban->reason ?? __('threats.reason_unknown') }} {{ __('threats.banned_until', ['time' => $ban->banned_until->diffForHumans()]) }}

@can('manage-panel') {{ __('threats.unban') }} @endcan
@empty

{{ __('threats.empty_banned_title') }}

{{ __('threats.empty_banned') }}

@endforelse