@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
/* ==============================================================
   OVERRIDE TEMA WARNA KABUPATEN LANGKAT
   ============================================================== */

/* Variabel Warna Dasar */
:root {
    --primary: #1e7b41;
    --info: #1e7b41;
    --success: #218c47;
    --warning: #f5b616;
    --danger: #da251d;
}

/* Warna Teks & Background Utama */
.text-primary, .text-info { color: #1e7b41 !important; }
.bg-primary, .bg-info { background-color: #1e7b41 !important; }

/* Tombol Utama */
.btn-primary, .btn-info {
    background-color: #1e7b41;
    border-color: #1e7b41;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary.active,
.btn-info:hover, .btn-info:focus, .btn-info.active {
    background-color: #176133 !important;
    border-color: #176133 !important;
    box-shadow: 0 0 0 0.2rem rgba(30, 123, 65, 0.25) !important;
}

/* Menu Sidebar Aktif */
.sidebar-nav #sidebarnav .sidebar-item.selected > .sidebar-link {
    background: linear-gradient(to right, #2ba858, #269a50, #218c47, #1c7e3f, #1e7b41) !important;
    box-shadow: 0px 7px 12px 0px rgba(30, 123, 65, 0.21) !important;
}

/* Animasi Preloader */
.lds-ripple .lds-pos {
    border: 2px solid #1e7b41 !important;
}

/* Tautan (Link) & Pagination */
a { color: #1e7b41; }
a:hover, a.link:hover { color: #176133; }
.page-link { color: #1e7b41; }
.page-item.active .page-link {
    background-color: #1e7b41;
    border-color: #1e7b41;
}

/* Border & Outline Button */
.border-primary { border-color: #1e7b41 !important; }
.btn-outline-primary {
    color: #1e7b41;
    border-color: #1e7b41;
}
.btn-outline-primary:hover {
    background-color: #1e7b41;
    border-color: #1e7b41;
    color: #fff;
}

/* Lebar Grafik Gender (Responsive) */
.grafik-gender-container {
    width: 80%;
}
@media (min-width: 768px) {
    .grafik-gender-container {
        width: 70%;
    }
}


/* ==============================================================
   PENGATURAN TEMA GELAP (DARK MODE) BERSIH
   ============================================================== */

/* Background & Warna Teks Utama */
[data-theme="dark"] {
    background-color: #12141a !important;
    color: #b0b5c1 !important;
}

[data-theme="dark"] .page-wrapper,
[data-theme="dark"] .page-breadcrumb {
    background-color: #12141a !important;
}

/* Background Kartu, Sidebar, Topbar, & Logo */
[data-theme="dark"] .card,
[data-theme="dark"] .left-sidebar,
[data-theme="dark"] .topbar,
[data-theme="dark"] .topbar .top-navbar,
[data-theme="dark"] .navbar-header {
    background-color: #1b1e24 !important;
    border-color: #2a2e35 !important;
    box-shadow: none !important;
}

/* Warna Teks Judul & Angka */
[data-theme="dark"] .card-body h2, 
[data-theme="dark"] .card-body h3, 
[data-theme="dark"] .card-body h4, 
[data-theme="dark"] .card-body h6, 
[data-theme="dark"] .text-dark,
[data-theme="dark"] .page-title,
[data-theme="dark"] .navbar-brand .logo-text b {
    color: #e2e4e8 !important;
}

/* Perataan Garis Border Kartu & Tabel */
[data-theme="dark"] .border-right,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .left-sidebar {
    border-color: #2a2e35 !important;
}

/* Menu Dropdown Profil */
[data-theme="dark"] .dropdown-menu {
    background-color: #1b1e24 !important;
    border-color: #2a2e35 !important;
}
[data-theme="dark"] .dropdown-item {
    color: #b0b5c1 !important;
}
[data-theme="dark"] .dropdown-item:hover {
    background-color: #2a2e35 !important;
    color: #e2e4e8 !important;
}
[data-theme="dark"] .dropdown-divider {
    border-top: 1px solid #2a2e35 !important;
}

/* Teks & Menu Sidebar */
[data-theme="dark"] .sidebar-nav ul .sidebar-item .sidebar-link,
[data-theme="dark"] .sidebar-nav ul .sidebar-item .sidebar-link i,
[data-theme="dark"] .sidebar-nav ul .sidebar-item .sidebar-link .feather-icon,
[data-theme="dark"] .sidebar-nav #sidebarnav .nav-small-cap {
    color: #b0b5c1 !important;
}
[data-theme="dark"] .sidebar-nav #sidebarnav .sidebar-item .sidebar-link:hover,
[data-theme="dark"] .sidebar-nav #sidebarnav .sidebar-item.selected > .sidebar-link {
    color: #ffffff !important;
}
[data-theme="dark"] .sidebar-nav #sidebarnav .list-divider {
    background: #2a2e35 !important;
    opacity: 1 !important;
}

/* Teks Navbar Atas & Tombol Profil */
[data-theme="dark"] .topbar .navbar-nav .nav-link,
[data-theme="dark"] .topbar span,
[data-theme="dark"] .topbar svg.svg-icon {
    color: #e2e4e8 !important;
}

/* Menyelaraskan background dan menghilangkan border pada navbar collapse */
[data-theme="dark"] .navbar-collapse {
    background-color: #1b1e24 !important;
    border-color: #2a2e35 !important;
}

/* ==============================================================
   HALAMAN LOGIN KHUSUS (HKDC) - RESPONSIVE
   ============================================================== */

.hkdc-login-body {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #191c1d;
    margin: 0;
    box-sizing: border-box;
}

/* Tambahan agar semua elemen di dalam body tidak melebihi lebar layar */
.hkdc-login-body * {
    box-sizing: border-box;
}

.hkdc-login-main {
    width: 100%;
    max-width: 448px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.hkdc-login-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 32px 24px;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e3e4;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.hkdc-login-header {
    text-align: center;
}

.hkdc-icon-wrapper {
    width: 40px;
    height: 40px;
    background-color: #1b7a43;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.hkdc-title-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.hkdc-title-wrap h1 {
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    margin: 0;
}

.hkdc-login-header h2 {
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    margin: 0 0 8px 0;
}

.hkdc-login-header p {
    font-size: 14px;
    color: #3f4940;
    margin: 0;
}

.hkdc-form-group {
    margin-bottom: 16px;
}

.hkdc-form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #3f4940;
    margin-bottom: 6px;
}

.hkdc-input-wrapper {
    position: relative;
}

.hkdc-input-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #6f7a6f;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.hkdc-input-icon-right {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #6f7a6f;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.hkdc-input {
    display: block;
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 1px solid #becabd;
    border-radius: 0.5rem;
    background-color: #ffffff;
    color: #191c1d;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.hkdc-input:focus {
    border-color: #006030;
    box-shadow: 0 0 0 2px rgba(0, 96, 48, 0.2);
}

.hkdc-checkbox-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.hkdc-checkbox-wrap input {
    width: 16px;
    height: 16px;
    border: 1px solid #becabd;
    border-radius: 4px;
    cursor: pointer;
}

.hkdc-checkbox-wrap label {
    margin-left: 8px;
    font-size: 14px;
    color: #3f4940;
    cursor: pointer;
}

.hkdc-btn-submit {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #1b7a43;
    cursor: pointer;
    transition: background-color 0.2s;
}

.hkdc-btn-submit:hover {
    background-color: #006030;
}

.hkdc-alert-error {
    background-color: #ffdad6;
    color: #93000a;
    padding: 12px;
    border-radius: 0.5rem;
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
}

.hkdc-footer {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    width: 100%;
}

.hkdc-footer p {
    font-size: 12px;
    font-weight: 700;
    color: #006030;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.hkdc-footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.hkdc-footer-links a {
    font-size: 12px;
    color: #3f4940;
    text-decoration: none;
    opacity: 0.8;
}

.hkdc-footer-links a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* ==============================================================
   MEDIA QUERIES (UNTUK LAYAR HP / MOBILE)
   ============================================================== */
@media (max-width: 576px) {
    .hkdc-login-main {
        padding: 16px; /* Mengurangi jarak tepi luar pada layar kecil */
    }

    .hkdc-login-card {
        padding: 24px 16px; /* Mengurangi padding di dalam kotak putih */
        gap: 20px; /* Sedikit merapatkan elemen di dalam form */
    }

    .hkdc-title-wrap h1 {
        font-size: 20px; /* Ukuran judul utama dikecilkan */
    }

    .hkdc-login-header h2 {
        font-size: 16px; /* Ukuran sub-judul dikecilkan */
    }

    .hkdc-login-header p {
        font-size: 13px; /* Ukuran deskripsi dikecilkan */
    }

    .hkdc-input {
        padding: 10px 36px 10px 36px; /* Input sedikit dipipihkan agar pas di jari */
    }

    .hkdc-btn-submit {
        padding: 10px 16px;
    }
    
    .hkdc-footer-links {
        gap: 12px; /* Jarak link footer lebih rapat */
    }
}

/* Layar sangat kecil (seperti iPhone SE / Galaxy lama) */
@media (max-width: 360px) {
    .hkdc-login-card {
        padding: 20px 12px;
    }
    
    .hkdc-footer-links {
        flex-direction: column; /* Link footer ditumpuk ke bawah */
        align-items: center;
        gap: 8px;
    }
}

.table-mobile-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}

@media (max-width: 768px) {
    .table-mobile-wrapper table {
        min-width: 900px;
        white-space: nowrap;
    }

    .table-mobile-wrapper th,
    .table-mobile-wrapper td {
        padding: 8px;
        font-size: 13px;
    }
}