/* assets/css/style.css */
:root {
    --primary: #2c3e7a;
    --primary-dark: #1a2550;
    --primary-light: #3d54a8;
    --secondary: #e8f0fe;
    --accent: #f0a500;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 60px;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f8;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ===== WRAPPER ===== */
#wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition);
    /* PERBAIKAN: scroll sidebar */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    /* Pastikan background tetap saat scroll */
    background-attachment: local;
}

/* PERBAIKAN: Custom scrollbar sidebar yang lebih baik */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.4);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) rgba(0,0,0,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    flex-shrink: 0; /* Jangan menyusut */
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-brand-text {
    margin-left: 12px;
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: white;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.brand-sub {
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255,255,255,0.05);
    margin: 12px 10px;
    border-radius: 10px;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}

.sidebar-user-info {
    margin-left: 10px;
    overflow: hidden;
    min-width: 0;
}

.user-name {
    color: white;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10px;
    margin-top: 3px;
    display: inline-block;
}

.sidebar-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 6px 16px;
    flex-shrink: 0;
}

.sidebar-heading {
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 20px 4px;
    flex-shrink: 0;
}

/* PERBAIKAN: Sidebar nav wrapper agar bisa scroll */
.sidebar-nav-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
}

.sidebar-nav {
    padding: 0 10px;
    list-style: none;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 15px;
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.sidebar-nav .nav-link.active {
    color: white;
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(240,165,0,0.3);
}

/* ===== CONTENT WRAPPER ===== */
#content-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    min-width: 0;
    min-height: 100vh;
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.topbar-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.topbar-toggle:hover {
    background: var(--secondary);
}

.topbar-nav {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--secondary);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 24px;
    flex: 1;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header-title h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.page-header-title p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 2px 0 0;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    margin-bottom: 0;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 20px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    height: 100%;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: -30px;
    right: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.stat-card-label {
    font-size: 13px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.stat-card-blue   { background: linear-gradient(135deg, #2c3e7a, #3d54a8); }
.stat-card-green  { background: linear-gradient(135deg, #1a7a4a, #27ae60); }
.stat-card-orange { background: linear-gradient(135deg, #c0720a, #f0a500); }
.stat-card-red    { background: linear-gradient(135deg, #7a1a1a, #c0392b); }
.stat-card-teal   { background: linear-gradient(135deg, #0a7a6e, #16a085); }
.stat-card-purple { background: linear-gradient(135deg, #5a1a7a, #8e44ad); }

/* ===== BUTTONS ===== */
.btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    transition: var(--transition);
}

.btn i {
    margin-right: 6px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-sm i {
    margin-right: 4px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-icon i {
    margin: 0;
}

/* ===== TABLES ===== */
.table {
    font-size: 13px;
}

.table thead th {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 600;
    border: none;
    padding: 12px 16px;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8faff;
}

/* ===== DATATABLES PERBAIKAN ===== */
.dataTables_wrapper {
    width: 100%;
}

/* PERBAIKAN: Baris atas DataTables */
.dataTables_wrapper .dataTables_length {
    float: left;
    margin-bottom: 16px;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
    margin-bottom: 16px;
}

/* PERBAIKAN: Select length lebih lebar */
.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 6px 32px 6px 12px;
    font-size: 13px;
    height: 36px;
    min-width: 80px;        /* PERBAIKAN: lebar minimum */
    width: auto;
    display: inline-block;
    background-color: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 500;
}

.dataTables_wrapper .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

/* PERBAIKAN: Input search DataTables */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    font-size: 13px;
    height: 36px;
    min-width: 220px;       /* PERBAIKAN: lebar minimum search */
    transition: var(--transition);
    color: var(--text-dark);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,62,122,0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}

/* PERBAIKAN: Info dan pagination */
.dataTables_wrapper .dataTables_info {
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 8px;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    font-size: 13px !important;
    padding: 4px 10px !important;
    margin: 0 2px !important;
    border: 1px solid transparent !important;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #ccc !important;
    cursor: not-allowed;
}

/* PERBAIKAN: Clearfix untuk dataTables header */
.dataTables_wrapper::after {
    content: '';
    display: table;
    clear: both;
}

/* ===== BADGES ===== */
.badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* ===== FORMS ===== */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    padding: 8px 12px;
    height: 38px;
    transition: var(--transition);
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,62,122,0.1);
    outline: none;
}

textarea.form-control {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: block;
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    background: var(--secondary);
    border-color: var(--border-color);
    color: var(--primary);
    font-size: 13px;
    height: 38px;
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
}

.input-group .form-control:not(:last-child) {
    border-radius: 0;
}

/* ===== SELECT2 PERBAIKAN TOTAL ===== */
/* Reset semua style Select2 */
.select2-container {
    width: 100% !important;
    display: block;
}

.select2-container--bootstrap4 .select2-selection--single {
    height: 38px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    background-color: white !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    transition: var(--transition);
}

.select2-container--bootstrap4 .select2-selection--single:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection--single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(44,62,122,0.1) !important;
    outline: none !important;
}

/* PERBAIKAN: Rendered text posisi */
.select2-container--bootstrap4 .select2-selection--single
.select2-selection__rendered {
    line-height: 38px !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
    font-size: 13px !important;
    color: var(--text-dark) !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
}

/* PERBAIKAN: Arrow/caret posisi */
.select2-container--bootstrap4 .select2-selection--single
.select2-selection__arrow {
    height: 36px !important;
    top: 0 !important;
    right: 8px !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container--bootstrap4 .select2-selection--single
.select2-selection__arrow b {
    border-color: var(--text-muted) transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
    margin-top: 0 !important;
    top: auto !important;
    left: auto !important;
    position: relative !important;
}

/* PERBAIKAN: Placeholder */
.select2-container--bootstrap4 .select2-selection--single
.select2-selection__placeholder {
    color: #adb5bd !important;
    line-height: 38px !important;
}

/* PERBAIKAN: Dropdown */
.select2-container--bootstrap4 .select2-dropdown {
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    overflow: hidden;
    z-index: 9999 !important;
}

.select2-container--bootstrap4 .select2-dropdown--below {
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    margin-top: -1px;
}

.select2-container--bootstrap4 .select2-dropdown--above {
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    margin-bottom: -1px;
}

/* PERBAIKAN: Search dalam dropdown */
.select2-container--bootstrap4 .select2-search--dropdown {
    padding: 8px !important;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field {
    border-radius: 6px !important;
    border: 1px solid var(--border-color) !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: 34px !important;
    width: 100% !important;
    color: var(--text-dark) !important;
}

.select2-container--bootstrap4 .select2-search--dropdown
.select2-search__field:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(44,62,122,0.1) !important;
}

/* PERBAIKAN: Options dalam dropdown */
.select2-container--bootstrap4 .select2-results__options {
    max-height: 250px !important;
    overflow-y: auto !important;
    padding: 4px 0 !important;
}

.select2-container--bootstrap4 .select2-results__option {
    padding: 8px 14px !important;
    font-size: 13px !important;
    color: var(--text-dark) !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.select2-container--bootstrap4 .select2-results__option:hover,
.select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: var(--secondary) !important;
    color: var(--primary) !important;
}

.select2-container--bootstrap4 .select2-results__option[aria-selected="true"] {
    background-color: var(--primary) !important;
    color: white !important;
}

.select2-container--bootstrap4 .select2-results__option--disabled {
    color: #adb5bd !important;
    cursor: not-allowed !important;
}

/* PERBAIKAN: Select2 dalam input-group */
.input-group .select2-container--bootstrap4 .select2-selection--single {
    border-radius: 0 8px 8px 0 !important;
}

/* PERBAIKAN: Select2 dalam modal */
.modal .select2-container {
    z-index: 10000 !important;
}

/* PERBAIKAN: Select2 multiple */
.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: 38px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    padding: 2px 8px !important;
}

.select2-container--bootstrap4 .select2-selection--multiple:focus,
.select2-container--bootstrap4.select2-container--focus
.select2-selection--multiple {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(44,62,122,0.1) !important;
}

/* ===== NATIVE SELECT (fallback) ===== */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

/* ===== PROGRESS BAR ===== */
.progress {
    border-radius: 10px;
    height: 8px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* ===== DETAIL CARD ===== */
.detail-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    align-items: flex-start;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    width: 180px;
    min-width: 180px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 500;
    padding-top: 2px;
}

.detail-value {
    flex: 1;
    color: var(--text-dark);
    font-weight: 600;
    min-width: 0;
    word-break: break-word;
}

/* ===== SEARCH BOX ===== */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 40px;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

/* ===== OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* ===== COLLAPSED SIDEBAR ===== */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

body.sidebar-collapsed #content-wrapper {
    margin-left: var(--sidebar-collapsed);
}

body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .sidebar-heading,
body.sidebar-collapsed .sidebar-nav .nav-link span,
body.sidebar-collapsed .sidebar-divider {
    display: none;
}

body.sidebar-collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 12px;
}

body.sidebar-collapsed .sidebar-nav .nav-link i {
    margin: 0;
    font-size: 18px;
    width: auto;
}

body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 12px 8px;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 16px 8px;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(44,62,122,0.3);
}

.login-logo h4 {
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 4px 0 0;
}

.login-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

/* ===== SUMMARY TABLE ===== */
.summary-table th {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
}

.summary-table td {
    font-size: 13px;
}

/* ===== GAP UTILITY ===== */
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* ===== UTILITIES ===== */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom   { background: var(--primary) !important; }
.fw-600              { font-weight: 600; }
.fw-700              { font-weight: 700; }
.fs-12               { font-size: 12px; }
.fs-13               { font-size: 13px; }
.fs-14               { font-size: 14px; }
.rounded-10          { border-radius: 10px; }
.rounded-12          { border-radius: 12px; }

/* ===== PRINT ===== */
@media print {
    .sidebar,
    .topbar,
    .no-print { display: none !important; }
    #content-wrapper { margin-left: 0 !important; }
    .main-content { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        margin-bottom: 10px;
    }

    .dataTables_wrapper .dataTables_filter input {
        min-width: 160px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    #content-wrapper {
        margin-left: 0 !important;
    }

    .main-content {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-card-value {
        font-size: 22px;
    }

    .table-responsive {
        font-size: 12px;
    }

    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-collapsed #content-wrapper {
        margin-left: 0;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        width: 100%;
        margin-bottom: 10px;
    }

    .dataTables_wrapper .dataTables_filter input {
        min-width: 100%;
        width: 100%;
    }

    .dataTables_wrapper .dataTables_length select {
        min-width: 70px;
    }

    .detail-label {
        width: 130px;
        min-width: 130px;
    }
}

@media (max-width: 576px) {
    .login-card { padding: 24px; }
    .main-content { padding: 12px; }
    .stat-card-value { font-size: 18px; }
    .stat-card { padding: 16px; }
}

/* ===== SWEETALERT2 SELALU DI ATAS ===== */
.swal2-container {
    z-index: 999999 !important;
    position: fixed !important;
}

.swal2-backdrop-show {
    z-index: 999998 !important;
}

/* ===== CARD OVERFLOW FIX ===== */
/* Cegah card memotong dropdown select */
.card {
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

/* ===== SELECT NATIVE FIX ===== */
/* Untuk select yang tidak menggunakan Select2 */
select.form-control {
    height: 38px !important;
    font-size: 13px !important;
    color: #2d3748 !important;
    cursor: pointer;
    padding: 6px 12px !important;
}

select.form-control:disabled {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

select.form-control:focus {
    border-color: #2c3e7a !important;
    box-shadow: 0 0 0 3px rgba(44,62,122,0.1) !important;
    outline: none !important;
}

/* ===== FORM GROUP POSITION ===== */
.form-group {
    position: relative;
    margin-bottom: 16px;
}

/* ===== MAIN CONTENT OVERFLOW ===== */
.main-content {
    overflow: visible !important;
}

#content-wrapper {
    overflow: visible !important;
}