
/* =========================================
   1. PENGATURAN DASAR WEBSITE
========================================= */

:root {
    --primary: #5541a8;
    --primary-dark: #282451;
    --secondary: #7462c8;
    --background: #f5f6fc;
    --white: #ffffff;
    --text: #252b48;
    --muted: #858ba4;
    --border: #e9eaf3;
    --purple-light: #f0ebff;
    --blue-light: #e9f3ff;
    --green-light: #e5f7f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 14px;
}

a {
    text-decoration: none;
}


/* =========================================
   2. SIDEBAR / MENU SAMPING
========================================= */

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(
        180deg,
        #29244f 0%,
        #201d43 65%,
        #332766 100%
    );
    color: white;
    padding: 25px 16px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 8px 30px;
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #a58af5, #6953d0);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.brand h4 {
    font-size: 21px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 1px;
}

.brand span {
    font-size: 11px;
    color: #c8c3e5;
}

.menu-label {
    color: #a9a3d0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
    padding: 10px 12px;
    margin-bottom: 5px;
}

.sidebar-menu {
    flex: 1;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #d9d6ed;
    padding: 13px 14px;
    border-radius: 11px;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.25s;
}

.menu-link i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.menu-link:hover {
    background: rgba(255,255,255,0.12);
    color: white;
    transform: translateX(3px);
}

.menu-link.active {
    background: linear-gradient(
        90deg,
        #7655d7,
        #5b62d8
    );
    color: white;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 18px 10px 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-footer small {
    color: #bdb7dc;
    font-size: 10px;
}

.sidebar-footer strong {
    color: white;
    font-size: 11px;
}


/* =========================================
   3. AREA KONTEN UTAMA
========================================= */

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    padding: 0 28px;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.topbar h5 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 4px;
}

.topbar p {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

.status-online {
    background: #e8f7ef;
    color: #238653;
    padding: 8px 13px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-online i {
    font-size: 7px;
    margin-right: 5px;
}


/* =========================================
   4. BANNER SAMBUTAN
========================================= */

.welcome-section {
    background: linear-gradient(
        110deg,
        #eae3ff 0%,
        #e5efff 55%,
        #dce9ff 100%
    );
    border-radius: 20px;
    padding: 35px 38px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.welcome-text {
    max-width: 650px;
    position: relative;
    z-index: 2;
}

.welcome-label {
    display: inline-block;
    background: white;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    padding: 7px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.welcome-text h1 {
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.25;
    font-weight: 800;
    margin-bottom: 12px;
    color: #29244f;
}

.welcome-text h1 span {
    color: #6650bd;
}

.welcome-text p {
    font-size: 13px;
    line-height: 1.8;
    color: #656985;
    max-width: 550px;
    margin-bottom: 20px;
}

.btn-welcome {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 11px 18px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.25s;
}

.btn-welcome:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

.welcome-decoration {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8976d5;
    font-size: 90px;
    margin-right: 35px;
    flex-shrink: 0;
}


/* =========================================
   5. BAGIAN DASHBOARD
========================================= */

.dashboard-section {
    margin-bottom: 30px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
    gap: 15px;
}

.section-heading h3 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 5px;
}

.section-heading p {
    color: var(--muted);
    font-size: 11px;
    margin: 0;
}

.year-label {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--muted);
    font-size: 11px;
}


/* =========================================
   6. KARTU INDIKATOR IDG IPG IKG
========================================= */

.indicator-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 21px;
    height: 100%;
    min-height: 155px;
    transition: 0.25s;
}

.indicator-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(52, 48, 105, 0.08);
}

.indicator-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.indicator-top > span {
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
}

.indicator-icon {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 20px;
}

.idg-card .indicator-icon {
    color: #7452c6;
    background: #f0eaff;
}

.ipg-card .indicator-icon {
    color: #3682cf;
    background: #e9f3ff;
}

.ikg-card .indicator-icon {
    color: #239a7b;
    background: #e4f7f0;
}

.indicator-card h2 {
    font-size: 29px;
    font-weight: 800;
    margin-bottom: 5px;
    color: #252747;
}

.indicator-card p {
    color: var(--muted);
    font-size: 11px;
    margin: 0;
}


/* =========================================
   7. KARTU RINGKASAN DATA
========================================= */

.summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 23px;
    min-height: 135px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: 0.25s;
}

.summary-card:hover {
    box-shadow: 0 8px 22px rgba(52, 48, 105, 0.07);
}

.summary-icon {
    width: 55px;
    height: 55px;
    background: #eee9ff;
    color: #7354c5;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    flex-shrink: 0;
}

.disability-icon {
    background: #e7f1ff;
    color: #4285c8;
}

.summary-card h5 {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 7px;
}

.summary-card h3 {
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 4px;
}

.summary-card p {
    color: var(--muted);
    font-size: 11px;
    margin: 0;
}


/* =========================================
   8. PANEL GRAFIK DAN PETA
========================================= */

.content-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    height: 100%;
    min-height: 270px;
}

.content-card h5 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 20px;
}

.empty-chart,
.empty-map {
    background: #f8f8fd;
    border: 1px dashed #d9d6ed;
    border-radius: 12px;
    min-height: 185px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9a91c7;
    text-align: center;
    padding: 15px;
}

.empty-chart i,
.empty-map i {
    font-size: 42px;
    margin-bottom: 12px;
}

.empty-chart p,
.empty-map p {
    font-size: 11px;
    margin: 0;
}


/* =========================================
   9. PANEL ARG
========================================= */

.arg-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 150px;
}

.arg-icon {
    width: 60px;
    height: 60px;
    background: #f0eaff;
    color: #7254c4;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.arg-preview h5 {
    margin-bottom: 8px;
}

.arg-preview p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.text-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.text-link:hover {
    color: #30236c;
}


/* =========================================
   10. FOOTER
========================================= */

.footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: 35px;
    text-align: center;
}

.footer p {
    color: var(--muted);
    font-size: 10px;
    margin: 0;
}


/* =========================================
   11. TAMPILAN TABLET DAN HP
========================================= */

@media (max-width: 991px) {

    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 0 20px;
    }

    .welcome-decoration {
        width: 120px;
        height: 120px;
        font-size: 65px;
        margin-right: 0;
    }

}

@media (max-width: 767px) {

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 15px;
    }

    .brand {
        padding-bottom: 12px;
    }

    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .menu-label {
        grid-column: 1 / -1;
        margin-top: 10px;
    }

    .menu-link {
        padding: 10px;
        font-size: 11px;
    }

    .menu-link i {
        font-size: 15px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 0 15px;
    }

    .topbar {
        min-height: 65px;
    }

    .welcome-section {
        padding: 25px 20px;
        min-height: auto;
    }

    .welcome-decoration {
        display: none;
    }

    .welcome-text h1 {
        font-size: 25px;
    }

    .section-heading h3 {
        font-size: 15px;
    }

    .indicator-card {
        min-height: 140px;
    }

    .summary-card {
        padding: 17px;
    }

    .arg-preview {
        align-items: flex-start;
    }

}

@media (max-width: 400px) {

    .sidebar-menu {
        grid-template-columns: 1fr;
    }

    .status-online {
        font-size: 9px;
        padding: 7px 9px;
    }

}


/* =========================================
   GRAFIK CHART.JS
========================================= */

.chart-container {
    position: relative;
    width: 100%;
    height: 260px;
    padding: 5px;
}

@media (max-width: 767px) {
    .chart-container {
        height: 230px;
    }
}


/* LEGENDA PETA GENDATA */
.info.legend {
    background: transparent;
    padding: 0;
    line-height: 1.5;
    color: #334155;
    z-index: 500;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
}

.leaflet-popup-content {
    margin: 12px;
}


/* ===================================
   KARTU STATISTIK PETA GENDATA
=================================== */

.map-statistics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 18px;
}

.map-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.03);
}

.map-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
}

.map-stat-icon.purple {
    background: #ede9fe;
    color: #6d28d9;
}

.map-stat-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.map-stat-icon.green {
    background: #dcfce7;
    color: #15803d;
}

.map-stat-card p {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 5px;
}

.map-stat-card h3 {
    font-size: 21px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.map-stat-card small {
    font-size: 10px;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .map-statistics {
        grid-template-columns: 1fr;
    }
}


/* GRAFIK PERBANDINGAN PETA */

.map-chart-section {
    margin-top: 18px;
}

.map-chart-section .section-heading h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}

.map-chart-section .section-heading p {
    font-size: 12px;
    color: #64748b;
}

.map-chart-container {
    position: relative;
    width: 100%;
    height: 390px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .map-chart-container {
        height: 450px;
    }
}


/* ===================================
   PANEL PROFIL KECAMATAN
=================================== */

.district-detail-section {
    margin-top: 18px;
}

.district-year {
    background: #ede9fe;
    color: #6d28d9;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.district-empty {
    padding: 35px 15px;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}

.district-empty i {
    font-size: 30px;
    display: block;
    margin-bottom: 10px;
}

.district-empty p {
    font-size: 12px;
    margin: 0;
}

.district-name {
    font-size: 20px;
    font-weight: 700;
    color: #26335f;
    margin: 15px 0;
}

.district-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.district-metric {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border-radius: 12px;
}

.district-metric.violence {
    background: #fff1f2;
}

.district-metric.facility {
    background: #f0fdf4;
}

.district-metric-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 21px;
}

.violence .district-metric-icon {
    background: #fee2e2;
    color: #dc2626;
}

.facility .district-metric-icon {
    background: #dcfce7;
    color: #15803d;
}

.district-metric small {
    color: #64748b;
    font-size: 11px;
}

.district-metric h3 {
    margin: 5px 0;
    font-size: 25px;
    font-weight: 700;
    color: #1e293b;
}

.district-metric span {
    font-size: 10px;
    color: #94a3b8;
}

.district-subtitle {
    font-size: 14px;
    font-weight: 700;
    margin: 25px 0 12px;
    color: #334155;
}

.district-table-wrapper {
    overflow-x: auto;
}

.district-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.district-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.district-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: #334155;
}

@media (max-width: 768px) {
    .district-metrics {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   JUDUL HALAMAN POLITIK DAN PENGAMBILAN KEPUTUSAN
========================================= */

.political-page-heading {
    display: block;
    width: 100%;
    padding: 12px 0 24px;
    margin-bottom: 28px;
}

.political-heading-label {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: #6855d9;
    background: #eeeaff;
    padding: 8px 13px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.political-page-heading h2 {
    display: block;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.8px;
    color: #202b50;
    margin: 0 0 12px;
}

.political-page-heading p {
    max-width: 850px;
    font-size: 14px;
    line-height: 1.8;
    color: #68738a;
    margin: 0;
}

.political-heading-line {
    width: 65px;
    height: 4px;
    background: linear-gradient(90deg, #6955dc, #b28ae9);
    border-radius: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .political-page-heading {
        padding: 8px 0 18px;
    }

    .political-page-heading h2 {
        font-size: 25px;
    }

    .political-page-heading p {
        font-size: 13px;
    }
}

/* Penyempurnaan judul Politik dan Pengambilan Keputusan */

.political-page-heading {
    padding: 20px 0 30px;
    margin-bottom: 32px;
}

.political-heading-label {
    font-size: 12px;
    padding: 8px 14px;
    margin-bottom: 18px;
}

.political-page-heading h2 {
    font-size: 32px;
    font-weight: 750;
    line-height: 1.3;
    margin-bottom: 14px;
    color: #202b50;
}

.political-page-heading p {
    font-size: 14px;
    line-height: 1.8;
    max-width: 900px;
}

.political-heading-line {
    width: 70px;
    height: 4px;
    margin-top: 22px;
}

html {
    scroll-behavior: smooth;
}

#politik,
#keterwakilan-perempuan {
    scroll-margin-top: 90px;
}

/* ==========================================
   REDESAIN HALAMAN POLITIK DAN PENGAMBILAN KEPUTUSAN
========================================== */

/* Area utama */
#politik {
    padding-bottom: 30px;
}

/* Judul halaman */
#politik .political-page-heading {
    padding: 18px 0 24px;
    margin-bottom: 24px;
}

#politik .political-page-heading h2 {
    font-size: 32px;
    font-weight: 750;
    color: #202b50;
    margin-bottom: 10px;
}

#politik .political-page-heading p {
    font-size: 14px;
    color: #75809a;
    max-width: 850px;
    line-height: 1.7;
}

/* Judul subbagian */
#politik .subsection-heading {
    margin-top: 12px;
    margin-bottom: 18px !important;
}

#politik .subsection-heading h4 {
    font-size: 21px;
    font-weight: 700;
    color: #26345b;
    margin-bottom: 6px;
}

#politik .subsection-heading p {
    font-size: 13px;
    color: #78839a;
    margin-bottom: 0;
}

/* Kartu statistik */
#politik .profile-stat-card {
    height: 100%;
    min-height: 115px;
    padding: 20px 22px;
    background: #ffffff;
    border: 1px solid #e9eaf2;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(35, 45, 85, 0.045);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#politik .profile-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 18px rgba(35, 45, 85, 0.08);
}

#politik .profile-stat-card span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #69758f;
    margin-bottom: 9px;
}

#politik .profile-stat-card h3 {
    font-size: 29px;
    font-weight: 750;
    color: #26345b;
    margin: 0 0 5px;
}

#politik .profile-stat-card small {
    font-size: 12px;
    color: #8993a8;
}

/* Kartu grafik dan indikator */
#politik .profile-chart-card {
    height: 100%;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e9eaf2;
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(35, 45, 85, 0.045);
}

#politik .profile-chart-card h5 {
    font-size: 16px;
    font-weight: 700;
    color: #26345b;
    margin-bottom: 18px;
}

/* Grafik DPRD */
#politik #chartDPRD {
    max-height: 240px;
}

/* Indikator keterwakilan perempuan */
#politik #persentaseKeterwakilanDPRD {
    font-size: 48px;
    font-weight: 750;
    color: #d66d9c;
    margin-bottom: 8px;
}

#politik .profile-chart-card .text-center p {
    font-size: 13px;
}

/* Jarak antarkomponen */
#politik .row.g-3.mb-4 {
    margin-bottom: 22px !important;
}

#politik .row.g-3.mb-5 {
    margin-bottom: 30px !important;
}

/* Grafik PNS */
#politik #chartPNSStruktural {
    max-height: 350px;
}

/* Tabel */
#politik .profile-table-card {
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e9eaf2;
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(35, 45, 85, 0.045);
}

#politik .profile-table-card h5 {
    font-size: 16px;
    font-weight: 700;
    color: #26345b;
    margin-bottom: 18px;
}

#politik .profile-table-card table {
    font-size: 13px;
    margin-bottom: 0;
}

#politik .profile-table-card thead th {
    background: #f4f5fb;
    color: #4a5573;
    font-weight: 700;
    white-space: nowrap;
}

#politik .profile-table-card tfoot th {
    background: #f4f5fb;
    font-weight: 750;
}

/* Sumber data */
#politik .profile-source-note {
    padding: 14px 17px;
    background: #f7f7fc;
    border: 1px solid #e7e6f5;
    border-radius: 10px;
    color: #69758f;
    line-height: 1.7;
}

/* Tampilan HP */
@media (max-width: 768px) {

    #politik .political-page-heading h2 {
        font-size: 25px;
    }

    #politik .subsection-heading h4 {
        font-size: 18px;
    }

    #politik .profile-stat-card {
        min-height: 100px;
        padding: 16px;
    }

    #politik .profile-stat-card h3 {
        font-size: 25px;
    }

    #politik .profile-chart-card,
    #politik .profile-table-card {
        padding: 16px;
    }

    #politik #persentaseKeterwakilanDPRD {
        font-size: 38px;
    }
}

/* INTERPRETASI IPG */

.ipg-interpretation {
    padding: 15px 16px;
    background: #f5f3ff;
    border: 1px solid #e8e2ff;
    border-radius: 11px;
}

.ipg-interpretation strong {
    font-size: 12px;
    color: #6552bd;
}

.ipg-interpretation i {
    color: #7561c6;
}

.ipg-interpretation p {
    color: #727d94;
    font-size: 12px;
    line-height: 1.8;
    margin: 0;
}