
        <!-- Alerts (dismissable + auto-fade after 10 sec) -->
        @if(isset($primary) || session('primary'))
        <div class="alert alert-solid-primary alert-dismissible fade show d-flex align-items-center status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-command"></i>
          </span>
          {{ $primary ?? session('primary') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif

        @if(isset($error) || session('error'))
        <div class="alert alert-solid-danger alert-dismissible fade show d-flex align-items-center status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-error"></i>
          </span>
          {{ $error ?? session('error') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif


        @if(isset($secondary) || session('secondary'))
        <div class="alert alert-solid-secondary alert-dismissible fade show d-flex align-items-center status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-envelope"></i>
          </span>
          {{ $secondary ?? session('secondary') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif

        @if(isset($success) || session('success'))
        <div class="alert alert-solid-success alert-dismissible fade show d-flex align-items-center status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-desktop"></i>
          </span>
          {{ $success ?? session('success') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif

        @if(isset($danger) || session('danger'))
        <div class="alert alert-solid-danger alert-dismissible fade show d-flex align-items-center status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-store"></i>
          </span>
          {{ $danger ?? session('danger') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif

        @if(isset($warning) || session('warning'))
        <div class="alert alert-solid-warning alert-dismissible fade show d-flex align-items-center status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-wallet"></i>
          </span>
          {{ $warning ?? session('warning') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif

        @if(isset($info) || session('info'))
        <div class="alert alert-solid-info alert-dismissible fade show d-flex align-items-center status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-detail"></i>
          </span>
          {{ $info ?? session('info') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif

        @if(isset($dark) || session('dark'))
        <div class="alert alert-solid-dark alert-dismissible fade show d-flex align-items-center mb-0 status-alert" role="alert">
          <span class="alert-icon rounded-circle">
            <i class="bx bx-xs bx-save"></i>
          </span>
          {{ $dark ?? session('dark') }}
          <button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Chiudi"></button>
        </div>
        @endif

        <!-- Auto dismiss JS -->
        <script>
        document.addEventListener('DOMContentLoaded', function () {
          setTimeout(function() {
            document.querySelectorAll('.status-alert').forEach(function(el) {
              // Bootstrap 5: triggers fade out (and removal) of alert
              var alertInstance = bootstrap.Alert.getOrCreateInstance(el);
              alertInstance.close();
            });
          }, 10000);
        });
        </script>

  <!--/ Alerts with Icons -->