:root {
    --bg-main: #3B4624;          /* Background utama */
    --card-bg: #4A5730;          /* Background card */
    --card-border: #8B8F63;      /* Border card */
    --text-title: #D7D0A4;       /* Judul & ikon */
    --text-normal: #EFEBD2;      /* Teks isi */
    --accent-orange: #C38A52;    /* Senjata & Optronik */
    --accent-yellow: #D5B461;    /* Munisi */
}

body {
    width: 100%;
    height: 100dvh;
    position: relative !important;
}

.bg-main{
    background: var(--bg-main);
}

.text-normal{
    color: var(--text-normal) !important;
}

.text-title{
    color: var(--text-title) !important;
}

a{
    cursor: pointer;
    text-decoration: none !important;
}

.btn{
    font-weight: 600 !important;
}

.sidebar-admin {
    width: 80% !important;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: -100%;
    z-index: 999;
    background-color: #fff;
    transition: all 0.3s ease;
    border-radius: 0 7.5px 7.5px 0;
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox fallback */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* .sidebar-title span{
    -webkit-text-stroke: 0.5px red;
} */

/* Webkit (Chrome, Edge, Safari) */
.sidebar-admin::-webkit-scrollbar {
    width: 6px;             /* tipis */
}

.sidebar-admin::-webkit-scrollbar-track {
    background: transparent;  /* track transparan */
}

.sidebar-admin::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35); /* warna minimalis */
    border-radius: 10px;
}

.sidebar-admin::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.55); /* sedikit lebih terlihat saat hover */
}

.sidebar-admin .sidebar-title {
    font-size: 1.3em !important;
    display: flex;
    text-align: center;
    flex-direction: column;
    gap: 2px;
}

.sidebar-admin .sidebar-title small{
    font-size: 0.5em !important;
    font-weight: 500;
}

.sidebar-admin .btn-close-sidebar{
    position: absolute;
    top: 7.5px;
    right: 7.5px;
    display: block;
}

.container-main-admin {
    width: 100% !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.container-main-admin .navbar-card {
    padding: 10px;
}

.container-main-admin main {
    padding: 10px;
}

.navbar-card .btn-menu {
    display: block;
}

.sidebar-admin.active {
    left: 0;
}

.header-mobile{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid black;
}

.header-mobile.active{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 998;
    width: 100%;
    transition: .3s ease;
}

.sidebar-admin .menu-sidebar{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    list-style: none;
    padding: 0 10px;
}

.menu-sidebar .menu-sidebar-item{
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 10px;
    font-weight: 500;
    padding: 10px 10px 10px 15px !important;
    border-radius: 10px;
    text-decoration: none;
    background-color: var(--bs-success) !important;
    color: var(--bs-light) !important;
}

.menu-sidebar .menu-sidebar-item.active {
    background-color: var(--bs-light) !important;
    color: var(--bs-success) !important;
}

.menu-sidebar .menu-sidebar-item:hover {
    background-color: var(--bs-light) !important;
    color: var(--bs-success) !important;
}

.menu-sidebar-list{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
}

.menu-sidebar-list li{
    width: 100% !important;
}

.menu-sidebar-list .menu-sidebar-list-item{
    display: block;
    width: 100% !important;
    padding: 10px !important;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    color: white !important;
}

.menu-sidebar-list-item:hover{
    background-color: var(--bs-success) !important;
}

@media (min-width: 992px) {
    .sidebar-admin {
        width: 18% !important;
        left: 0; /* selalu terlihat di desktop */
    }

    .container-main-admin {
        padding-left: 18% !important;
    }

    .sidebar-admin .btn-close-sidebar{
        position: absolute;
        top: 7.5px;
        right: 7.5px;
        display: none;
    }

    .header-mobile{
        display: none;
    }
}

.navbar-title {
    border-inline-start: 3.5px solid var(--bs-success);
    padding-left: 10px;
}

.form-control:focus {
    box-shadow: none !important;
    border: 1px solid var(--bs-success) !important;
}

.form-select:focus {
    box-shadow: none !important;
    border: 1px solid var(--bs-success) !important;
}

.card {
    border-radius: var(--bs-border-radius-lg) !important;
}

.btn-close:focus {
    box-shadow: none !important;
    border: 1px solid var(--bs-success) !important;
}

.swal-popup-custom {
    z-index: 9999 !important; /* biar tidak ganggu sidebar */
    border-radius: 10px;
    padding: 20px;
}

.container-main {
    display: flex;
    flex-direction: row;
    gap: 0;
    max-height: 100dvh;
    overflow: hidden;
}

.container-main .sidebar-main {
    width: 20%;
    min-height: 100dvh;
}

.container-main main {
    width: 100%;
    overflow-y: auto;
}

.logo {
    width: 50px;
    height: auto;
}

.logo-sidebar {
    width: 35px;
    height: auto;
}

/* Hilangkan shadow bawaan */
.ts-control {
    box-shadow: none !important;
    border: 2px solid var(--bs-success) !important; /* hijau Bootstrap */
    border-radius: 6px;
}

.required::after {
    content: " *";
    color: red;
    font-weight: bold;
}

.dropdown-item:focus,
.dropdown-item:active {
    background-color: transparent !important;
    color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
}

.sidebar-menu-child {
    list-style: none;
    margin-left: 5px;
    padding-left: 10px;
    border-left: 2px solid white;
    color: white;
    font-weight: 500;
}

.sidebar-menu-child li a {
    cursor: pointer;
    color: white;
    text-decoration: none;
}

/* Style untuk Select2 agar mirip Bootstrap */
.select2-bootstrap {
    width: 100% !important;
}

.select2-container .select2-selection__rendered {
    white-space: nowrap !important; /* Boleh wrap */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.select2-container--bootstrap .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 25px !important; /* Posisikan di sebelah kiri dropdown arrow */
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
    color: #6c757d !important;
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
}

.select2-container--bootstrap .select2-selection--single {
    height: auto !important;
    min-height: 38px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.select2-container--bootstrap .select2-selection--single:focus {
    border-color: #198754;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
        0 0 8px rgba(25, 135, 84, 0.6);
}

.select2-container--bootstrap
    .select2-selection--single
    .select2-selection__rendered {
    color: #555;
    line-height: 24px;
    padding-left: 0;
}

.select2-container--bootstrap
    .select2-selection--single
    .select2-selection__arrow {
    height: 36px;
    right: 6px;
}

/* Dropdown styling dengan scroll */
.select2-container--bootstrap .select2-dropdown {
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

/* Container untuk results dengan max height dan scroll */
.select2-container--bootstrap .select2-results {
    max-height: 300px; /* Maksimal tinggi dropdown */
    overflow-y: auto; /* Scroll vertikal */
}

.select2-container--bootstrap .select2-results__option {
    padding: 8px 12px;
    border-bottom: 1px solid #f8f9fa; /* Garis pemisah subtle */
}

.select2-container--bootstrap .select2-results__option:last-child {
    border-bottom: none; /* Hapus border untuk item terakhir */
}

.select2-container--bootstrap .select2-results__option--highlighted {
    background-color: #198754;
    color: white;
}

/* Style untuk scrollbar */
.select2-container--bootstrap .select2-results::-webkit-scrollbar {
    width: 8px;
}

.select2-container--bootstrap .select2-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.select2-container--bootstrap .select2-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.select2-container--bootstrap .select2-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Untuk Firefox */
.select2-container--bootstrap .select2-results {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Loading state */
.select2-container--bootstrap .select2-results__option--loading {
    background-color: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}

/* Selected state */
.select2-container--bootstrap .select2-results__option[aria-selected="true"] {
    background-color: #e9ecef;
    color: #495057;
}

/* Group headers */
.select2-container--bootstrap .select2-results__group {
    padding: 6px 12px;
    font-weight: bold;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Disabled state untuk dropdown */
.select2-container--bootstrap .select2-results__option--disabled {
    color: #6c757d;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.kecil {
    width: 30px;
    white-space: nowrap;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

th.kecil {
    border-right: 2px solid black;
}

@media (max-width: 575.98px) {
    th.kecil{
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

th.kecil:last-child {
    border-right: none;
}

.text-hover-success:hover {
    color: #198754 !important;
}

.export-wrapper:has(input[type="radio"]:checked) label.export-card {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  border-color: #6c757d; /* muted grey border */
  color: #495057; /* text muted-dark */
  background: rgba(108,117,125,.08); /* light grey background */
}


.bullet-icon {
  background-color: var(--bs-success); /* warna yang diinginkan */
  -webkit-mask: url('/assets/img/bullet.png') no-repeat center / contain;
  mask: url('/assets/img/bullet.png') no-repeat center / contain;
}

.kondisi-b-title i{
    color: var(--bs-success) !important;
}
.kondisi-rr-title i{
    color: var(--bs-warning) !important;
}
.kondisi-rb-title i{
    color: var(--bs-danger) !important;
}

.kondisi-b-title .bullet-icon{
    background-color: var(--bs-success) !important;
}
.kondisi-rr-title .bullet-icon{
    background-color: var(--bs-warning) !important;
}
.kondisi-rb-title .bullet-icon{
    background-color: var(--bs-danger) !important;
}

.text-total .bullet-icon{
    background-color: black !important;
}

.menu-sidebar-item .bullet-icon{
    background-color: white !important;
}

.border-orange{
    border: 4px solid purple !important;
}

.border-warning{
    border: 4px solid var(--bs-warning) !important;
}