<?php if (isset($component)) { $__componentOriginale0f1cdd055772eb1d4a99981c240763e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0f1cdd055772eb1d4a99981c240763e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin-layout','data' => ['title' => 'Kanban Operacional — OPCON']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Kanban Operacional — OPCON']); ?>

     <?php $__env->slot('scripts', null, []); ?> 
        <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.0/Sortable.min.js"></script>
        <script>
        document.addEventListener('DOMContentLoaded', () => {
            const csrfToken = document.querySelector('meta[name="csrf-token"]')?.content ?? '';

            async function updateStatus(demandaId, newStatus) {
                await fetch(`/kanban/demandas/${demandaId}`, {
                    method: 'PATCH',
                    headers: {
                        'Content-Type': 'application/json',
                        'X-CSRF-TOKEN': csrfToken,
                        'Accept': 'application/json',
                    },
                    body: JSON.stringify({ status: newStatus }),
                });
            }

            document.querySelectorAll('.kanban-column').forEach(column => {
                new Sortable(column, {
                    group: 'kanban',
                    animation: 150,
                    ghostClass: 'sortable-ghost',
                    dragClass: 'sortable-drag',
                    onEnd(evt) {
                        const card = evt.item;
                        const newColumn = evt.to;
                        const demandaId = card.dataset.id;
                        const newStatus = newColumn.dataset.status;
                        if (demandaId && newStatus) {
                            updateStatus(demandaId, newStatus);
                        }
                    }
                });
            });
        });
        </script>
        <style>
            .sortable-ghost { opacity: 0.3; border: 2px dashed #25b87e !important; }
            .sortable-drag  { opacity: 0.9; transform: rotate(2deg); box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; }
            .kinput { width:100%; padding:0.65rem 0.85rem; border:1.5px solid #e2e8f0; border-radius:10px; font-size:0.875rem; font-family:inherit; color:#1e3a5f; outline:none; box-sizing:border-box; background:#fff; transition:border-color 0.15s, box-shadow 0.15s; }
            .kinput:focus { border-color:#25b87e; box-shadow:0 0 0 3px rgba(37,184,126,0.12); }
            .kinput::placeholder { color:#c8d3de; }
            .klabel { display:block; font-size:0.75rem; font-weight:600; color:#475569; margin-bottom:0.35rem; letter-spacing:0.01em; }
        </style>
     <?php $__env->endSlot(); ?>

    <div x-data="{
        showModal: false,
        showCard: null,
        filterSetor: '',
        filterPrioridade: '',
        form: {
            titulo: '', cliente: '', empresa_cnpj: '', setor: 'Contábil',
            responsavel: '', tipo: 'Suporte interno', prioridade: 'Média',
            sla_vencimento: '', descricao: ''
        },
        saving: false,

        async submitDemanda() {
            this.saving = true;
            const res = await fetch('/kanban/demandas', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                    'X-CSRF-TOKEN': document.querySelector('meta[name=csrf-token]').content,
                    'Accept': 'application/json',
                },
                body: JSON.stringify(this.form)
            });
            this.saving = false;
            if (res.ok) window.location.reload();
        },

        async deleteDemanda(id) {
            if (!confirm('Excluir demanda?')) return;
            await fetch('/kanban/demandas/' + id, {
                method: 'DELETE',
                headers: { 'X-CSRF-TOKEN': document.querySelector('meta[name=csrf-token]').content }
            });
            window.location.reload();
        }
    }">

        
        <div class="px-6 py-6" style="background: #ffffff; border-bottom: 1px solid #e2e8f0;">
            <div class="flex items-center justify-between flex-wrap gap-4">
                <div>
                    <h1 class="text-2xl font-bold" style="color: #1e3a5f;">Kanban Operacional</h1>
                    <p class="text-sm mt-0.5" style="color: #94a3b8;">Gestão de demandas internas com controle de SLA</p>
                </div>
                <button @click="showModal = true" class="btn-primary">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
                    </svg>
                    Nova demanda
                </button>
            </div>

            
            <div class="grid grid-cols-2 lg:grid-cols-4 gap-4 mt-5">
                <?php
                    $cards = [
                        ['label' => 'Abertas',          'value' => $stats['total_abertas'],     'color' => '#2563eb', 'bg' => '#eff6ff'],
                        ['label' => 'Vencidas',         'value' => $stats['vencidas'],          'color' => '#ef4444', 'bg' => '#fef2f2'],
                        ['label' => 'Vencem hoje',      'value' => $stats['vencem_hoje'],       'color' => '#f59e0b', 'bg' => '#fffbeb'],
                        ['label' => 'Concluídas/semana','value' => $stats['concluidas_semana'], 'color' => '#25b87e', 'bg' => '#e8f8f1'],
                    ];
                ?>
                <?php $__currentLoopData = $cards; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $card): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="p-4 rounded-xl" style="background: <?php echo e($card['bg']); ?>;">
                        <p class="text-2xl font-bold" style="color: <?php echo e($card['color']); ?>;"><?php echo e($card['value']); ?></p>
                        <p class="text-xs font-medium mt-0.5" style="color: #565656;"><?php echo e($card['label']); ?></p>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>

            
            <div class="flex flex-wrap gap-3 mt-4">
                <select x-model="filterSetor"
                        class="px-3 py-2 rounded-lg border text-sm outline-none"
                        style="border-color: #e2e8f0; color: #565656;">
                    <option value="">Todos os setores</option>
                    <?php $__currentLoopData = ['Fiscal','Contábil','DP','Financeiro','Legalização']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option><?php echo e($s); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <select x-model="filterPrioridade"
                        class="px-3 py-2 rounded-lg border text-sm outline-none"
                        style="border-color: #e2e8f0; color: #565656;">
                    <option value="">Todas as prioridades</option>
                    <?php $__currentLoopData = ['Crítica','Alta','Média','Baixa']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option><?php echo e($p); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
        </div>

        
        <div class="overflow-x-auto">
            <div class="flex gap-4 p-6" style="min-width: max-content;">
                <?php
                    $colColors = [
                        'Novo'                 => '#2563eb',
                        'Em análise'           => '#7c3aed',
                        'Em execução'          => '#0ea5e9',
                        'Aguardando cliente'   => '#f59e0b',
                        'Aguardando interno'   => '#f97316',
                        'Revisão/Supervisão'   => '#8b5cf6',
                        'Concluído'            => '#25b87e',
                        'Cancelado'            => '#94a3b8',
                    ];
                ?>

                <?php $__currentLoopData = $colunas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $coluna): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php
                        $colDemandas = $demandas[$coluna] ?? collect();
                        $colColor    = $colColors[$coluna] ?? '#94a3b8';
                    ?>
                    <div class="flex-shrink-0 w-72">
                        
                        <div class="flex items-center justify-between mb-3">
                            <div class="flex items-center gap-2">
                                <span class="w-2.5 h-2.5 rounded-full flex-shrink-0" style="background: <?php echo e($colColor); ?>;"></span>
                                <h3 class="text-sm font-semibold" style="color: #1e3a5f;"><?php echo e($coluna); ?></h3>
                            </div>
                            <span class="text-xs font-bold px-2 py-0.5 rounded-full"
                                  style="background: <?php echo e($colColor); ?>18; color: <?php echo e($colColor); ?>;">
                                <?php echo e($colDemandas->count()); ?>

                            </span>
                        </div>

                        
                        <div class="kanban-column space-y-3 min-h-20 p-2 rounded-xl transition-all"
                             data-status="<?php echo e($coluna); ?>"
                             style="background: rgba(0,0,0,0.02);">

                            <?php $__currentLoopData = $colDemandas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $demanda): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php
                                    $prioColor = $demanda->prioridade_color;
                                    $isVencida = $demanda->isVencida();
                                    $isHoje    = $demanda->isVenceHoje();
                                ?>
                                <div class="kanban-card bg-white rounded-xl p-4 cursor-grab active:cursor-grabbing"
                                     data-id="<?php echo e($demanda->id); ?>"
                                     style="border: 1px solid <?php echo e($isVencida ? '#fecaca' : '#e2e8f0'); ?>; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
                                            <?php echo e($isVencida ? 'border-left: 3px solid #ef4444;' : ($isHoje ? 'border-left: 3px solid #f59e0b;' : 'border-left: 3px solid ' . $colColor . ';')); ?>"
                                     @click.stop="showCard = <?php echo e($demanda->toJson()); ?>">

                                    
                                    <div class="flex items-center justify-between mb-2">
                                        <span class="text-[10px] font-bold px-2 py-0.5 rounded-full"
                                              style="background: <?php echo e($prioColor); ?>18; color: <?php echo e($prioColor); ?>;">
                                            <?php echo e($demanda->prioridade); ?>

                                        </span>
                                        <span class="text-[10px]" style="color: #94a3b8;"><?php echo e($demanda->tipo); ?></span>
                                    </div>

                                    <h4 class="text-sm font-semibold leading-snug mb-1" style="color: #1e3a5f;"><?php echo e($demanda->titulo); ?></h4>
                                    <p class="text-xs" style="color: #565656;"><?php echo e($demanda->cliente); ?></p>

                                    
                                    <div class="flex items-center justify-between mt-3 pt-2" style="border-top: 1px solid #f1f5f9;">
                                        <span class="text-[10px] px-2 py-0.5 rounded"
                                              style="background: #f8fafc; color: #565656;"><?php echo e($demanda->setor); ?></span>
                                        <?php if($demanda->sla_vencimento): ?>
                                            <span class="text-[10px] font-medium"
                                                  style="color: <?php echo e($isVencida ? '#ef4444' : ($isHoje ? '#f59e0b' : '#94a3b8')); ?>;">
                                                <?php echo e($isVencida ? '⚠ Vencida' : ($isHoje ? '⏰ Hoje' : $demanda->sla_vencimento->format('d/m'))); ?>

                                            </span>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>

        
        <div x-show="showCard"
             x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100"
             x-transition:leave="transition ease-in duration-150"  x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0"
             @keydown.escape.window="showCard=null"
             style="position:fixed; inset:0; z-index:200; background:rgba(15,23,42,0.5); backdrop-filter:blur(3px);">
            <div style="display:flex; align-items:center; justify-content:center; min-height:100%; width:100%; padding:1rem;">
            <div @click.stop
                 x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100"
                 style="position:relative; background:#fff; border-radius:20px; width:100%; max-width:520px; max-height:90vh; overflow-y:auto; box-shadow:0 32px 80px rgba(0,0,0,0.22); display:flex; flex-direction:column;">
                <template x-if="showCard">
                    <div>
                        
                        <div style="background:linear-gradient(135deg,#1e3a5f 0%,#162e4a 100%); border-radius:20px 20px 0 0; padding:1.25rem 1.375rem; display:flex; align-items:flex-start; justify-content:space-between; gap:0.75rem; position:sticky; top:0; z-index:1;">
                            <div style="min-width:0;">
                                <span x-text="showCard.status" style="display:inline-block; font-size:0.6875rem; font-weight:700; padding:0.2rem 0.625rem; border-radius:100px; background:rgba(37,184,126,0.2); color:#6ee7b7; border:1px solid rgba(37,184,126,0.3); margin-bottom:0.375rem;"></span>
                                <h3 x-text="showCard.titulo" style="font-size:1rem; font-weight:700; color:#fff; margin:0; line-height:1.3; word-break:break-word;"></h3>
                            </div>
                            <button @click="showCard=null"
                                    style="width:30px; height:30px; border-radius:7px; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.08); color:rgba(255,255,255,0.6); cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all 0.15s;"
                                    onmouseover="this.style.background='rgba(255,255,255,0.15)'" onmouseout="this.style.background='rgba(255,255,255,0.08)'">
                                <svg style="width:13px;height:13px;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
                            </button>
                        </div>
                        
                        <div style="padding:1.25rem;">
                            <div style="display:grid; grid-template-columns:1fr 1fr; gap:0.75rem; margin-bottom:1rem;">
                                <?php $__currentLoopData = [['cliente','Cliente'],['setor','Setor'],['tipo','Tipo'],['prioridade','Prioridade'],['responsavel','Responsável'],['sla_vencimento','SLA']]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [$field,$label]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div>
                                    <p style="font-size:0.6875rem; color:#94a3b8; margin:0 0 2px;"><?php echo e($label); ?></p>
                                    <?php if($field === 'sla_vencimento'): ?>
                                    <p style="font-size:0.875rem; font-weight:600; color:#1e3a5f; margin:0;" x-text="showCard.sla_vencimento ? new Date(showCard.sla_vencimento).toLocaleDateString('pt-BR') : '—'"></p>
                                    <?php elseif($field === 'responsavel'): ?>
                                    <p style="font-size:0.875rem; font-weight:600; color:#1e3a5f; margin:0;" x-text="showCard.responsavel || '—'"></p>
                                    <?php else: ?>
                                    <p style="font-size:0.875rem; font-weight:600; color:#1e3a5f; margin:0;" x-text="showCard.<?php echo e($field); ?>"></p>
                                    <?php endif; ?>
                                </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                            <div x-show="showCard.descricao" style="padding:0.75rem; background:#f8fafc; border-radius:10px; margin-bottom:1rem;">
                                <p style="font-size:0.6875rem; color:#94a3b8; margin:0 0 0.25rem;">Descrição</p>
                                <p style="font-size:0.875rem; color:#374151; margin:0; line-height:1.6;" x-text="showCard.descricao"></p>
                            </div>

                            
                            <div style="border-top:1px solid #f1f5f9; padding-top:1rem;">
                                <p style="font-size:0.6875rem; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:0.06em; margin:0 0 0.625rem;">Arquivos</p>
                                <div style="display:flex; flex-direction:column; gap:0.375rem; margin-bottom:0.75rem;">
                                    <template x-if="showCard.uploads && showCard.uploads.length > 0">
                                        <div>
                                            <template x-for="up in showCard.uploads" :key="up.id">
                                                <div style="display:flex; align-items:center; gap:0.5rem; padding:0.4rem 0.5rem; border-radius:8px; background:#f8fafc;">
                                                    <span x-text="up.icon" style="font-size:1rem; flex-shrink:0;"></span>
                                                    <span x-text="up.original_name" style="flex:1; font-size:0.8rem; color:#1e3a5f; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;"></span>
                                                    <span x-text="up.size_human" style="font-size:0.7rem; color:#94a3b8; flex-shrink:0;"></span>
                                                    <a :href="'/uploads/' + up.id + '/download'" style="font-size:0.7rem; color:#2563eb; padding:0.15rem 0.375rem; border-radius:4px; border:1px solid #bfdbfe; text-decoration:none; flex-shrink:0;">↓</a>
                                                </div>
                                            </template>
                                        </div>
                                    </template>
                                    <template x-if="!showCard.uploads || showCard.uploads.length === 0">
                                        <p style="font-size:0.8125rem; color:#94a3b8;">Nenhum arquivo anexado.</p>
                                    </template>
                                </div>
                                <form method="POST" :action="'/kanban/demandas/' + showCard.id + '/uploads'" enctype="multipart/form-data"
                                      style="display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap;">
                                    <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                                    <input type="file" name="arquivo" required style="flex:1; min-width:0; font-size:0.75rem; color:#565656; border:1px dashed #cbd5e1; border-radius:8px; padding:0.3rem 0.5rem;">
                                    <button type="submit" style="padding:0.375rem 0.875rem; background:#1e3a5f; color:#fff; border:none; border-radius:8px; font-size:0.75rem; font-weight:600; cursor:pointer; white-space:nowrap;">Enviar</button>
                                </form>
                            </div>
                        </div>
                        
                        <div style="padding:1rem 1.375rem; border-top:1.5px solid #f1f5f9; display:flex; gap:0.625rem; justify-content:space-between; flex-shrink:0;">
                            <button @click="deleteDemanda(showCard.id)"
                                    style="padding:0.5625rem 0.875rem; border:1.5px solid #fecaca; border-radius:10px; color:#ef4444; font-size:0.875rem; font-weight:500; background:#fff; cursor:pointer; font-family:inherit; transition:all 0.15s;"
                                    onmouseover="this.style.background='#fef2f2'" onmouseout="this.style.background='#fff'">
                                Excluir
                            </button>
                            <button @click="showCard=null"
                                    style="padding:0.5625rem 1.125rem; border:1.5px solid #e2e8f0; border-radius:10px; color:#64748b; font-size:0.875rem; font-weight:500; background:#fff; cursor:pointer; font-family:inherit; transition:all 0.15s;"
                                    onmouseover="this.style.background='#f8fafc'; this.style.borderColor='#cbd5e1'" onmouseout="this.style.background='#fff'; this.style.borderColor='#e2e8f0'">
                                Fechar
                            </button>
                        </div>
                    </div>
                </template>
            </div>
            </div>
        </div>

        
        <div x-show="showModal"
             x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100"
             x-transition:leave="transition ease-in duration-150"  x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0"
             @keydown.escape.window="showModal=false"
             style="position:fixed; inset:0; z-index:200; background:rgba(15,23,42,0.5); backdrop-filter:blur(3px);">
            <div style="display:flex; align-items:center; justify-content:center; min-height:100%; width:100%; padding:1rem;">
            <div @click.stop
                 x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100"
                 style="position:relative; background:#fff; border-radius:20px; width:100%; max-width:520px; max-height:90vh; overflow-y:auto; box-shadow:0 32px 80px rgba(0,0,0,0.22); display:flex; flex-direction:column;">

                
                <div style="background:linear-gradient(135deg,#1e3a5f 0%,#162e4a 100%); border-radius:20px 20px 0 0; padding:1.25rem 1.375rem; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:1;">
                    <div>
                        <h3 style="font-size:1.0625rem; font-weight:700; color:#fff; margin:0 0 2px;">Nova demanda</h3>
                        <p style="font-size:0.75rem; color:rgba(255,255,255,0.45); margin:0;">Preencha os campos obrigatórios</p>
                    </div>
                    <button @click="showModal=false"
                            style="width:30px; height:30px; border-radius:7px; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.08); color:rgba(255,255,255,0.6); cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all 0.15s;"
                            onmouseover="this.style.background='rgba(255,255,255,0.15)'" onmouseout="this.style.background='rgba(255,255,255,0.08)'">
                        <svg style="width:13px;height:13px;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
                    </button>
                </div>

                
                <form @submit.prevent="submitDemanda" style="padding:1.375rem; background:#f8fafc; flex:1;">
                        <div style="display:grid; grid-template-columns:1fr 1fr; gap:0.9rem;">
                        <div style="grid-column:1/-1;">
                            <label class="klabel">Título *</label>
                            <input x-model="form.titulo" required type="text" class="kinput" placeholder="Descrição resumida da demanda">
                        </div>
                        <div>
                            <label class="klabel">Cliente *</label>
                            <input x-model="form.cliente" required type="text" class="kinput" placeholder="Nome do cliente">
                        </div>
                        <div>
                            <label class="klabel">CNPJ</label>
                            <input x-model="form.empresa_cnpj" type="text" class="kinput" placeholder="00.000.000/0001-00">
                        </div>
                        <div>
                            <label class="klabel">Setor *</label>
                            <select x-model="form.setor" class="kinput" style="background:#fff;">
                                <?php $__currentLoopData = ['Fiscal','Contábil','DP','Financeiro','Legalização']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option><?php echo e($s); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div>
                            <label class="klabel">Responsável</label>
                            <input x-model="form.responsavel" type="text" class="kinput" placeholder="Nome do responsável">
                        </div>
                        <div>
                            <label class="klabel">Tipo *</label>
                            <select x-model="form.tipo" class="kinput" style="background:#fff;">
                                <?php $__currentLoopData = ['Abertura','Alteração','Fechamento','Obrigação','Documento','Contrato','Suporte interno']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $t): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option><?php echo e($t); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div>
                            <label class="klabel">Prioridade *</label>
                            <select x-model="form.prioridade" class="kinput" style="background:#fff;">
                                <?php $__currentLoopData = ['Baixa','Média','Alta','Crítica']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option><?php echo e($p); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div>
                            <label class="klabel">SLA / Prazo</label>
                            <input x-model="form.sla_vencimento" type="datetime-local" class="kinput">
                        </div>
                        <div style="grid-column:1/-1;">
                            <label class="klabel">Descrição</label>
                            <textarea x-model="form.descricao" rows="3" class="kinput" style="resize:vertical;" placeholder="Detalhes da demanda..."></textarea>
                        </div>
                    </div>

                    
                    <div style="display:flex; gap:0.625rem; justify-content:flex-end; margin-top:1.25rem; padding-top:1rem; border-top:1.5px solid #eef2f7;">
                        <button type="button" @click="showModal=false"
                                style="padding:0.625rem 1.125rem; border:1.5px solid #e2e8f0; border-radius:10px; font-size:0.875rem; font-weight:500; color:#64748b; background:#fff; cursor:pointer; font-family:inherit; transition:all 0.15s;"
                                onmouseover="this.style.background='#f8fafc'; this.style.borderColor='#cbd5e1'" onmouseout="this.style.background='#fff'; this.style.borderColor='#e2e8f0'">
                            Cancelar
                        </button>
                        <button type="submit" :disabled="saving"
                                style="padding:0.625rem 1.375rem; background:#1e3a5f; color:#fff; border:none; border-radius:10px; font-size:0.875rem; font-weight:600; cursor:pointer; font-family:inherit; transition:background 0.15s;"
                                :style="saving ? 'opacity:0.7;' : ''"
                                onmouseover="if(!this.disabled)this.style.background='#162d4a'" onmouseout="if(!this.disabled)this.style.background='#1e3a5f'">
                            <span x-text="saving ? 'Salvando...' : 'Criar demanda'"></span>
                        </button>
                    </div>
                </form>
            </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $attributes = $__attributesOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $component = $__componentOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__componentOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php /**PATH C:\ProjetosWeb\OPCON\resources\views\pages\kanban.blade.php ENDPATH**/ ?>