/* =====================================================
   DATA DEMOGRAFI DESA
===================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f1f5f9;
    color: #333;
}


/* =====================================================
   CONTAINER
===================================================== */

.demografi-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}


/* =====================================================
   HEADER DATA DEMOGRAFI
===================================================== */

.page-header {
    background: #ffffff;
    border-radius: 18px;
    padding: 26px 34px;
    margin-bottom: 28px;

    border-left: 5px solid #07883f;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}


/* Baris tombol dashboard */

.header-top {
    margin-bottom: 18px;
}


/* Tombol Dashboard */

.btn-back {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    background: #075f48;

    color: white;

    text-decoration: none;

    padding: 12px 20px;

    border-radius: 12px;

    font-weight: 700;

    font-size: 16px;

    transition: 0.2s;
}

.btn-back:hover {
    background: #f4d35e;

    color: #064d36;
    transform: translateX(-3px);
}


/* Isi header */

.header-content {
    display: flex;
    align-items: center;
    gap: 18px;
}


/* Icon */

.header-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #e0f5eb;

    border-radius: 15px;

    font-size: 28px;

    flex-shrink: 0;
}


/* Teks header */

.header-text h1 {
    margin: 0 0 6px;

    color: #08783f;

    font-size: 32px;
    font-weight: 700;
}

.header-text p {
    margin: 0;

    color: #687b74;

    font-size: 15px;
    line-height: 1.6;
}

/* =====================================================
   CARD RINGKASAN
===================================================== */

.demografi-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.demografi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 145px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #008f4c;
}

.demografi-card.laki {
    border-top-color: #2196f3;
}

.demografi-card.perempuan {
    border-top-color: #e91e63;
}

.card-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #e8f5ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-content span {
    color: #666;
    font-size: 14px;
    margin-bottom: 7px;
}

.card-content strong {
    font-size: 30px;
    color: #006b36;
    line-height: 1.1;
}

.card-content small {
    color: #888;
    margin-top: 5px;
}


/* =====================================================
   SECTION
===================================================== */

.demografi-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0 0 5px 0;
    color: #006b36;
    font-size: 21px;
}

.section-header p {
    margin: 0;
    color: #777;
    font-size: 14px;
}


/* =====================================================
   KELOMPOK UMUR
===================================================== */

.umur-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.umur-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.umur-card span {
    display: block;
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
}

.umur-card strong {
    display: block;
    font-size: 27px;
    color: #006b36;
}

.umur-card small {
    display: block;
    color: #888;
    margin-top: 6px;
}


/* =====================================================
   TABLE
===================================================== */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.demografi-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.demografi-table thead {
    background: #006b36;
    color: #ffffff;
}

.demografi-table th {
    padding: 14px 15px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
}

.demografi-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.demografi-table tbody tr:hover {
    background: #f5faf7;
}

.demografi-table th:first-child,
.demografi-table td:first-child {
    width: 70px;
    text-align: center;
}

.demografi-table th:last-child,
.demografi-table td:last-child {
    width: 180px;
}


/* =====================================================
   DATA KOSONG
===================================================== */

.empty {
    text-align: center !important;
    color: #888;
    padding: 25px !important;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {

    .demografi-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .umur-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .demografi-container {
        padding: 15px;
    }

    .demografi-card-grid {
        grid-template-columns: 1fr;
    }

    .umur-grid {
        grid-template-columns: 1fr;
    }

    .demografi-header h1 {
        font-size: 23px;
    }

    .demografi-section {
        padding: 18px;
    }

}