@extends('layout.layout')

@php
    $script= '<script src="' . asset('assets/js/homeOneChart.js') . '"></script>';
@endphp

@section('content')

<!-- Tab Navigation -->
<div class="row mb-16">
    <div class="col-12">
        <div class="card shadow-lg border-0 overflow-hidden">
            <div class="card-body p-0">
                <ul class="nav nav-justified position-relative flex-wrap flex-md-nowrap" id="dashboard-tabs" role="tablist" style="gap: 4px; overflow-x: auto; white-space: nowrap;">

                    <li class="nav-item position-relative flex-fill" role="presentation" style="z-index: 2; min-width: 90px;">
                        <button class="nav-link active fw-semibold d-flex align-items-center justify-content-center gap-2 text-md py-3 px-2 border-0 bg-transparent position-relative overflow-hidden w-100 flex-column flex-sm-row"
                                id="pertek-tab" data-bs-toggle="pill" data-bs-target="#pertek-content"
                                type="button" role="tab" aria-controls="pertek-content" aria-selected="true"
                                data-bs-toggle="tooltip" data-bs-placement="bottom"
                                title="Persetujuan Teknis & Sertifikat Laik Operasi"
                                data-bs-custom-class="tooltip-mobile">
                            <div class="icon-wrapper d-flex align-items-center justify-content-center">
                                <x-lucide-shield-check class="w-20-px h-20-px w-md-22-px h-md-22-px transition-all duration-300"/>
                            </div>
                            <span class="nav-text transition-all duration-300 text-center">PERTEK</span>
                            <div class="nav-ripple position-absolute rounded-circle bg-white opacity-0 transition-all"
                                 style="width: 0; height: 0; top: 50%; left: 50%; transform: translate(-50%, -50%);"></div>
                        </button>
                    </li>

                    <li class="nav-item position-relative flex-fill" role="presentation" style="z-index: 2; min-width: 90px;">
                        <button class="nav-link fw-semibold d-flex align-items-center justify-content-center gap-2 text-md py-3 px-2 border-0 bg-transparent position-relative overflow-hidden w-100 flex-column flex-sm-row"
                                id="rintek-tab" data-bs-toggle="pill" data-bs-target="#rintek-content"
                                type="button" role="tab" aria-controls="rintek-content" aria-selected="false"
                                data-bs-toggle="tooltip" data-bs-placement="bottom"
                                title="Rekomendasi Teknis"
                                data-bs-custom-class="tooltip-mobile">
                            <div class="icon-wrapper d-flex align-items-center justify-content-center">
                                <x-lucide-settings class="w-20-px h-20-px w-md-22-px h-md-22-px transition-all duration-300"/>
                            </div>
                            <span class="nav-text transition-all duration-300 text-center">RINTEK</span>
                            <div class="nav-ripple position-absolute rounded-circle bg-white opacity-0 transition-all"
                                 style="width: 0; height: 0; top: 50%; left: 50%; transform: translate(-50%, -50%);"></div>
                        </button>
                    </li>

                    <li class="nav-item position-relative flex-fill" role="presentation" style="z-index: 2; min-width: 90px;">
                        <button class="nav-link fw-semibold d-flex align-items-center justify-content-center gap-2 text-md py-3 px-2 border-0 bg-transparent position-relative overflow-hidden w-100 flex-column flex-sm-row"
                                id="amdal-tab" data-bs-toggle="pill" data-bs-target="#amdal-content"
                                type="button" role="tab" aria-controls="amdal-content" aria-selected="false"
                                data-bs-toggle="tooltip" data-bs-placement="bottom"
                                title="Analisis Mengenai Dampak Lingkungan"
                                data-bs-custom-class="tooltip-mobile">
                            <div class="icon-wrapper d-flex align-items-center justify-content-center">
                                <x-lucide-leaf class="w-20-px h-20-px w-md-22-px h-md-22-px transition-all duration-300"/>
                            </div>
                            <span class="nav-text transition-all duration-300 text-center">AMDAL</span>
                            <div class="nav-ripple position-absolute rounded-circle bg-white opacity-0 transition-all"
                                 style="width: 0; height: 0; top: 50%; left: 50%; transform: translate(-50%, -50%);"></div>
                        </button>
                    </li>

                    <li class="nav-item position-relative flex-fill" role="presentation" style="z-index: 2; min-width: 90px;">
                        <button class="nav-link fw-semibold d-flex align-items-center justify-content-center gap-2 text-md py-3 px-2 border-0 bg-transparent position-relative overflow-hidden w-100 flex-column flex-sm-row"
                                id="angkut-tab" data-bs-toggle="pill" data-bs-target="#angkut-content"
                                type="button" role="tab" aria-controls="angkut-content" aria-selected="false"
                                data-bs-toggle="tooltip" data-bs-placement="bottom"
                                title="Izin Angkut & Olah Limbah B3"
                                data-bs-custom-class="tooltip-mobile">
                            <div class="icon-wrapper d-flex align-items-center justify-content-center">
                                <x-lucide-bus-front class="w-20-px h-20-px w-md-22-px h-md-22-px transition-all duration-300"/>
                            </div>
                            <span class="nav-text transition-all duration-300 text-center">IZIN ANGKUT</span>
                            <div class="nav-ripple position-absolute rounded-circle bg-white opacity-0 transition-all"
                                 style="width: 0; height: 0; top: 50%; left: 50%; transform: translate(-50%, -50%);"></div>
                        </button>
                    </li>
                    <li class="nav-item position-relative flex-fill" role="presentation" style="z-index: 2; min-width: 90px;">
                        <button class="nav-link fw-semibold d-flex align-items-center justify-content-center gap-2 text-md py-3 px-2 border-0 bg-transparent position-relative overflow-hidden w-100 flex-column flex-sm-row"
                                id="ujiemisi-tab" data-bs-toggle="pill" data-bs-target="#ujiemisi-content"
                                type="button" role="tab" aria-controls="ujiemisi-content" aria-selected="false"
                                data-bs-toggle="tooltip" data-bs-placement="bottom"
                                title="Izin Tempat Uji Emisi Kendaraan Bermotor"
                                data-bs-custom-class="tooltip-mobile">
                            <div class="icon-wrapper d-flex align-items-center justify-content-center">
                                <x-lucide-bus class="w-20-px h-20-px w-md-22-px h-md-22-px transition-all duration-300"/>
                            </div>
                            <span class="nav-text transition-all duration-300 text-center">IZIN TUE</span>
                            <div class="nav-ripple position-absolute rounded-circle bg-white opacity-0 transition-all"
                                 style="width: 0; height: 0; top: 50%; left: 50%; transform: translate(-50%, -50%);"></div>
                        </button>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>


<!-- Tab Content -->
<div class="tab-content" id="dashboard-tab-content">

    <!-- Pertek Content -->
    <div class="tab-pane fade show active" id="pertek-content" role="tabpanel" aria-labelledby="pertek-tab">
        <div class="row gy-4 mb-4">
            <!-- Total Pengajuan -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-1 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-primary">PERTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Total Pengajuan</p>
                                <h4 class="mb-1 fw-bold text-primary-600">
                                    @php
                                        $pertekData = $allStatistics['pertek']['data'] ?? [];
                                        $totalData = collect($pertekData)->firstWhere('id', 'total');
                                    @endphp
                                    {{ number_format($totalData['value'] ?? 65) }}
                                </h4>
                            </div>
                            <div class="w-50-px h-50-px bg-yellow rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-equal class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Disetujui -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-2 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                 <span class="badge text-bg-primary">PERTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Disetujui</p>
                                <h4 class="mb-1 fw-bold text-success-main">
                                    @php
                                        $selesaiData = collect($pertekData)->firstWhere('id', 'selesai');
                                    @endphp
                                    {{ number_format($selesaiData['value'] ?? 45) }}
                                </h4>

                            </div>
                            <div class="w-50-px h-50-px bg-green rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-check class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Proses -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-3 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                 <span class="badge text-bg-primary">PERTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Dalam Proses</p>
                                <h4 class="mb-1 fw-bold text-info-main">
                                    @php
                                        $prosesData = collect($pertekData)->firstWhere('id', 'proses');
                                    @endphp
                                    {{ number_format($prosesData['value'] ?? 12) }}
                                </h4>

                            </div>
                            <div class="w-50-px h-50-px bg-info rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-refresh-cw class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Ditolak -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-4 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                 <span class="badge text-bg-primary">PERTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Ditolak</p>
                                <h4 class="mb-1 fw-bold text-danger-main">
                                    @php
                                        $ditolakData = collect($pertekData)->firstWhere('id', 'ditolak');
                                    @endphp
                                    {{ number_format($ditolakData['value'] ?? 8) }}
                                </h4>

                            </div>
                            <div class="w-50-px h-50-px bg-red rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-x class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Top 5 Izin Tercepat Table -->
        <div class="row gy-4 mt-4">
            <div class="col-lg-6 col-12">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                         <span class="badge text-bg-primary">PERTEK</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Tercepat</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm d-none d-md-table-cell">Total Izin</th>
                                        <th scope="col" class="text-sm d-none d-xl-table-cell">Waktu Rata-Rata (Pemohon)</th>
                                        <th scope="col" class="text-sm d-none d-xl-table-cell">Waktu Rata-Rata (Petugas)</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @php
                                        $pertekFastestData = $allFastestData['pertek']['data'] ?? [];
                                    @endphp
                                    @forelse($pertekFastestData as $fastest)
                                    <tr>
                                        <td>{{ $fastest['rank_order'] }}</td>
                                        <td class="text-sm">{{ $fastest['Nama'] }}</td>
                                        <td class="text-sm d-none d-md-table-cell">{{ number_format($fastest['Total']) }}</td>
                                        <td class="text-sm d-none d-xl-table-cell">{{ $fastest['DurasiPemohon'] }}</td>
                                        <td class="text-sm d-none d-xl-table-cell">{{ $fastest['DurasiPetugas'] }}</td>
                                    </tr>
                                    @empty
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm d-none d-md-table-cell">125</td>
                                        <td class="text-sm d-none d-xl-table-cell">58 Jam 29 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">19 Jam 12 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH (PEMANFAATAN)</td>
                                        <td class="text-sm d-none d-md-table-cell">89</td>
                                        <td class="text-sm d-none d-xl-table-cell">36 Jam 0 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">26 Jam 24 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU AIR LIMBAH (PEMBUANGAN)</td>
                                        <td class="text-sm d-none d-md-table-cell">156</td>
                                        <td class="text-sm d-none d-xl-table-cell">43 Jam 12 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">31 Jam 12 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH (PEMBUANGAN)</td>
                                        <td class="text-sm d-none d-md-table-cell">73</td>
                                        <td class="text-sm d-none d-xl-table-cell">50 Jam 24 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">38 Jam 24 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU AIR LIMBAH (PEMANFAATAN)</td>
                                        <td class="text-sm d-none d-md-table-cell">92</td>
                                        <td class="text-sm d-none d-xl-table-cell">55 Jam 12 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">45 Jam 36 Menit</td>
                                    </tr>
                                    @endforelse
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-lg-6 col-12">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                         <span class="badge text-bg-primary mb-12">PERTEK</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Terakhir Terbit</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm d-none d-md-table-cell">Pemohon</th>
                                        <th scope="col" class="text-sm d-none d-xl-table-cell">Tanggal Terbit</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @php
                                        $pertekTerakhirTerbitData = $allTerakhirTerbitData['pertek']['data'] ?? [];
                                    @endphp
                                    @forelse($pertekTerakhirTerbitData as $terakhir)
                                    <tr>
                                        <td>{{ $terakhir['rank_order'] }}</td>
                                        <td class="text-sm">{{ $terakhir['NamaIzin'] }}</td>
                                        <td class="text-sm d-none d-md-table-cell">{{ $terakhir['Pemohon'] }}</td>
                                        <td class="text-sm d-none d-xl-table-cell">{{ \App\Helpers\DashboardHelper::formatTanggalTerbit($terakhir['TanggalTerbit']) }}</td>
                                    </tr>
                                    @empty
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm d-none d-md-table-cell">PT. MAJU BERSAMA</td>
                                        <td class="text-sm d-none d-xl-table-cell">15 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm d-none d-md-table-cell">CV. KARYA MANDIRI</td>
                                        <td class="text-sm d-none d-xl-table-cell">14 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm d-none d-md-table-cell">PT. INDUSTRI SEJAHTERA</td>
                                        <td class="text-sm d-none d-xl-table-cell">13 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm d-none d-md-table-cell">PT. TEKNOLOGI MODERN</td>
                                        <td class="text-sm d-none d-xl-table-cell">12 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm d-none d-md-table-cell">CV. BERKAH JAYA</td>
                                        <td class="text-sm d-none d-xl-table-cell">11 Des 2024</td>
                                    </tr>
                                    @endforelse
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row gy-4 mt-1">
            <div class="col-xxl-6 col-xl-12">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex flex-wrap align-items-center justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="text-lg mb-0">Grafik Trend Pengajuan Pertek/SLO</h6>
                                <span class="badge text-bg-primary">PERTEK</span>
                            </div>
                            <select class="form-select bg-base form-select-sm w-auto">
                                <option>Yearly</option>
                                <option>Monthly</option>
                                <option>Weekly</option>
                                <option>Today</option>
                            </select>
                        </div>
                        <div class="d-flex flex-wrap align-items-center gap-2 mt-8">
                            <h6 class="mb-0">1,450</h6>
                            <span class="text-sm fw-semibold rounded-pill bg-success-focus text-success-main border br-success px-8 py-4 line-height-1 d-flex align-items-center gap-1">
                                15% <iconify-icon icon="bxs:up-arrow" class="text-xs"></iconify-icon>
                            </span>
                            <span class="text-xs fw-medium">+ 125 Pengajuan/Bulan</span>
                        </div>
                        <div id="chart-pertek" class="pt-28 apexcharts-tooltip-style-1"></div>
                    </div>
                </div>
            </div>

            <div class="col-xxl-6">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex align-items-center flex-wrap gap-2 justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="mb-2 fw-bold text-lg mb-0">Grafik Trend Distribusi Jenis Izin</h6>
                                <span class="badge text-bg-primary">PERTEK</span>
                            </div>
                            <select class="form-select form-select-sm w-auto bg-base border text-secondary-light">
                                <option>Today</option>
                                <option>Weekly</option>
                                <option>Monthly</option>
                                <option>Yearly</option>
                            </select>
                        </div>
                        <ul class="d-flex flex-wrap align-items-center mt-3 gap-3">
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-primary-600"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Usaha Perdagangan & Jasa</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-yellow"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Property</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-success-main"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Manufaktur</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-danger-400"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Lainnya</span>
                            </li>
                        </ul>

                        <div class="mt-40">
                            <div id="paymentStatusChart-pertek" class="margin-16-minus"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Rintek Content -->
    <div class="tab-pane fade" id="rintek-content" role="tabpanel" aria-labelledby="rintek-tab">
        <div class="row gy-4 mb-4">
            <!-- Total Pengajuan -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-1 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-success">RINTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Total Pengajuan</p>
                                <h4 class="mb-1 fw-bold text-primary-600">
                                    @php
                                        $rintekData = $allStatistics['rintek']['data'] ?? [];
                                        $rintekTotalData = collect($rintekData)->firstWhere('id', 'total');
                                    @endphp
                                    {{ number_format($rintekTotalData['value'] ?? 892) }}
                                </h4>
                            </div>
                            <div class="w-50-px h-50-px bg-yellow rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-equal class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Disetujui -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-2 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-success">RINTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Disetujui</p>
                                <h4 class="mb-1 fw-bold text-success-main">
                                    @php
                                        $rintekSelesaiData = collect($rintekData)->firstWhere('id', 'selesai');
                                    @endphp
                                    {{ number_format($rintekSelesaiData['value'] ?? 675) }}
                                </h4>
                            </div>
                            <div class="w-50-px h-50-px bg-green rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-check class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Proses -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-3 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-success">RINTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Dalam Proses</p>
                                <h4 class="mb-1 fw-bold text-info-main">
                                    @php
                                        $rintekProsesData = collect($rintekData)->firstWhere('id', 'proses');
                                    @endphp
                                    {{ number_format($rintekProsesData['value'] ?? 147) }}
                                </h4>

                            </div>
                            <div class="w-50-px h-50-px bg-info rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-refresh-cw class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Ditolak -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-4 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-success">RINTEK</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Ditolak</p>
                                <h4 class="mb-1 fw-bold text-danger-main">
                                    @php
                                        $rintekDitolakData = collect($rintekData)->firstWhere('id', 'ditolak');
                                    @endphp
                                    {{ number_format($rintekDitolakData['value'] ?? 70) }}
                                </h4>

                            </div>
                            <div class="w-50-px h-50-px bg-red rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-x class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Top 5 Izin Tercepat Table -->
        <div class="row gy-4 mt-4">
            <div class="col-lg-6 col-12">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-success">RINTEK</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Tercepat </h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm d-none d-md-table-cell">Total Izin</th>
                                        <th scope="col" class="text-sm d-none d-xl-table-cell">Waktu Rata-Rata (Pemohon)</th>
                                        <th scope="col" class="text-sm d-none d-xl-table-cell">Waktu Rata-Rata (Petugas)</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">REKOMENDASI TEKNIS KEGIATAN PEMANFAATAN RUANG</td>
                                        <td class="text-sm d-none d-md-table-cell">98</td>
                                        <td class="text-sm d-none d-xl-table-cell">42 Jam 15 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">18 Jam 30 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS BANGUNAN GEDUNG</td>
                                        <td class="text-sm d-none d-md-table-cell">76</td>
                                        <td class="text-sm d-none d-xl-table-cell">35 Jam 45 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">22 Jam 12 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">IZIN MENDIRIKAN BANGUNAN</td>
                                        <td class="text-sm d-none d-md-table-cell">134</td>
                                        <td class="text-sm d-none d-xl-table-cell">48 Jam 20 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">28 Jam 45 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">SERTIFIKAT LAIK FUNGSI BANGUNAN</td>
                                        <td class="text-sm d-none d-md-table-cell">67</td>
                                        <td class="text-sm d-none d-xl-table-cell">52 Jam 10 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">35 Jam 20 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS PRASARANA WILAYAH</td>
                                        <td class="text-sm d-none d-md-table-cell">89</td>
                                        <td class="text-sm d-none d-xl-table-cell">60 Jam 30 Menit</td>
                                        <td class="text-sm d-none d-xl-table-cell">40 Jam 15 Menit</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

               <div class="col-lg-6 col-12">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-success">RINTEK</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Terakhir Terbit</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm d-none d-md-table-cell">Pemohon</th>
                                        <th scope="col" class="text-sm d-none d-xl-table-cell">Tanggal Terbit</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm d-none d-md-table-cell">PT. MAJU BERSAMA</td>
                                        <td class="text-sm d-none d-xl-table-cell">15 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm d-none d-md-table-cell">CV. KARYA MANDIRI</td>
                                        <td class="text-sm d-none d-xl-table-cell">14 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm d-none d-md-table-cell">PT. INDUSTRI SEJAHTERA</td>
                                        <td class="text-sm d-none d-xl-table-cell">13 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm d-none d-md-table-cell">PT. TEKNOLOGI MODERN</td>
                                        <td class="text-sm d-none d-xl-table-cell">12 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm">CV. BERKAH JAYA</td>
                                        <td class="text-sm d-none d-lg-table-cell">11 Des 2024</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row gy-4 mt-1">
            <div class="col-xxl-6 col-xl-12">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex flex-wrap align-items-center justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="text-lg mb-0">Grafik Trend Pengajuan Rintek</h6>
                                <span class="badge text-bg-success">RINTEK</span>
                            </div>
                            <select class="form-select bg-base form-select-sm w-auto">
                                <option>Yearly</option>
                                <option>Monthly</option>
                                <option>Weekly</option>
                                <option>Today</option>
                            </select>
                        </div>
                        <div class="d-flex flex-wrap align-items-center gap-2 mt-8">
                            <h6 class="mb-0">892</h6>
                            <span class="text-sm fw-semibold rounded-pill bg-success-focus text-success-main border br-success px-8 py-4 line-height-1 d-flex align-items-center gap-1">
                                8% <iconify-icon icon="bxs:up-arrow" class="text-xs"></iconify-icon>
                            </span>
                            <span class="text-xs fw-medium">+ 67 Pengajuan/Bulan</span>
                        </div>
                        <div id="chart-rintek" class="pt-28 apexcharts-tooltip-style-1"></div>
                    </div>
                </div>
            </div>

            <div class="col-xxl-6">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex align-items-center flex-wrap gap-2 justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="mb-2 fw-bold text-lg mb-0">Grafik Trend Distribusi Jenis Izin</h6>
                                <span class="badge text-bg-success">RINTEK</span>
                            </div>
                            <select class="form-select form-select-sm w-auto bg-base border text-secondary-light">
                                <option>Today</option>
                                <option>Weekly</option>
                                <option>Monthly</option>
                                <option>Yearly</option>
                            </select>
                        </div>
                        <ul class="d-flex flex-wrap align-items-center mt-3 gap-3">
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-primary-600"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Bangunan Gedung</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-yellow"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Infrastruktur</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-success-main"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Tata Ruang</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-danger-400"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Lainnya</span>
                            </li>
                        </ul>

                        <div class="mt-40">
                            <div id="paymentStatusChart-rintek" class="margin-16-minus"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Amdal Content -->
    <div class="tab-pane fade" id="amdal-content" role="tabpanel" aria-labelledby="amdal-tab">
        <div class="row gy-4 mb-4">
            <!-- Total Pengajuan -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-1 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-info text-white">AMDAL</span>
                                <p class="fw-medium text-primary-light mb-1">Total Pengajuan</p>
                                <h4 class="mb-1 fw-bold text-primary-600">
                                    @php
                                        $amdalData = $allStatistics['amdal']['data'] ?? [];
                                        $amdalTotalData = collect($amdalData)->firstWhere('id', 'total');
                                    @endphp
                                    {{ number_format($amdalTotalData['value'] ?? 456) }}
                                </h4>
                            </div>
                            <div class="w-50-px h-50-px bg-yellow rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-equal class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Disetujui -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-2 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-info text-white">AMDAL</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Disetujui</p>
                                <h4 class="mb-1 fw-bold text-success-main">
                                    @php
                                        $amdalSelesaiData = collect($amdalData)->firstWhere('id', 'selesai');
                                    @endphp
                                    {{ number_format($amdalSelesaiData['value'] ?? 298) }}
                                </h4>
                            </div>
                            <div class="w-50-px h-50-px bg-green rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-check class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Proses -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-3 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-info text-white">AMDAL</span>
                                <p class="fw-medium text-primary-light mb-1">Dalam Proses</p>
                                <h4 class="mb-1 fw-bold text-info-main">
                                    @php
                                        $amdalProsesData = collect($amdalData)->firstWhere('id', 'proses');
                                    @endphp
                                    {{ number_format($amdalProsesData['value'] ?? 112) }}
                                </h4>

                            </div>
                            <div class="w-50-px h-50-px bg-info rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-refresh-cw class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Ditolak -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-4 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-info text-white">AMDAL</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Ditolak</p>
                                <h4 class="mb-1 fw-bold text-danger-main">
                                    @php
                                        $amdalDitolakData = collect($amdalData)->firstWhere('id', 'ditolak');
                                    @endphp
                                    {{ number_format($amdalDitolakData['value'] ?? 46) }}
                                </h4>

                            </div>
                            <div class="w-50-px h-50-px bg-red rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-x class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Top 5 Izin Tercepat Table -->
        <div class="row gy-4 mt-4">
            <div class="col-lg-6 col-12">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-info text-white">AMDAL</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Tercepat</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm">Total Izin</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Waktu Rata-Rata (Pemohon)</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Waktu Rata-Rata (Petugas)</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @php
                                        $amdalFastestData = $allFastestData['amdal']['data'] ?? [];
                                    @endphp
                                    @forelse($amdalFastestData as $fastest)
                                    <tr>
                                        <td>{{ $fastest['rank_order'] }}</td>
                                        <td class="text-sm">{{ $fastest['Nama'] }}</td>
                                        <td class="text-sm">{{ number_format($fastest['Total']) }}</td>
                                        <td class="text-sm d-none d-lg-table-cell">{{ $fastest['DurasiPemohon'] }}</td>
                                        <td class="text-sm d-none d-lg-table-cell">{{ $fastest['DurasiPetugas'] }}</td>
                                    </tr>
                                    @empty
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">IZIN LINGKUNGAN KEGIATAN USAHA</td>
                                        <td class="text-sm">87</td>
                                        <td class="text-sm d-none d-lg-table-cell">72 Jam 30 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">45 Jam 15 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">SPPL (SURAT PERNYATAAN PENGELOLAAN LINGKUNGAN)</td>
                                        <td class="text-sm">65</td>
                                        <td class="text-sm d-none d-lg-table-cell">48 Jam 20 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">32 Jam 45 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">UKL-UPL (UPAYA KELOLA UPAYA PANTAU LINGKUNGAN)</td>
                                        <td class="text-sm">98</td>
                                        <td class="text-sm d-none d-lg-table-cell">96 Jam 45 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">68 Jam 30 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">AMDAL (ANALISIS MENGENAI DAMPAK LINGKUNGAN)</td>
                                        <td class="text-sm">43</td>
                                        <td class="text-sm d-none d-lg-table-cell">120 Jam 15 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">85 Jam 40 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">IZIN PEMBUANGAN AIR LIMBAH</td>
                                        <td class="text-sm">76</td>
                                        <td class="text-sm d-none d-lg-table-cell">84 Jam 50 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">58 Jam 25 Menit</td>
                                    </tr>
                                    @endforelse
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

               <div class="col-6">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-info text-white">AMDAL</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Terakhir Terbit</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm">Pemohon</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Tanggal Terbit</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @php
                                        $amdalTerakhirTerbitData = $allTerakhirTerbitData['amdal']['data'] ?? [];
                                    @endphp
                                    @forelse($amdalTerakhirTerbitData as $terakhir)
                                    <tr>
                                        <td>{{ $terakhir['rank_order'] }}</td>
                                        <td class="text-sm">{{ $terakhir['NamaIzin'] }}</td>
                                        <td class="text-sm">{{ $terakhir['Pemohon'] }}</td>
                                        <td class="text-sm d-none d-lg-table-cell">{{ \App\Helpers\DashboardHelper::formatTanggalTerbit($terakhir['TanggalTerbit']) }}</td>
                                    </tr>
                                    @empty
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm">PT. MAJU BERSAMA</td>
                                        <td class="text-sm d-none d-lg-table-cell">15 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">CV. KARYA MANDIRI</td>
                                        <td class="text-sm d-none d-lg-table-cell">14 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">PT. INDUSTRI SEJAHTERA</td>
                                        <td class="text-sm d-none d-lg-table-cell">13 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">PT. TEKNOLOGI MODERN</td>
                                        <td class="text-sm d-none d-lg-table-cell">12 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm">CV. BERKAH JAYA</td>
                                        <td class="text-sm d-none d-lg-table-cell">11 Des 2024</td>
                                    </tr>
                                    @endforelse
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row gy-4 mt-1">
            <div class="col-xxl-6 col-xl-12">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex flex-wrap align-items-center justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="text-lg mb-0">Grafik Trend Pengajuan Amdal</h6>
                                <span class="badge text-bg-info text-white">AMDAL</span>
                            </div>
                            <select class="form-select bg-base form-select-sm w-auto">
                                <option>Yearly</option>
                                <option>Monthly</option>
                                <option>Weekly</option>
                                <option>Today</option>
                            </select>
                        </div>
                        <div class="d-flex flex-wrap align-items-center gap-2 mt-8">
                            <h6 class="mb-0">456</h6>
                            <span class="text-sm fw-semibold rounded-pill bg-success-focus text-success-main border br-success px-8 py-4 line-height-1 d-flex align-items-center gap-1">
                                5% <iconify-icon icon="bxs:up-arrow" class="text-xs"></iconify-icon>
                            </span>
                            <span class="text-xs fw-medium">+ 22 Pengajuan/Bulan</span>
                        </div>
                        <div id="chart-amdal" class="pt-28 apexcharts-tooltip-style-1"></div>
                    </div>
                </div>
            </div>

            <div class="col-xxl-6">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex align-items-center flex-wrap gap-2 justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="mb-2 fw-bold text-lg mb-0">Grafik Trend Distribusi Jenis Izin</h6>
                                <span class="badge text-bg-info text-white">AMDAL</span>
                            </div>
                            <select class="form-select form-select-sm w-auto bg-base border text-secondary-light">
                                <option>Today</option>
                                <option>Weekly</option>
                                <option>Monthly</option>
                                <option>Yearly</option>
                            </select>
                        </div>
                        <ul class="d-flex flex-wrap align-items-center mt-3 gap-3">
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-primary-600"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Izin Lingkungan</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-yellow"></span>
                                <span class="text-secondary-light text-sm fw-semibold">SPPL</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-success-main"></span>
                                <span class="text-secondary-light text-sm fw-semibold">UKL-UPL</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-danger-400"></span>
                                <span class="text-secondary-light text-sm fw-semibold">AMDAL</span>
                            </li>
                        </ul>

                        <div class="mt-40">
                            <div id="paymentStatusChart-amdal" class="margin-16-minus"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

        <!-- izin angkut Content -->
    <div class="tab-pane fade" id="angkut-content" role="tabpanel" aria-labelledby="angkut-tab">
        <div class="row gy-4 mb-4">
            <!-- Total Pengajuan -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-1 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-dark text-white">IZIN ANGKUT & OLAH</span>
                                <p class="fw-medium text-primary-light mb-1">Total Pengajuan</p>
                                <h4 class="mb-1 fw-bold text-primary-600">456</h4>
                            </div>
                            <div class="w-50-px h-50-px bg-yellow rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-equal class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Disetujui -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-2 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-dark text-white">IZIN ANGKUT & OLAH</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Disetujui</p>
                                <h4 class="mb-1 fw-bold text-success-main">298</h4>
                            </div>
                            <div class="w-50-px h-50-px bg-green rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-check class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Proses -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-3 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-dark text-white">IZIN ANGKUT & OLAH</span>
                                <p class="fw-medium text-primary-light mb-1">Dalam Proses</p>
                                <h4 class="mb-1 fw-bold text-info-main">112</h4>

                            </div>
                            <div class="w-50-px h-50-px bg-info rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-refresh-cw class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Ditolak -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-4 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-dark text-white">IZIN ANGKUT & OLAH</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Ditolak</p>
                                <h4 class="mb-1 fw-bold text-danger-main">46</h4>

                            </div>
                            <div class="w-50-px h-50-px bg-red rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-x class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Top 5 Izin Tercepat Table -->
        <div class="row gy-4 mt-4">
            <div class="col-6">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-dark text-white">IZIN IZIN ANGKUT & OLAH</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Tercepat</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm">Total Izin</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Waktu Rata-Rata (Pemohon)</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Waktu Rata-Rata (Petugas)</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">IZIN LINGKUNGAN KEGIATAN USAHA</td>
                                        <td class="text-sm">87</td>
                                        <td class="text-sm d-none d-lg-table-cell">72 Jam 30 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">45 Jam 15 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">SPPL (SURAT PERNYATAAN PENGELOLAAN LINGKUNGAN)</td>
                                        <td class="text-sm">65</td>
                                        <td class="text-sm d-none d-lg-table-cell">48 Jam 20 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">32 Jam 45 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">UKL-UPL (UPAYA KELOLA UPAYA PANTAU LINGKUNGAN)</td>
                                        <td class="text-sm">98</td>
                                        <td class="text-sm d-none d-lg-table-cell">96 Jam 45 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">68 Jam 30 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">AMDAL (ANALISIS MENGENAI DAMPAK LINGKUNGAN)</td>
                                        <td class="text-sm">43</td>
                                        <td class="text-sm d-none d-lg-table-cell">120 Jam 15 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">85 Jam 40 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">IZIN PEMBUANGAN AIR LIMBAH</td>
                                        <td class="text-sm">76</td>
                                        <td class="text-sm d-none d-lg-table-cell">84 Jam 50 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">58 Jam 25 Menit</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

               <div class="col-6">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-dark text-white">IZIN IZIN ANGKUT & OLAH</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Terakhir Terbit</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm">Pemohon</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Tanggal Terbit</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm">PT. MAJU BERSAMA</td>
                                        <td class="text-sm d-none d-lg-table-cell">15 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">CV. KARYA MANDIRI</td>
                                        <td class="text-sm d-none d-lg-table-cell">14 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">PT. INDUSTRI SEJAHTERA</td>
                                        <td class="text-sm d-none d-lg-table-cell">13 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">PT. TEKNOLOGI MODERN</td>
                                        <td class="text-sm d-none d-lg-table-cell">12 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm">CV. BERKAH JAYA</td>
                                        <td class="text-sm d-none d-lg-table-cell">11 Des 2024</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row gy-4 mt-1">
            <div class="col-xxl-6 col-xl-12">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex flex-wrap align-items-center justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="text-lg mb-0">Grafik Trend Pengajuan</h6>
                                <span class="badge text-bg-dark text-white">IZIN ANGKUT & OLAH</span>
                            </div>
                            <select class="form-select bg-base form-select-sm w-auto">
                                <option>Yearly</option>
                                <option>Monthly</option>
                                <option>Weekly</option>
                                <option>Today</option>
                            </select>
                        </div>
                        <div class="d-flex flex-wrap align-items-center gap-2 mt-8">
                            <h6 class="mb-0">456</h6>
                            <span class="text-sm fw-semibold rounded-pill bg-success-focus text-success-main border br-success px-8 py-4 line-height-1 d-flex align-items-center gap-1">
                                5% <iconify-icon icon="bxs:up-arrow" class="text-xs"></iconify-icon>
                            </span>
                            <span class="text-xs fw-medium">+ 22 Pengajuan/Bulan</span>
                        </div>
                        <div id="chart-angkut" class="pt-28 apexcharts-tooltip-style-1"></div>
                    </div>
                </div>
            </div>

            <div class="col-xxl-6">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex align-items-center flex-wrap gap-2 justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="mb-2 fw-bold text-lg mb-0">Grafik Trend Distribusi Jenis Izin</h6>
                                <span class="badge text-bg-dark text-white">IZIN ANGKUT & OLAH</span>
                            </div>
                            <select class="form-select form-select-sm w-auto bg-base border text-secondary-light">
                                <option>Today</option>
                                <option>Weekly</option>
                                <option>Monthly</option>
                                <option>Yearly</option>
                            </select>
                        </div>
                        <ul class="d-flex flex-wrap align-items-center mt-3 gap-3">
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-primary-600"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Izin Lingkungan</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-yellow"></span>
                                <span class="text-secondary-light text-sm fw-semibold">SPPL</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-success-main"></span>
                                <span class="text-secondary-light text-sm fw-semibold">UKL-UPL</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-danger-400"></span>
                                <span class="text-secondary-light text-sm fw-semibold">AMDAL</span>
                            </li>
                        </ul>

                        <div class="mt-40">
                            <div id="paymentStatusChart-angkut" class="margin-16-minus"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

            <!-- izin tempat uji emisi Content -->
    <div class="tab-pane fade" id="ujiemisi-content" role="tabpanel" aria-labelledby="ujiemisi-tab">
        <div class="row gy-4 mb-4">
            <!-- Total Pengajuan -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-1 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                                <p class="fw-medium text-primary-light mb-1">Total Pengajuan</p>
                                <h4 class="mb-1 fw-bold text-primary-600">456</h4>
                            </div>
                            <div class="w-50-px h-50-px bg-yellow rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-equal class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Disetujui -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-2 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Disetujui</p>
                                <h4 class="mb-1 fw-bold text-success-main">298</h4>
                            </div>
                            <div class="w-50-px h-50-px bg-green rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-check class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Proses -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-3 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                                <p class="fw-medium text-primary-light mb-1">Dalam Proses</p>
                                <h4 class="mb-1 fw-bold text-info-main">112</h4>

                            </div>
                            <div class="w-50-px h-50-px bg-info rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-refresh-cw class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Izin Ditolak -->
            <div class="col-xl-3 col-lg-6 col-sm-6">
                <div class="card shadow-none border bg-gradient-start-4 h-100">
                    <div class="card-body p-20">
                        <div class="d-flex align-items-center justify-content-between">
                            <div>
                                <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                                <p class="fw-medium text-primary-light mb-1">Izin Ditolak</p>
                                <h4 class="mb-1 fw-bold text-danger-main">46</h4>

                            </div>
                            <div class="w-50-px h-50-px bg-red rounded-circle d-flex justify-content-center align-items-center">
                                <x-lucide-circle-x class="text-white w-32-px h-32-px mb-0"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Top 5 Izin Tercepat Table -->
        <div class="row gy-4 mt-4">
            <div class="col-6">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Tercepat</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm">Total Izin</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Waktu Rata-Rata (Pemohon)</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Waktu Rata-Rata (Petugas)</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">IZIN LINGKUNGAN KEGIATAN USAHA</td>
                                        <td class="text-sm">87</td>
                                        <td class="text-sm d-none d-lg-table-cell">72 Jam 30 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">45 Jam 15 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td class="text-sm">SPPL (SURAT PERNYATAAN PENGELOLAAN LINGKUNGAN)</td>
                                        <td class="text-sm">65</td>
                                        <td class="text-sm d-none d-lg-table-cell">48 Jam 20 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">32 Jam 45 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">UKL-UPL (UPAYA KELOLA UPAYA PANTAU LINGKUNGAN)</td>
                                        <td class="text-sm">98</td>
                                        <td class="text-sm d-none d-lg-table-cell">96 Jam 45 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">68 Jam 30 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">AMDAL (ANALISIS MENGENAI DAMPAK LINGKUNGAN)</td>
                                        <td class="text-sm">43</td>
                                        <td class="text-sm d-none d-lg-table-cell">120 Jam 15 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">85 Jam 40 Menit</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">IZIN PEMBUANGAN AIR LIMBAH</td>
                                        <td class="text-sm">76</td>
                                        <td class="text-sm d-none d-lg-table-cell">84 Jam 50 Menit</td>
                                        <td class="text-sm d-none d-lg-table-cell">58 Jam 25 Menit</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

               <div class="col-6">
                <div class="card shadow-none border h-100">
                    <div class="card-body p-24">
                        <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                        <h6 class="mb-3 fw-semibold">Top 5 Izin Terakhir Terbit</h6>
                        <div class="table-responsive">
                            <table class="table table-sm mb-0">
                                <thead>
                                    <tr>
                                        <th scope="col" class="text-sm">No</th>
                                        <th scope="col" class="text-sm">Nama Izin</th>
                                        <th scope="col" class="text-sm">Pemohon</th>
                                        <th scope="col" class="text-sm d-none d-lg-table-cell">Tanggal Terbit</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>1</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm">PT. MAJU BERSAMA</td>
                                        <td class="text-sm d-none d-lg-table-cell">15 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                                                               <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">CV. KARYA MANDIRI</td>
                                        <td class="text-sm d-none d-lg-table-cell">14 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>3</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">PT. INDUSTRI SEJAHTERA</td>
                                        <td class="text-sm d-none d-lg-table-cell">13 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>4</td>
                                        <td class="text-sm">PERSETUJUAN TEKNIS - PEMENUHAN BAKU MUTU AIR LIMBAH</td>
                                        <td class="text-sm">PT. TEKNOLOGI MODERN</td>
                                        <td class="text-sm d-none d-lg-table-cell">12 Des 2024</td>
                                    </tr>
                                    <tr>
                                        <td>5</td>
                                        <td class="text-sm">SERTIFIKAT LAIK OPERASI - PEMENUHAN BAKU MUTU EMISI</td>
                                        <td class="text-sm">CV. BERKAH JAYA</td>
                                        <td class="text-sm d-none d-lg-table-cell">11 Des 2024</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row gy-4 mt-1">
            <div class="col-xxl-6 col-xl-12">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex flex-wrap align-items-center justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="text-lg mb-0">Grafik Trend Pengajuan</h6>
                                <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                            </div>
                            <select class="form-select bg-base form-select-sm w-auto">
                                <option>Yearly</option>
                                <option>Monthly</option>
                                <option>Weekly</option>
                                <option>Today</option>
                            </select>
                        </div>
                        <div class="d-flex flex-wrap align-items-center gap-2 mt-8">
                            <h6 class="mb-0">456</h6>
                            <span class="text-sm fw-semibold rounded-pill bg-success-focus text-success-main border br-success px-8 py-4 line-height-1 d-flex align-items-center gap-1">
                                5% <iconify-icon icon="bxs:up-arrow" class="text-xs"></iconify-icon>
                            </span>
                            <span class="text-xs fw-medium">+ 22 Pengajuan/Bulan</span>
                        </div>
                        <div id="chart-ujiemisi" class="pt-28 apexcharts-tooltip-style-1"></div>
                    </div>
                </div>
            </div>

            <div class="col-xxl-6">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex align-items-center flex-wrap gap-2 justify-content-between">
                            <div class="d-flex align-items-center gap-2">
                                <h6 class="mb-2 fw-bold text-lg mb-0">Grafik Trend Distribusi Jenis Izin</h6>
                                <span class="badge text-bg-warning text-white">IZIN TEMPAT UJI EMISI</span>
                            </div>
                            <select class="form-select form-select-sm w-auto bg-base border text-secondary-light">
                                <option>Today</option>
                                <option>Weekly</option>
                                <option>Monthly</option>
                                <option>Yearly</option>
                            </select>
                        </div>
                        <ul class="d-flex flex-wrap align-items-center mt-3 gap-3">
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-primary-600"></span>
                                <span class="text-secondary-light text-sm fw-semibold">Izin Lingkungan</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-yellow"></span>
                                <span class="text-secondary-light text-sm fw-semibold">SPPL</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-success-main"></span>
                                <span class="text-secondary-light text-sm fw-semibold">UKL-UPL</span>
                            </li>
                            <li class="d-flex align-items-center gap-2">
                                <span class="w-12-px h-12-px rounded-circle bg-danger-400"></span>
                                <span class="text-secondary-light text-sm fw-semibold">AMDAL</span>
                            </li>
                        </ul>

                        <div class="mt-40">
                            <div id="paymentStatusChart-ujiemisi" class="margin-16-minus"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@endsection

@push('css')
<style>
/* .nav-pills {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 16px;
    padding: 8px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
} */

.nav-link {
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.025em;
    z-index: 2;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    transform: translateY(-2px);
    color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.nav-link.active {
    background: transparent;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

/* .nav-indicator {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.3),
        0 4px 16px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 1;
} */

.icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-link.active .icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-link:hover .icon-wrapper {
    background: rgba(59, 130, 246, 0.15);
    transform: scale(1.05);
}

.nav-text {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.nav-link.active .nav-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.nav-ripple {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

/* Card improvements */
.card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Responsive design */
@media (max-width: 768px) {
    /* .nav-pills {
        padding: 6px;
        border-radius: 12px;
    } */

    .nav-pills .nav-link {
        padding: 12px 8px;
        gap: 8px;
        border-radius: 10px;
    }

    .nav-text {
        font-size: 0.8rem;
        font-weight: 600;
    }

    .icon-wrapper {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .nav-indicator {
        border-radius: 10px;
    }
}

/* Smooth animations */
.tab-pane {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Glass morphism effect */
/* .nav-pills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: -1;
} */
</style>

@endpush

@push('scripts')
<script>
document.addEventListener('DOMContentLoaded', function() {
    const navTabs = document.querySelectorAll('#dashboard-tabs .nav-link');
    const indicator = document.querySelector('.nav-indicator');

    // Set initial indicator position
    updateIndicator(document.querySelector('#dashboard-tabs .nav-link.active'));

    navTabs.forEach((tab, index) => {
        tab.addEventListener('click', function() {
            updateIndicator(this);

            // Add ripple effect
            const ripple = this.querySelector('.nav-ripple');
            ripple.style.width = '200px';
            ripple.style.height = '200px';
            ripple.style.opacity = '0.3';

            setTimeout(() => {
                ripple.style.width = '0';
                ripple.style.height = '0';
                ripple.style.opacity = '0';
            }, 600);
        });

        // Add hover effects
        tab.addEventListener('mouseenter', function() {
            if (!this.classList.contains('active')) {
                this.style.transform = 'translateY(-2px)';
                this.style.transition = 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)';
            }
        });

        tab.addEventListener('mouseleave', function() {
            if (!this.classList.contains('active')) {
                this.style.transform = 'translateY(0)';
            }
        });
    });

    function updateIndicator(activeTab) {
        const tabIndex = Array.from(navTabs).indexOf(activeTab);
        const leftPosition = (tabIndex * 20) + '%';
        indicator.style.left = leftPosition;
    }

    // Handle window resize to show/hide indicator
    window.addEventListener('resize', function() {
        if (window.innerWidth < 768) {
            indicator.style.display = 'none';
        } else {
            indicator.style.display = 'block';
            // Update indicator position for the active tab
            const activeTab = document.querySelector('#dashboard-tabs .nav-link.active');
            if (activeTab) {
                updateIndicator(activeTab);
            }
        }
    });

    // Initial check for mobile/desktop
    if (window.innerWidth < 768) {
        indicator.style.display = 'none';
    }
});

// Aktifkan tooltip Bootstrap hanya pada desktop, karena mobile sudah menampilkan text
document.addEventListener('DOMContentLoaded', function () {
    // Hanya aktifkan tooltip pada desktop (768px ke atas)
    if (window.innerWidth >= 768) {
        var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
        tooltipTriggerList.forEach(function (tooltipTriggerEl) {
            new bootstrap.Tooltip(tooltipTriggerEl);
        });
    }

    // Update tooltip saat resize window
    window.addEventListener('resize', function() {
        var tooltips = document.querySelectorAll('.tooltip');
        tooltips.forEach(function(tooltip) {
            tooltip.remove();
        });

        if (window.innerWidth >= 768) {
            var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
            tooltipTriggerList.forEach(function (tooltipTriggerEl) {
                new bootstrap.Tooltip(tooltipTriggerEl);
            });
        }
    });
});
</script>
<style>
/* Desktop active state styles */
@media (min-width: 768px) {
    #dashboard-tabs .nav-link.active {
        background-color: var(--bs-primary) !important;
        color: white !important;
        border-radius: 12px !important;
        position: relative;
        z-index: 2;
    }

    #dashboard-tabs .nav-link.active svg {
        color: white !important;
    }

    #dashboard-tabs .nav-link.active .nav-text {
        color: white !important;
    }

    #dashboard-tabs .nav-link:not(.active) {
        color: var(--bs-gray-600) !important;
    }

    #dashboard-tabs .nav-link:not(.active) svg {
        color: var(--bs-gray-600) !important;
    }

    #dashboard-tabs .nav-link:not(.active) .nav-text {
        color: var(--bs-gray-600) !important;
    }

    /* Hover states for desktop */
    #dashboard-tabs .nav-link:not(.active):hover {
        color: var(--bs-primary) !important;
        transform: translateY(-2px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #dashboard-tabs .nav-link:not(.active):hover svg {
        color: var(--bs-primary) !important;
    }

    #dashboard-tabs .nav-link:not(.active):hover .nav-text {
        color: var(--bs-primary) !important;
    }

    .tooltip-mobile {
        display: none !important;
    }

    /* Hide all tooltips on desktop since we have better hover states */
    .tooltip {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    #dashboard-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #dashboard-tabs .nav-item {
        min-width: 110px;
        flex: 0 0 auto;
    }

    /* Mobile tab styling for vertical layout (icon above text) */
    #dashboard-tabs .nav-link {
        flex-direction: column !important;
        gap: 4px !important;
        padding: 12px 8px !important;
        min-height: 70px;
    }

    #dashboard-tabs .nav-text {
        font-size: 0.7rem !important;
        line-height: 1.1 !important;
        font-weight: 600 !important;
        text-align: center !important;
        max-width: 80px;
        word-wrap: break-word;
        hyphens: auto;
    }

    #dashboard-tabs .icon-wrapper {
        width: 28px !important;
        height: 28px !important;
        margin-bottom: 2px;
    }

    /* Mobile active state styles */
    #dashboard-tabs .nav-link.active {
        background-color: var(--bs-primary) !important;
        color: white !important;
        border-radius: 8px !important;
    }

    #dashboard-tabs .nav-link.active svg {
        color: white !important;
    }

    #dashboard-tabs .nav-link.active .nav-text {
        color: white !important;
    }

    #dashboard-tabs .nav-link:not(.active) {
        background-color: transparent !important;
        color: var(--bs-gray-600) !important;
    }

    #dashboard-tabs .nav-link:not(.active) svg {
        color: var(--bs-gray-600) !important;
    }

    #dashboard-tabs .nav-link:not(.active) .nav-text {
        color: var(--bs-gray-600) !important;
    }

    /* Hover states for mobile */
    #dashboard-tabs .nav-link:not(.active):hover {
        background-color: var(--bs-gray-100) !important;
        color: var(--bs-primary) !important;
    }

    #dashboard-tabs .nav-link:not(.active):hover svg {
        color: var(--bs-primary) !important;
    }

    #dashboard-tabs .nav-link:not(.active):hover .nav-text {
        color: var(--bs-primary) !important;
    }

    /* Hide tooltips on mobile since we now show text */
    .tooltip {
        display: none !important;
    }
}

/* Custom tooltip styles for mobile */
.tooltip-mobile {
    font-size: 12px !important;
}
</style>
@endpush
