<?php $__env->startSection("title", env("APP_NAME") . " :: " . $ppp->projeto); ?>

<?php $__env->startSection('content'); ?>
<style>
    .bg-primary { background: linear-gradient(135deg, #0d6efd, #084298); }
    .landing-header {
        color: white;
        padding: 3rem 0 2.5rem 0;
        margin-bottom: 2rem;
        border-radius: 0 0 50px 50px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        position: relative;
        overflow: hidden;
    }
    .landing-header.bg-primary::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: url('https://www.angra.rj.gov.br/uploads/2023/01/20230113110543.jpg') center/cover;
        opacity: 0.08;
        mix-blend-mode: overlay;
    }
    .detail-card {
        border: none;
        border-radius: 15px;
        background: white;
        box-shadow: 0 5px 20px rgba(0,0,0,0.05);
        margin-bottom: 2rem;
        overflow: hidden;
    }
    .detail-card-header {
        background: #f8f9fa;
        padding: 1.5rem;
        border-bottom: 1px solid #eee;
    }
    .detail-card-body {
        padding: 2rem;
    }
    .info-group {
        margin-bottom: 1.5rem;
    }
    .info-label {
        font-size: 0.8rem;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }
    .info-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #212529;
    }
    .status-timeline {
        position: relative;
        padding-left: 30px;
        margin-top: 2rem;
    }
    .status-item {
        position: relative;
        padding-bottom: 2rem;
    }
    .status-item::before {
        content: '';
        position: absolute;
        left: -34px;
        top: 5px;
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #0055a5;
        border: 3px solid #e9ecef;
    }
    .status-item::after {
        content: '';
        position: absolute;
        left: -28px;
        top: 25px;
        width: 3px;
        height: 100%;
        background: #e9ecef;
    }
    .status-item:last-child::after {
        display: none;
    }
    .btn-back {
        background: rgba(255,255,255,0.1);
        color: white;
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 25px;
        padding: 8px 20px;
        transition: all 0.3s;
    }
    .btn-back:hover {
        background: rgba(255,255,255,0.2);
        color: white;
    }
</style>

<div class="landing-header bg-primary text-center position-relative">
    <div class="container position-relative">
        <div class="d-flex justify-content-between align-items-start flex-wrap gap-3 mb-3">
            <div class="d-flex align-items-center gap-3">
                <div class="bg-white text-primary rounded-circle p-3 shadow-sm">
                    <i class="fa-solid fa-handshake fa-2x"></i>
                </div>
                <div class="text-start">
                    <h1 class="h3 mb-1 text-white fw-bold"><?php echo e($ppp->projeto); ?></h1>
                    <p class="lead mb-0 text-white opacity-75">
                        <i class="fa-solid fa-building me-2"></i><?php echo e($ppp->show_secretaria_responsavel ? ($ppp->secretaria_responsavel ?? '–') : ''); ?>

                    </p>
                </div>
            </div>
            <div class="d-flex align-items-center gap-2 ms-auto">
                <a href="<?php echo e(route('pppseconvenios')); ?>" class="btn btn-outline-light btn-sm rounded-pill">
                    <i class="fa-solid fa-arrow-left me-2"></i> <?php echo e(__('Início')); ?>

                </a>
                <a href="<?php echo e(route('ppps.public.list')); ?>" class="btn btn-outline-light btn-sm rounded-pill">
                    <i class="fa-solid fa-list me-2"></i> <?php echo e(__('Voltar à lista')); ?>

                </a>
                <?php if($ppp->show_andamento ?? true): ?>
                <span class="badge badge-status-andamento px-3 py-2 rounded-pill">
                    <?php echo e($ppp->andamento ?? __('Em Análise')); ?>

                </span>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>

<div class="container mb-5">
    <div class="row">
        <div class="col-lg-8">
            <div class="detail-card">
                <div class="detail-card-header">
                    <h4 class="mb-0 fw-bold text-primary"><i class="fa-regular fa-file-lines me-2"></i><?php echo e(__('Informações do Projeto')); ?></h4>
                </div>
                <div class="detail-card-body">
                    <div class="row">
                        <?php if($ppp->show_empresa): ?>
                        <div class="col-md-6 info-group">
                            <div class="info-label"><?php echo e(__('Empresa Responsável')); ?></div>
                            <div class="info-value"><?php echo e($ppp->empresa ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                        <?php if($ppp->show_criterio_julgamento): ?>
                        <div class="col-md-6 info-group">
                            <div class="info-label"><?php echo e(__('Critério de Julgamento')); ?></div>
                            <div class="info-value"><?php echo e($ppp->criterio_julgamento ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                        <?php if($ppp->show_prazo_concessao): ?>
                        <div class="col-md-6 info-group">
                            <div class="info-label"><?php echo e(__('Prazo de Concessão')); ?></div>
                            <div class="info-value"><?php echo e($ppp->prazo_concessao ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                        <?php if($ppp->show_prazo_implantacao): ?>
                        <div class="col-md-6 info-group">
                            <div class="info-label"><?php echo e(__('Prazo de Implantação')); ?></div>
                            <div class="info-value"><?php echo e($ppp->prazo_implantacao ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                    </div>
                    <?php if($ppp->show_observacoes && $ppp->observacoes): ?>
                    <div class="mt-4">
                        <div class="info-label"><?php echo e(__('Observações')); ?></div>
                        <p class="text-muted"><?php echo e($ppp->observacoes); ?></p>
                    </div>
                    <?php endif; ?>
                    <?php if($ppp->show_obrigacao && $ppp->obrigacao): ?>
                    <div class="mt-4">
                        <div class="info-label"><?php echo e(__('Obrigações')); ?></div>
                        <p class="text-muted"><?php echo e($ppp->obrigacao); ?></p>
                    </div>
                    <?php endif; ?>
                    <?php if(!empty($ppp->normativas)): ?>
                    <div class="mt-4">
                        <div class="info-label"><?php echo e(__('Normativas')); ?></div>
                        <p class="text-muted"><?php echo e($ppp->normativas); ?></p>
                    </div>
                    <?php endif; ?>
                </div>
            </div>

            <div class="detail-card">
                <div class="detail-card-header">
                    <h4 class="mb-0 fw-bold text-primary">
                        <i class="fa-solid fa-clock-rotate-left me-2"></i><?php echo e(__('Histórico de Tramitações')); ?>

                    </h4>
                </div>
                <div class="detail-card-body">
                    <?php if($ppp->historicos && $ppp->historicos->count() > 0): ?>
                        <div class="status-timeline">
                            <?php $__currentLoopData = $ppp->historicos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $historico): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="status-item">
                                    <div class="d-flex justify-content-between align-items-center mb-1">
                                        <div class="fw-semibold text-primary">
                                            <?php echo e($historico->orgao ?? __('Órgão não informado')); ?>

                                        </div>
                                        <small class="text-muted">
                                            <i class="fa-regular fa-calendar-days me-1"></i>
                                            <?php echo e($historico->data ? \Carbon\Carbon::parse($historico->data)->format('d/m/Y') : optional($historico->created_at)->format('d/m/Y H:i')); ?>

                                        </small>
                                    </div>
                                    <?php if($historico->observacao): ?>
                                        <div class="border rounded-3 p-2 bg-light small text-muted">
                                            <?php echo e($historico->observacao); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    <?php else: ?>
                        <p class="text-muted mb-0"><?php echo e(__('Nenhum histórico de tramitação cadastrado.')); ?></p>
                    <?php endif; ?>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
            <div class="detail-card">
                <div class="detail-card-header bg-primary text-white">
                    <h5 class="mb-0 fw-bold"><i class="fa-solid fa-coins me-2"></i><?php echo e(__('Dados Financeiros')); ?></h5>
                </div>
                <div class="detail-card-body">
                    <?php if($ppp->show_valor_estimado_contrato): ?>
                    <div class="info-group border-bottom pb-2">
                        <div class="info-label"><?php echo e(__('Valor Estimado do Contrato')); ?></div>
                        <div class="info-value text-success"><?php echo e($ppp->valor_estimado_contrato ?? '–'); ?></div>
                    </div>
                    <?php endif; ?>
                    <?php if($ppp->show_investimento_total): ?>
                    <div class="info-group border-bottom pb-2">
                        <div class="info-label"><?php echo e(__('Investimento Total')); ?></div>
                        <div class="info-value text-primary"><?php echo e($ppp->investimento_total ?? '–'); ?></div>
                    </div>
                    <?php endif; ?>
                    <?php if($ppp->show_aporte_municipio): ?>
                    <div class="info-group border-bottom pb-2">
                        <div class="info-label"><?php echo e(__('Aporte do Município')); ?></div>
                        <div class="info-value"><?php echo e($ppp->aporte_municipio ?? '–'); ?></div>
                    </div>
                    <?php endif; ?>
                    <?php if($ppp->show_contraprestacao_mensal): ?>
                    <div class="info-group border-bottom pb-2">
                        <div class="info-label"><?php echo e(__('Contraprestação Mensal')); ?></div>
                        <div class="info-value"><?php echo e($ppp->contraprestacao_mensal ?? '–'); ?></div>
                    </div>
                    <?php endif; ?>
                    <?php if($ppp->show_outorga_fixa): ?>
                    <div class="info-group border-bottom pb-2">
                        <div class="info-label"><?php echo e(__('Outorga Fixa')); ?></div>
                        <div class="info-value"><?php echo e($ppp->outorga_fixa ?? '–'); ?></div>
                    </div>
                    <?php endif; ?>
                    <?php if($ppp->show_outorga_variavel): ?>
                    <div class="info-group">
                        <div class="info-label"><?php echo e(__('Outorga Variável')); ?></div>
                        <div class="info-value"><?php echo e($ppp->outorga_variavel ?? '–'); ?></div>
                    </div>
                    <?php endif; ?>
                </div>
            </div>
            <div class="detail-card">
                <div class="detail-card-header">
                    <h5 class="mb-0 fw-bold text-secondary"><i class="fa-solid fa-chart-line me-2"></i><?php echo e(__('Indicadores')); ?></h5>
                </div>
                <div class="detail-card-body">
                    <div class="row">
                        <?php if($ppp->show_tir ?? true): ?>
                        <div class="col-6 info-group text-center">
                            <div class="info-label"><?php echo e(__('TIR')); ?></div>
                            <div class="display-6 fw-bold text-dark"><?php echo e($ppp->tir ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                        <?php if(isset($ppp->reajuste)): ?>
                        <div class="col-6 info-group text-center">
                            <div class="info-label"><?php echo e(__('Reajuste')); ?></div>
                            <div class="h5 fw-bold text-muted mt-2"><?php echo e($ppp->reajuste ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                    </div>
                    <div class="row mt-3">
                        <?php if($ppp->show_capex ?? true): ?>
                        <div class="col-6 info-group">
                            <div class="info-label"><?php echo e(__('CAPEX')); ?></div>
                            <div class="info-value small"><?php echo e($ppp->capex ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                        <?php if($ppp->show_opex ?? true): ?>
                        <div class="col-6 info-group">
                            <div class="info-label"><?php echo e(__('OPEX')); ?></div>
                            <div class="info-value small"><?php echo e($ppp->opex ?? '–'); ?></div>
                        </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.pmar.theme', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/portal/resources/views/paginas/pppseconvenios/show.blade.php ENDPATH**/ ?>