<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 9pt; 
    color: #000; 
    margin: 0 auto;
    width: 170mm; /* Ancho similar al PDF original de FPDF */
    padding: 5mm 0;
}

.hdr-empresa { 
    font-size: 6pt; 
    font-weight: bold; 
    margin-left: 2mm;
}
.hdr-titulo { 
    font-size: 16pt; 
    font-weight: bold; 
    text-align: center; 
    margin: 6px 0 2px; 
}
.hdr-fecha { 
    font-size: 6pt; 
    text-align: right; 
    margin-right: 2mm;
}
hr.sep { 
    border: none; 
    border-top: 1px solid #000; 
    margin: 4px 0; 
    width: 100%;
}

/* Bloque NRO / TIPO / FECHA — tres columnas iguales */
table.nro { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 6px; 
}
table.nro td { 
    border: 1px solid #000; 
    padding: 3px 5px; 
    font-weight: bold; 
    font-size: 11pt; 
}

/* Datos secundarios (contrato, urb, dist) */
.dat-sec { 
    font-size: 10pt; 
    font-weight: bold; 
    margin-bottom: 2px; 
    margin-left: 2mm;
}

/* Tabla cuerpo */
table.cuerpo { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 10pt; 
    font-weight: bold; 
    margin-top: 6px; 
}
table.cuerpo td { 
    padding: 3px 4px; 
    vertical-align: middle; 
}
table.cuerpo td.b  { border: 1px solid #000; }
table.cuerpo td.r  { text-align: right; }
table.cuerpo td.c  { text-align: center; }

/* Tabla de firmas */
table.firmas { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 10pt; 
    font-weight: bold; 
    margin-top: 6px; 
}
table.firmas td { 
    padding: 3px 4px; 
}
table.firmas td.b { 
    border: 1px solid #000; 
}
table.firmas td.c { 
    text-align: center; 
}
.firma-h { 
    height: 22px; 
}

.footer { 
    position: fixed; 
    bottom: -20px; 
    width: 170mm; 
    text-align: center; 
    font-size: 8pt; 
    color: #666; 
    font-style: italic; 
}

.contenedor {
    width: 170mm;
    margin: 0 auto;
}

.texto-literal {
    font-size: 8pt;
    padding-left: 4px;
}
</style>
</head>
<body>

<div class="contenedor">

<?php
    $hoy  = now('America/La_Paz')->format('d/m/Y');
    $hora = now('America/La_Paz')->format('H:i:s');
    $d    = $datos; // alias corto para mantener legibilidad
?>

<div class="footer">Página <span class="page"></span></div>


<div class="hdr-empresa">EMPRESA COMERCIAL COSMOS</div>
<div class="hdr-empresa">LA PAZ - BOLIVIA</div>
<div class="hdr-titulo">AJUSTE</div>
<div class="hdr-fecha">Fecha: <?php echo e($hoy); ?>, Hora: <?php echo e($hora); ?></div>
<hr class="sep">


<table class="nro">
    <tr>
        <td>Nro:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo e($d->id); ?></td>
        <td style="text-align:center">Tipo de Ajuste:&nbsp;&nbsp;<?php echo e($d->tip); ?></td>
        <td style="text-align:right">Fecha:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo e($d->fechaAjuste); ?></td>
    </tr>
</table>


<div class="dat-sec">Contrato:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo e($d->idcontrato); ?>&nbsp;&nbsp;/&nbsp;&nbsp;<?php echo e($d->fechaContrato); ?></div>
<div class="dat-sec">Urbanización:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo e($d->urbanizacion); ?></div>
<div class="dat-sec">Distrito:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo e($d->distrito); ?></div>


<table class="cuerpo" style="margin-top:8px">

    
    <tr>
        <td class="b" style="width:48%">Cliente:</td>
        <td style="width:9%">&nbsp;</td>
        <td class="b c" style="width:9%">Manz</td>
        <td class="b c" style="width:9%">Lote</td>
        <td class="b c" style="width:14%">Superficie</td>
        <td class="b c" style="width:11%">Monto</td>
    </tr>

    
    <tr>
        <td class="b"><?php echo e($d->idcliente); ?></td>
        <td>&nbsp;</td>
        <td class="b c"><?php echo e($d->manzano); ?></td>
        <td class="b c"><?php echo e($d->lote); ?></td>
        <td class="b c"><?php echo e($d->superficie); ?>m²</td>
        <td class="b c">&nbsp;</td>
    </tr>

    
    <tr>
        <td><?php echo e($d->nombrecli); ?></td>
        <td>&nbsp;</td>
        <td class="b" colspan="3" style="font-size:9pt">Fecha de Vencimiento&nbsp;&nbsp;&nbsp;&nbsp;<?php echo e($d->fechaVen ?: '—'); ?></td>
        <td class="b">&nbsp;</td>
    </tr>

    
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td class="b" colspan="3" style="font-size:9pt">Parcial bolivianos&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<?php echo e($d->tipocambio); ?>)</td>
        <td class="b r"><?php echo e($d->bolivianos); ?></td>
    </tr>

    
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td class="b" colspan="3">Parcial Dólares</td>
        <td class="b r"><?php echo e($d->cargo); ?></td>
    </tr>

    
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td class="b" colspan="3">TOTAL EXPRESADO EN DOLARES</td>
        <td class="b r"><?php echo e($d->cargo); ?></td>
    </tr>

    
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="4" class="texto-literal">Son: <?php echo e($d->literal); ?></td>
    </tr>

<?php if($d->observacion): ?>
<tr>
    <td colspan="6" class="texto-literal" style="padding: 10px 4px; text-align: justify;">
        <strong>Observaciones:</strong> <?php echo e($d->observacion); ?>

    </td>
</tr>
<?php endif; ?>

</table>


<table class="firmas" style="margin-top:20px">
    <tr>
        <td style="width:48%">&nbsp;</td> 
        <td class="b c" style="width:26%">AUTORIZADO</td>
        <td class="b c" style="width:26%">INTERESADO</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td class="b firma-h" style="height: 60px;">&nbsp;</td>
        <td class="b firma-h" style="height: 60px;">&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td class="b" style="font-size:7pt; text-align:center"><?php echo e($d->nomUserRegistro); ?></td>
        <td class="b" style="font-size:7pt; text-align:center"><?php echo e($d->nombrecli); ?></td>
    </tr>
</table>


<div style="font-size:7pt; margin-top:6px; margin-left:2mm;">Usuario:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo e($d->nomUserActual); ?></div>

</div>

</body>
</html><?php /**PATH /var/www/proyect-laravel/cosmos-app/resources/views/ajustes/ajuste_pdf.blade.php ENDPATH**/ ?>