<?php if (isset($component)) { $__componentOriginal7a25e34e48cb1a211bdf036fcdbf334f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal7a25e34e48cb1a211bdf036fcdbf334f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.cliente-layout','data' => ['title' => 'Meus Documentos — OPCON Portal']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('cliente-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' => 'Meus Documentos — OPCON Portal']); ?>

    <div style="margin-bottom:1.75rem;">
        <h1 style="font-size:1.375rem; font-weight:700; color:#1e3a5f; margin:0;">Meus Documentos</h1>
        <p style="font-size:0.875rem; color:#64748b; margin:0.25rem 0 0;">Arquivos compartilhados pela OPCON referentes aos seus contratos.</p>
    </div>

    <?php if($documentos->isEmpty()): ?>
        <div style="background:#fff; border-radius:14px; border:1px solid #e2e8f0; padding:3rem; text-align:center;">
            <svg style="width:48px;height:48px;color:#cbd5e1;margin:0 auto 1rem;display:block;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
            <h2 style="font-size:1rem; font-weight:600; color:#1e3a5f; margin:0 0 0.375rem;">Nenhum documento disponível</h2>
            <p style="font-size:0.875rem; color:#94a3b8; margin:0;">Quando a OPCON compartilhar documentos com você, eles aparecerão aqui.</p>
        </div>
    <?php else: ?>
        <?php $__currentLoopData = $documentos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $categoria => $docs): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div style="margin-bottom:1.75rem;">
            
            <?php
                $catMeta = [
                    'Contrato'  => ['#1e3a5f','#eff6ff','M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2'],
                    'Fiscal'    => ['#d97706','#fffbeb','M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z'],
                    'Contábil'  => ['#7c3aed','#f5f3ff','M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z'],
                    'DP'        => ['#0369a1','#e0f2fe','M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z'],
                    'Relatório' => ['#065f46','#ecfdf5','M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'],
                    'Outros'    => ['#475569','#f1f5f9','M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z'],
                ];
                [$tc,$bg,$icon] = $catMeta[$categoria] ?? ['#475569','#f1f5f9','M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z'];
            ?>
            <div style="display:flex; align-items:center; gap:0.625rem; margin-bottom:0.875rem;">
                <div style="width:32px;height:32px;border-radius:9px;background:<?php echo e($bg); ?>;display:flex;align-items:center;justify-content:center;flex-shrink:0;">
                    <svg style="width:16px;height:16px;color:<?php echo e($tc); ?>;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="<?php echo e($icon); ?>"/></svg>
                </div>
                <h2 style="font-size:0.9375rem; font-weight:700; color:#1e3a5f; margin:0;"><?php echo e($categoria); ?></h2>
                <span style="font-size:0.7rem; font-weight:700; color:<?php echo e($tc); ?>; background:<?php echo e($bg); ?>; padding:0.2rem 0.5rem; border-radius:20px;"><?php echo e($docs->count()); ?></span>
            </div>

            
            <div style="display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:0.875rem;">
                <?php $__currentLoopData = $docs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $doc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div style="background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:1rem 1.125rem; display:flex; align-items:center; gap:0.875rem; transition:box-shadow 0.15s;"
                     onmouseover="this.style.boxShadow='0 4px 16px rgba(30,58,95,0.08)'" onmouseout="this.style.boxShadow=''">
                    <span style="font-size:1.75rem; flex-shrink:0;"><?php echo e($doc->icone); ?></span>
                    <div style="min-width:0; flex:1;">
                        <p style="font-size:0.875rem; font-weight:600; color:#1e3a5f; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" title="<?php echo e($doc->nome); ?>"><?php echo e($doc->nome); ?></p>
                        <p style="font-size:0.7rem; color:#94a3b8; margin:0.15rem 0 0;">
                            <?php echo e($doc->contrato?->razao_social ?? 'Geral'); ?> &middot; <?php echo e($doc->tamanho_human); ?> &middot; <?php echo e($doc->created_at->format('d/m/Y')); ?>

                        </p>
                    </div>
                    <a href="<?php echo e(route('cliente.documentos.download', $doc)); ?>"
                       style="flex-shrink:0; display:flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:9px; background:#eff6ff; color:#2563eb; text-decoration:none; transition:background 0.15s;"
                       title="Baixar" onmouseover="this.style.background='#dbeafe'" onmouseout="this.style.background='#eff6ff'">
                        <svg style="width:15px;height:15px;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/></svg>
                    </a>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php endif; ?>

 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal7a25e34e48cb1a211bdf036fcdbf334f)): ?>
<?php $attributes = $__attributesOriginal7a25e34e48cb1a211bdf036fcdbf334f; ?>
<?php unset($__attributesOriginal7a25e34e48cb1a211bdf036fcdbf334f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7a25e34e48cb1a211bdf036fcdbf334f)): ?>
<?php $component = $__componentOriginal7a25e34e48cb1a211bdf036fcdbf334f; ?>
<?php unset($__componentOriginal7a25e34e48cb1a211bdf036fcdbf334f); ?>
<?php endif; ?>
<?php /**PATH C:\ProjetosWeb\OPCON\resources\views\pages\cliente\documentos.blade.php ENDPATH**/ ?>