#kanban_board {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px;
    background: #f8f9fa;
    min-height: 500px;
}

/* Dark mode untuk kanban board */
[data-bs-theme="dark"] #kanban_board {
    background: var(--bs-body-bg);
}

/* Force horizontal */
.kanban-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
}

/* Jangan biarkan board turun */
.kanban-board {
    min-width: 280px;
    max-width: 280px;
    margin-right: 15px;
    border-radius: 12px;
}

/* Dark mode untuk kanban board */
[data-bs-theme="dark"] .kanban-board {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

/* Footer Add Task selalu di bawah */
.kanban-drag {
    padding: 10px;
    min-height: 100px;
}

.add-task-btn {
    border-style: dashed;
    margin-top: 10px;
}

/* Add Section Card */
.add-section-card {
    min-width: 280px;
    max-width: 280px;
    height: fit-content;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.add-section-card:hover {
    background: #f1f5ff;
    border-color: #3b82f6;
}

/* Dark mode untuk add section card */
[data-bs-theme="dark"] .add-section-card {
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .add-section-card:hover {
    background: var(--bs-hover-bg);
    border-color: #3b82f6;
}

/* =========================
   Select2 Single - Metronic Fix Selected Color
   ========================= */

.single-select2 + .select2-container {
    width: 100% !important;
}

.single-select2 + .select2-container .select2-selection--single {
    height: calc(1.5em + 1.65rem + 2px);
    border: 1px solid #dbdfe9;
    border-radius: 0.475rem;
    background-color: #ffffff;
    padding-left: 0.75rem;
    display: flex;
    align-items: center;
}

/* Dark mode untuk select2 single */
[data-bs-theme="dark"]
    .single-select2
    + .select2-container
    .select2-selection--single {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

/* Selected text */
.single-select2
    + .select2-container
    .select2-selection--single
    .select2-selection__rendered {
    color: #181c32 !important;
    font-size: 1rem;
    font-weight: 500;
    line-height: normal !important;
    padding-left: 0 !important;
    padding-right: 2rem !important;
}

/* Dark mode untuk selected text */
[data-bs-theme="dark"]
    .single-select2
    + .select2-container
    .select2-selection--single
    .select2-selection__rendered {
    color: var(--bs-body-color) !important;
}

/* Placeholder */
.single-select2
    + .select2-container
    .select2-selection--single
    .select2-selection__placeholder {
    color: #a1a5b7 !important;
}

/* Dark mode untuk placeholder */
[data-bs-theme="dark"]
    .single-select2
    + .select2-container
    .select2-selection--single
    .select2-selection__placeholder {
    color: var(--bs-body-color) !important;
    opacity: 0.6;
}

/* Arrow */
.single-select2
    + .select2-container
    .select2-selection--single
    .select2-selection__arrow {
    height: 100%;
    right: 10px;
    top: 0;
}

/* Dark mode untuk arrow */
[data-bs-theme="dark"]
    .single-select2
    + .select2-container
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: var(--bs-body-color) transparent transparent transparent !important;
}

/* Focus */
.single-select2
    + .select2-container.select2-container--focus
    .select2-selection--single,
.single-select2
    + .select2-container.select2-container--open
    .select2-selection--single {
    border-color: #009ef7;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.25);
}

/* Dropdown */
.select2-dropdown {
    border: 1px solid #dbdfe9;
    border-radius: 0.475rem;
    overflow: hidden;
}

/* Dark mode untuk dropdown */
[data-bs-theme="dark"] .select2-dropdown {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

/* Dropdown option */
.select2-results__option {
    padding: 10px 14px;
    color: #181c32;
}

/* Dark mode untuk option */
[data-bs-theme="dark"] .select2-results__option {
    color: var(--bs-body-color) !important;
}

/* Selected option */
.select2-results__option--selected {
    background-color: #f1faff !important;
    color: #009ef7 !important;
}

/* Dark mode untuk selected option */
[data-bs-theme="dark"] .select2-results__option--selected {
    background-color: rgba(0, 158, 247, 0.15) !important;
    color: #009ef7 !important;
}

/* Hover option */
.select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #009ef7 !important;
    color: #ffffff !important;
}

/* Dark mode untuk hover option */
[data-bs-theme="dark"]
    .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #009ef7 !important;
    color: #ffffff !important;
}

/* ==========================================
   Project Category Select2 Multiple
   ========================================== */

.multiple-select2 + .select2-container {
    width: 100% !important;
}

.multiple-select2 + .select2-container .select2-selection--multiple {
    min-height: calc(1.5em + 1.65rem + 2px);
    border: 1px solid #dbdfe9;
    border-radius: 0.475rem;
    background: #fff;
    padding: 4px 8px;
}

/* Dark mode untuk select2 multiple */
[data-bs-theme="dark"]
    .multiple-select2
    + .select2-container
    .select2-selection--multiple {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

/* focus */
.multiple-select2
    + .select2-container.select2-container--focus
    .select2-selection--multiple,
.multiple-select2
    + .select2-container.select2-container--open
    .select2-selection--multiple {
    border-color: #009ef7;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.25);
}

/* input */
.multiple-select2 + .select2-container .select2-search__field {
    margin-top: 4px !important;
}

/* Dark mode untuk input search */
[data-bs-theme="dark"]
    .multiple-select2
    + .select2-container
    .select2-search__field {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
}

/* selected tags */
.multiple-select2 + .select2-container .select2-selection__choice {
    background: #f1faff !important;
    border: 1px solid #cfe8ff !important;
    color: #009ef7 !important;
    border-radius: 0.475rem !important;
    padding: 4px 10px !important;
    margin-top: 4px !important;
    margin-right: 6px !important;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Dark mode untuk selected tags */
[data-bs-theme="dark"]
    .multiple-select2
    + .select2-container
    .select2-selection__choice {
    background: rgba(0, 158, 247, 0.15) !important;
    border-color: rgba(0, 158, 247, 0.3) !important;
    color: #009ef7 !important;
}

/* remove button */
.multiple-select2 + .select2-container .select2-selection__choice__remove {
    color: #009ef7 !important;
    margin-right: 6px !important;
    border-right: none !important;
}

.multiple-select2
    + .select2-container
    .select2-selection__choice__remove:hover {
    color: #f1416c !important;
    background: transparent !important;
}

/* Dark mode untuk remove button */
[data-bs-theme="dark"]
    .multiple-select2
    + .select2-container
    .select2-selection__choice__remove {
    color: #009ef7 !important;
}

[data-bs-theme="dark"]
    .multiple-select2
    + .select2-container
    .select2-selection__choice__remove:hover {
    color: #f1416c !important;
}

/* placeholder */
.multiple-select2
    + .select2-container
    .select2-search--inline
    .select2-search__field::placeholder {
    color: #a1a5b7;
}

/* Dark mode untuk placeholder */
[data-bs-theme="dark"]
    .multiple-select2
    + .select2-container
    .select2-search--inline
    .select2-search__field::placeholder {
    color: var(--bs-body-color) !important;
    opacity: 0.6;
}

/* dropdown */
.select2-dropdown {
    border: 1px solid #dbdfe9;
    border-radius: 0.475rem;
    overflow: hidden;
}

.select2-results__option {
    padding: 10px 14px;
}

.select2-results__option--selected {
    background-color: #f1faff !important;
    color: #009ef7 !important;
}

.select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #009ef7 !important;
    color: #fff !important;
}

/* Dark mode untuk search field di dropdown */
[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}

/* Dark mode untuk dropdown container */
[data-bs-theme="dark"]
    .select2-container--default
    .select2-results__option[aria-selected="true"] {
    background-color: rgba(0, 158, 247, 0.15) !important;
}

/* Fix untuk select2 dropdown arrow di dark mode */
[data-bs-theme="dark"]
    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: var(--bs-body-color) transparent transparent transparent !important;
}

[data-bs-theme="dark"]
    .select2-container--default.select2-container--open
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: transparent transparent var(--bs-body-color) transparent !important;
}

/* Fix untuk clear button di dark mode */
[data-bs-theme="dark"]
    .select2-container--default
    .select2-selection--single
    .select2-selection__clear {
    color: var(--bs-body-color) !important;
}

/* Fix untuk disabled state */
[data-bs-theme="dark"]
    .select2-container--default.select2-container--disabled
    .select2-selection--single {
    background-color: var(--bs-body-bg) !important;
    opacity: 0.6;
}

[data-bs-theme="dark"]
    .select2-container--default.select2-container--disabled
    .select2-selection--single
    .select2-selection__rendered {
    color: var(--bs-body-color) !important;
}

/* Scrollbar untuk kanban board di dark mode */
[data-bs-theme="dark"] #kanban_board::-webkit-scrollbar {
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] #kanban_board::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] #kanban_board::-webkit-scrollbar-thumb {
    background: var(--bs-border-color);
    border-radius: 10px;
}

[data-bs-theme="dark"] #kanban_board::-webkit-scrollbar-thumb:hover {
    background: var(--bs-border-color);
}
/* ==========================================
   DARK MODE UNTUK FILTER INVOICE
   ========================================== */

/* Dark mode untuk menu filter dropdown */
[data-bs-theme="dark"] .menu-sub-dropdown {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .menu-item {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .menu-link {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .menu-link:hover {
    background: var(--bs-hover-bg) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .text-gray-900 {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .text-muted {
    color: var(--bs-body-color) !important;
    opacity: 0.7;
}

[data-bs-theme="dark"] .menu-sub-dropdown .separator {
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .border-gray-200 {
    border-color: var(--bs-border-color) !important;
}

/* Dark mode untuk form di dalam menu filter */
[data-bs-theme="dark"] .menu-sub-dropdown .form-label {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .form-select {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .form-select:focus {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.2) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .form-select option {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .form-control {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .form-control:focus {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.2) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .form-control::placeholder {
    color: var(--bs-body-color) !important;
    opacity: 0.5;
}

/* Dark mode untuk select2 di dalam menu filter */
[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-container--default
    .select2-selection--multiple {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-container--default.select2-container--focus
    .select2-selection--multiple {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.2) !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    background: rgba(0, 158, 247, 0.15) !important;
    border-color: rgba(0, 158, 247, 0.3) !important;
    color: #009ef7 !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__remove {
    color: #009ef7 !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__choice__remove:hover {
    color: #f1416c !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-container--default
    .select2-search--inline
    .select2-search__field {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-container--default
    .select2-search--inline
    .select2-search__field::placeholder {
    color: var(--bs-body-color) !important;
    opacity: 0.5;
}

/* Dark mode untuk select2 dropdown di dalam menu filter */
[data-bs-theme="dark"] .menu-sub-dropdown .select2-dropdown {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .select2-results__option {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .select2-results__option--selected {
    background: rgba(0, 158, 247, 0.15) !important;
    color: #009ef7 !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-results__option--highlighted {
    background: #009ef7 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-search--dropdown
    .select2-search__field {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .select2-search--dropdown
    .select2-search__field::placeholder {
    color: var(--bs-body-color) !important;
    opacity: 0.5;
}

/* Keep the selected Select2 option visually distinct from the hover target. */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background: #e7f3ff !important;
    color: #075a99 !important;
    box-shadow: inset 3px 0 #1b84ff;
}

.select2-container--default
    .select2-results__option--highlighted.select2-results__option--selectable:not([aria-selected="true"]) {
    background: #e9edf2 !important;
    color: #18202a !important;
    box-shadow: none;
}

.select2-container--default
    .select2-results__option--highlighted.select2-results__option--selectable[aria-selected="true"] {
    background: #cce6ff !important;
    color: #003e68 !important;
    box-shadow: inset 3px 0 #0878c9;
}

[data-bs-theme="dark"]
    .select2-container--default
    .select2-results__option[aria-selected="true"] {
    background: #173247 !important;
    color: #a8d9ff !important;
    box-shadow: inset 3px 0 #1b84ff;
}

[data-bs-theme="dark"]
    .select2-container--default
    .select2-results__option--highlighted.select2-results__option--selectable:not([aria-selected="true"]) {
    background: #343c4d !important;
    color: #ffffff !important;
    box-shadow: none;
}

[data-bs-theme="dark"]
    .select2-container--default
    .select2-results__option--highlighted.select2-results__option--selectable[aria-selected="true"] {
    background: #125783 !important;
    color: #ffffff !important;
    box-shadow: inset 3px 0 #69d4ff;
}

/* Dark mode untuk tombol di menu filter */
[data-bs-theme="dark"] .menu-sub-dropdown .btn-light {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .btn-light:hover {
    background: var(--bs-hover-bg) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .btn-primary {
    background: #009ef7 !important;
    border-color: #009ef7 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .menu-sub-dropdown .btn-primary:hover {
    background: #0095e8 !important;
    border-color: #0095e8 !important;
}

/* Dark mode untuk badge di menu filter */
[data-bs-theme="dark"] .menu-sub-dropdown .badge-primary {
    background: rgba(0, 158, 247, 0.15) !important;
    color: #009ef7 !important;
}

/* Dark mode untuk date range label */
[data-bs-theme="dark"] .menu-sub-dropdown .text-muted.fs-7 {
    color: var(--bs-body-color) !important;
    opacity: 0.7;
}

[data-bs-theme="dark"] .menu-sub-dropdown .ki-calendar {
    color: var(--bs-body-color) !important;
    opacity: 0.7;
}

/* Dark mode untuk tombol filter di card header */
[data-bs-theme="dark"] .btn-light-primary {
    background: rgba(0, 158, 247, 0.1) !important;
    color: #009ef7 !important;
    border-color: rgba(0, 158, 247, 0.2) !important;
}

[data-bs-theme="dark"] .btn-light-primary:hover {
    background: rgba(0, 158, 247, 0.2) !important;
    color: #009ef7 !important;
    border-color: rgba(0, 158, 247, 0.3) !important;
}

[data-bs-theme="dark"] .btn-light-secondary {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .btn-light-secondary:hover {
    background: var(--bs-hover-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .btn-light-secondary .ki-filter {
    color: var(--bs-body-color) !important;
    opacity: 0.7;
}

[data-bs-theme="dark"] .btn-light-primary .ki-calendar {
    color: #009ef7 !important;
}

/* Dark mode untuk badge di button filter */
[data-bs-theme="dark"] .badge-primary {
    background: rgba(0, 158, 247, 0.15) !important;
    color: #009ef7 !important;
}

/* Dark mode untuk select2 dengan class form-select-solid */
[data-bs-theme="dark"] .form-select-solid {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .form-select-solid:focus {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.2) !important;
}

[data-bs-theme="dark"] .form-select-solid option {
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

/* Dark mode untuk select2 yang menggunakan data-kt-select2 */
[data-bs-theme="dark"]
    .select2-container--default
    .select2-selection--multiple.form-select-solid {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"]
    .select2-container--default.select2-container--focus
    .select2-selection--multiple.form-select-solid {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.2) !important;
}

/* Dark mode untuk tombol reset dan apply di filter */
[data-bs-theme="dark"] .menu-sub-dropdown .btn-light.btn-active-light-primary {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"]
    .menu-sub-dropdown
    .btn-light.btn-active-light-primary:hover {
    background: var(--bs-hover-bg) !important;
    color: var(--bs-body-color) !important;
}

/* Dark mode untuk responsive */
@media (max-width: 768px) {
    [data-bs-theme="dark"] .menu-sub-dropdown {
        width: 90% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
}

/* ===== PIC AVATAR WIDGET (header Project Workflow) ===== */
.pic-avatar-widget {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 🔥 Kartu navigasi cepat "Task"/"Project" di Staff Profile — efek
   hover halus supaya jelas kalau kartu ini bisa diklik (bukan cuma
   kartu info statis seperti card lain di halaman ini). */
.hoverable {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.hoverable:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075);
}

/* 🔥 Baris Task & Project di Staff Profile — sekarang bisa diklik
   (langsung navigasi, lihat profile.blade.php). Style ini cuma indikator
   visual (cursor + hover) supaya jelas kalau baris tsb clickable. */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    background-color: var(--bs-light);
}

.project-row-link:hover {
    background-color: var(--bs-light);
}

[data-bs-theme="dark"] .cursor-pointer:hover,
[data-bs-theme="dark"] .project-row-link:hover {
    background-color: var(--bs-tertiary-bg);
}

.pic-avatar-stack {
    display: flex;
    align-items: center;
}

/* 🔥 Tombol pembungkus avatar PIC (trigger modal "Staff Dashboard") —
   reset total supaya tampilan persis sama dengan <img> polos sebelumnya,
   .pic-avatar-circle di dalamnya tetap yang mengatur ukuran/border/shadow. */
.pic-avatar-trigger {
    display: inline-flex;
    padding: 0;
    margin-left: -8px;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.pic-avatar-trigger:first-child {
    margin-left: 0;
}

.pic-avatar-trigger .pic-avatar-circle {
    margin-left: 0;
}

.pic-avatar-trigger:focus-visible .pic-avatar-circle {
    outline: 2px solid var(--bs-primary);
    outline-offset: 1px;
}

.pic-avatar-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--bs-body-bg);
    box-shadow: 0 0 0 1px var(--bs-border-color);
    object-fit: cover;
    background: var(--bs-secondary-bg);
    margin-left: -8px;
    transition:
        transform 0.15s ease,
        z-index 0s;
    font-size: 9px;
    font-weight: 600;
    color: var(--bs-body-color);
}

.pic-avatar-stack .pic-avatar-circle:first-child {
    margin-left: 0;
}

.pic-avatar-stack .pic-avatar-circle:hover {
    transform: translateY(-2px) scale(1.1);
    z-index: 5;
    position: relative;
}

.pic-avatar-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-tertiary-bg);
}

.pic-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--bs-border-color);
    background: transparent;
    color: var(--bs-secondary-color);
    box-shadow: none;
}

.pic-avatar-empty .ki-duotone {
    font-size: 11px;
}

/* Tombol terpisah (titik tiga) — satu-satunya trigger buka modal kelola PIC */
.pic-avatar-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.pic-avatar-action-btn:hover {
    background: var(--bs-secondary-bg);
    transform: scale(1.08);
}

.pic-avatar-action-btn .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--bs-secondary-color);
}

@media (max-width: 768px) {
    .pic-avatar-circle {
        width: 20px;
        height: 20px;
        margin-left: -6px;
    }

    .pic-avatar-action-btn {
        width: 20px;
        height: 20px;
    }
}
/* Jangan tampilkan kontrol select kosong yang disisipkan pada SweetAlert. */
.swal2-select {
    display: none !important;
}

/* Global select defaults: native option menus and Select2 follow Metronic theme. */
html,
html[data-bs-theme="light"] {
    color-scheme: light;
}

html[data-bs-theme="dark"] {
    color-scheme: dark;
}

select.form-select:not(.form-select-sm):not([multiple]),
select.form-control:not(.form-control-sm):not([multiple]) {
    min-height: calc(1.5em + 1.65rem + 2px);
    font-size: 1rem;
}

select.form-select[multiple][size]:not(.form-select-sm),
select.form-control[multiple][size]:not(.form-control-sm) {
    min-height: 9rem;
    font-size: 1rem;
}

select.select2-hidden-accessible + .select2-container {
    max-width: 100%;
}

select.select2-hidden-accessible:not([multiple]):not(.form-select-sm):not(.form-control-sm)
    + .select2-container
    .select2-selection--single {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: calc(1.5em + 1.65rem + 2px);
    min-height: calc(1.5em + 1.65rem + 2px);
}

select.form-select-sm.select2-hidden-accessible + .select2-container .select2-selection--single,
select.form-control-sm.select2-hidden-accessible + .select2-container .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    min-height: calc(1.5em + 0.75rem + 2px);
}

.select2-container--default .select2-results__option {
    min-height: 2.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    line-height: 1.5;
}

[data-bs-theme="dark"] select,
[data-bs-theme="dark"] .select2-container,
[data-bs-theme="dark"] .select2-dropdown {
    color-scheme: dark;
}

[data-bs-theme="dark"] select option,
[data-bs-theme="dark"] select optgroup {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--default .select2-selection__placeholder,
[data-bs-theme="dark"] .select2-container--default .select2-search__field {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-dropdown,
[data-bs-theme="dark"] .select2-container--default .select2-results__options,
[data-bs-theme="dark"] .select2-container--default .select2-results__option:not(.select2-results__option--highlighted):not([aria-selected="true"]) {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

/* Server & Akses: Metronic surfaces, denser data rows, and a readable mobile list. */
.server-access-page,
.server-access-modal-view {
    min-width: 0;
}

.server-access-tabs {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.server-access-tabs .nav {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.server-access-tabs .nav-item {
    flex: 0 0 auto;
}

.server-access-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg, 0.475rem);
    background: var(--bs-card-bg, var(--bs-body-bg));
}

.server-access-summary__item {
    min-width: 0;
    padding: 1rem 1.25rem;
}

.server-access-summary__item + .server-access-summary__item {
    border-inline-start: 1px solid var(--bs-border-color);
}

.server-access-summary__value {
    margin-top: 0.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

#server-list-table {
    min-width: 1500px;
}

.server-access-projects {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-access-value,
.server-access-mobile-meta dd {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.server-access-mobile-list {
    display: grid;
    gap: 0.75rem;
}

.server-access-mobile-row {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg, 0.475rem);
    background: var(--bs-card-bg, var(--bs-body-bg));
}

.server-access-mobile-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
}

.server-access-mobile-meta dt {
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    font-weight: 400;
}

.server-access-mobile-meta dd {
    margin: 0.125rem 0 0;
    font-weight: 500;
}

.server-access-mobile-meta__notice {
    grid-column: 1 / -1;
}

.server-master-form {
    max-width: 60rem;
}

.server-access-form {
    padding-bottom: 4rem;
}

.server-access-submit--floating {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1020;
    min-width: 8rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
}

.server-credential-card .card-toolbar .btn:disabled {
    opacity: 0.55;
}

@media (max-width: 767.98px) {
    .server-access-page__header {
        padding-bottom: 1rem;
    }

    .server-access-page .card:not(.server-credential-card) {
        box-shadow: none;
    }
}

@media (max-width: 575.98px) {
    .server-access-mobile-meta {
        gap: 0.625rem 0.75rem;
    }

    .server-access-mobile-row {
        padding: 0.875rem;
    }

    .server-access-actions > .btn:not(.server-access-submit--floating) {
        width: 100%;
    }

    .server-access-submit--floating {
        right: 1rem;
        bottom: 1rem;
    }

    .server-access-modal .modal-header {
        padding: 1rem;
    }

    .server-access-modal .modal-body {
        padding: 1rem;
    }
}

/* Server & Akses page polish: keep Metronic surfaces while improving hierarchy. */
.server-access-page__header {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.server-access-page__header h1 {
    letter-spacing: -0.025em;
}

.server-access-tabs .nav {
    gap: 0.25rem;
    border-bottom-color: var(--bs-border-color);
}

.server-access-tabs .nav-link {
    padding-inline: 0.875rem;
    font-weight: 600;
}

.server-access-summary {
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.025);
}

.server-access-summary__item {
    padding: 1.125rem 1.375rem;
}

.server-access-section-heading h2 {
    letter-spacing: -0.015em;
}

.server-access-page .card:not(.server-credential-card) {
    border-color: var(--bs-border-color);
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.025);
}

.server-access-form-section .card-header {
    min-height: 4.25rem;
    padding-block: 0.875rem;
}

.server-credential-card {
    overflow: hidden;
    border-color: var(--bs-border-color) !important;
    border-inline-start: 3px solid rgba(var(--bs-primary-rgb), 0.55) !important;
    background: var(--bs-secondary-bg, var(--bs-card-bg, var(--bs-body-bg)));
}

.server-credential-card .card-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.server-credential-card .card-body {
    padding-block: 1rem;
}

.server-access-detail-list > div {
    padding-block: 0.25rem 0.625rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.server-access-detail-list > div:last-child {
    border-bottom: 0;
}

.server-access-detail-list dt {
    margin-bottom: 0.25rem;
}

.server-access-modal .modal-content {
    overflow: hidden;
    border-color: var(--bs-border-color);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.18);
}

.server-access-modal .modal-header {
    border-bottom-color: var(--bs-border-color);
}

.server-access-modal-heading h2 {
    letter-spacing: -0.015em;
}

.credential-type-field-grid {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 2.75rem minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.95fr) 3rem 3rem 3rem;
    align-items: center;
    column-gap: 0.75rem;
}

.credential-type-fields-header {
    grid-template-columns: 2.75rem minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.95fr) 3rem 3rem 3rem;
    align-items: center;
    column-gap: 0.75rem;
    padding: 0 0.75rem 0.5rem;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
}

.credential-type-fields-list {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.credential-type-field {
    width: 100%;
    min-width: 0;
    border-color: var(--bs-border-color) !important;
    background: var(--bs-body-bg);
    transition: opacity 120ms ease, background-color 120ms ease;
}

.credential-type-field.is-hidden {
    border-style: dashed !important;
    background: var(--bs-secondary-bg, var(--bs-body-bg));
}

.credential-type-field.is-dragging {
    opacity: 0.5;
}

.credential-type-field-grid {
    grid-template-areas:
        "handle label key type required visibility remove"
        "handle meta meta meta meta meta meta";
    row-gap: 0.5rem;
}

.credential-type-field-handle {
    grid-area: handle;
    justify-self: center;
    cursor: grab;
    touch-action: none;
}

.credential-type-field-handle,
.credential-type-field-visibility,
.credential-type-field-remove {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.credential-type-field-handle:active {
    cursor: grabbing;
}

.credential-type-field-label { grid-area: label; min-width: 0; }
.credential-type-field-key { grid-area: key; min-width: 0; }
.credential-type-field-type { grid-area: type; min-width: 0; }
.credential-type-field-required { grid-area: required; justify-self: center; }
.credential-type-field-visibility { grid-area: visibility; justify-self: center; }
.credential-type-field-remove { grid-area: remove; justify-self: center; }

.credential-type-field-label .form-control,
.credential-type-field-key .form-control,
.credential-type-field-type .form-select {
    width: 100%;
    min-width: 0;
}

.credential-type-field-required {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0;
}

.credential-type-field-required .form-check-input {
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

.project-reference-form-modal .modal-dialog {
    height: calc(100% - var(--bs-modal-margin) - var(--bs-modal-margin));
    max-height: calc(100dvh - var(--bs-modal-margin) - var(--bs-modal-margin));
}

.project-reference-form-modal .modal-content {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.project-reference-form-modal .modal-header,
.project-reference-form-modal .modal-footer {
    flex-shrink: 0;
}

.project-reference-form-modal .project-reference-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.project-reference-form-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 575.98px) {
    .project-reference-form-modal .modal-dialog {
        height: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
        margin: 0.5rem;
    }
}

.credential-type-field-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    min-height: 1rem;
}

@media (max-width: 991.98px) {
    .credential-type-field-grid {
        grid-template-columns: 2.75rem minmax(0, 1fr) auto auto auto;
        grid-template-areas:
            "handle label label label label"
            "handle required required visibility remove"
            "handle key key key key"
            "handle type type type type"
            "handle meta meta meta meta";
        row-gap: 0.75rem;
    }

    .credential-type-field-handle {
        align-self: start;
        margin-top: 1.75rem;
    }

    .credential-type-field-required,
    .credential-type-field-visibility,
    .credential-type-field-remove {
        align-self: end;
    }
}

.table-responsive table.datatable:not(.datatable-design) thead th {
    min-width: 8rem;
    white-space: nowrap;
}

.table-responsive table.datatable:not(.datatable-design) thead th:first-child {
    min-width: 6rem;
}

.table-responsive table.datatable:not(.datatable-design) thead th:last-child {
    min-width: 9rem;
}

.select2-dropdown.user-tasks-assignee-dropdown {
    min-width: 18rem;
    max-width: min(28rem, calc(100vw - 2rem));
}

.select2-dropdown.user-tasks-assignee-dropdown .select2-results__option {
    white-space: nowrap;
}

.select2-dropdown.user-tasks-assignee-dropdown .select2-results__options {
    overscroll-behavior: contain;
}
