<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>Verifikasi Pengembalian - <?php echo e(config('app.name')); ?></title>

    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/lucide@latest"></script>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">

    <style>
        body {
            margin: 0;
            font-family: 'Inter', sans-serif;
            background: #f8fafc;
            color: #0f172a;
        }

        .app {
            display: flex;
            min-height: 100vh;
        }

        .content {
            flex: 1;
            width: 100%;
            padding: 32px;
        }

        @media (max-width: 1024px) {
            .app {
                display: block;
            }

            .content {
                padding: 20px;
                padding-top: 80px;
            }
        }

        @media (max-width: 640px) {
            .content {
                padding: 16px;
                padding-top: 80px;
            }
        }
    </style>
</head>
<body>
    <div class="app">
        <?php echo $__env->make('partials.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

        <main class="content">
            <div class="max-w-6xl mx-auto space-y-6">
                <div class="rounded-[28px] p-6 md:p-8 text-white shadow-xl overflow-hidden relative"
                    style="background: linear-gradient(135deg, #0f172a 0%, #14532d 50%, #15803d 100%);">
                    <div class="absolute top-0 right-0 w-72 h-72 bg-white/10 rounded-full blur-3xl -translate-y-16 translate-x-16"></div>
                    <div class="relative">
                        <div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/10 border border-white/10 text-xs font-semibold tracking-wide uppercase">
                            <i data-lucide="clipboard-check" class="w-3.5 h-3.5"></i>
                            Verifikasi Pengembalian
                        </div>

                        <h1 class="text-2xl md:text-4xl font-extrabold mt-4">Pengembalian Barang</h1>
                        <p class="text-emerald-100/90 mt-3 text-sm md:text-base max-w-3xl leading-relaxed">
                            Tinjau barang yang sudah diajukan kembali oleh peminjam dan terima pengembalian untuk memperbarui stok.
                        </p>
                    </div>
                </div>

                <?php if(session('success')): ?>
                    <div class="rounded-2xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-emerald-700 text-sm font-medium">
                        <?php echo e(session('success')); ?>

                    </div>
                <?php endif; ?>

                <?php if(session('error')): ?>
                    <div class="rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-rose-700 text-sm font-medium">
                        <?php echo e(session('error')); ?>

                    </div>
                <?php endif; ?>

                <div class="bg-white border border-slate-200 rounded-[28px] shadow-sm overflow-hidden">
                    <div class="px-6 py-5 border-b border-slate-200 bg-slate-50 flex flex-col sm:flex-row sm:items-center justify-between gap-3">
                        <div>
                            <h2 class="text-xl font-bold text-slate-900">Daftar Menunggu Verifikasi</h2>
                            <p class="text-sm text-slate-500 mt-1">Total pengajuan pengembalian saat ini: <?php echo e($pendingReturns->count()); ?></p>
                        </div>
                    </div>

                    <div class="divide-y divide-slate-100">
                        <?php $__empty_1 = true; $__currentLoopData = $pendingReturns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $return): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <div class="p-5 md:p-6">
                                <div class="grid grid-cols-1 xl:grid-cols-[1fr_auto] gap-5 xl:items-center">
                                    <div class="space-y-4">
                                        <div>
                                            <div class="text-lg font-bold text-slate-900"><?php echo e($return->item->nama ?? 'Item tidak ditemukan'); ?></div>
                                            <div class="text-sm text-slate-500 mt-1">
                                                Diajukan oleh <span class="font-semibold text-slate-700"><?php echo e($return->user->name ?? '-'); ?></span>
                                            </div>
                                        </div>

                                        <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3">
                                            <div class="rounded-2xl bg-slate-50 border border-slate-200 px-4 py-3">
                                                <div class="text-[11px] uppercase tracking-wide text-slate-400 mb-1">Jumlah</div>
                                                <div class="text-sm font-semibold text-slate-700"><?php echo e($return->jumlah); ?> Unit</div>
                                            </div>

                                            <div class="rounded-2xl bg-slate-50 border border-slate-200 px-4 py-3">
                                                <div class="text-[11px] uppercase tracking-wide text-slate-400 mb-1">Diajukan Kembali</div>
                                                <div class="text-sm font-semibold text-slate-700">
                                                    <?php echo e($return->actual_return_date ? \Carbon\Carbon::parse($return->actual_return_date)->format('d M Y, H:i') : '-'); ?>

                                                </div>
                                            </div>

                                            <div class="rounded-2xl bg-amber-50 border border-amber-100 px-4 py-3">
                                                <div class="text-[11px] uppercase tracking-wide text-amber-500 mb-1">Kondisi</div>
                                                <div class="text-sm font-semibold text-amber-700"><?php echo e(ucfirst(str_replace('_', ' ', $return->return_condition ?? '-'))); ?></div>
                                            </div>

                                            <div class="rounded-2xl bg-blue-50 border border-blue-100 px-4 py-3">
                                                <div class="text-[11px] uppercase tracking-wide text-blue-500 mb-1">Status</div>
                                                <div class="text-sm font-semibold text-blue-700">Menunggu Verifikasi</div>
                                            </div>
                                        </div>

                                        <div class="rounded-2xl bg-slate-50 border border-slate-200 p-4">
                                            <div class="text-[11px] uppercase tracking-wide text-slate-400 mb-1">Catatan Peminjam</div>
                                            <div class="text-sm text-slate-700"><?php echo e($return->return_notes ?? '-'); ?></div>
                                        </div>
                                    </div>

                                    <div class="xl:w-[220px]">
                                        <form action="<?php echo e(route('verification.returns.approve', $return->id)); ?>" method="POST" class="rounded-3xl bg-slate-50 border border-slate-200 p-4 space-y-3">
                                            <?php echo csrf_field(); ?>

                                            <div class="text-[11px] uppercase tracking-wide text-slate-400">Aksi Sekretariat</div>

                                            <button type="submit"
                                                class="w-full inline-flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 text-white text-sm font-semibold rounded-2xl shadow-sm transition-colors">
                                                <i data-lucide="check-circle-2" class="h-4 w-4"></i>
                                                <span>Terima Pengembalian</span>
                                            </button>

                                            <div class="text-xs text-slate-500 leading-relaxed">
                                                Saat tombol ini ditekan, status berubah menjadi <span class="font-semibold">returned</span> dan stok barang akan diperbarui.
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <div class="px-6 py-14 text-center text-slate-500">
                                <div class="w-16 h-16 rounded-full bg-slate-100 flex items-center justify-center mx-auto mb-4">
                                    <i data-lucide="inbox" class="w-8 h-8 text-slate-400"></i>
                                </div>
                                <div class="font-semibold text-slate-700">Tidak ada pengembalian yang menunggu verifikasi.</div>
                                <div class="text-sm text-slate-500 mt-1">Semua pengajuan pengembalian sudah diproses.</div>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <script>
        lucide.createIcons();
    </script>
</body>
</html>
<?php /**PATH /Users/Afifudin/Downloads/Laravel 15-04-26 3/production/resources/views/returns/verification.blade.php ENDPATH**/ ?>