{{-- Reusable dashboard stat/list card. Use anywhere (MEC dashboard, reports, etc.). Metric card: List card: Use backgroundGradient for gradient, e.g. backgroundGradient="linear-gradient(180deg,#e65100,#ff9800)" Optional: iconBg (icon circle color), rounded (true/false), extra slot for footer content. Pass id, class via attributes. --}} @props([ 'type' => 'metric', 'background' => '#1A3B73', 'backgroundGradient' => null, 'number' => null, 'title' => '', 'icon' => null, 'subText' => null, 'meta' => null, 'trend' => null, 'layout' => 'compact', 'iconBg' => 'rgba(255,255,255,0.2)', 'items' => [], 'rounded' => true, ]) @once @push('styles') @endpush @endonce @php $isList = $type === 'list' || (empty($number) && empty($title) && !empty($items)); $bgStyle = $backgroundGradient ? 'background: ' . $backgroundGradient . ';' : 'background-color: ' . $background . ';'; @endphp