@section('page-title', 'My Portal') {{-- Welcome Header --}}

Welcome back, {{ auth()->user()->name }} 👋

@if($client->company_name)

{{ $client->company_name }}

@endif
{{-- KPI Cards --}}
Active Hosting

{{ $stats['active_hosting'] }}

Active Domains

{{ $stats['active_domains'] }}

Expiring Soon

{{ $stats['expiring_soon'] }}

Within 30 days
Pending Invoices

{{ $stats['pending_invoices'] }}

@if($stats['total_outstanding'] > 0) {{ number_format($stats['total_outstanding'], 2) }} outstanding @endif
{{-- Upcoming Renewals --}} @if($upcomingRenewals->isNotEmpty())
Upcoming Renewals (Next 30 Days)
@foreach($upcomingRenewals as $item) @php $daysLeft = now()->diffInDays($item['expiry'], false); @endphp @endforeach
Type Name Expiry Days Left Renewal Amount
@if($item['type'] === 'Hosting') Hosting @else Domain @endif {{ $item['name'] }} {{ $item['expiry']->format('d M Y') }} {{ (int)$daysLeft }} days {{ number_format($item['amount'], 2) }} {{ $item['currency'] }}
@endif {{-- Quick Links --}}
@foreach([ ['client.hosting', 'fa-server', 'My Hosting', 'View hosting accounts', 'text-success', 'bg-success-subtle'], ['client.domains', 'fa-globe', 'My Domains', 'View all domains', 'text-indigo', 'bg-indigo-light'], ['client.invoices', 'fa-file-invoice-dollar', 'Invoices', 'View billing history', 'text-warning', 'bg-warning-subtle'], ['client.payments', 'fa-receipt', 'Payments', 'Payment history', 'text-info', 'bg-info-subtle'], ] as [$route, $icon, $title, $desc, $color, $bg]) @endforeach