@charset "UTF-8";

/* ===================== E-SURADI Custom CSS ===================== */

/* Body */
body {
    font-size: 12px;
}

.d-footer {
    display: flex; justify-content: center; align-items: center;
    padding: 6px 16px; background-color: #f8f9fa;
    font-size: 12px; text-align: center;
}
.d-footer p { margin: 0; }

h6 { font-size: 17px !important; font-weight: 500; margin-top: 0px; margin-bottom: 2px; }

/* Form */
.form-label { font-size: 13px; margin-bottom: 4px; }
.form-control, .form-select { font-size: 12px !important; }
.form-control-sm:not(textarea) { font-size: 12px !important; padding: 4px 10px; height: 32px !important; border-radius: 4px; }
textarea.form-control-sm { font-size: 12px !important; padding: 4px 10px; height: auto !important; border-radius: 4px; }
.form-select-sm { font-size: 12px !important; padding: 4px 10px; height: 32px !important; border-radius: 4px; }

/* Select2 Fix for hidden containers & responsive 100% full width */
.select2-container,
.select2-container.form-select,
.select2-container.form-select-sm,
.select2-container.form-control,
.select2-container.form-control-sm {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
}

.select2-container .selection {
    display: block !important;
    width: 100% !important;
}

.select2-container .select2-selection--single {
    position: relative !important;
    width: 100% !important;
    height: 34px !important;
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    display: block !important;
    padding: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    display: block !important;
    width: 100% !important;
    height: 32px !important;
    line-height: 32px !important;
    padding-left: 10px !important;
    padding-right: 28px !important;
    margin: 0 !important;
    color: #212529 !important;
    font-size: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    height: 32px !important;
    width: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container .select2-selection--single .select2-selection__arrow b {
    position: static !important;
    margin: 0 !important;
    border-color: #6c757d transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    height: 0 !important;
    width: 0 !important;
}

.select2-dropdown {
    font-size: 12px !important;
    border-color: #ced4da !important;
    border-radius: 4px !important;
    z-index: 99999 !important;
}

/* Buttons */
.btn { display: inline-block; font-weight: 500; text-align: center; text-decoration: none; border: none; cursor: pointer; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.btn-sm { font-size: 12px !important; line-height: 1.1; border-radius: 5px; padding: 5px 12px; }
.btn-xs { font-size: 11px; line-height: 1; border-radius: 3px; padding: 3px 6px; }

/* Datepicker */
.datepicker { font-size: 12px !important; }

/* Table */
.table-sm { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-sm th, .table-sm td { padding: 4px 8px !important; vertical-align: middle; }
table.DataTable { font-size: 12px; }

/* Sidebar */
.sidebar-menu>li>a { font-size: 13px; padding: 6px 12px; display: flex; align-items: center; gap: 6px; }
.sidebar-submenu li a { font-size: 13px; padding: 4px 16px; display: block; }
.sidebar-menu>li, .sidebar-submenu li { margin-bottom: 2px; }
.sidebar-menu i { font-size: 16px; }
.sidebar-menu span { margin-left: 4px; }

/* ===================== Dashboard Cards ===================== */
.dashboard-card {
    border: none; border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dashboard-card:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ===================== Navbar Jabatan Text ===================== */
.navbar-jabatan-text {
    display: inline-block;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    vertical-align: middle;
    max-width: 200px;
}
@media (max-width: 991.98px) {
    .navbar-jabatan-text { max-width: 180px; }
}
@media (max-width: 767.98px) {
    .navbar-jabatan-text { max-width: 120px; }
}
@media (max-width: 575.98px) {
    .navbar-jabatan-text { max-width: 80px; }
}

/* ===================== KPI Cards ===================== */
.kpi-card {
    border: none; border-radius: 10px; padding: 16px;
    background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.kpi-card .kpi-value {
    font-size: 22px; font-weight: 700; color: #1e293b;
}
.kpi-card .kpi-label {
    font-size: 12px; color: #64748b; margin-top: 4px;
}
.kpi-card .kpi-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

/* ===================== Card Styling ===================== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 10px 10px 0 0 !important;
}
.card-body {
    padding: 16px;
}

/* ===================== Alert Styling ===================== */
.alert {
    font-size: 13px;
    border-radius: 8px;
}

/* ===================== Badge ===================== */
.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ===================== Modal ===================== */
.modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
}
.modal-title {
    font-size: 15px;
    font-weight: 600;
}
.modal-body {
    padding: 16px;
    font-size: 13px;
}
.modal-footer {
    padding: 10px 16px;
    border-top: 1px solid #e9ecef;
}

/* ===================== Document Preview ===================== */
.document-preview-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

/* ===================== Print Styles ===================== */
@media print {
    .sidebar, .navbar-header, .d-footer, .dashboard-main-body > .d-flex:first-child {
        display: none !important;
    }
    .dashboard-main-body {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ===================== Modern Dashboard Palette (from SIRU-KLAIM) ===================== */
.dashboard-modern .kpi-card {
    position: relative;
    min-height: 112px;
    overflow: hidden;
    border: none;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(30, 41, 59, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dashboard-modern .kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(30, 41, 59, 0.24);
}
.dashboard-modern .kpi-card .kpi-value,
.dashboard-modern .kpi-card .kpi-label {
    position: relative;
    z-index: 1;
}
.dashboard-modern .kpi-card .kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
}
.dashboard-modern .kpi-card .kpi-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 4px;
    font-weight: 500;
}
.dashboard-modern .kpi-card .kpi-icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 6px 16px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(6px);
}
.dashboard-modern .kpi-gradient-blue { background: linear-gradient(135deg, #1677ff 0%, #0754c7 100%); }
.dashboard-modern .kpi-gradient-amber { background: linear-gradient(135deg, #ffad1f 0%, #ed7203 100%); }
.dashboard-modern .kpi-gradient-rose { background: linear-gradient(135deg, #f43f5e 0%, #c81e45 100%); }
.dashboard-modern .kpi-gradient-cyan { background: linear-gradient(135deg, #13b8d1 0%, #087eaa 100%); }
.dashboard-modern .kpi-gradient-emerald { background: linear-gradient(135deg, #20b77a 0%, #087c56 100%); }
.dashboard-modern .kpi-gradient-violet { background: linear-gradient(135deg, #8b5cf6 0%, #6330c7 100%); }
.dashboard-modern .kpi-gradient-teal { background: linear-gradient(135deg, #14b8a6 0%, #087b79 100%); }
.dashboard-modern .kpi-gradient-indigo { background: linear-gradient(135deg, #6366f1 0%, #3b3fbd 100%); }

/* ===================== DataTables Compact Styling (from SIRU-KLAIM) ===================== */
div.dataTables_wrapper div.dataTables_paginate {
    font-size: 11px !important;
    padding-top: 4px !important;
    margin: 0 !important;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    padding: 3px 8px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    border-radius: 4px !important;
    margin: 0 1px !important;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button.previous,
div.dataTables_wrapper div.dataTables_paginate .paginate_button.next {
    padding: 3px 8px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
}

div.dataTables_wrapper div.dataTables_paginate .pagination .page-item .page-link {
    padding: 3px 8px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
}

div.dataTables_wrapper div.dataTables_info {
    font-size: 11px !important;
    padding-top: 6px !important;
    color: #64748b !important;
}

div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
    font-size: 11px !important;
}

div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_filter input {
    font-size: 11px !important;
    padding: 2px 6px !important;
    height: auto !important;
    border-radius: 4px !important;
}

/* ===================== SIDEBAR WIDTH REDUCTION ===================== */
@media (min-width: 1200px) {
    .sidebar {
        width: 11.875rem !important; /* 190px */
    }
    .dashboard-main {
        margin-inline-start: 11.875rem !important;
    }
    /* Collapsed state */
    .sidebar.active {
        width: 86px !important;
    }
    .dashboard-main.active {
        margin-inline-start: 86px !important;
    }
    .sidebar.active:hover {
        width: 11.875rem !important;
    }
}

@media (min-width: 1400px) {
    .sidebar {
        width: 13.125rem !important; /* 210px */
    }
    .dashboard-main {
        margin-inline-start: 13.125rem !important;
    }
    /* Collapsed state */
    .sidebar.active {
        width: 86px !important;
    }
    .dashboard-main.active {
        margin-inline-start: 86px !important;
    }
    .sidebar.active:hover {
        width: 13.125rem !important;
    }
}

@media (min-width: 1650px) {
    .sidebar {
        width: 14.375rem !important; /* 230px */
    }
    .dashboard-main {
        margin-inline-start: 14.375rem !important;
    }
    /* Collapsed state */
    .sidebar.active {
        width: 86px !important;
    }
    .dashboard-main.active {
        margin-inline-start: 86px !important;
    }
    .sidebar.active:hover {
        width: 14.375rem !important;
    }
}

/* ===================== SIDEBAR COLLAPSED (ACTIVE) FORMATTING ===================== */
.sidebar.active .sidebar-user-info {
    display: none !important;
}

.sidebar.active .sidebar-menu > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 4px auto !important;
    border-radius: 10px !important;
}

.sidebar.active .sidebar-menu > li > a .menu-icon {
    font-size: 22px !important;
    margin: 0 !important;
}

.sidebar.active:hover .sidebar-user-info {
    display: block !important;
}

.sidebar.active:hover .sidebar-menu > li > a {
    width: 100% !important;
    height: auto !important;
    padding: 10px 16px !important;
    justify-content: flex-start !important;
}

.sidebar.active:hover .sidebar-menu > li > a .menu-icon {
    margin-inline-end: 0.5rem !important;
}
