

<?php $__env->startSection('content'); ?>
    <div class="mb-8 flex justify-between items-end">
        <div>
            <h1 class="text-3xl font-black text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-purple-500 uppercase tracking-widest">Master Inventory</h1>
            <p class="text-sm text-slate-400 font-medium mt-1">Manage genuine electronics spare parts and stock levels.</p>
        </div>
        <a href="<?php echo e(route('products.create')); ?>" class="bg-gradient-to-r from-cyan-500 to-purple-600 hover:from-cyan-400 hover:to-purple-500 text-white font-bold py-2.5 px-6 rounded-lg transition-all transform hover:scale-[1.02] uppercase tracking-wider shadow-[0_0_15px_rgba(6,182,212,0.4)] flex items-center text-sm inline-flex">
       <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
       Add New Part
        </a>
    </div>

    <div class="bg-slate-900/60 backdrop-blur-xl rounded-2xl shadow-2xl border border-slate-800 overflow-hidden">
        
        <div class="p-5 border-b border-slate-800 flex justify-between items-center bg-slate-900/40">
            <div class="relative w-72">
                <input type="text" placeholder="Search part code or name..." class="w-full bg-slate-950/50 border border-slate-700 rounded-lg pl-10 pr-4 py-2 text-sm text-white placeholder-slate-500 focus:outline-none focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500 transition-all">
                <svg class="w-4 h-4 text-slate-500 absolute left-3 top-2.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
            </div>
            <div class="flex space-x-3">
                <select class="bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-2 text-sm text-slate-300 focus:outline-none focus:border-cyan-500">
                    <option>All Categories</option>
                    <option>TV Mainboards</option>
                    <option>AC Compressors</option>
                </select>
            </div>
        </div>

        <div class="overflow-x-auto">
            <table class="w-full text-left border-collapse">
                <thead>
                    <tr class="bg-[#05070B] text-xs font-bold text-slate-500 uppercase tracking-widest border-b border-slate-800">
                        <th class="px-6 py-4">Part Details</th>
                        <th class="px-6 py-4">Category</th>
                        <th class="px-6 py-4">Genuine Price</th>
                        <th class="px-6 py-4 text-center">Stock Status</th>
                        <th class="px-6 py-4 text-center">In Transit</th>
                        <th class="px-6 py-4 text-right">Actions</th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-slate-800/50">
                    <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr class="hover:bg-slate-800/30 transition-colors group">
                        <td class="px-6 py-4">
                            <p class="text-sm font-bold text-slate-200"><?php echo e($product->name); ?></p>
                            <p class="text-xs font-mono text-cyan-500 mt-1"><?php echo e($product->part_code); ?></p>
                        </td>
                        <td class="px-6 py-4">
                            <span class="inline-flex items-center px-2.5 py-1 rounded-md text-[10px] font-bold uppercase tracking-wider bg-slate-800 text-slate-300 border border-slate-700">
                                <?php echo e($product->category->name); ?>

                            </span>
                        </td>
                        <td class="px-6 py-4 text-sm font-bold text-slate-200">
                            ₹<?php echo e(number_format($product->price, 2)); ?>

                        </td>
                        <td class="px-6 py-4 text-center">
                            <?php if($product->masterStock && $product->masterStock->available_quantity > 0): ?>
                                <span class="inline-flex items-center px-3 py-1 rounded-full text-xs font-bold bg-green-500/10 text-green-400 border border-green-500/20">
                                    <span class="w-1.5 h-1.5 bg-green-500 rounded-full mr-2 animate-pulse"></span>
                                    <?php echo e($product->masterStock->available_quantity); ?> Available
                                </span>
                            <?php else: ?>
                                <span class="inline-flex items-center px-3 py-1 rounded-full text-xs font-bold bg-red-500/10 text-red-400 border border-red-500/20">
                                    <span class="w-1.5 h-1.5 bg-red-500 rounded-full mr-2"></span>
                                    Out of Stock
                                </span>
                            <?php endif; ?>
                        </td>
                        <td class="px-6 py-4 text-center">
                            <span class="text-sm font-bold text-purple-400">
                                <?php echo e($product->masterStock->in_transit_quantity ?? 0); ?> Units
                            </span>
                        </td>
                        <td class="px-6 py-4 text-right">
                            <button class="text-slate-400 hover:text-cyan-400 transition-colors p-1">
                                <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg>
                            </button>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>

        <div class="px-6 py-4 border-t border-slate-800 bg-[#05070B]">
            <?php echo e($products->links()); ?>

        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Administrator\utsn-spare\resources\views/admin/products/index.blade.php ENDPATH**/ ?>