<div class="col-12 mb-6">
    <div class="card">
      <div class="card-widget-separator-wrapper">
        <div class="card-body card-widget-separator">
          <div class="row gy-4 gy-sm-1">
            <div class="col-sm-6 col-lg-3">
              <div class="d-flex justify-content-between align-items-center card-widget-1 border-end pb-4 pb-sm-0">
                <div>
                  <h4 class="mb-0">{{ \App\Models\Ordine::where('created_at', '>=', now()->startOfDay())->where('attivita_id', session()->get('attivita_attuale'))->count() }}</h4>
                  <p class="mb-0">Ordini di oggi (€ {{ number_format(\App\Models\Ordine::where('created_at', '>=', now()->startOfDay())->where('attivita_id', session()->get('attivita_attuale'))->sum('prezzo'), 2, ',', '.') }})</p>
                </div>
                <div class="avatar me-sm-6">
                  <span class="avatar-initial rounded bg-label-secondary text-heading">
                    <i class="bx bx-calendar-check bx-26px"></i>
                  </span>
                </div>
              </div>
              <hr class="d-none d-sm-block d-lg-none me-6">
            </div>
            <div class="col-sm-6 col-lg-3">
              <div class="d-flex justify-content-between align-items-center card-widget-2 border-end pb-4 pb-sm-0">
                <div>
                  <h4 class="mb-0">{{ \App\Models\Ordine::where('attivita_id', session()->get('attivita_attuale'))->where('created_at', '>=', now()->subDay()->startOfDay())->where('created_at', '<', now()->startOfDay())->count() }}</h4>
                  <p class="mb-0">Ordini di ieri (€ {{ number_format(\App\Models\Ordine::where('attivita_id', session()->get('attivita_attuale'))->where('created_at', '>=', now()->subDay()->startOfDay())->where('created_at', '<', now()->startOfDay())->sum('prezzo'), 2, ',', '.') }})</p>
                </div>
                <div class="avatar me-lg-6">
                  <span class="avatar-initial rounded bg-label-secondary text-heading">
                    <i class="bx bx-calendar-minus bx-26px"></i>
                  </span>
                </div>
              </div>
              <hr class="d-none d-sm-block d-lg-none">
            </div>
            <div class="col-sm-6 col-lg-3">
              <div class="d-flex justify-content-between align-items-center border-end pb-4 pb-sm-0 card-widget-3">
                <div>
                  <h4 class="mb-0">{{ \App\Models\Ordine::whereYear('created_at', date('Y'))->where('attivita_id', session()->get('attivita_attuale'))->count() }}</h4>
                  <p class="mb-0">Ordini totali ({{ date('Y') }})</p>
                </div>
                <div class="avatar me-sm-6">
                  <span class="avatar-initial rounded bg-label-secondary text-heading">
                    <i class="bx bx-receipt bx-26px"></i>
                  </span>
                </div>
              </div>
            </div>
            <div class="col-sm-6 col-lg-3">
              <div class="d-flex justify-content-between align-items-center">
                <div>
                  <h4 class="mb-0">€ {{ number_format(\App\Models\Ordine::whereYear('created_at', date('Y'))->where('attivita_id', session()->get('attivita_attuale'))->sum('prezzo'), 2, ',', '.') }}</h4>
                  <p class="mb-0">Incassi totali ({{ date('Y') }})</p>
                </div>
                <div class="avatar">
                  <span class="avatar-initial rounded bg-label-secondary text-heading">
                    <i class="bx bx-money bx-26px"></i>
                  </span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>