@extends('layouts.app')
@section('title', 'Dashboard')
@section('heading', 'Good morning, ' . auth()->user()->full_name . ' ✦')
@section('subheading', now()->format('l, F j, Y') . ($event ? ' · ' . $event->couple_name . '\'s Wedding' : ''))
@section('topbar_actions')
Add Contribution
@endsection
@section('content')
{{-- Progress Banner --}}
@if($event)
Total Collected
TZS {{ number_format($stats['total_confirmed']) }}
/ {{ number_format($event->target_budget) }}
{{ $stats['progress_percent'] }}% of target reached
TZS {{ number_format($event->target_budget - $stats['total_confirmed']) }} remaining
@foreach([['Days to Go', $stats['days_to_go']], ['Contributors', $stats['total_contributors']], ['Gifts', $stats['total_gifts']]] as [$lbl, $val])
@if(!$loop->last)
@endif
@endforeach
@endif
{{-- Stats Grid --}}
@php
$cards = [
['Cash Collected (TZS)', number_format($stats['total_confirmed']), 'rose', '↑ Today', 'M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'],
['Pending Amount (TZS)', number_format($stats['total_pending']), 'gold', 'Pending', 'M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'],
['Gifts Registered', $stats['total_gifts'], 'green', 'Total', 'M20 12v10H4V12M22 7H2v5h20V7zM12 22V7'],
['Receipts Sent', $stats['receipts_sent'], 'blue', 'Auto', 'M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2zM22 6l-10 7L2 6'],
];
$topColors = ['rose'=>'linear-gradient(90deg,var(--rose),var(--rose-light))', 'gold'=>'linear-gradient(90deg,var(--gold),var(--gold-light))', 'green'=>'linear-gradient(90deg,var(--green),#4CAF82)', 'blue'=>'linear-gradient(90deg,var(--blue),#3A7AC8)'];
$bgColors = ['rose'=>'var(--rose-pale)','gold'=>'var(--gold-pale)','green'=>'var(--green-pale)','blue'=>'var(--blue-pale)'];
$txtColors= ['rose'=>'var(--rose)','gold'=>'var(--gold)','green'=>'var(--green)','blue'=>'var(--blue)'];
@endphp
@foreach($cards as [$label, $val, $color, $badge, $icon])
{{ $badge }}
{{ $val }}
{{ $label }}
@endforeach
{{-- Two Column --}}