@extends("client.layouts.app") @section("title", __("client.dashboard.title")) @section("content") {{-- Welcome Banner --}}

{{ __('client.dashboard.welcome_back', ['name' => auth()->user()->first_name]) }}

{{ __('client.dashboard.overview') }}

@php $credit = auth()->user()->credit ?? 0; @endphp @if($credit > 0)
{{ __('client.dashboard.account_credit') }}
${{ number_format($credit, 2) }}
@endif
{{-- Stat Cards --}}
{{ $serviceCount }}
{{ __('client.dashboard.active_services_stat') }}
{{ $domainCount }}
{{ __('client.dashboard.registered_domains') }}
{{ $unpaidInvoices }}
{{ __('client.dashboard.unpaid_invoices') }}
{{ $openTickets }}
{{ __('client.dashboard.open_tickets_stat') }}
{{-- Quick Actions --}}
{{ __('client.dashboard.quick_actions') }}
{{ __('client.dashboard.order_service') }} {{ __('client.dashboard.open_ticket') }} {{ __('client.dashboard.add_funds') }} {{ __('client.dashboard.edit_profile') }}
{{-- Recent Invoices + Tickets --}}
{{ __('client.dashboard.recent_invoices_title') }} {{ __('client.dashboard.view_all') }} →
@if($recentInvoices->isEmpty())
📄

{{ __('client.dashboard.no_invoices') }}

@else @foreach($recentInvoices as $invoice) @endforeach
{{ __('client.dashboard.invoice_col') }}{{ __('client.dashboard.due_col') }}{{ __('common.table.total') }}{{ __('common.table.status') }}
#{{ $invoice->invoice_num ?? $invoice->id }} {{ $invoice->due_date?->format("d M Y") ?? "-" }} ${{ number_format($invoice->total, 2) }} {{ __('client.status.' . strtolower($invoice->status)) }}
@endif
{{ __('client.dashboard.recent_tickets_title') }} {{ __('client.dashboard.view_all') }} →
@if($recentTickets->isEmpty())
👥

{{ __('client.dashboard.no_tickets') }}

@else @foreach($recentTickets as $ticket) @endforeach
{{ __('common.table.subject') }}{{ __('common.table.status') }}{{ __('common.table.last_reply') }}
{{ Str::limit($ticket->title, 38) }} status)) }}">{{ __('client.status.' . strtolower(str_replace(' ', '-', $ticket->status))) }} {{ $ticket->last_reply?->diffForHumans() ?? $ticket->created_at?->diffForHumans() }}
@endif
{{-- Active Services --}} @if($activeServices->isNotEmpty())
{{ __('client.dashboard.active_services_title') }} {{ __('client.dashboard.view_all') }} →
@foreach($activeServices as $service) @endforeach
{{ __('common.table.product') }}{{ __('common.table.domain') }}{{ __('common.table.amount') }}{{ __('client.dashboard.next_due') }}{{ __('common.table.status') }}
{{ $service->product?->name ?? __('client.dashboard.service_fallback', ['id' => $service->id]) }} {{ $service->domain ?? "-" }} ${{ number_format($service->amount, 2) }}/{{ $service->billing_cycle }} {{ $service->next_due_date?->format("d M Y") ?? "N/A" }} {{ __('client.status.active') }}
@endif @endsection