.pagination .page-item {
    margin-left: 0.5rem;
}

.pagination .page-item .page-link {
    width: 32px;
    height: 32px;
    background: #e5e5e5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
}

.pagination .page-item.active .page-link, .pagination .page-item:hover .page-link {
    background: #4a6cf7;
    color: #fff;
}

.radio-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-mark {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    border: 2px solid #ccc;
    position: relative;
    margin-right: 10px;
}

.radio input:checked ~ .radio-mark {
    border-color: #2196f3;
    background-color: #2196f3;
}

/* New styles for the image and radio button container */
.image-container {
    display: flex;
    align-items: center;
}

.image-container img {
    display: block;
    height: 6rem;
    object-fit: cover; /* To maintain image aspect ratio */
    border-radius: 50%; /* Round border for the image */
    margin-right: 10px;
}

.radio-label {
    font-size: 16px;
    color: #000000;
}

/* Custom CSS for the ordered list */
.card-body ol {
    list-style: none; /* Remove default numbers */
    counter-reset: custom-counter; /* Reset the counter */
    padding-left: 1.5rem; /* Add spacing for custom numbers and dots */
  }
  
  .card-body ol li {
    position: relative; /* Required for positioning the number and dot */
    counter-increment: custom-counter; /* Increment the counter */
    margin-bottom: 0.5rem; /* Adjust spacing between items */
  }
  
  .card-body ol li::before {
    content: counter(custom-counter) "."; /* Use the counter as content followed by a dot */
    position: absolute;
    left: -1.5rem; /* Adjust the position of the number and dot */
    font-size: 1rem; /* Adjust the size of the number and dot */
    color: gray; /* Adjust the color of the number and dot */
  }
  
  /* Circular Progress Bar Styles */
.progress-circle {
    width: 100px;
    height: 100px;
    position: relative;
    display: inline-block;
}

.progress-circle .progress-circle-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle svg circle {
    fill: transparent;
    stroke: #d1393a; /* Change the color as needed */
    stroke-width: 10;
}

.bg-custom-image {
  background-image: url('../background.webp'); 
  background-size: cover;
  background-position: center;
}

.bg-red-wari {
    background: #DC0000;
}

.bg-black-wari {
    background: #322D2F;
}

.fs-8 {
    font-size: 12px;
}

.floating-image {
    position: fixed;
    bottom: 10px; /* Adjust this value to change the distance from the bottom */
    left: 10px; /* Adjust this value to change the distance from the left */
    width: 1100px; /* Default width of the image */
    height: auto; /* Let the height adjust proportionally to the width */
    z-index: 1; /* Set a z-index value for the floating image */
}

@media screen and (min-width: 1600px) {
    .floating-image {
        width: 1366px; /* Adjust the width of the image for screens 1600px and above */
    }
}

@media screen and (min-width: 1920px) {
    .floating-image {
        width: 1800px; /* Adjust the width of the image for screens 1920px and above */
    }
}

.mb-6 {
    margin-bottom: 70px;
}

@media screen and (min-width: 768px) {
    .object-image {
        position: relative;
        z-index: 9999; /* Set a high z-index value */
    }
}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Ensure body doesn't overflow on mobile */
@media (max-width: 767px) {
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    * {
        box-sizing: border-box;
    }
}

/* Logo responsive for mobile */
.logo-mobile-responsive {
    max-width: 200px;
    height: auto;
}

@media (max-width: 767px) {
    .logo-mobile-responsive {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .logo-mobile-responsive {
        max-width: 120px;
    }
}

/* Make all tables scrollable on mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Flash/alert mobile responsive */
.flash-alert-mobile {
    max-width: 360px;
    width: 90vw;
}

@media (max-width: 480px) {
    .flash-alert-mobile {
        max-width: 320px;
        width: 95vw;
        left: 2.5vw !important;
        right: 2.5vw !important;
        margin: 0.5rem auto !important;
    }
}

/* Mobile table styling */
@media (max-width: 767px) {
    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    /* Compact tables on mobile */
    .table-sm th,
    .table-sm td {
        padding: 0.3rem;
    }

    /* DataTables mobile adjustments */
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none !important;
        text-align: center !important;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: center !important;
        margin-top: 0.5rem;
    }

    .pagination .page-item .page-link {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    /* Compact buttons on mobile */
    .btn {
        font-size: 0.85rem;
        padding: 0.375rem 0.75rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Sidebar mobile adjustments - OVERRIDE main.css */
    .sidebar-nav-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 9999 !important;
        transition: left 0.3s ease !important;
        -webkit-transform: none !important;
        -moz-transform: none !important;
        -ms-transform: none !important;
        -o-transform: none !important;
        transform: none !important;
    }

    .sidebar-nav-wrapper.active {
        left: 0 !important;
        -webkit-transform: none !important;
        -moz-transform: none !important;
        -ms-transform: none !important;
        -o-transform: none !important;
        transform: none !important;
    }

    .overlay {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9998 !important;
        -webkit-transform: translateX(0) !important;
        -moz-transform: translateX(0) !important;
        -ms-transform: translateX(0) !important;
        -o-transform: translateX(0) !important;
        transform: translateX(0) !important;
    }

    .overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        -webkit-transform: translateX(0) !important;
        -moz-transform: translateX(0) !important;
        -ms-transform: translateX(0) !important;
        -o-transform: translateX(0) !important;
        transform: translateX(0) !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        transition: none !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .main-wrapper.active {
        margin-left: 0 !important;
        overflow-x: hidden !important;
    }

    /* Container adjustments - OVERRIDE main.css */
    .main-wrapper .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Section mobile */
    .section {
        padding: 1rem 0;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Header mobile adjustments */
    .header {
        padding: 0.5rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .header .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .header .row {
        margin: 0 !important;
        width: 100% !important;
    }

    .header-left,
    .header-right {
        width: 50%;
        padding: 0 0.25rem;
    }

    .menu-toggle-btn button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Profile box mobile adjustments */
    .profile-box .profile-info .info h6 {
        max-width: 100px !important;
        font-size: 0.85rem;
    }

    .profile-box button {
        padding: 0.25rem !important;
    }

    /* Dropdown menu mobile */
    .dropdown-menu {
        min-width: 200px !important;
        font-size: 0.85rem;
    }

    /* Title wrapper mobile */
    .title-wrapper {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .title-wrapper h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .breadcrumb {
        font-size: 0.85rem;
    }

    /* Section mobile */
    .section {
        padding: 1rem 0;
    }

    /* Footer mobile */
    .footer {
        padding: 1rem 0 !important;
        font-size: 0.85rem;
    }

    /* Form controls mobile */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    /* Modal mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: 100%;
    }

    .modal-content {
        border-radius: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Alert mobile */
    .alert {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hide-mobile {
        display: none !important;
    }

    .table {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Extra large screens */
@media (min-width: 1920px) {
    .table {
        font-size: 1rem;
    }

    .container-fluid {
        max-width: 1800px;
        margin: 0 auto;
    }
}

/* Prevent text selection issues on touch devices */
table {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Improve touch targets on mobile */
@media (max-width: 767px) {
    .btn,
    .form-control,
    .form-select {
        min-height: 44px;
    }

    a.btn,
    button.btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Fix DataTables mobile overflow */
.dataTables_wrapper {
    margin-bottom: 1rem;
    overflow-x: auto;
}

.dataTables_wrapper .dataTables_scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure DataTables tables are responsive on mobile */
@media (max-width: 767px) {
    table.dataTable {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        display: block;
        float: none !important;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_length select,
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        max-width: 100% !important;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        display: block;
        float: none !important;
        text-align: center !important;
        margin-top: 0.5rem;
    }

    .dataTables_wrapper .dataTables_paginate {
        padding: 10px 0;
    }

    .dataTables_wrapper .pagination {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Make action buttons stack vertically on mobile */
@media (max-width: 767px) {
    .aksi-group {
        flex-direction: column;
        gap: 0.25rem !important;
    }

    .btn-aksi {
        width: 2rem !important;
        height: 2rem !important;
    }

    .btn-aksi i {
        font-size: 0.9rem !important;
    }
}

/* Ensure proper spacing on mobile devices */
@media (max-width: 767px) {
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        width: 100%;
        max-width: 100%;
    }

    .row > [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Fix col-6 to be exactly 50% on mobile */
    .col-6 {
        flex: 0 0 auto;
        width: 50%;
        max-width: 50%;
    }
}

/* Improve readability on mobile */
@media (max-width: 767px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
    }
}

/* ============================================================
   FIX: Modal Horizontal Scroll - Tabel Detail Unit
   ============================================================ */

/* 1. Fix .table-responsive dalam Modal */
.modal .table-responsive {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    position: relative;
    max-width: 100%;
}

/* 2. Fix .table-responsive dengan max-height (untuk sticky header) */
.modal .table-responsive[style*="max-height"],
.modal .table-responsive[style*="overflow:auto"] {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
}

/* 3. Fix DataTables scrollBody dalam Modal */
.modal .dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    position: relative !important;
}

/* 4. Fix DataTables scroll wrapper */
.modal .dataTables_scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
}

/* 5. Fix table dalam modal agar tidak memperluas parent */
.modal table {
    table-layout: fixed !important;
    min-width: max-content !important;
}

/* 6. Fix th/td untuk prevent text overflow tapi tetap bisa scroll */
.modal table th,
.modal table td {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

/* 7. Fix scrollbar visibility */
.modal .table-responsive::-webkit-scrollbar,
.modal .dataTables_scrollBody::-webkit-scrollbar,
.modal .dataTables_scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    -webkit-appearance: none;
}

.modal .table-responsive::-webkit-scrollbar-track,
.modal .dataTables_scrollBody::-webkit-scrollbar-track,
.modal .dataTables_scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.modal .table-responsive::-webkit-scrollbar-thumb,
.modal .dataTables_scrollBody::-webkit-scrollbar-thumb,
.modal .dataTables_scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
    cursor: pointer;
}

.modal .table-responsive::-webkit-scrollbar-thumb:hover,
.modal .dataTables_scrollBody::-webkit-scrollbar-thumb:hover,
.modal .dataTables_scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 8. Fix untuk modal-dialog-scrollable */
.modal-dialog-scrollable .modal-body {
    overflow-x: hidden !important;
}

.modal-dialog-scrollable .modal-body .table-responsive {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

/* 9. Fix z-index untuk ensure scrollbar clickable */
.modal .dataTables_scrollBody,
.modal .table-responsive {
    z-index: 1;
}

.modal .dataTables_scrollHead {
    position: relative;
    z-index: 2;
}

/* 10. Fix untuk nonaktifkan DataTables responsive extension jika conflict */
.modal .dtr-inline.collapsed tbody td:first-child,
.modal .dtr-inline.collapsed tbody th:first-child,
.modal .dtr-inline.collapsed tbody tr.dtr-group td {
    display: table-cell !important;
}

.modal table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child::before,
.modal table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child::before {
    display: none !important;
}

/* 11. Fix untuk prevent modal backdrop blocking scroll */
.modal.show {
    overflow: hidden;
}

.modal-backdrop {
    touch-action: none;
}

/* 12. Mobile-specific fixes */
@media (max-width: 767px) {
    .modal .table-responsive {
        overflow-x: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
        padding-bottom: 20px; /* Extra space for scrollbar */
    }

    .modal .dataTables_scrollBody {
        overflow-x: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
    }

    /* Make scrollbar more visible on mobile */
    .modal .table-responsive::-webkit-scrollbar,
    .modal .dataTables_scrollBody::-webkit-scrollbar {
        height: 12px;
        width: 12px;
    }
}

/* 13. Fix untuk sticky header dalam scrollable container */
.table-sticky thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #fff !important;
}

.modal .table-sticky thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #f8fafc !important;
}