@php
$kpis = [
['label' => 'Total Articles', 'value' => $stats['total_articles'], 'icon' => 'document', 'cls' => 'kpi-blue', 'sub' => $stats['published_today'].' published today'],
['label' => 'Total Views', 'value' => number_format($stats['total_views']), 'icon' => 'eye', 'cls' => 'kpi-cyan', 'sub' => number_format($stats['views_today']).' today', 'trend' => $trends['views_pct']],
['label' => 'Subscribers', 'value' => number_format($stats['newsletter_subscribers']), 'icon' => 'mail', 'cls' => 'kpi-purple', 'sub' => 'newsletter list', 'trend' => $trends['subscribers_pct']],
['label' => 'Pending Comments', 'value' => $stats['pending_comments'], 'icon' => 'chat', 'cls' => 'kpi-amber', 'sub' => $stats['total_comments'].' total'],
['label' => 'Drafts', 'value' => $stats['drafts'], 'icon' => 'pencil', 'cls' => 'kpi-slate', 'sub' => $stats['scheduled'].' scheduled'],
['label' => 'Breaking News', 'value' => $stats['breaking_stories'], 'icon' => 'bolt', 'cls' => 'kpi-rose', 'sub' => $stats['featured_stories'].' featured'],
['label' => 'Active Users', 'value' => $stats['total_users'], 'icon' => 'users', 'cls' => 'kpi-green', 'sub' => 'editors & readers'],
['label' => 'News Tips', 'value' => $stats['pending_tips'], 'icon' => 'tip', 'cls' => 'kpi-orange', 'sub' => 'awaiting review'],
];
@endphp
@foreach($kpis as $kpi)
{{ $kpi['label'] }}
@if(isset($kpi['trend']))
@php $trend = $kpi['trend']; @endphp
@if($trend > 0) ↑ @elseif($trend < 0) ↓ @else — @endif
{{ abs($trend) }}%
@endif
{{ $kpi['value'] }}
{{ $kpi['sub'] }}
@endforeach