@extends('merchant_admin.layouts.app')

@section('title', '商家仪表盘')
@section('page_title', '商家仪表盘')

@section('content')
<div class="page-header mb-20" data-page="merchant_admin.dashboard">
    <div class="page-header-main">
        <div>
            <div class="page-header-title">商家仪表盘</div>
            <div class="page-header-subtitle">当前商家：{{ $merchant->name }}（{{ $merchant->slug }}）。这里是商家运营视角后台，只展示当前商家范围内的数据。</div>
        </div>
        <div class="page-header-actions">
            <span class="muted muted-xs">缓存：{{ $cacheMeta['store'] }} / TTL {{ $cacheMeta['ttl'] }}</span>
        </div>
    </div>
</div>

<div class="kpi-grid mb-20" data-role="kpi-grid">
    <div class="card">
        <div class="stat-card-title">商家用户</div>
        <div class="stat-card-value">{{ $stats['users'] }}</div>
        <div class="stat-card-footnote">当前商家用户总量</div>
    </div>
    <div class="card">
        <div class="stat-card-title">商家商品</div>
        <div class="stat-card-value">{{ $stats['products'] }}</div>
        <div class="stat-card-footnote">当前商家商品总量</div>
    </div>
    <div class="card">
        <div class="stat-card-title">商家订单</div>
        <div class="stat-card-value">{{ $stats['orders'] }}</div>
        <div class="stat-card-footnote">当前商家订单总量</div>
    </div>
    <div class="card">
        <div class="stat-card-title">待处理订单</div>
        <div class="stat-card-value">{{ $stats['pending_orders'] }}</div>
        <div class="stat-card-footnote">待处理（pending）订单</div>
    </div>
</div>
@endsection
