<?php $__env->startSection('title', 'Workflow Kanban Board'); ?>

<?php $__env->startSection('content'); ?>
<div class="space-y-6">
    <div class="flex items-center justify-between">
        <div>
            <h1 class="text-xl font-bold text-slate-900 dark:text-white">Workflow Stage Kanban Board</h1>
            <p class="text-xs text-slate-500">Visual application movement across workflow processing stages.</p>
        </div>

        <a href="<?php echo e(route('app.applications.index')); ?>" class="px-4 py-2 bg-slate-200 dark:bg-slate-700 text-slate-700 dark:text-slate-200 font-bold text-xs rounded-xl">Application Directory</a>
    </div>

    <!-- Kanban Stage Columns (Requirement 90) -->
    <div class="flex space-x-4 rtl:space-x-reverse overflow-x-auto pb-6 text-xs">
        <?php $__currentLoopData = $stages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php $stgApps = $applications->get($stg->id, collect()); ?>
            <div class="w-80 flex-shrink-0 bg-slate-100 dark:bg-slate-900 rounded-3xl p-4 space-y-4 border border-slate-200 dark:border-slate-800">
                <div class="flex items-center justify-between border-b border-slate-200 dark:border-slate-800 pb-2">
                    <span class="font-bold text-slate-900 dark:text-white uppercase tracking-wider text-[11px]"><?php echo e($stg->stage_name_en); ?></span>
                    <span class="px-2 py-0.5 rounded-full bg-sky-100 text-sky-700 font-bold font-mono text-[10px]"><?php echo e($stgApps->count()); ?></span>
                </div>

                <div class="space-y-3">
                    <?php $__currentLoopData = $stgApps; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $app): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="bg-white dark:bg-slate-800 rounded-2xl p-4 border border-slate-200 dark:border-slate-700/60 shadow-sm space-y-2">
                            <div class="flex justify-between items-center">
                                <a href="<?php echo e(route('app.applications.show', $app->id)); ?>" class="font-mono font-extrabold text-sky-600 hover:underline text-xs"><?php echo e($app->application_number); ?></a>
                                <span class="px-2 py-0.5 rounded text-[9px] uppercase font-bold <?php echo e($app->priority === 'urgent' ? 'bg-amber-100 text-amber-700' : 'bg-slate-100 text-slate-600'); ?>"><?php echo e($app->priority); ?></span>
                            </div>
                            <span class="font-bold text-slate-900 dark:text-white block"><?php echo e($app->customer ? $app->customer->full_name_en : 'N/A'); ?></span>
                            <span class="text-[10px] text-slate-400 font-bold block"><?php echo e($app->service ? $app->service->name_en : 'Service'); ?></span>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\typingcenter\resources\views\tenant\applications\kanban.blade.php ENDPATH**/ ?>