<?php
session_start();
if (!isset($_SESSION['role']) || $_SESSION['role'] !== 'kader') {
    header("Location: ../login.php"); exit;
}
?>
<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Menu Laporan</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        body { 
            background: #f4f7fe; 
            font-family: 'Segoe UI', sans-serif; 
            min-height: 100vh;
        }
        
        .main-container {
            padding: 10px 15px;
        }

        /* Header dipersempit jaraknya */
        .header-section {
            margin-bottom: 8px; 
            padding-top: 5px;
        }

        /* Container Kartu */
        .menu-wrapper {
            display: flex;
            flex-direction: column;
            gap: 8px; /* Jarak antar kartu dipersempit sesuai permintaan */
        }

        .card-menu { 
            border: none; 
            border-radius: 18px; 
            text-decoration: none;
            display: flex;
            align-items: center;
            padding: 15px 20px; /* Padding sedikit dikurangi agar lebih ramping */
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            transition: transform 0.1s;
        }

        .card-menu:active { transform: scale(0.97); }

        .icon-box { 
            width: 60px; height: 60px; /* Ukuran ikon proporsional */
            border-radius: 15px; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            font-size: 26px; 
            margin-right: 18px;
            flex-shrink: 0;
        }

        .menu-title {
            font-size: 1.1rem; 
            font-weight: 700;
            margin: 0;
            color: #333;
        }

        .menu-desc {
            font-size: 0.8rem;
            color: #777;
            margin: 0;
            line-height: 1.2;
        }

        .bg-purple-subtle { background-color: #f3e5f5; color: #6f42c1; }
    </style>
</head>
<body>

<div class="main-container">
    <div class="header-section d-flex align-items-center">
        <a href="dashboard.php" class="btn btn-white shadow-sm rounded-circle me-3" style="width:35px; height:35px; display:flex; align-items:center; justify-content:center; background:white;">
            <i class="fa fa-arrow-left text-primary"></i>
        </a>
        <h4 class="fw-bold mb-0" style="font-size: 1.2rem;">Laporan Kader</h4>
    </div>

    <div class="menu-wrapper">
        <a href="laporan_balita.php" class="card-menu">
            <div class="icon-box bg-primary-subtle text-primary">
                <i class="fa-solid fa-baby"></i>
            </div>
            <div>
                <h5 class="menu-title">Laporan Balita</h5>
                <p class="menu-desc">Data pertumbuhan & penimbangan</p>
            </div>
        </a>

        <a href="laporan_bumil.php" class="card-menu">
            <div class="icon-box bg-danger-subtle text-danger">
                <i class="fa-solid fa-person-pregnant"></i>
            </div>
            <div>
                <h5 class="menu-title">Laporan Ibu Hamil</h5>
                <p class="menu-desc">Data pemeriksaan & kesehatan</p>
            </div>
        </a>

        <a href="laporan_lansia.php" class="card-menu">
            <div class="icon-box bg-purple-subtle">
                <i class="fa-solid fa-person-cane"></i>
            </div>
            <div>
                <h5 class="menu-title">Laporan Lansia</h5>
                <p class="menu-desc">Cek kesehatan & skrining lansia</p>
            </div>
        </a>
        
        <a href="balita_qr_massal.php" class="card-menu">
            <div class="icon-box bg-purple-subtle">
                <i class="fa-solid fa-baby"></i>
            </div>
            <div>
                <h5 class="menu-title">QR Code</h5>
                <p class="menu-desc">Cetak Seluruh QR Code Balita</p>
            </div>
        </a>
    </div>
</div>

</body>
</html>