/* Import Google Font Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: #f4f6f9;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

/* ====== Navbar ====== */
.navbar {
    background: #2e7d32; /* hijau tua */
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h2 {
    margin: 0;
    font-weight: 700;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

.navbar ul li {
    display: inline;
}

.navbar ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: 0.3s;
}

.navbar ul li a:hover {
    background: #1b5e20; /* hijau lebih gelap */
}

/* ====== Container Utama ====== */
.container {
    max-width: 1100px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* ====== Heading ====== */
h1, h2, h3 {
    margin-bottom: 15px;
    color: #2e7d32; /* hijau tua */
    font-weight: 700;
}

/* ====== Tabel ====== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

table th {
    background: #2e7d32; /* hijau tua */
    color: #fff;
    text-align: left;
    padding: 12px;
    font-weight: 500;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

table tr:nth-child(even) {
    background: #f9fbfc;
}

/* ====== Form ====== */
form {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

form label {
    font-weight: 500;
}

form input, form select, form textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border 0.3s ease;
}

form input:focus, form select:focus, form textarea:focus {
    border-color: #2e7d32; /* hijau tua */
}

/* ====== Tombol ====== */
button, .btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #2e7d32; /* hijau tua */
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background: #1b5e20; /* hijau lebih gelap */
}

/* ====== Chart Container ====== */
.chart-container {
    margin-top: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* ====== Footer ====== */
.footer {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    background: #2e7d32; /* hijau tua */
    color: #fff;
    border-radius: 10px;
}

/* ===== Popup Notifikasi ===== */
.popup {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    background: rgba(0,0,0,0.3);
    z-index:1000;
    transition: opacity 0.5s ease;
}

.popup-content {
    background:#2e7d32;
    color:#fff;
    padding:20px 30px;
    border-radius:10px;
    font-weight:500;
    box-shadow:0 4px 10px rgba(0,0,0,0.2);
    animation: popupFade 0.5s ease;
}

@keyframes popupFade {
    from {transform: scale(0.8); opacity:0;}
    to {transform: scale(1); opacity:1;}
}

/* ====== Grid Dusun ====== */
.grid-dusun {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card-dusun {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.card-dusun:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    background: #f1f8f4; /* hijau sangat muda */
}

.card-dusun h3 {
    margin: 0;
    color: #2e7d32; /* hijau tua */
    font-size: 18px;
    font-weight: 700;
}

.card-dusun i {
    font-size: 32px;
    color: #2e7d32; /* hijau tua */
    margin-bottom: 10px;
}

/* Dropdown */
.navbar ul li {
    position: relative;
}

.navbar ul li .dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 160px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar ul li .dropdown-content li {
    display: block;
}

.navbar ul li .dropdown-content li a {
    padding: 10px 16px;
    display: block;
    color: #333;
}

.navbar ul li:hover .dropdown-content {
    display: block;
}

.navbar ul li .dropdown-content li a:hover {
    background: #e8f5e9; /* hijau muda sebagai hover */
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    form {
        flex-direction: column;
        align-items: flex-start;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    table tr {
        margin-bottom: 15px;
		transition: background 0.3s ease, box-shadow 0.3s ease;
    }
	
	table tr:hover {
    background: #e8f5e9; /* hijau muda */
    box-shadow: inset 0 0 6px rgba(46,125,50,0.2);
	}

    table td {
        padding-left: 50%;
        position: relative;
    }

    table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: #555;
    }
}
