<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>LPKA Kelas II Jakarta</title>

<!-- Favicon -->
<link rel="icon" href="<?php echo e(asset('picture/favicon.ico')); ?>" type="image/x-icon">
<link rel="shortcut icon" href="<?php echo e(asset('picture/favicon.ico')); ?>" type="image/x-icon">

<?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css', 'resources/js/app.js']); ?>
<style>
    body { font-family: Arial, sans-serif; color: black; background-color: white; margin: 0; padding: 0; }
    .container { max-width: 1200px; margin: 0 auto; padding: 20px; }
    header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ccc; padding-bottom: 15px; margin-bottom: 20px; }
    .logo { display: flex; align-items: center; gap: 10px; }
    .logo img { height: 50px; }
    .logo-text { font-weight: 700; font-size: 20px; }
    .header-buttons a { text-decoration: none; background-color: black; color: white; padding: 6px 12px; border-radius: 8px; font-weight: 600; }
    .header-buttons a:hover { background-color: #333; }

    h2 { font-weight: 700; font-size: 26px; color: #1E40AF; margin-bottom: 15px; }

    table { border-collapse: collapse; width: 100%; margin-top: 10px; }
    th, td { border: 1px solid #333; padding: 8px 12px; text-align: left; vertical-align: top; font-size: 14px; }
    th { background-color: #f0f0f0; }
    .nowrap { white-space: nowrap; }
    .small { font-size: 12px; }

    /* Tombol */
    .btn { display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; font-weight: 600; border-radius: 8px; text-decoration: none; color: white; }
    .btn-detail { background-color: #facc15; } /* kuning */
    .btn-detail:hover { background-color: #eab308; }
    .btn-edit { background-color: #ef4444; } /* merah */
    .btn-edit:hover { background-color: #dc2626; }

    .btn-add { background-color: black; } 
    .btn-add:hover { background-color: #333; }

    /* Search */
    .search-input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; }
    .search-btn { padding: 6px 12px; background-color: black; color: white; border-radius: 6px; font-weight: 600; border: none; cursor: pointer; }
    .search-btn:hover { background-color: #333; }

    .success { color: green; margin-bottom: 15px; }
    footer { margin-top: 30px; border-top: 1px solid #ccc; padding-top: 15px; text-align: center; }
</style>
</head>

<body>
<div class="container">

    <!-- Header -->
    <header>
        <div class="logo">
            <img src="<?php echo e(asset('picture/logolpka1.png')); ?>" alt="Logo">
            <div class="logo-text">LPKA Kelas II Jakarta</div>
        </div>
        <div class="header-buttons">
            <a href="<?php echo e(route('laporan.create')); ?>" class="btn btn-add">Tambah Laporan Baru</a>
        </div>
    </header>

    <!-- Judul + Pencarian -->
    <div style="display:flex; justify-content: space-between; align-items: center; margin-bottom: 15px;">
        <h2>Daftar Laporan Anak Binaan</h2>
        <form action="<?php echo e(route('laporan.index')); ?>" method="GET" style="display:flex; gap:5px; align-items:center;">
            <input type="text" name="search" placeholder="Cari nama anak" value="<?php echo e(request('search')); ?>" class="search-input">
            <button type="submit" class="search-btn">Cari</button>
        </form>
    </div>

    <!-- Pesan sukses -->
    <?php if(session('success')): ?>
        <div class="success"><?php echo e(session('success')); ?></div>
    <?php endif; ?>

    <!-- Tabel Laporan -->
    <table>
        <thead>
            <tr>
                <th class="nowrap">ID</th>
                <th>Anak Binaan</th>
                <th>Bulan/Tahun</th>
                <th>Pembinaan</th>
                <th>Kesehatan</th>
                <th>Psikologi</th>
                <th>Pengajian</th>
                <th>Aksi</th>
            </tr>
        </thead>
        <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $laporan; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $l): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <tr>
                <td class="nowrap"><?php echo e($l->id); ?></td>
                <td><?php echo e($l->anak->nama ?? '-'); ?></td>
                <td class="small"><?php echo e($l->bulan); ?> / <?php echo e($l->tahun); ?></td>

                <td class="small">
                    Disiplin: <?php echo e($l->pembinaan->disiplin ?? '-'); ?><br>
                    Partisipasi: <?php echo e($l->pembinaan->partisipasi ?? '-'); ?><br>
                    Tanggung Jawab: <?php echo e($l->pembinaan->tanggung_jawab ?? '-'); ?><br>
                    Catatan: <?php echo e($l->pembinaan->catatan ?? '-'); ?>

                </td>

                <td class="small">
                    Tekanan: <?php echo e($l->kesehatan->tekanan_darah ?? '-'); ?><br>
                    Nadi: <?php echo e($l->kesehatan->nadi ?? '-'); ?><br>
                    Suhu: <?php echo e($l->kesehatan->suhu ?? '-'); ?><br>
                    Berat: <?php echo e($l->kesehatan->berat_badan ?? '-'); ?><br>
                    Tinggi: <?php echo e($l->kesehatan->tinggi_badan ?? '-'); ?><br>
                    Diagnosa: <?php echo e($l->kesehatan->diagnosa ?? '-'); ?><br>
                    Tindakan: <?php echo e($l->kesehatan->tindakan ?? '-'); ?>

                </td>

                <td class="small">
                    Kontrol Emosi: <?php echo e($l->psikologi->kontrol_emosi ?? '-'); ?><br>
                    Motivasi: <?php echo e($l->psikologi->motivasi ?? '-'); ?><br>
                    Interaksi Sosial: <?php echo e($l->psikologi->interaksi_sosial ?? '-'); ?><br>
                    Risiko: <?php echo e($l->psikologi->tingkat_risiko ?? '-'); ?><br>
                    Emosi: <?php echo e($l->psikologi->kondisi_emosional ?? '-'); ?><br>
                    Rekomendasi: <?php echo e($l->psikologi->rekomendasi ?? '-'); ?>

                </td>

                <td class="small">
                    Program: <?php echo e($l->pengajian->program ?? '-'); ?><br>
                    Halaman: <?php echo e($l->pengajian->halaman ?? '-'); ?><br>
                    Target: <?php echo e($l->pengajian->target ?? '-'); ?>

                </td>

                <td class="nowrap">
                    <a href="<?php echo e(route('laporan.show', $l->id)); ?>" class="btn btn-detail">Detail</a>
                    <a href="<?php echo e(route('laporan.edit', $l->id)); ?>" class="btn btn-edit">Edit</a>
                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <tr>
                <td colspan="8" style="text-align:center;">Belum ada laporan</td>
            </tr>
            <?php endif; ?>
        </tbody>
    </table>

    <!-- Footer -->
    <footer>
        <a href="<?php echo e(url('/')); ?>" class="btn btn-add">Kembali ke Menu</a>
        <p style="margin-top:10px; font-size:12px; color:#555;">© <?php echo e(now()->year); ?> LPKA Kelas II Jakarta. All rights reserved.</p>
    </footer>

</div>
</body>
</html><?php /**PATH /home/lpkaberk/public_html/resources/views/laporan/index.blade.php ENDPATH**/ ?>