

<?php $__env->startSection('styles'); ?>
<style>
    /* ক্লিন কার্ড ডিজাইন */
    .card-security { border: none; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); background: #fff; }
    .card-header-clean { background: #fff; padding: 20px 25px; border-bottom: 1px solid #f1f1f4; border-radius: 12px 12px 0 0 !important; }

    /* টেবিল স্টাইল */
    #geniustable { border: none; width: 100% !important; }
    #geniustable thead th { background: #f9f9fc; color: #495057; font-weight: 600; font-size: 12px; text-transform: uppercase; padding: 15px; border: none; }
    #geniustable tbody td { padding: 15px; vertical-align: middle; border-bottom: 1px solid #f1f1f4; color: #3f4254; }
    #geniustable tbody tr:hover { background-color: #f8f9ff !important; }

    /* ভিজিট সাইট বাটন (Solid Clean) */
    .btn-visit { display: inline-flex; align-items: center; margin-top: 5px; padding: 4px 12px; background-color: #5d78ff; color: #fff !important; font-size: 10px; font-weight: 500; border-radius: 4px; text-decoration: none !important; transition: 0.3s; }
    .btn-visit i { font-size: 9px; margin-right: 5px; }
    .btn-visit:hover { background-color: #3e5eff; box-shadow: 0 4px 10px rgba(93, 120, 255, 0.2); }

    /* স্ট্যাটাস ব্যাজ */
    .badge-pending { background-color: #fff4de; color: #ffa800; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; }
    .badge-resolved { background-color: #c9f7f5; color: #1bc5bd; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; }

    /* অ্যাকশন বাটন */
    .btn-action { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: none; transition: 0.2s; cursor: pointer; }
    .btn-status-change { background-color: #f3f6f9; color: #7e8299; }
    .btn-status-change:hover { background-color: #5d78ff; color: #fff; }
    .btn-delete-report { background-color: #ffe2e5; color: #f64e60; }
    .btn-delete-report:hover { background-color: #f64e60; color: #fff; }

    /* টেবিল সার্চ ইনপুট কাস্টমাইজ */
    .dataTables_filter input { border: 1px solid #e2e5ec; border-radius: 6px; padding: 6px 12px; font-size: 13px; outline: none; }
</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid py-4">
    <div class="d-flex align-items-center justify-content-between mb-4">
        <div>
            <h4 class="font-weight-bold text-dark mb-1">Security Logs</h4>
            <span class="text-muted small">Monitor unauthorized use of your script.</span>
        </div>
        <button onclick="location.reload();" class="btn btn-sm btn-outline-primary px-3 shadow-sm" style="border-radius: 8px;">
            <i class="fas fa-sync-alt mr-1"></i> Refresh
        </button>
    </div>

    <div class="card card-security">
        <div class="card-header-clean">
            <h6 class="mb-0 text-dark font-weight-bold"><i class="fas fa-shield-alt text-danger mr-2"></i> Unauthorized Access Entries</h6>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table" id="geniustable">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Domain</th>
                            <th>Connection</th>
                            <th class="text-center">Status</th>
                            <th>Log Date</th>
                            <th class="text-right">Actions</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content border-0" style="border-radius: 15px;">
            <div class="modal-body p-5 text-center">
                <div class="mb-4">
                    <i class="fas fa-exclamation-circle fa-4x text-warning"></i>
                </div>
                <h5 class="font-weight-bold">Are you sure?</h5>
                <p class="text-muted small">আপনি কি এই রেকর্ডটি মুছে ফেলতে চান? এটি আর ফিরে পাওয়া যাবে না।</p>
                <div class="mt-4">
                    <button type="button" class="btn btn-light btn-sm px-4 mr-2" data-dismiss="modal" style="border-radius: 6px;">Cancel</button>
                    <a class="btn btn-danger btn-sm px-4 btn-ok" style="border-radius: 6px;">Confirm Delete</a>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
    $(function() {
        // ডাটাটেবিল লোড
        var table = $('#geniustable').DataTable({
            processing: true,
            serverSide: true,
            ajax: '<?php echo e(route("admin.stolen.index")); ?>',
            columns: [
                { data: 'DT_RowIndex', name: 'id' },
                { data: 'domain_info', name: 'domain_name' },
                { data: 'details', name: 'full_url' },
                { data: 'status', name: 'status', className: 'text-center' },
                { data: 'date', name: 'created_at' },
                { data: 'action', searchable: false, orderable: false, className: 'text-right' }
            ],
            language: {
                processing: '<div class="spinner-border spinner-border-sm text-primary" role="status"></div>',
                search: "_INPUT_",
                searchPlaceholder: "Search logs..."
            }
        });

        // ডিলিট বাটন ক্লিক হ্যান্ডলার (এটি ডিলিট বাটন কাজ করার জন্য গুরুত্বপূর্ণ)
        $(document).on('click', '.delete-btn', function() {
            var url = $(this).data('href');
            $('#confirm-delete').modal('show');
            $('#confirm-delete').find('.btn-ok').attr('href', url);
        });
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\project\resources\views/admin/stolen/index.blade.php ENDPATH**/ ?>