:root {
    --kecamatan-bg: #f4f7fb;
    --kecamatan-card: #ffffff;
    --kecamatan-text: #0f172a;
    --kecamatan-muted: #5b6b82;
    --kecamatan-accent: #1f7a8c;
    --kecamatan-border: rgba(15, 23, 42, 0.1);
    --kecamatan-soft: #eef2f7;
}

html[data-bs-theme='dark'] {
    --kecamatan-bg: #0f172a;
    --kecamatan-card: #131c26;
    --kecamatan-text: #e6eef5;
    --kecamatan-muted: #a7b6c8;
    --kecamatan-accent: #7fe3e6;
    --kecamatan-border: rgba(230, 238, 245, 0.12);
    --kecamatan-soft: rgba(230, 238, 245, 0.08);
}

.profil-kecamatan-section {
    padding: 2rem 0 1rem;
}

.profil-kecamatan-search-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0 0 1.4rem;
    border-radius: 10px;
    background: rgba(31, 162, 166, 0.08);
    color: var(--kecamatan-text);
    font-size: 0.95rem;
}

.profil-kecamatan-search-note a {
    font-weight: 600;
    color: var(--kecamatan-accent);
    text-decoration: none;
}

.profil-kecamatan-search-note a:hover {
    text-decoration: underline;
}

html[data-bs-theme='dark'] .profil-kecamatan-search-note {
    background: rgba(31, 162, 166, 0.16);
    color: var(--kecamatan-text);
}

.profil-kecamatan-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
}

.profil-kecamatan-title {
    font-family: var(--front-font-heading);
    font-size: 1.6rem;
    margin: 0;
    color: var(--kecamatan-text);
}

.profil-kecamatan-subtitle {
    margin: 0.35rem 0 0;
    color: var(--kecamatan-muted);
}

.profil-kecamatan-search {
    position: relative;
    min-width: 260px;
}

.profil-kecamatan-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--kecamatan-muted);
    font-size: 0.9rem;
}

.profil-kecamatan-search .form-control {
    padding-left: 36px;
    border-radius: 999px;
    border: 1px solid var(--kecamatan-border);
    background: var(--kecamatan-card);
    color: var(--kecamatan-text);
}

.profil-kecamatan-grid {
    display: grid;
    gap: 1.3rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.profil-kecamatan-card {
    background: var(--kecamatan-card);
    border: 1px solid var(--kecamatan-border);
    border-radius: 10px;
    padding: 1.4rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.profil-kecamatan-card-footer {
    margin-top: auto;
    padding-top: 0.8rem;
    display: flex;
    justify-content: center;
}

.profil-kecamatan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.profil-kecamatan-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(31, 122, 140, 0.12);
    color: var(--kecamatan-accent);
    font-size: 1.1rem;
}

.profil-kecamatan-name {
    margin: 0.2rem 0 0;
    font-size: 1.1rem;
    color: var(--kecamatan-text);
    font-weight: 700;
    text-align: center;
    min-height: 4.6rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profil-kecamatan-head-label {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kecamatan-muted);
    font-weight: 600;
}

.profil-kecamatan-head-name {
    margin: 0.15rem 0 0;
    color: var(--kecamatan-text);
    font-weight: 550;
    line-height: 1.3;
}

.profil-kecamatan-head-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--kecamatan-border);
    background: rgba(31, 122, 140, 0.08);
    display: grid;
    place-items: center;
    margin: 0 auto;
}

.profil-kecamatan-head-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profil-kecamatan-head-photo-placeholder {
    font-family: var(--front-font-heading);
    font-size: 1.1rem;
    color: var(--kecamatan-accent);
    font-weight: 600;
}

.profil-kecamatan-head-role {
    margin: 0;
    color: var(--kecamatan-muted);
    font-size: 0.9rem;
}

.profil-kecamatan-detail {
    align-self: flex-start;
    margin-top: 0.6rem;
}

.profil-kecamatan-empty {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    background: var(--kecamatan-card);
    border: 1px dashed var(--kecamatan-border);
    color: var(--kecamatan-muted);
}

.profil-kecamatan-modal {
    background: var(--kecamatan-card);
    color: var(--kecamatan-text);
}

.profil-kecamatan-modal-title {
    color: var(--kecamatan-text);
    font-weight: 700;
}

.profil-kecamatan-modal-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--kecamatan-muted);
    font-weight: 600;
}

.profil-kecamatan-modal-contact {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--kecamatan-muted);
}

.profil-kecamatan-modal-contact span,
.profil-kecamatan-modal-contact a {
    color: var(--kecamatan-muted);
    text-decoration: none;
}

.profil-kecamatan-modal-head {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    align-items: center;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--kecamatan-border);
}

.profil-kecamatan-modal-photo {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--kecamatan-border);
    background: rgba(31, 122, 140, 0.08);
    min-height: 200px;
    display: grid;
    place-items: center;
    position: relative;
}

.profil-kecamatan-modal-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.profil-kecamatan-modal-photo-placeholder {
    font-family: var(--front-font-heading);
    font-size: 2.2rem;
    color: var(--kecamatan-accent);
}

.profil-kecamatan-modal-head-name {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--kecamatan-text);
}

.profil-kecamatan-modal-head-role {
    margin: 0.2rem 0 0;
    color: var(--kecamatan-accent);
    font-weight: 600;
}

.profil-kecamatan-modal-head-nip {
    margin: 0.4rem 0 0;
    color: var(--kecamatan-muted);
    font-size: 0.95rem;
}

.profil-kecamatan-modal-head-lhkpn {
    margin-top: 0.35rem;
}

.profil-kecamatan-modal-head-lhkpn a {
    color: var(--kecamatan-accent);
    font-weight: 600;
    text-decoration: none;
}

.profil-kecamatan-modal-head-lhkpn a:hover {
    text-decoration: underline;
}

.profil-kecamatan-modal-section {
    margin-top: 1.5rem;
}

.profil-kecamatan-modal-section-title {
    margin: 0;
    font-weight: 700;
    color: var(--kecamatan-text);
}

.profil-kecamatan-modal-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.profil-kecamatan-modal-section-subtitle {
    color: var(--kecamatan-muted);
    font-size: 0.9rem;
}

.profil-kecamatan-accordion .accordion-item {
    border: 1px solid var(--kecamatan-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--kecamatan-soft);
}

.profil-kecamatan-accordion .accordion-item+.accordion-item {
    margin-top: 0.6rem;
}

.profil-kecamatan-accordion .accordion-button {
    background: transparent;
    color: var(--kecamatan-text);
    font-weight: 600;
    padding: 0.8rem 1rem;
}

.profil-kecamatan-accordion .accordion-button:not(.collapsed) {
    background: rgba(31, 122, 140, 0.12);
    color: var(--kecamatan-accent);
}

.profil-kecamatan-accordion .accordion-button:focus {
    box-shadow: none;
}

.profil-kecamatan-accordion .accordion-body {
    color: var(--kecamatan-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

.profil-kecamatan-doc-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profil-kecamatan-doc-card {
    border-radius: 8px;
    border: 1px solid var(--kecamatan-border);
    background: var(--kecamatan-soft);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: space-between;
}

.profil-kecamatan-doc-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kecamatan-muted);
    font-weight: 600;
}

.profil-kecamatan-doc-title {
    margin: 0.35rem 0 0;
    font-weight: 600;
    color: var(--kecamatan-text);
    font-size: 0.95rem;
}

.profil-kecamatan-doc-empty {
    padding: 0.9rem;
    border-radius: 8px;
    border: 1px dashed var(--kecamatan-border);
    color: var(--kecamatan-muted);
    text-align: center;
    background: var(--kecamatan-card);
}

.profil-kecamatan-modal .table {
    background: var(--kecamatan-card);
}

.profil-kecamatan-modal .table thead th {
    background: var(--kecamatan-soft);
    color: var(--kecamatan-text);
}

.profil-kecamatan-modal .table tbody tr:hover {
    background: rgba(31, 122, 140, 0.08);
}

@media (max-width: 991.98px) {
    .profil-kecamatan-modal-head {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .profil-kecamatan-search {
        width: 100%;
    }
}
