@extends('layouts.admin') @section('title', 'Dashboard') @section('breadcrumb', 'Dashboard') @section('content') {{-- PAGE HEADER --}}

Admin Dashboard

System overview and monitoring — {{ now()->format('D, d M Y') }}

Risk Monitoring
{{-- STATS GRID --}}
👥
{{ number_format($stats['users']) }}
Total Users
🌍
{{ number_format($stats['countries']) }}
Countries
⚓
{{ number_format($stats['ports']) }}
Ports
📄
{{ number_format($stats['articles']) }}
Articles
📰
{{ number_format($stats['news_cache']) }}
Cached News
⭐
{{ number_format($stats['watchlists']) }}
Watchlists
⚠️
{{ $stats['avg_risk'] }}
Avg Risk Score
🎯
{{ number_format($stats['risk_scores']) }}
Risk Assessed
{{-- CHARTS ROW --}}
{{-- Risk Distribution Doughnut --}}
Risk Distribution
{{-- Countries by Region Bar --}}
Countries by Region
{{-- BOTTOM ROW --}}
{{-- Top Risk Countries --}}
Top Risk Countries
View All
@forelse($topRisk as $rs) @empty @endforelse
Country Score Level
{{ $rs->country?->country_name }}
{{ number_format($rs->total_score, 1) }}
{{ $rs->risk_level }}
No risk data yet.
{{-- Recent Users + Latest News --}}
Recent Users
View All
@forelse($recentUsers as $u)
{{ strtoupper(substr($u->name, 0, 1)) }}
{{ $u->name }}
{{ $u->email }}
{{ $u->role_id === 1 ? 'Admin' : 'User' }} {{ $u->created_at->diffForHumans() }}
@empty

No users found.

@endforelse
Latest News
View All
@forelse($latestNews as $n)
{{ Str::limit($n->title, 65) }}
{{ $n->sentiment ?? 'Neutral' }} {{ $n->source }} {{ $n->published_at?->diffForHumans() }}
@empty

No news cached yet.

@endforelse
@endsection @push('scripts') @endpush