<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo e($main_title); ?> <?php echo e($jurusan_title); ?></title>
    <style>
        body {
            font-family: "Arial", sans-serif;
            margin: 0;
            padding: 20px;
            font-size: 12px;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
        }
        @page {
            size: A4;
            margin: 1mm;
        }
        .bold {
            font-weight: bold;
        }
        .header-container {
            position: relative;
            width: 100%;
            margin: 0 auto 10px;
            text-align: center;
        }
        .header-logo {
            max-width: 80%;
            height: auto;
            position: relative;
            left: 40%;
            transform: translateX(-50%);
        }
        .title {
            text-align: center;
            font-weight: bold;
        }
        .title-last {
            margin-bottom: 15px;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
            page-break-inside: avoid;
        }
        table, th, td {
            border: 1px solid black;
        }
        th, td {
            padding: 5px;
            text-align: center;
            vertical-align: middle;
        }
        .signature-container {
            margin-top: 50px;
            width: 100%;
            page-break-inside: avoid;
        }
        .signature-table {
            width: 100%;
            border: none;
            border-collapse: collapse;
        }
        .signature-col {
            width: 50%;
            vertical-align: top;
            text-align: left;
            border: none;
        }
        .signature-col-left {
            padding-left: 5px;
        }
        .signature-col-right {
            padding-left: 172px;
        }
        .signature-title {
            margin-bottom: 5px;
        }
        .signature-department {
            font-weight: bold;
            margin-bottom: 80px;
        }
        .signature-date {
            margin-bottom: 5px;
        }
        .signature-position {
            font-weight: bold;
            margin-bottom: 80px;
        }
        .signature-name {
            margin-top: 40px;
            font-weight: bold;
            text-decoration: none;
        }
        .signature-nip {
            margin-top: 0;
        }
        hr {
            border: 0.5px solid black;
            margin: 5px 0 10px 0;
        }
    </style>
</head>
<body>
    <div class="header-container">
        <img class="header-logo" src="<?php echo e(public_path('images/top-smakensa.jpg')); ?>">
    </div>

    <hr>

    <div class="title"><?php echo e($main_title); ?><br><?php echo e($jurusan_title); ?></div>
    <div class="title"><?php echo e($subtitle); ?></div>
    <div class="title title-last"><?php echo e($tahun); ?></div>

    <table>
        <thead>
            <tr>
                <th rowspan="2">NO</th>
                <th rowspan="2">HARI</th>
                <th rowspan="2">Jam Ke-</th>
                <th rowspan="2">KELAS</th>
                <th colspan="2">JAM</th>
                <th rowspan="2">INSTRUKTUR</th>
                <th rowspan="2">MAPEL</th>
            </tr>
            <tr>
                <th>MULAI</th>
                <th>BERAKHIR</th>
            </tr>
        </thead>
        <tbody>
            <?php
                $rowspanCounts = [];
                foreach ($jadwals as $item) {
                    $key = $item['no'] . '|' . $item['hari'];
                    if (!isset($rowspanCounts[$key])) {
                        $rowspanCounts[$key] = 0;
                    }
                    $rowspanCounts[$key]++;
                }
            ?>

            <?php $__currentLoopData = $jadwals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                    $key = $item['no'] . '|' . $item['hari'];
                    $rowspan = $rowspanCounts[$key] ?? 1;
                ?>
                <tr>
                    <?php if($item['is_first']): ?>
                        <td rowspan="<?php echo e($rowspan); ?>"><?php echo e($item['no']); ?></td>
                        <td rowspan="<?php echo e($rowspan); ?>"><?php echo e($item['hari']); ?></td>
                    <?php endif; ?>
                    <td><?php echo e($item['jam_ke']); ?></td>
                    <td><?php echo e($item['kelas']); ?></td>
                    <td><?php echo e($item['waktu_mulai']); ?></td>
                    <td><?php echo e($item['waktu_selesai']); ?></td>
                    <td><?php echo e($item['instruktur']); ?></td>
                    <td><?php echo e($item['mapel']); ?></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>

    <div class="signature-container">
        <table class="signature-table">
            <tr>
                <td class="signature-col signature-col-left">
                    <div class="signature-title">KETUA PAKET KEAHLIAN</div>
                    <div class="signature-department"><?php echo e($signature_data['keahlian']); ?></div>
                    <div class="signature-name"><?php echo e($signature_data['ketua']); ?></div>
                    <div class="signature-nip"><?php echo e($signature_data['nip']); ?></div>
                </td>
                <td class="signature-col signature-col-right">
                    <div class="signature-date">Bondowoso, <?php echo e(now()->translatedFormat('d F Y')); ?></div>
                    <div class="signature-position"><?php echo e($signature_data['laboran']); ?></div>
                    <div class="signature-name">ABDUL MUID</div>
                </td>
            </tr>
        </table>
    </div>
</body>
</html><?php /**PATH C:\wamp64\www\muid-akuntansi\resources\views/jadwal/jadwal_praktik.blade.php ENDPATH**/ ?>