<div class="col-md-12">
            <div class="alert alert-primary shadow"><i class="fa fa-info-circle fa-fw"></i> <b class="text-uppercase">𝗪𝗘𝗟𝗖𝗢𝗠𝗘</b><br>
                Selamat Datang <?= user('full_name') ?></br>
                Jika anda perlu bantuan silahkan kirim Tiket atau bisa langsung via Live Chat di pojok kanan bawah</div>
        </div>
<div class="row">
    <div class="col-md-6 col-xxl-4">
        <div class="card">
            <div class="card-body">
                <div class="d-flex align-items-center">
                    <div class="flex-shrink-0">
                        <div class="avtar bg-light-primary">
                            <i class="ph-duotone ph-wallet f-30"></i>
                        </div>
                    </div>
                    <div class="flex-grow-1 ms-3">
                        <p class="mb-1">Saldo Anda</p>
                        <div class="d-flex align-items-center justify-content-between">
                            <h4 class="mb-0">Rp <?= currency(user('balance')) ?></h4>
                            </div>
                            
                        <p class="mb-1">Sisa Saldo</p>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-6 col-xxl-4">
        <div class="card">
            <div class="card-body">
                <div class="d-flex align-items-center">
                    <div class="flex-shrink-0">
                        <div class="avtar bg-light-primary">
                            <i class="ph-duotone ph-shopping-cart f-30"></i>
                        </div>
                    </div>
                    <div class="flex-grow-1 ms-3">
                        <p class="mb-1">Pesanan Anda Bulan Ini</p>
                        <div class="d-flex align-items-center justify-content-between">
                            <h4 class="mb-0">Rp <?= currency($widget_order[0]['rupiah']) ?></h4>
                            <span class="<?= $order_percentage_change > 0 ? 'text-success' : 'text-danger' ?> fw-medium" data-bs-toggle="tooltip" data-bs-placement="top" title="Pesanan Anda bulan lalu: Rp <?= currency($previous_order[0]['rupiah']) ?> Dari <?= currency($previous_order[0]['total']) ?> Pesanan">
                                <?= ($order_percentage_change > 0 ? '<i class="ti ti-arrow-up-right"></i>' : '<i class="ti ti-arrow-down-left"></i>') . number_format($order_percentage_change, 2) . '%' ?>
                            </span>
                        </div>
                        <p class="mb-1">Dari <?= currency($widget_order[0]['total']) ?> Pesanan</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-6 col-xxl-4">
        <div class="card">
            <div class="card-body">
                <div class="d-flex align-items-center">
                    <div class="flex-shrink-0">
                        <div class="avtar bg-light-primary">
                            <i class="ph-duotone ph-credit-card f-30"></i>
                        </div>
                    </div>
                    <div class="flex-grow-1 ms-3">
                        <p class="mb-1">Deposit Anda Bulan Ini</p>
                        <div class="d-flex align-items-center justify-content-between">
                            <h4 class="mb-0">Rp <?= currency($widget_deposit[0]['rupiah']) ?></h4>
                            <span class="<?= $deposit_percentage_change > 0 ? 'text-success' : 'text-danger' ?> fw-medium" data-bs-toggle="tooltip" data-bs-placement="top" title="Deposit Anda bulan lalu: Rp <?= currency($previous_deposit[0]['rupiah']) ?> Dari <?= currency($previous_deposit[0]['total']) ?> Deposit">
                                <?= ($deposit_percentage_change > 0 ? '<i class="ti ti-arrow-up-right"></i>' : '<i class="ti ti-arrow-down-left"></i>') . number_format($deposit_percentage_change, 2) . '%' ?>
                            </span>
                        </div>
                        <p class="mb-1">Dari <?= currency($widget_deposit[0]['total']) ?> Deposit</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
            var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {
                return new bootstrap.Tooltip(tooltipTriggerEl)
            })
        });
    </script> 
     
      

            

        
         
          
           
    <div class="col-sm-12">
        <div class="card-body pc-component">
            <div class="accordion card" id="accordionExample">
                <div class="accordion-item">
                    <h2 class="accordion-header" id="headingOne">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
                            <i class="ph-duotone ph-fire fs-4 me-2"></i>Layanan Rekomendasi
                        </button>
                    </h2>
                    <div id="collapseOne" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
                        <div class="accordion-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-xs align-middle m-0">
                                    <?php if (!empty($service_recommended)) { ?>
                                        <?php foreach ($service_recommended as $value) { ?>
                                            <tr>
                                                <td class="text-muted">#<?= $value['service_id'] ?></td>
                                                <td>
                                                    <a href="javascript:;" onclick="detail_service(<?= $value['service_id']; ?>);" class="text-reset text-wrap fs-14 mb-0">
                                                        <?= $value['service_name'] ?>
                                                    </a>
                                                </td>
                                                <td class="text-center">
                                                    <a href="<?= base_url() ?>order/single?id=<?= $value['service_id'] ?>">
                                                        <div class="avtar avtar-xs bg-primary bg-gradient">
                                                            <i class="fas fa-cart-plus text-white"></i>
                                                        </div>
                                                    </a>
                                                </td>
                                            </tr>
                                        <?php } ?>
                                    <?php } else { ?>
                                        <tr>
                                            <td colspan="3" class="text-center">Data belum tersedia.</td>
                                        </tr>
                                    <?php } ?>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <h2 class="accordion-header" id="headingTwo">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                            <i class="ph-duotone ph-shooting-star fs-4 me-2"></i>Layanan Terlaris Bulan Ini
                        </button>
                    </h2>
                    <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample">
                        <div class="accordion-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-xs align-middle m-0">
                                    <?php if (!empty($all_user_service_top)) { ?>
                                        <?php foreach ($all_user_service_top as $value) { ?>
                                            <tr>
                                                <td class="text-muted">#<?= $value['id'] ?></td>
                                                <td>
                                                    <a href="javascript:;" onclick="detail_service(<?= $value['id']; ?>);" class="text-reset text-wrap fs-14 mb-0">
                                                        <?= $value['name'] ?>
                                                    </a>
                                                </td>
                                                <td class="text-center">
                                                    <a href="<?= base_url() ?>order/single?id=<?= $value['id'] ?>">
                                                        <div class="avtar avtar-xs bg-primary bg-gradient">
                                                            <i class="fas fa-cart-plus text-white"></i>
                                                        </div>
                                                    </a>
                                                </td>
                                            </tr>
                                        <?php } ?>
                                    <?php } else { ?>
                                        <tr>
                                            <td colspan="3" class="text-center">Data belum tersedia.</td>
                                        </tr>
                                    <?php } ?>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Tambahan: Layanan yang Sering Anda Pesan -->
                <div class="accordion-item">
                    <h2 class="accordion-header" id="headingThree">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                            <i class="ph-duotone ph-star fs-4 me-2"></i>Yang Sering Anda Pesan Bulan Ini
                        </button>
                    </h2>
                    <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample">
                        <div class="accordion-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-xs align-middle m-0">
                                    <?php if (!empty($user_service_top)) { ?>
                                        <?php foreach ($user_service_top as $value) { ?>
                                            <tr>
                                                <td class="text-muted">#<?= $value['id'] ?></td>
                                                <td>
                                                    <a href="javascript:;" onclick="detail_service(<?= $value['id']; ?>);" class="text-reset text-wrap fs-14 mb-0">
                                                        <?= $value['name'] ?>
                                                    </a>
                                                </td>
                                                <td class="text-center">
                                                    <a href="<?= base_url() ?>order/single?id=<?= $value['id'] ?>">
                                                        <div class="avtar avtar-xs bg-primary bg-gradient">
                                                            <i class="fas fa-cart-plus text-white"></i>
                                                        </div>
                                                    </a>
                                                </td>
                                            </tr>
                                        <?php } ?>
                                    <?php } else { ?>
                                        <tr>
                                            <td colspan="3" class="text-center">Data belum tersedia.</td>
                                        </tr>
                                    <?php } ?>
                                </table>
                            </div>
                        </div>
                    </div>
                </div><!-- Tambahan: Layanan Terakhir Yang Anda Pesan Bulan Ini -->
                <div class="accordion-item">
                    <h2 class="accordion-header" id="headingFour">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
                            <i class="ph-duotone ph-clock fs-4 me-2"></i>Terakhir Yang Anda Pesan Bulan Ini
                        </button>
                    </h2>
                    <div id="collapseFour" class="accordion-collapse collapse" aria-labelledby="headingFour" data-bs-parent="#accordionExample">
                        <div class="accordion-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-xs align-middle m-0">
                                    <?php if (!empty($last_order_services)) { ?>
                                        <?php foreach ($last_order_services as $value) { ?>
                                            <tr>
                                                <td class="text-muted">#<?= $value['service_id'] ?></td>
                                                <td>
                                                    <a href="javascript:;" onclick="detail_service(<?= $value['service_id']; ?>);" class="text-reset text-wrap fs-14 mb-0">
                                                        <?= $value['name'] ?>
                                                    </a>
                                                </td>
                                                <td class="text-center">
                                                    <a href="<?= base_url() ?>order/single?id=<?= $value['service_id'] ?>">
                                                        <div class="avtar avtar-xs bg-primary bg-gradient">
                                                            <i class="fas fa-cart-plus text-white"></i>
                                                        </div>
                                                    </a>
                                                </td>
                                            </tr>
                                        <?php } ?>
                                    <?php } else { ?>
                                        <tr>
                                            <td colspan="3" class="text-center">Data belum tersedia.</td>
                                        </tr>
                                    <?php } ?>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="card">
            <div class="card-header">
                <h4 class="mb-0 d-flex align-items-center"><i class="ph-duotone ph-user fs-3 me-2"></i>Detail Akun</h4>
            </div>
            <div class="card-body pb-3">
                <div class="row">
                    <div class="col-12 d-grid mb-3">
                        <a href="javascript:;" class="btn btn-primary bg-gradient benefit_account" data-bs-toggle="modal" data-bs-target="#benefit_account">Lihat Benefit</a>
                    </div>
                </div>
                <div class="row align-items-center mb-2">
                    <div class="col-6 mb-2 mb-sm-0">
                        <p class="mb-0">Level saat ini</p>
                    </div>
                    <div class="col-6 mb-2 mb-sm-0">
                        <div class="d-flex align-items-center">
                            <div class="flex-grow-1 me-3">
                            </div>
                            <div class="flex-shrink-0">
                                <p class="mb-0 text-primary fw-bolder"><?= strtoupper(user('benefit')) ?></p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row align-items-center mb-2">
                    <div class="col-6 mb-2 mb-sm-0">
                        <p class="mb-0">Minimal Payout</p>
                    </div>
                    <div class="col-6 mb-2 mb-sm-0">
                        <div class="d-flex align-items-center">
                            <div class="flex-grow-1 me-3">
                            </div>
                            <div class="flex-shrink-0">
                                <p class="mb-0 fw-bolder"><?= currency(benefit('min_payout', user('benefit'))) ?> Point</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row align-items-center mb-2">
                    <div class="col-6 mb-2 mb-sm-0">
                        <p class="mb-0">Rate Payout</p>
                    </div>
                    <div class="col-6 mb-2 mb-sm-0">
                        <div class="d-flex align-items-center">
                            <div class="flex-grow-1 me-3">
                            </div>
                            <div class="flex-shrink-0">
                                <p class="mb-0 fw-bolder">1 Point ≈ Rp <?= currency(benefit('rate_payout', user('benefit'))) ?></p>
                            </div>
                        </div>
                    </div>
                </div>
                <hr>
                <?php if ($next_level != 'null') {
                    $next = $this->benefit_model->get_rows(['type' => $next_level])
                ?>
                    <div class="row align-items-center mb-2">
                        <div class="col-6 mb-2 mb-sm-0">
                            <p class="mb-0">Level Selanjutnya</p>
                        </div>
                        <div class="col-6 mb-2 mb-sm-0">
                            <div class="d-flex align-items-center">
                                <div class="flex-grow-1 me-3">
                                </div>
                                <div class="flex-shrink-0">
                                    <p class="mb-0 text-primary fw-bolder"><?= strtoupper($next_level) ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row align-items-center mb-2">
                        <div class="col-6 mb-2 mb-sm-0">
                            <p class="mb-0">Target Transaksi</p>
                        </div>
                        <div class="col-6 mb-2 mb-sm-0">
                            <div class="d-flex align-items-center">
                                <div class="flex-grow-1 me-3">
                                </div>
                                <div class="flex-shrink-0">
                                    <p class="mb-0 fw-bolder">Rp <?= currency(benefit('trx', $next_level)) ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row align-items-center mb-2">
                        <div class="col-6 mb-2 mb-sm-0">
                            <p class="mb-0">Progress (Rp)</p>
                        </div>
                        <div class="col-6 mb-2 mb-sm-0">
                            <div class="d-flex align-items-center">
                                <div class="flex-grow-1 me-3">
                                </div>
                                <div class="flex-shrink-0">
                                    <p class="mb-0 fw-bolder">Rp <?= currency($total_order[0]['rupiah']) ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row align-items-center mb-0">
                        <div class="col-6 mb-2 mb-sm-0">
                            <p class="mb-0">Progress (%)</p>
                        </div>
                        <div class="col-6 mb-2 mb-sm-0">
                            <div class="d-flex align-items-center">
                                <div class="flex-grow-1 me-3">
                                    <div class="progress" style="height: 10px;">
                                        <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: <?= number_format(($total_order[0]['rupiah'] / benefit('trx', $next_level)) * 100, 2) ?>%"></div>
                                    </div>
                                </div>
                                <div class="flex-shrink-0">
                                    <p class="mb-0 fw-bolder"><?= number_format(($total_order[0]['rupiah'] / benefit('trx', $next_level)) * 100, 2) ?>%</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <hr>
                <?php } ?>
                <div class="row align-items-center mb-2">
                    <div class="col-6 mb-2 mb-sm-0">
                        <p class="mb-0">
                            Admin Aktif
                        </p>
                    </div>
                    <div class="col-6 mb-2 mb-sm-0">
                        <div class="d-flex align-items-center">
                            <div class="flex-grow-1 me-3">
                            </div>
                            <div class="flex-shrink-0">
                                <p class="mb-0 fw-bolder">
                                    <?php echo (custom_statistic('total_admin_online') != 0) ? currency(custom_statistic('total_admin_online')) : $this->user_model->get_count(['where' => [['level' => 'Owner']]]); ?>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row align-items-center mb-2">
                    <div class="col-6 mb-2 mb-sm-0">
                        <p class="mb-0">
                            Member Aktif
                        </p>
                    </div>
                    <div class="col-6 mb-2 mb-sm-0">
                        <div class="d-flex align-items-center">
                            <div class="flex-grow-1 me-3">
                            </div>
                            <div class="flex-shrink-0">
                                <p class="mb-0 fw-bolder">
                                    <?php echo (custom_statistic('total_user_online') != 0) ? currency(custom_statistic('total_user_online')) : $this->user_model->get_count(); ?>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row align-items-center mb-2">
                    <div class="col-6 mb-2 mb-sm-0">
                        <p class="mb-0">
                            Kirim Ticket
                        </p>
                    </div>
                    <div class="col-6 mb-2 mb-sm-0">
                        <div class="d-flex align-items-center">
                            <div class="flex-grow-1 me-3">
                            </div>
                            <div class="flex-shrink-0">
                                <p class="mb-0 fw-bolder">
                                    <a href="https://flaxspedia.com/ticket/new">Kirim</a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row align-items-center mb-2">
                    <div class="col-6 mb-2 mb-sm-0">
                        <p class="mb-0">
                            WhatsApp CS
                        </p>
                    </div>
                    <div class="col-6 mb-2 mb-sm-0">
                        <div class="d-flex align-items-center">
                            <div class="flex-grow-1 me-3">
                            </div>
                            <div class="flex-shrink-0">
                                <p class="mb-0 fw-bolder">
                                    <a href="https://wa.me/6285871345768">Kontak</a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-8">
        <div class="card">
            <div class="card-header">
                <h4 class="mb-0 d-flex align-items-center"><i class="ph-duotone ph-arrows-counter-clockwise fs-3 me-2"></i>Update Layanan</h4>
            </div>
            <!-- end card header -->
            <div class="card-body pb-3" style="max-height: 395.328px; overflow: auto;">
                <ul class="list-group border-dashed">
                    <?php if (!empty($service_logs)) {
                        foreach ($service_logs as $key => $value) {
                            if ($value['type'] == 'price_increased') {
                                $bg = 'warning';
                                $icon = 'fas fa-arrow-circle-up';
                            } elseif ($value['type'] == 'price_decreased') {
                                $bg = 'success';
                                $icon = 'fas fa-arrow-circle-down';
                            } elseif ($value['type'] == 'update_min' or $value['type'] === 'update_max') {
                                $bg = 'info';
                                $icon = 'far fa-dot-circle';
                            } elseif ($value['type'] == 'enabled') {
                                $bg = 'success';
                                $icon = 'fas fa-check-circle';
                            } elseif ($value['type'] == 'insert') {
                                $bg = 'success';
                                $icon = 'fas fa-plus-circle';
                            } else {
                                $bg = 'danger';
                                $icon = 'fas fa-times-circle';
                            }
                    ?>
                            <li class="list-group-item">
                                <div class="row align-items-center g-3">
                                    <div class="col-auto">
                                        <div class="text-center">
                                            <button type="button" class="btn btn-icon btn-<?= $bg ?> bg-gradient avtar-l"><i class="<?= $icon ?>"></i></button>
                                        </div>
                                    </div>
                                    <div class="col">
                                        <span class="text-muted f-12">
                                            <?= $this->lib->tanggal_indonesia($value['created_at']) ?>
                                        </span><br>
                                        <?php if ($value['type'] == 'update_min' or $value['type'] == 'update_max') {
                                        ?>
                                            <a href="javascript:;" onclick="detail_service(<?php echo $value['service_id']; ?>);" class="text-reset fs-14 mb-0"><b>
                                                    <?= $value['service_name'] ?>
                                                </b> -
                                                <?= ($value['type'] == 'update_min' ? 'Perubahan' : 'Perubahan') ?> jumlah
                                                <?= ($value['type'] == 'update_min' ? 'Minimal' : 'Maksimal') ?> Order dari <b>
                                                    <?= currency($value['before_update']) ?>
                                                </b> ke <b>
                                                    <?= currency($value['after_update']) ?>
                                                </b>
                                            </a>

                                        <?php
                                        } elseif ($value['type'] == 'price_increased' or $value['type'] == 'price_decreased') {
                                        ?>
                                            <a href="javascript:;" onclick="detail_service(<?php echo $value['service_id']; ?>);" class="text-reset fs-14 mb-0"><b>
                                                    <?= $value['service_name'] ?>
                                                </b> -
                                                <?= ($value['type'] == 'price_increased' ? 'Kenaikan' : 'Penurunan') ?> harga dari
                                                <b>Rp
                                                    <?= currency($value['before_update']) ?>
                                                </b> ke <b>Rp
                                                    <?= currency($value['after_update']) ?>
                                                </b>
                                            </a>
                                        <?php
                                        } elseif ($value['type'] == 'enabled' or $value['type'] == 'disabled') {
                                        ?>
                                            <a href="javascript:;" onclick="detail_service(<?php echo $value['service_id']; ?>);" class="text-reset fs-14 mb-0"><b>
                                                    <?= $value['service_name'] ?>
                                                </b> -
                                                <?= ($value['type'] == 'enabled' ? 'Layanan sudah <span class="text-success"><b>AKTIF</b></span>' : 'Layanan <span class="text-danger"><b>MAINTENANCE</b></span>') ?>
                                            </a>
                                        <?php
                                        } elseif ($value['type'] == 'insert') {
                                        ?>
                                            <a href="javascript:;" onclick="detail_service(<?php echo $value['service_id']; ?>);" class="text-reset fs-14 mb-0"><b>
                                                    <?= $value['service_name'] ?>
                                                </b> - Layanan <span class="text-success"><b>BARU</b></span> ditambahkan</a>
                                        <?php
                                        } ?>
                                    </div>
                                </div>
                                <!-- end row -->
                            </li><!-- end -->
                        <?php
                        }
                    } else {
                        ?>
                        <h6 class="text-center">Data belum tersedia.</h6>
                    <?php
                    }
                    ?>
                </ul>
                <!-- end -->
            </div>
            <!-- end card body -->
            <div class="card-footer">
                
                     <h6 class="text-center m-0">
                        <a href="<?= base_url() ?>page/service_log">Lihat Selengkapnya</a>
                    </h6>
                
            </div>
        </div>
        <!-- end card -->
    </div>
    <!-- end col-->
    <div class="col-md-12">
        <div class="card">
            <div class="card-header">
                <h4 class="mb-0 d-flex align-items-center"><i class="ph-duotone ph-bell-ringing fs-3 me-2"></i>Informasi Terbaru</h4>
            </div>
            <div class="card-body pb-3" style="max-height: 500px; overflow: auto;">
                <?php
                foreach ($info as $key => $value) {
                ?>
                    <ul class="list-group list-group-flush border-top-0">
                        <li class="list-group-item pt-0 px-0">
                            <div class="d-flex align-items-start ">
                                <div class="flex-grow-1 me-2">
                                    <span class="mb-0"><span class="fs-6 badge text-white fw-bold bg-<?= $this->lib->status_info_bg($value['category']) ?> bg-gradient rounded-pill"><i class="fas fa-info-circle"></i>
                                            <?= $this->lib->status_info($value['category']) ?>
                                        </span><small class="fw-normal float-end">
                                            <?= $this->lib->tanggal_indonesia($value['created_at']) ?>
                                        </small></span>
                                    <p class="my-1" style="margin-top: 0.6rem !important">
                                    <p><?= $value['content'] ?></p>
                                    </p>
                                    <small class="text-muted">Pembaruan:
                                        <?= $this->lib->tanggal_indonesia($value['updated_at']) ?>
                                    </small>
                                </div>
                            </div>
                        </li>
                    </ul>
                    <hr class="mt-0">
                <?php
                }
                if ($value <= 0) {
                ?>
                    <h6 class="text-center">Data belum tersedia.</h6>
                <?php
                }
                ?>
            </div>
            <div class="card-footer">
                
               <div class="text-center mt-0"><a href="<?= base_url('page/info'); ?>" class="d-grid btn btn-rounded btn-primary bg-gradient">Lihat Selengkapnya</a></div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="benefit_account" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-scrollable modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title d-flex align-items-center"><i class="ph-duotone ph-info fs-3 me-2"></i>Benefit Akun</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body pb-4">
                <div class="benefit-details"><span class="d-flex justify-content-center">Sedang memuat...</span></div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function level_detail(to, timeout = true) {
        $.ajax({
            type: "GET",
            url: "<?php echo base_url('user/benefit/'); ?>" + to,
            data: {
                '<?php echo $this->security->get_csrf_token_name(); ?>': '<?php echo $this->security->get_csrf_hash(); ?>'
            },
            dataType: "html",
            success: function(data) {
                if (timeout) {
                    setTimeout(function() {
                        $('.benefit-details').html(data);
                    }, 200);
                } else {
                    $('.benefit-details').html(data);
                }
            },
            error: function() {
                $('.benefit-details').html('<span class="d-flex justify-content-center text-danger">Terjadi kesalahan, mohon refresh halaman ini.</span>');
            },
            beforeSend: function() {
                $('.benefit-details').html('<span class="d-flex justify-content-center">Sedang memuat...</span>');
            }
        });
    }

    var uri = window.location.toString();
    if (uri.indexOf("#") > 0) {
        var clean_uri = uri.substring(0, uri.indexOf("#"));
        window.history.replaceState({}, document.title, clean_uri);
    }

    $(".benefit_account").on('click', function() {
        level_detail('<?= user('benefit') ?>', false);
    });

    $("#benefit_account").on('hide.bs.modal', function() {
        setTimeout(function() {
            $('.benefit-details').html('<span class="d-flex justify-content-center">Sedang memuat...</span>');
        }, 200);
    });
</script>
<div class="modal fade" id="account_modal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-scrollable modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="account_modal_title"></h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body pb-3" id="account_modal_body">
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function detail_account(id) {
        $('#account_modal_title').html('<i class="fas fa-user me-2"></i>Detail Akun Anda');
        $('#account_modal').modal('show');
        $.ajax({
            type: "GET", // Ganti menjadi POST
            url: "<?php echo base_url('auth/detail_account/'); ?>" + id,
            data: {
                '<?php echo $this->security->get_csrf_token_name(); ?>': '<?php echo $this->security->get_csrf_hash(); ?>'
            },
            dataType: "html",
            success: function(data) {
                $('#account_modal_body').html(data);
            },
            error: function() {
                $('#ajax-result').html('<font color="red">Terjadi kesalahan, jika masalah ini masih berlanjut mohon hubungi Admin.</font>');
            },
            beforeSend: function() {
                $('#account_modal_body').html('<div class="progress mb-0"><div class="progress-bar progress-bar-striped active" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%" role="progressbar"></div></div>');
            }
        });

    }
</script>