@extends('admin.layout.master') @section('css') @endsection @section('content')
{{-- ══════════════════════════════════════════════════════════════ Hero / Welcome Banner ══════════════════════════════════════════════════════════════ --}}

{{ __('admin.welcome') }}, {{ auth('admin')->user()->name }}

{{ __('routes.main_page') }}

{{ now()->locale(app()->getLocale())->translatedFormat('l، d F Y') }}

@if(($kpis['pending_providers'] ?? 0) > 0) @haspermission('admin.providers.index') {{ $kpis['pending_providers'] }} {{ __('admin.pending_providers') }} @endhaspermission @endif @if(($kpis['pending_withdrawals'] ?? 0) > 0) @haspermission('admin.withdrawal_requests.index') {{ $kpis['pending_withdrawals'] }} {{ __('admin.pending_withdrawals') }} @endhaspermission @endif
{{-- ══════════════════════════════════════════════════════════════ Today KPI cards ══════════════════════════════════════════════════════════════ --}}

{{ __('admin.today') }}

{{-- Clients --}} {{-- Orders --}} {{-- Revenue today --}}
@php $revPct = $kpis['revenue_change_pct'] ?? 0; @endphp
{{ __('admin.reports_sales_value') }}
{{ number_format($kpis['revenue_today'] ?? 0, 2) }} {{ __('admin.sar') }}
@if($revPct > 0) +{{ $revPct }}% @elseif($revPct < 0) {{ $revPct }}% @else @endif {{ __('admin.vs_yesterday') }}
{{-- Listings split by sale type --}} @php $auctions = $kpis['auctions'] ?? 0; $directOffers = $kpis['direct_offers'] ?? 0; $totalListings = $kpis['total_listings'] ?? 0; $auctionRate = $totalListings > 0 ? round(($auctions / $totalListings) * 100) : 0; $directOfferRate = $totalListings > 0 ? round(($directOffers / $totalListings) * 100) : 0; @endphp {{-- Direct offers --}}
{{-- ══════════════════════════════════════════════════════════════ Overview / Totals row ══════════════════════════════════════════════════════════════ --}}

{{ __('admin.overview_statistics') }}

{{-- Providers --}} {{-- Total orders --}} {{-- Total revenue --}}
{{ __('admin.total_revenue') }}
{{ number_format($kpis['total_revenue'] ?? 0, 2) }}
{{ number_format($kpis['revenue_this_month'] ?? 0, 2) }} {{ __('admin.sar') }} {{ __('admin.month') }}
{{-- Pending withdrawal requests --}}
{{-- ══════════════════════════════════════════════════════════════ Marketplace & support metrics ══════════════════════════════════════════════════════════════ --}}

{{ __('admin.additional_statistics') }}

{{ __('admin.reports_commissions') }}
{{ number_format($kpis['avg_commission'] ?? 0, 2) }} {{ __('admin.sar') }}
{{ __('admin.month') }}
{{-- ══════════════════════════════════════════════════════════════ Quick Actions ══════════════════════════════════════════════════════════════ --}} @if(!empty($quickActions))

{{ __('admin.quick_actions') }}

@php $actionColors = ['ib-yellow', 'ib-orange', 'ib-purple', 'ib-teal']; $ai = 0; @endphp @foreach($quickActions as $action) @php $ai++; @endphp @endforeach
@endif {{-- ══════════════════════════════════════════════════════════════ Charts row — monthly performance & fleet ══════════════════════════════════════════════════════════════ --}}

{{ __('admin.financial_statistics') }}

{{ __('admin.monthly_performance') }}
{{ __('admin.revenue') }} ({{ __('admin.sar') }}) {{ __('admin.reports_orders') }}
{{ __('admin.listing_type_chart') }}
{{-- ══════════════════════════════════════════════════════════════ Charts row — daily activity & order status ══════════════════════════════════════════════════════════════ --}}

{{ __('admin.recent_activity') }}

{{ __('admin.daily_activity') }}
{{ __('admin.last_14_days') }}
{{ __('admin.order_status_chart') }}
{{-- ══════════════════════════════════════════════════════════════ Charts row — user growth ══════════════════════════════════════════════════════════════ --}}

{{ __('admin.users_statistics') }}

{{ __('admin.user_growth') }}
{{ __('admin.clients') }} {{ __('admin.providers') }}
{{-- ══════════════════════════════════════════════════════════════ Legacy menu cards (only shown if non-empty) ══════════════════════════════════════════════════════════════ --}} @if(count($menus ?? []) > 0)

{{ __('admin.dashboard') }}

@foreach($menus as $key => $menu) @php $color = $colores[array_rand($colores)] @endphp

{{ $menu['count'] ?? '' }}

{{ $menu['name'] }}

@endforeach
@endif
{{-- /.neo-dash --}} @endsection @section('js') @endsection