/* ===== Google Font Import - Poppins ===== */
@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Parkinsans:wght@300..800&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* ===== Local CSS ===== */
@import url('header.css');
@import url('boxicon.css');
@import url('scrollbar.css');

/* ===== External CSS ===== */
@import url('../../assets/css/bootstrap/css/bootstrap.min.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/css/bootstrap-select.min.css');
@import url('https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css');
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css');
@import url('https://cdn.datatables.net/1.13.7/css/dataTables.bootstrap5.min.css');
@import url('https://cdn.datatables.net/responsive/2.2.9/css/responsive.bootstrap5.min.css');
@import url('https://cdn.datatables.net/select/1.3.3/css/select.dataTables.min.css');
/* ===== Reset & Base Styles ===== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Parkinsans", sans-serif;
}

body{
    min-height: 100vh;
    background-color: var(--body-color) !important;
}

section{
    background-color: var(--body-color) !important;
    min-height: 100vh;
}

:root{
    /* Sidebar terbuka/tertutup dipakai bersama oleh menu, konten, dan footer. */
    --sidebar-width-open: 224px;
    --sidebar-width-closed: 78px;

    /* Colors */
    --body-color: #c7d6d5;
    --sidebar-color: #FFF;
    --primary-color: #47a397;
    --primary-color-sidebar: #05463b;
    --primary-color-light: #F6F5FF;
    --toggle-color: #DDD;
    --text-color: #707070;
    --text-color-dark: #ccc;
    --bc-color: #3a3a3a;
    --bg-primary-color: #10b951;

    /* Transitions */
    --tran-03: all 0.2s ease;
    --tran-04: all 0.3s ease;
    --tran-05: all 0.3s ease;
}

/* Sudut tombol seragam 6px (selaras tombol cetak SPPD) */
.btn {
    border-radius: 6px;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
}

/* Tombol toolbar agenda: border-radius seragam 8px */
.card-body-custom .d-flex.justify-content-between.gap-2 .btn {
    border-radius: 8px !important;
}
/* Tombol yang menyambung (Urutkan + Reset): luar 8px, sisi sambungan 0 */
.card-body-custom .d-flex.justify-content-between.gap-2 .d-flex.gap-0 .btn:first-child {
    border-radius: 8px 0 0 8px !important;
}
.card-body-custom .d-flex.justify-content-between.gap-2 .d-flex.gap-0 .btn:last-child {
    border-radius: 0 8px 8px 0 !important;
}

.btn-primary:hover {
    background-color: var(--primary-color-sidebar) !important;
    border: 1px solid var(--primary-color-sidebar) !important;
}

.btn-primary:focus {
    background-color: var(--primary-color-sidebar) !important;
    border: 1px solid var(--primary-color-sidebar) !important;
}

.btn-success {
    background-color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
}

.active > .page-link, .page-link.active {
    background-color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--sidebar-color) !important;
}

.dataTables_filter input:focus {
    border: 1px solid var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(15, 136, 100, 0.25) !important;
}

.bs-searchbox input:focus {
    border: 1px solid var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(15, 136, 100, 0.25) !important;
}

.form-control:focus {
    border: 1px solid var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(15, 136, 100, 0.25) !important;
}

.tabel-data-kegiatan .form-control:focus {
    border: 1px solid var(--primary-color) !important;
    box-shadow: none !important;
}

/* Select2 */
.select2-search__field[type="search"]:focus {
    border: 1px solid var(--primary-color) !important;
    outline: none !important;
    box-shadow: 0 0 0 0.25rem rgba(15, 136, 100, 0.25) !important;
    border-radius: 4px !important;
    margin: 4px !important;
    width: calc(100% - 8px) !important;
}

.select2-selection__rendered {
    vertical-align: middle !important;
    padding-top: 8px !important;
    margin-top: 0px !important;
}

/* Tombol clear (x): sejajar dengan teks, tidak menimpa placeholder */
.select2-selection--single .select2-selection__clear {
    display: inline-flex;
    align-items: center;
    height: 100%;
    margin-top: 0;
    margin-right: 4px;
    float: right;
    position: relative;
    top: -6px;
}

.select2-selection__arrow {
    margin-top: 6px !important;
    margin-right: 8px !important;
}

.footer-custom a {
    color: var(--primary-color) !important;
}

.selected.active {
    color: var(--sidebar-color) !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0.1rem 0 !important;
}

.dropdown-item.selected.active {
    background-color: var(--primary-color) !important;
    color: var(--sidebar-color) !important;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-color) !important;
    color: var(--sidebar-color) !important;
}

.dropdown-item:hover {
    background-color: var(--primary-color) !important;
    color: var(--sidebar-color) !important;
}

.pagination > li > a {
    color: var(--primary-color) !important;
}

.table-bordered {
    border: 0.2px solid black !important;
}

::selection{
    background-color: var(--primary-color);
    color: #fff;
}

.toggle-custom-custom {
    margin-top: 0;
    padding-top: 0;
    position: absolute;
    top: calc(var(--topbar-height, 52px) / 2);
    right: -28px;
}

.text-menu {
    margin-top: 4px;
    margin-left: 10px;
    margin-bottom: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .2px;
}

/* ===== Sidebar Styles ===== */
.sidebar-custom{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-width-open);
    padding: 10px 12px 0;
    background-color: #05463b;
    z-index: 1000;
}

.sidebar-custom.close {
    width: var(--sidebar-width-closed);
    padding-left: 6px;
    padding-right: 6px;
    opacity: 1;
}

.sidebar-custom.close .menu-bar-custom{
    overflow: hidden;
}

/* Rail tertutup: ikon harus tetap di tengah, termasuk ikon submenu yang
   memiliki padding-left inline. */
.sidebar-custom.close .nav-link-custom a {
    justify-content: center;
    width: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar-custom.close .nav-link-custom a > .icon-custom {
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-width: 0 !important;
    width: auto;
    flex-shrink: 0;
    justify-content: center;
    padding: 0 12px !important;
}

.sidebar-custom.close li.mode-custom > a {
    justify-content: center;
    width: auto;
}

.sidebar-custom.close li.mode-custom > a > .icon-custom {
    min-width: 0 !important;
    width: auto;
    flex-shrink: 0;
    justify-content: center;
    padding: 0 12px !important;
}

.sidebar-custom.close .bottom-content-custom {
    display: flex;
    justify-content: center;
}

.sidebar-custom.close .nav-text-custom {
    display: none;
}

.sidebar-custom.close .nav-link-custom a > .icon-custom:last-child {
    display: none;
}

.sidebar-custom.close header .image-text-custom {
    justify-content: center;
}

.sidebar-custom.close .menu-custom {
    padding-right: 0;
}

/* Sidebar List Items */
.sidebar-custom li{
    height: 32px;
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.sidebar-custom.close li.nav-link-custom {
    justify-content: center;
}

.sidebar-custom header .image-custom,
.sidebar-custom .icon-custom{
    min-width: 42px;
    border-radius: 6px;
}

.sidebar-custom .icon-custom{
    min-width: 42px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    padding-right: 4px;
    flex-shrink: 0;
}

.sidebar-custom .text-custom,
.sidebar-custom .icon-custom{
    color: #fff;
}

.sidebar-custom .text-custom{
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
}

.sidebar-custom.close .text-custom{
    opacity: 0;
}

/* Sidebar Header */
.sidebar-custom header{
    position: relative;
}

.sidebar-custom header .image-text-custom{
    display: flex;
    align-items: center;
}

.sidebar-custom header .logo-text-custom{
    display: flex;
    flex-direction: column;
    padding-left: 12px !important;
}

header .image-text-custom .name-custom {
    font-size: 38px !important;
    font-weight: 600;
    line-height: 1.2;
    padding-top: 6px !important;
}

header .image-text-custom .profession-custom{
    font-size: 16px;
    margin-top: -2px;
    display: block;
}

.sidebar-custom header .image-custom{
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-custom header .image-custom img{
    width: 42px;
    border-radius: 6px;
}

.sidebar-custom.close header .image-text-custom .logo-text-custom{
    display: none;
}

.sidebar-custom.close header .image-custom img{
    width: 36px !important;
    height: 36px !important;
}

/* Toggle Button */
.sidebar-custom .toggle-custom-custom .toggle-custom{
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: #e7e7e7;
    color: #05463b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    z-index: 1000;
}

.navigation_header .toggle-custom{
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: #05463b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
}

.sidebar-custom.close .toggle-custom{
    transform: translateY(-50%) rotate(0deg);
}

/* Sidebar Menu */
.sidebar-custom .menu-custom{
    margin-top: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-radius: 10px;
}

.sidebar-custom li.search-box-custom{
    border-radius: 10px;
    background-color: #05463b;
    cursor: pointer;
}

.sidebar-custom li.search-box-custom input{
    height: 100%;
    width: 100%;
    outline: none;
    border: none;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-custom li a{
    list-style: none;
    background-color: transparent;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    border-radius: 8px;
    text-decoration: none;
}

.nav-link-custom {
    height: 32px !important;
    margin-top: 0px !important;
    margin-bottom: 4px !important;
}

/* Utamakan proporsi 4px daripada margin Bootstrap mt-1/mt-2 pada submenu. */
.sidebar-custom li.nav-link-custom.mt-1,
.sidebar-custom li.nav-link-custom.mt-2 {
    margin-top: 4px !important;
}

.sidebar-custom .nav-link-custom a {
    min-width: 0;
}

.bottom-content-custom li {
    height: 36px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 10px;    
}

.toggle-switch-custom {
    width: 40px !important;
}

.switch-custom {
    width: 40px !important;
    font-size: 14px !important;
}

/* Hover Effects */
.sidebar-custom li a:hover{
    background-color: var(--primary-color);
}

.sidebar-custom li a:hover .icon-custom,
.sidebar-custom li a:hover .text-custom{
    color: #fff;
}

/* Menu Bar */
.sidebar-custom .menu-bar-custom{
    height: calc(100% - 92px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

/* Satu area scroll saja agar tinggi Keluar tidak memotong viewport pada zoom 100%. */
.sidebar-custom .menu-custom {
    flex: 1 1 auto;
    min-height: 0;
}

.sidebar-custom .bottom-content-custom {
    flex-shrink: 0;
    margin-bottom: 0;
}

.sidebar-custom .menu-bar-custom .mode-custom {
    margin-bottom: 0 !important;
}

.menu-bar-custom::-webkit-scrollbar{
    display: none;
}

.sidebar-custom .menu-bar-custom .mode-custom{
    border-radius: 10px;
    background-color: var(--primary-color);
    position: relative;
    transition: var(--tran-05);
    margin-bottom: 0;
}

.menu-bar-custom .mode-custom .sun-moon-custom{
    height: 50px;
    width: 60px;
}

.mode-custom .sun-moon-custom i{
    position: absolute;
}

.mode-custom .sun-moon-custom i.sun{
    opacity: 0;
}

/* Toggle Switch */
.menu-bar-custom .bottom-content-custom .toggle-switch-custom{
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

.toggle-switch-custom .switch-custom{
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: var(--primary-color);
}

.switch-custom::before{
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: var(--sidebar-color);
}

/* Home Content */
.home-custom{
    position: absolute;
    top: 0;
    left: var(--sidebar-width-open);
    width: calc(100% - var(--sidebar-width-open));
    background-color: var(--body-color);
    color: var(--text-color);
    /* Footer memakai position: fixed (tinggi ±56–64px). Beri ruang bawah agar
       kartu terakhir tidak tertutup footer saat halaman di-scroll sampai bawah. */
    padding-bottom: 72px;
}

.home-custom .text-custom{
    font-size: 30px;
    font-weight: 500;
    color: var(--text-color);
    padding: 12px 60px;
}

.sidebar-custom.close ~ .home-custom{
    left: var(--sidebar-width-closed);
    /* height: 100vh; */
    width: calc(100% - var(--sidebar-width-closed));
}

/* Card Styles */
.card-header-custom {
    background-color: var(--sidebar-color);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 0 20px;
    position: sticky;
    top: var(--topbar-height, 52px);
    z-index: 300;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.card-header-custom h3 {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

/* Ikon judul halaman: override font-size inline 1.8rem di tiap halaman. */
.card-header-custom i.bx {
    font-size: 1.1rem !important;
}

/* Halaman rekapan insentif: matikan scroll anchoring agar viewport tidak "disesuaikan" saat
   melewati judul sticky + blok tabel (mengurangi sensasi konten terdorong). */
html.page-rekapan-insentif {
    overflow-anchor: none;
}

html.page-rekapan-insentif #content {
    overflow-anchor: none;
}

.card-body-custom {
    background-color: var(--sidebar-color);
    height: max-content;
    margin: 20px;
    padding: 20px !important;
    font-size: 0.9rem;
    border-radius: 8px;
}

.card-body-custom p {
    text-align: left;
}

/* ===== Dashboard hero (kartu sambutan) ===== */
.dashboard-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    min-height: 0;
    height: auto;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
    border-radius: 10px;
}

.dashboard-hero-logo {
    flex: 0 0 auto;
    object-fit: contain;
}

.dashboard-hero-logo-alor {
    width: 62px;
    height: 70px;
    margin-left: 4px;
}

.dashboard-hero-logo-puskesmas {
    width: 62px;
    height: 74px;
}

.dashboard-hero-text {
    min-width: 0;
}

.dashboard-hero-heading {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
    font-weight: 700;
}

.dashboard-hero-title {
    display: block;
    color: var(--primary-color);
    font-size: 1.55rem;
    line-height: 1.2;
    text-shadow: 3px 1px 5px rgba(0, 0, 0, 0.1);
}

.dashboard-hero-subtitle {
    margin: 0 !important;
    padding-top: 5px;
    font-size: 1.02rem;
    line-height: 1.2;
    font-weight: 700;
    color: inherit;
    text-shadow: 3px 3px 5px rgba(255, 255, 255, 0.1);
}

.dashboard-hero-desc {
    margin: 4px 0 0 !important;
    padding: 0 !important;
    text-align: left;
    font-size: 13.5px;
    line-height: 1.45;
}

/* ===== Kartu ringkasan (dipakai bersama semua halaman) ===== */
.stat-cards {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
}

.stat-cards > .row {
    align-items: stretch;
}

.stat-cards > .row > [class*="col-"] {
    display: flex;
}

.stat-card {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 4px;
}

.stat-card .card-header {
    padding: 14px 18px 0;
    background: transparent;
    border: 0;
}

.stat-card .card-title {
    margin: 0;
    min-height: 2.7em;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
}

.stat-card .card-body {
    flex: 1 1 auto;
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    padding: 4px 18px 16px !important;
    container-type: inline-size;
}

.stat-value {
    margin: 0;
    display: block;
    white-space: nowrap;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    /* 1.7vw menjaga proporsi seperti dashboard, 11cqw mencegah angka
       panjang meluber saat kartu menyempit (sidebar / layar kecil). */
    font-size: clamp(1.05rem, min(1.7vw, 11cqw), 2.05rem);
}

.stat-number {
    font-size: 1em;
    font-weight: 700;
}

.stat-currency {
    font-size: .62em;
    opacity: .95;
    margin-right: .22em;
}

.stat-suffix,
.stat-unit {
    font-size: .55em;
}

.stat-number + .stat-suffix {
    margin-left: .18em;
}

.stat-meta {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.35;
    opacity: .85;
}

.stat-badge {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 2px;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    background-color: rgba(0, 0, 0, .3);
}

.stat-sub {
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, .12);
    font-size: 11.5px;
    line-height: 1.4;
}

.stat-sub .stat-sub-label {
    font-size: 10.5px;
    font-weight: 500;
    opacity: .85;
    margin-right: 2px;
}

/* ===== Kartu grafik (dipakai bersama semua halaman) ===== */
.chart-cards {
    margin-bottom: 16px;
    border-radius: 10px;
}

.chart-cards > .row {
    align-items: stretch;
}

.chart-card {
    display: flex;
    flex-direction: column;
    height: clamp(370px, 46vh, 430px);
    margin-bottom: 0 !important;
    border-radius: 4px;
}

.chart-card--tall {
    height: clamp(520px, 70vh, 660px);
}

.chart-card .card-header {
    padding: 8px 18px !important;
    background: transparent;
    border: 0;
}

.chart-card .card-title {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
}

.chart-body {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    margin: 0 !important;
    padding: 6px 12px 14px !important;
}

.chart-body canvas {
    display: block;
}

/* Grafik butuh lebar lebih besar: tumpuk jadi satu kolom di bawah 1200px. */
@media (max-width: 1199.98px) {
    .chart-cards > .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .chart-card {
        height: clamp(320px, 45vh, 380px);
        margin-bottom: 16px !important;
    }

    .chart-card--tall {
        height: clamp(440px, 60vh, 560px);
    }

    .chart-cards > .row > [class*="col-"]:last-child .chart-card {
        margin-bottom: 0 !important;
    }
}

/* Kartu ringkasan terlalu sempit di bawah 992px: tumpuk. */
@media (max-width: 991.98px) {
    .stat-cards > .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .stat-card {
        height: auto;
        margin-bottom: 14px !important;
    }

    .stat-cards > .row > [class*="col-"]:last-child .stat-card {
        margin-bottom: 0 !important;
    }

    .stat-card .card-title {
        min-height: 0;
    }

    .stat-value {
        font-size: clamp(1.5rem, 4.4vw, 2.05rem);
    }
}

/* Navigation & Menu Links */
.menu-links-custom {
    padding: 0 !important;
}

.nav-link-custom {
    padding: 0 !important;
} 

/* Modal Styles */
.modal.show {
    display: block;
    background: rgba(0,0,0,0.5);
}

.modal-dialog {
    margin-top: 50px;
}

.modal-content {
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

/* Table Styles */
.table .nomorId {
    width: 40px;
    text-align: center;
}

/* DataTables Pagination */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 10px;
    padding-top: 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0;
    margin: 0;
    border-radius: 4px;
    background: white;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef;
    color: var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #6c757d !important;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* DataTables Layout */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 10px;
}

.sidebar-custom.close .menu-custom::-webkit-scrollbar{
    display: none !important;
    overflow-y: hidden;
    overflow-x: hidden;
    width: 0px !important;
}

/* Menu Custom Scrollbar */
.menu-custom::-webkit-scrollbar {
    /* width: 12px; */
    background: transparent;
    position: absolute;
    margin-left: 5px;
    right: 0;
}

.menu-custom::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
    padding-left: 5px;
}
.menu-custom::-webkit-scrollbar-thumb {
    background: #366b64;
    border-radius: 8px;
}
.menu-custom::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.menu-custom {
    /* scrollbar-color: transparent transparent; */
    position: relative;
    padding-right: 5px;
}

/* Petugas: tata letak block (bukan flex) */
.div-petugas {
    display: block;
    box-sizing: border-box;
    word-wrap: break-word;
    word-break: break-word;
    overflow: visible;
}
.div-petugas > .btn,
.div-petugas > button.btn {
    display: block;
    margin-top: 0.75rem !important;
    margin-bottom: 0 !important;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.div-petugas > div {
    padding: 0 8px;
    display: block;
    margin: 0 0 0.15rem 0 !important;
    line-height: 1.3;
    transition: all 0.2s ease;
}
.div-petugas > div:last-of-type {
    margin-bottom: 0 !important;
}

.div-petugas .text-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    border: 1px solid #c42c2c;
    margin-bottom: 2px !important;
    padding: 2px 6px;
}

.div-petugas .text-danger:hover {
    background-color: rgba(220, 53, 69, 0.2);
}

.div-petugas .bx-error-circle {
    color: #dc3545;
    font-size: 1em;
    margin-left: 0.25em;
    vertical-align: -0.1em;
}

/* Dropdown Menu */
.dropdown-right {
    position: relative;
}

.drowright-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* DataTables Header */
.dataTables_scroll .dataTables_scrollHead thead th {
    height: 30px !important;
}

.form-select:focus {
    border: 1px solid var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(15, 136, 100, 0.25) !important;
}

/* Gaya Tautan Aktif */
.nav-link-custom > a.active-link {
    background-color: var(--primary-color);
    color: var(--sidebar-color);
}

.nav-link-custom > a.active-link i,
.nav-link-custom > a.active-link span {
    color: var(--sidebar-color);
}

.active-link:hover {
    background-color: var(--primary-color);
}

/* Collapse Animation */
.sidebar-custom .collapse {
    transition: all 0.3s ease;
}

.sidebar-custom .collapsing {
    transition: all 0.3s ease;
}

.card.bg-primary {
    background-color: #127e6f !important;
    border-color: var(--primary-color) !important;
    border: 0 !important;
}

.card-header.bg-success {
    background-color: #47a397 !important;
    
}

.dropdown.bootstrap-select {
    border: var(--bs-border-width) solid var(--bs-border-color) !important;
}

/* Style untuk Select2 dengan wrap text */
.select2-container--default .select2-selection--single {
    height: auto !important;
    min-height: 38px;
    color: #212529;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    white-space: normal !important;
    word-break: break-word;
    line-height: 1.4 !important;
    padding: 6px 12px;
    min-height: 38px;
    color: #212529;
    font-size: 1rem;
}

.select2-results__option {
    white-space: normal !important;
    word-break: break-word;
    padding: 8px 12px !important;
    font-size: 13px;
}

/* Style untuk dropdown */
.select2-container--default .select2-results > .select2-results__options {
    max-height: 400px;
}

.select2-selection__placeholder {
    color: #565b5f !important;
}

/* Posisi tombol clear (x) Select2: vertikal tengah, tidak menimpa teks */
.select2-selection__clear {
    display: inline-flex;
    align-items: center;
    height: 100%;
    margin-top: 0;
    margin-right: 4px;
}

/* Style untuk hover dan selected */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
    color: var(--sidebar-color) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--primary-color) !important;
    color: var(--sidebar-color) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] small {
    color: var(--sidebar-color) !important;
}

/* Style untuk small */
.select2-results__option small {
    display: block;
    margin-top: 0px;
    font-size: 0.9rem;
}

/* Style untuk input group dengan Select2 */
.input-group .select2-container {
    flex: 1 1 auto;
    width: auto !important;
    border-color: #ced4da !important;
}

.input-group .select2-container .select2-selection--single {
    height: 38px;
    border-radius: 0.375rem 0 0 0.375rem !important;
}

#rincian_kegiatan .select2 {
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

nav.close ~ #footer-cust {
    width: calc(100% - var(--sidebar-width-closed)) !important;
}

table.table-bordered.dataTable tr th td {
    color: #2c2c2c !important;
    text-align: center;
    vertical-align: middle;
    border: 2px solid #696969 !important;
    border-bottom: none !important;
}

table.table-bordered.dataTable tbody tr:first-child td {
    border-top: none !important;
}

#table_wrapper table.table-bordered.dataTable tbody tr:first-child td {
    border-top: 1px solid #000 !important;
}

table.dataTable tbody tr.selected {
    background-color: #d1ecf1 !important;
}

table.dataTable tbody tr {
    cursor: default;
}

.sidebar-custom.close ~ .home-custom .footer-custom {
    width: calc(100% - var(--sidebar-width-closed));
}

.bottom-content-custom {
    position: sticky;
}

.close:not(:disabled):not(.disabled):focus, .close:not(:disabled):not(.disabled):hover {
    opacity: 1 !important;
}

/* STYLE BAGIAN HEADER
 =============================================== */

 .btn-tahun {
    background-color: #127e6f !important;
    /* border: 1px solid #18695e !important; */
}

.btn-tahun:hover {
    background-color: #217063 !important;
    /* border: 1px solid #226459 !important; */
}

/* STYLE BAGIAN FOOTER
 =============================================== */

.footer-custom .card-header-custom {
    margin: 0 !important;
    padding: 15px 28px !important;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center !important;
}

.footer-custom p {
    margin: 0;
    font-weight: 500;
    font-size: 0.85rem;
}

.footer-custom a {
    text-decoration: none;
    color: var(--primary-color);
}

.footer-custom a:hover {
    text-decoration: underline;
}

/* Footer Styles */
.footer-custom {
    position: fixed;
    bottom: 0;
    right: 0;
    width: calc(100% - var(--sidebar-width-open));
    background-color: var(--sidebar-color);
    z-index: 1000;
}

/* Tombol ambil indeks SPM (form perhitungan insentif) */
#btnAmbilIndeksSpm {
    border-radius: 0 3px 3px 0 !important;
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
    color: #fff !important;
}

#btnAmbilIndeksSpm:hover,
#btnAmbilIndeksSpm:focus-visible {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
    color: #fff !important;
}

#btnAmbilIndeksSpm:active {
    background-color: #115e59 !important;
    border-color: #115e59 !important;
}

#btnAmbilIndeksSpm:disabled {
    opacity: 0.65;
}
/* ============================================================
   Pola proporsi font (terpusat) - konsisten dengan halaman Agenda
   Berlaku untuk semua halaman yang memakai .card-body-custom,
   tabel di dalamnya, bootstrap-select, dan modal.
   Halaman dengan aturan scoped sendiri (mis. Agenda) tetap menang.
   ============================================================ */

/* Tombol di dalam kartu konten */
.card-body-custom .btn {
    font-size: 12px;
    padding: 4px 12px;
}

/* bootstrap-select: tampilan tombol + item dropdown */
.card-body-custom .bootstrap-select .btn,
.card-body-custom .bootstrap-select .filter-option-inner-inner {
    font-size: 12px !important;
}

.card-body-custom .bootstrap-select .dropdown-menu .dropdown-item,
.card-body-custom .bootstrap-select .dropdown-menu .dropdown-item .text,
.card-body-custom .bootstrap-select .dropdown-menu .no-results,
.card-body-custom .bootstrap-select .bs-searchbox .form-control {
    font-size: 12px !important;
}

/* Item dropdown biasa di dalam kartu */
.card-body-custom .dropdown-menu .dropdown-item {
    font-size: 12.5px;
}

/* Sel tabel di dalam kartu (asli + kloning header DataTables) */
.card-body-custom table th,
.card-body-custom table td {
    font-size: 12px;
}

/* Baris rincian di tabel RAB: 11px */
.card-body-custom table tr.rincian-kegiatan td {
    font-size: 11px;
}

/* Info, length, filter & paginasi DataTables */
.card-body-custom .dataTables_wrapper .dataTables_info,
.card-body-custom .dataTables_wrapper .dataTables_length,
.card-body-custom .dataTables_wrapper .dataTables_filter,
.card-body-custom .dataTables_wrapper .dataTables_length select,
.card-body-custom .dataTables_wrapper .dataTables_filter input {
    font-size: 12.5px !important;
}

.card-body-custom .dataTables_wrapper .dataTables_paginate,
.card-body-custom .dataTables_wrapper .dataTables_paginate .paginate_button,
.card-body-custom .dataTables_wrapper .dataTables_paginate .page-link {
    font-size: 12px !important;
}

/* Input di dalam kartu */
.card-body-custom .form-control,
.card-body-custom .form-select {
    font-size: 13px;
}

/* Alert di dalam kartu */
.card-body-custom .alert {
    font-size: 13px;
}

/* ===== Modal: judul, label, input, tombol ===== */
.modal .modal-content {
    font-size: 13px;
}

.modal .modal-title {
    font-size: 16px;
}

.modal .form-label,
.modal .form-control,
.modal .form-select {
    font-size: 13px;
}

.modal .modal-footer .btn {
    font-size: 13px;
    padding: 5px 12px;
}

/* bootstrap-select di dalam modal */
.modal .bootstrap-select .btn,
.modal .bootstrap-select .filter-option-inner-inner {
    font-size: 12px !important;
}

.modal .bootstrap-select .dropdown-menu .dropdown-item,
.modal .bootstrap-select .dropdown-menu .dropdown-item .text,
.modal .bootstrap-select .dropdown-menu .no-results,
.modal .bootstrap-select .bs-searchbox .form-control {
    font-size: 12px !important;
}

/* Tooltip (popup teks saat hover tombol) - diperkecil */
.tooltip-inner {
    font-size: 11.5px;
    line-height: 1.3;
    padding: 3px 8px;
}

/* ============================================================
   SweetAlert2 (popup notifikasi) - diperkecil di semua halaman
   Pola selaras dengan halaman login.
   ============================================================ */
.swal2-popup {
    width: auto !important;
    min-width: 300px !important;
    max-width: 320px !important;
    padding: 20px 22px !important;
    font-size: 13px !important;
}

.swal2-icon {
    /* Skala ikon via font-size saja: semua elemen internal (ring, arc,
       garis centang) berbasis em sehingga ikut mengecil proporsional dan
       animasi menggambar tetap utuh. 8.8px * 5em = ~44px (default 16px=80px).
       Jangan kunci width/height piksel atau transform agar garis centang
       tidak kolaps. */
    font-size: 8.8px !important;
    margin: 0 auto 10px !important;
}

/* Ikon error secara bawaan lebih besar dari success (garis X 2.9375em).
   Kecilkan sedikit font-size-nya agar sebanding dengan ikon lain. */
.swal2-icon.swal2-error {
    font-size: 7.6px !important;
}

.swal2-icon .swal2-icon-content {
    font-size: 3em !important;
}

.swal2-title {
    font-size: 17px !important;
    padding: 0 !important;
    margin-bottom: 2px !important;
}

.swal2-html-container {
    font-size: 13px !important;
    margin-top: 0 !important;
}

/* tombol konfirmasi/batal */
.swal2-styled {
    font-size: 13px !important;
    padding: 8px 16px !important;
}

.swal2-timer-progress-bar-container {
    height: 3px;
}

/* Toast (notifikasi pojok kanan atas): teks 12px dan tidak tebal.
   Berlaku hanya untuk toast, popup konfirmasi tetap memakai ukuran di atas. */
.swal2-popup.swal2-toast {
    font-size: 12px !important;
    /* Ikon dan teks sejajar tengah secara vertikal. */
    align-items: center !important;
    /* Jarak antara ikon dan teks. Grid toast hanya punya satu baris,
       jadi column-gap cukup dan tidak mengubah tinggi. */
    column-gap: 10px !important;
}

/* Margin bawah bawaan ikon (dari aturan .swal2-icon di atas) membuat ikon
   turun 10px di dalam grid toast. Nolkan khusus toast. */
.swal2-popup.swal2-toast .swal2-icon {
    margin: 0 !important;
}

.swal2-popup.swal2-toast .swal2-title {
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.swal2-popup.swal2-toast .swal2-html-container {
    font-size: 12px !important;
    font-weight: 400 !important;
    /* SweetAlert2 memberi margin 0.5em 1em pada elemen ini (inline <style>),
       sehingga teks deskripsi menjorok 12px lebih jauh dari judul.
       Ratakan dengan judul. */
    margin: 0 !important;
}

/* Profil: perkecil font label form */
.col-form-label strong {
    font-size: 12px;
}

/* ===== Modal: border radius 12px global (semua halaman) ===== */
.modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}
