<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <style>
        body {
            font-family: Arial, sans-serif;
            font-size: 10pt;
            color: #333;
            margin: 0;
            padding: 0;
        }
        .header {
            text-align: center;
            margin-bottom: 20px;
        }
        .header h1 {
            font-size: 16pt;
            margin: 0;
            padding: 0;
        }
        .summary-box {
            background-color: #ffff00;
            display: inline-block;
            padding: 5px 10px;
            font-weight: bold;
            font-size: 12pt;
        }
        .doctor-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-weight: bold;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }
        th {
            background-color: #5b9bd5;
            color: white;
            border: 1px solid #333;
            padding: 5px;
            font-size: 9pt;
        }
        td {
            border: 1px solid #333;
            padding: 5px;
            font-size: 8pt;
        }
        .text-right {
            text-align: right;
        }
        .text-center {
            text-align: center;
        }
        .footer-row {
            font-weight: bold;
        }
        .footer-total {
            background-color: #ffff00;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>Laporan Jasa Medis Dokter Tanggal <?php echo e($startDate ? Carbon\Carbon::parse($startDate)->format('d F Y') : '-'); ?> - <?php echo e($endDate ? Carbon\Carbon::parse($endDate)->format('d F Y') : '-'); ?></h1>
    </div>

    <div style="margin-bottom: 10px; width: 100%;">
        <div style="float: left; width: 70%; font-weight: bold;">
            <?php echo e($dokter); ?>

        </div>
        <div style="float: right; width: 25%; text-align: right;">
            <span class="summary-box"><?php echo e(number_format($total, 0, ',', '.')); ?></span>
        </div>
        <div style="clear: both;"></div>
    </div>

    <table>
        <thead>
            <tr>
                <th width="5%">No.</th>
                <th width="20%">Dokter</th>
                <th width="10%">RMK</th>
                <th width="20%">Nama Pasien</th>
                <th width="12%">Tgl.Perawatan</th>
                <th width="10%">Penjamin</th>
                <th width="13%">Nama Tindakan</th>
                <th width="10%">Jumlah</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td class="text-center"><?php echo e($index + 1); ?></td>
                    <td><?php echo e($item->dokter); ?></td>
                    <td class="text-center"><?php echo e($item->rmk); ?></td>
                    <td><?php echo e($item->nama_pasien); ?></td>
                    <td class="text-center"><?php echo e($item->tgl_perawatan ? $item->tgl_perawatan->format('d-m-Y') : '-'); ?></td>
                    <td class="text-center"><?php echo e($item->penjamin); ?></td>
                    <td><?php echo e($item->nama_tindakan); ?></td>
                    <td class="text-right"><?php echo e(number_format($item->jumlah, 0, ',', '.')); ?></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
        <tfoot>
            <tr class="footer-row">
                <td colspan="7" class="text-center"><?php echo e($dokter); ?></td>
                <td class="text-right footer-total"><?php echo e(number_format($total, 0, ',', '.')); ?></td>
            </tr>
        </tfoot>
    </table>
</body>
</html>
<?php /**PATH /Users/yunagusna/sites/rekap-dokter/resources/views/medical-recap/pdf.blade.php ENDPATH**/ ?>