html, body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', Arial, sans-serif;
}

header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #38482f;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav {
    padding: 22px 26px;
    text-align: right;
    font-size: 14px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline-block;
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
}

nav ul li a.active,
nav ul li a:hover {
    color: #b0c7b6;
}


.user-info{
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    margin-left: 10px;
}

.user-details{
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3c2d3;
    object-fit: cover;
    border: 1px solid #ffffff;
}

.user-details span:first-child {
    font-size: 13px;
    font-weight: bold;
}

.user-details span:last-child {
    font-size: 11px;
    opacity: 0.85;
}

.main-content {
    width: 100%;
    min-height: calc(100vh - 60px); /* tinggi navbar */
    background: url('../images/dashboard.jpg') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box; 
}

.data-kecamatan {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.data-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.left-action {
    display: flex;
    gap: 10px;
}

.right-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.right-action select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-primary {
    background: #38482f;
    color: #ffffff;
}


.btn-primary:hover {
    background: #2c3925;
}

.btn-secondary {
    background: #2f6b3f;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #245432;
}

.data-table {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: #38482f;
    color: #ffffff;
}

thead th {
    padding: 12px 10px;
    text-align: center;
    font-weight: bold;
}

tbody td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

tbody tr:hover {
    background: #f4f7f4;
}

.aksi {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0;
    cursor: pointer;
}

.btn-icon.edit {
    background: #38482f;
}

.btn-icon.edit:hover {
    background: #2c3925;
}

button.btn-icon.delete {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #38482f;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.btn-icon.delete:hover {
    background: #b02a37;
}

.pagination {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination a,
.pagination span {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.pagination a {
    background: #38482f;
    color: #fff;
    text-decoration: none;
}

.pagination a:hover {
    background: #2c3925;
}

.pagination span.active {
    background: #b0c7b6;
    color: #2c3925;
}

@media (max-width: 768px) {

    /* HEADER */
    header {
        padding: 14px 16px;
    }

    /* USER INFO */
    .user-details {
        display: none; 
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    /* NAV */
    nav {
        padding: 0;
        text-align: center;
        font-size: 12px;
    }

    nav ul {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    nav ul li {
        margin-left: 0;
    }

    nav ul li a {
        padding: 6px 6px;
        font-size: 12px;
    }
    
    .data-kecamatan {
        padding: 16px;
    }

    .data-tools {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        font-size: 12px;
    }

    thead th,
    tbody td {
        padding: 8px 6px;
    }
}

