
/* PERBAIKAN UTAMA: WARNA TEKS AGAR TERBACA */
body {
    color: #195ca0ff !important;
    background-color: #f8f9fa !important;
}

/* PERBAIKAN TEKS PADA ELEMEN DENGAN BACKGROUND GELAP */
.card-header.bg-dark,
.card-header.bg-primary,
.card-header.bg-danger,
.card-header.bg-success,
.card-header.bg-info,
.card-header.bg-warning,
.card-header.bg-dark *,
.card-header.bg-primary *,
.card-header.bg-danger *,
.card-header.bg-success *,
.card-header.bg-info *,
.card-header.bg-warning * {
    color: white !important;
}

/* PERBAIKAN TEKS PADA BADGE DENGAN BACKGROUND GELAP */
.badge.bg-dark,
.badge.bg-primary,
.badge.bg-danger,
.badge.bg-success,
.badge.bg-info,
.badge.bg-warning {
    color: white !important;
}

/* Pastikan semua teks di dalam card readable */
.card,
.card-body,
.card-title,
.card-text {
    color: #010a12ff !important;
}

/* Pastikan teks di dalam modal readable kecuali header berwarna */
.modal-content,
.modal-body,
.modal-title:not(.text-white) {
    color: #212529 !important;
}

/* Pastikan tabel readable kecuali .table-dark */
.table:not(.table-dark),
.table:not(.table-dark) th,
.table:not(.table-dark) td {
    color: #212529 !important;
}

/* Pastikan form elements readable */
.form-label,
.form-control,
.form-select,
.form-text {
    color: #212529 !important;
}

/* Fix untuk teks di dalam header berwarna */
.navbar-brand,
.navbar .text-white,
.navbar .text-white * {
    color: white !important;
}
.oqc-section {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
/* SRORD Details Popup */
.srord-details-popup {
    border-radius: 12px;
    overflow: hidden;
}

.srord-details-popup .swal2-popup {
    padding: 0;
    border-radius: 12px;
}

.srord-details-popup .swal2-close {
    color: white;
    font-size: 1.5rem;
    top: 20px;
    right: 20px;
}

/* Table in modal */
.srord-details-popup table {
    font-size: 0.85rem;
}

.srord-details-popup table th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    position: sticky;
    top: 0;
    z-index: 10;
}
/* MEDIA QUERIES UNTUK RESPONSIVE */
@media (max-width: 992px) {
    .ipqc-modal-detail .modal-xl {
        max-width: 100%;
        margin: 0;
    }
    
    #ipqcModalBody .row {
        flex-direction: column;
    }
    
    #ipqcModalBody .col-lg-4,
    #ipqcModalBody .col-lg-8,
    #ipqcModalBody .col-md-5,
    #ipqcModalBody .col-md-7 {
        width: 100%;
        max-width: 100%;
    }
    
    #ipqcModalBody table {
        font-size: 11px !important;
    }
    
    #ipqcModalBody th,
    #ipqcModalBody td {
        padding: 4px 6px !important;
    }
}

@media (max-width: 576px) {
    .ipqc-modal-detail .modal-dialog {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .ipqc-modal-detail .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
    
    #ipqcModalBody {
        padding: 5px !important;
    }
    
    #ipqcModalBody .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    #ipqcModalBody .col-6,
    #ipqcModalBody .col-md-3,
    #ipqcModalBody .col-md-4,
    #ipqcModalBody .col-md-6 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* FIX UNTUK SCROLL PADA MOBILE */
@media (hover: none) and (pointer: coarse) {
    .modal-scrollable-container {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .ipqc-thumbnails {
        -webkit-overflow-scrolling: touch;
    }
}

/* HINDARI TEXT SELECTION PADA MODAL */
.modal-scrollable-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ALLOW SELECTION PADA TEXT AREAS */
.modal-scrollable-container textarea,
.modal-scrollable-container input,
.modal-scrollable-container [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
}

.srord-details-popup table td {
    padding: 10px 8px;
    vertical-align: middle;
}

.srord-details-popup .table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Card styling */
.srord-details-popup .card {
    border-radius: 8px;
    border-width: 2px;
    transition: transform 0.2s ease;
}

.srord-details-popup .card:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1200px) {
    .srord-details-popup .swal2-popup {
        width: 95% !important;
        margin: 10px;
    }
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
    color: white;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

.table-sm th {
    font-size: 11px;
    white-space: nowrap;
}

.table-sm td {
    font-size: 11px;
    vertical-align: middle;
}

.card-header {
    font-weight: bold;
    font-size: 14px;
}

.badge {
    font-size: 10px;
    padding: 3px 6px;
}

/* Modal styling */
.modal-xl {
    max-width: 95%;
}

.modal-body-scrollable {
    max-height: 80vh;
    overflow-y: auto;
}

.ipqc-modal-detail .modal-content {
    border-radius: 10px;
}

/* Photo gallery styling */
.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.photo-item {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-item:hover {
    border-color: #0d6efd;
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Timeline styling */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6c757d;
}

.timeline-item.active::before {
    background: #0d6efd;
}

.timeline-item.completed::before {
    background: #198754;
}

.timeline-content {
    margin-left: 10px;
}

/* Progress bar styling */
.progress {
    height: 8px;
    margin: 5px 0;
}

.progress-bar {
    border-radius: 4px;
}
/* CSS untuk modal Hourly Production */
.hourly-cell {
    cursor: pointer;
    transition: all 0.2s ease;
}

.hourly-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.3);
    z-index: 1;
    position: relative;
}

.hourly-header {
    background-color: #f8f9fa !important;
    color: #e7edf3ff !important;
}

.hourly-table-compact th,
.hourly-table-compact td {
    padding: 4px 6px !important;
    font-size: 0.85rem;
}

.bg-success-light {
    background-color: rgba(29, 112, 74, 0.15) !important;
}

.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

.bg-primary-light {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

.bg-primary-medium {
    background-color: rgba(13, 110, 253, 0.25) !important;
}

/* CSS untuk progress bar di tabel */
.hourly-performance {
    margin-top: 2px;
}

.performance-badge {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
}

.performance-badge.excellent {
    background-color: #198754;
    color: white;
}

.performance-badge.good {
    background-color: #ffc107;
    color: black;
}

.performance-badge.poor {
    background-color: #dc3545;
    color: white;
}

.lose-time-indicator {
    font-size: 0.7rem;
    color: #fd7e14;
    margin-top: 1px;
}

/* Responsive table */
.hourly-table-container {
    max-height: 350px;
    overflow-y: auto;
}

/* Modal styles */
.hourly-detail-modal .modal-xl {
    max-width: 95%;
}

.photo-zoom-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.operator-detail-card, .quality-detail-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.detail-info {
    margin-top: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    font-weight: 500;
    color: #212529;
}

/* PERBAIKAN: Teks pada header dengan background warna */
.table-dark th,
.table-dark td,
.table-dark * {
    color: white !important;
}

/* PERBAIKAN: Warna teks pada filter section */
.filter-section * {
    color: #212529 !important;
}

.filter-section .form-label {
    color: #212529 !important;
}

/* PERBAIKAN: Warna teks pada dashboard sections */
.section-header .section-title,
.section-header .text-muted {
    color: #212529 !important;
}

/* PERBAIKAN: Warna teks pada card headers */
.card-header:not(.bg-dark):not(.bg-primary):not(.bg-danger):not(.bg-success):not(.bg-info):not(.bg-warning) {
    color: #212529 !important;
    background-color: #f8f9fa !important;
}

/* PERBAIKAN: Warna teks pada modal headers */
.modal-header:not(.bg-dark):not(.bg-primary):not(.bg-danger):not(.bg-success):not(.bg-info):not(.bg-warning) {
    color: #212529 !important;
    background-color: #f8f9fa !important;
}

/* PERBAIKAN: Warna teks pada modal headers yang berwarna */
.modal-header.bg-dark .modal-title,
.modal-header.bg-primary .modal-title,
.modal-header.bg-danger .modal-title,
.modal-header.bg-success .modal-title,
.modal-header.bg-info .modal-title,
.modal-header.bg-warning .modal-title {
    color: white !important;
}

/* HAPUS STYLE PRINT */
@media print {
    .no-print, 
    .modal-footer,
    button,
    .btn,
    .filter-section,
    .navbar {
        display: none !important;
    }
}
/* ================================ */
/* CATEGORY TABLE SPECIFIC STYLES */
/* ================================ */
.category-table-sm {
    width: 100%;
    margin-bottom: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 12px !important;
    color: #333 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.category-table-sm th {
    background-color: #dc3545 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border: none !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}
.mobile-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

.mobile-table-scroll {
    display: flex;
    gap: 10px;
    min-width: fit-content;
}

.mobile-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
}

.mobile-cell {
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 3px;
    background: #f8f9fa;
    font-size: 12px;
}

.mobile-table-hint {
    text-align: center;
    padding: 5px;
    color: #6c757d;
    font-size: 11px;
    border-top: 1px solid #dee2e6;
    margin-top: 10px;
}

/* Swipe indicator */
.swipe-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 1000;
}

.category-table-sm th:first-child {
    border-radius: 6px 0 0 0 !important;
}

.category-table-sm th:last-child {
    border-radius: 0 6px 0 0 !important;
}

.category-table-sm td {
    padding: 10px 12px !important;
    border-bottom: 1px solid #e1e5eb !important;
    color: #333 !important;
    text-align: center !important;
    vertical-align: middle !important;
    background-color: white !important;
    transition: background-color 0.2s ease !important;
}

.category-table-sm tbody tr {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.category-table-sm tbody tr:hover {
    background-color: rgba(25, 92, 160, 0.08) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-table-sm tbody tr:last-child td {
    border-bottom: none !important;
}

/* Alternating row colors */
.category-table-sm tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
}

.category-table-sm tbody tr:nth-child(even):hover {
    background-color: rgba(25, 92, 160, 0.1) !important;
}

/* Column-specific styles */
.category-table-sm td:first-child {
    font-weight: 600 !important;
    color: #dc3545 !important;
    text-align: left !important;
}

.category-table-sm td:nth-child(2) { /* Total Minutes */
    font-weight: 700 !important;
    color: #dc3545 !important;
    font-size: 13px !important;
}

.category-table-sm td:nth-child(3), /* Events */
.category-table-sm td:nth-child(4) { /* Avg Min/Event */
    font-weight: 500 !important;
    color: #6c757d !important;
}
/* CSS untuk modal SRORD details */
.srord-details-modal .swal2-popup {
    max-height: 80vh;
    overflow-y: auto;
}

.srord-container {
    font-size: 0.75rem;
    line-height: 1.3;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.srord-container::-webkit-scrollbar {
    width: 6px;
}

.srord-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.srord-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.srord-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.notes-container {
    font-size: 0.75rem;
    line-height: 1.3;
    scrollbar-width: thin;
}

.notes-container::-webkit-scrollbar {
    width: 4px;
}

.srord-summary-item {
    margin-bottom: 2px;
    padding: 2px 4px;
    background: #e9ecef;
    border-radius: 3px;
    border-left: 3px solid #0d6efd;
}

.srord-count-badge {
    display: inline-block;
    background: #0d6efd;
    color: white;
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}

.category-table-sm td:nth-child(5) { /* Percentage */
    min-width: 120px;
}

.category-table-sm td:last-child { /* Description */
    text-align: left !important;
    color: #495057 !important;
    line-height: 1.4;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge inside table */
.category-table-sm .badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
}

/* Progress bar inside table */
.category-table-sm .progress {
    height: 6px !important;
    background-color: #e9ecef !important;
    border-radius: 3px !important;
    margin-right: 8px !important;
    min-width: 50px;
}

.category-table-sm .progress-bar {
    border-radius: 3px !important;
}

/* Color classes for progress bars */
.category-table-sm .category-color-1 .progress-bar { background-color: #195ca0 !important; }
.category-table-sm .category-color-2 .progress-bar { background-color: #198754 !important; }
.category-table-sm .category-color-3 .progress-bar { background-color: #ffc107 !important; }
.category-table-sm .category-color-4 .progress-bar { background-color: #dc3545 !important; }
.category-table-sm .category-color-5 .progress-bar { background-color: #6f42c1 !important; }
.category-table-sm .category-color-6 .progress-bar { background-color: #fd7e14 !important; }
.category-table-sm .category-color-7 .progress-bar { background-color: #20c997 !important; }
.category-table-sm .category-color-8 .progress-bar { background-color: #e83e8c !important; }
.category-table-sm .category-color-9 .progress-bar { background-color: #17a2b8 !important; }
.category-table-sm .category-color-10 .progress-bar { background-color: #343a40 !important; }

/* Table container for scroll */
.table-responsive {
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    background-color: white !important;
}
/* Warna untuk performa hourly */
.hourly-cell.bg-success-light {
    background-color: rgba(25, 135, 84, 0.25) !important; /* Hijau terang */
    border: 2px solid rgba(25, 135, 84, 0.5) !important;
}

.hourly-cell.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.25) !important; /* Kuning terang */
    border: 2px solid rgba(255, 193, 7, 0.5) !important;
}

.hourly-cell.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.25) !important; /* Merah terang */
    border: 2px solid rgba(220, 53, 69, 0.5) !important;
}

/* Progress bar di dalam cell */
.hourly-cell .progress {
    height: 3px !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-radius: 2px !important;
}

/* Badge performa */
.performance-badge.excellent {
    background-color: #198754 !important;
    color: white !important;
    padding: 1px 3px !important;
    border-radius: 2px !important;
    font-weight: bold !important;
}

.performance-badge.good {
    background-color: #ffc107 !important;
    color: black !important;
    padding: 1px 3px !important;
    border-radius: 2px !important;
    font-weight: bold !important;
}

.performance-badge.poor {
    background-color: #dc3545 !important;
    color: white !important;
    padding: 1px 3px !important;
    border-radius: 2px !important;
    font-weight: bold !important;
}

/* ============================================ */
/* CSS UNTUK IPQC DENGAN FOTO MULTIPLE & SCROLL */
/* ============================================ */

/* Container untuk foto IPQC dengan scroll */
.ipqc-photos-container {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.ipqc-main-photo {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ipqc-main-photo:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-color: #0d6efd;
}
/* CSS untuk thumbnail gallery dengan scroll horizontal */
.ipqc-thumbnails {
    display: flex;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Untuk smooth scroll di mobile */
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.ipqc-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.ipqc-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ipqc-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ipqc-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Pastikan thumbnail tidak menyusut */
.ipqc-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Penting: agar tidak menyusut saat di-scroll */
}

.ipqc-thumbnail:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Container utama untuk foto dengan scroll vertikal */
.ipqc-photos-container {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

/* Scrollbar custom untuk semua konten */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Modal body dengan scroll */
.modal-body-scrollable {
    max-height: 80vh;
    overflow-y: auto;
    padding: 15px;
}
#outputDistributionChart canvas {
    width: 100% !important;
    height: 250px !important;
}

#performanceSummary .card {
    height: 100%;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#performanceSummary .card-body {
    padding: 15px;
}
/* Container untuk operator dengan scroll */
.ipqc-operators-container {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
}

/* Container untuk detail dengan scroll */
.ipqc-details-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ipqc-main-photo {
        max-height: 200px;
    }
    
    .ipqc-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .ipqc-photos-container {
        max-height: 300px;
    }
    
    .ipqc-details-container {
        max-height: 400px;
    }
}

/* Scrollbar styling untuk table-responsive */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
/* Hourly Detail Modal Styling */
#hourlyDetailModal .modal-xl {
    max-width: 95%;
}

#hourlyDetailTable {
    font-size: 0.85rem;
}

#hourlyDetailTable th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    padding: 12px 8px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

#hourlyDetailTable td {
    vertical-align: middle;
    padding: 10px 8px;
}

/* SRORD Container */
.srord-container, .srord-summary-container {
    max-height: 180px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    scrollbar-width: thin;
    scrollbar-color: #adb5bd #f1f1f1;
}

.srord-container::-webkit-scrollbar,
.srord-summary-container::-webkit-scrollbar {
    width: 6px;
}

.srord-container::-webkit-scrollbar-track,
.srord-summary-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.srord-container::-webkit-scrollbar-thumb,
.srord-summary-container::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}

.srord-container::-webkit-scrollbar-thumb:hover,
.srord-summary-container::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

.top-srord-list {
    max-height: 120px;
    overflow-y: auto;
}

/* Notes Container */
.notes-list-container {
    max-height: 180px;
    overflow-y: auto;
    padding: 8px;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.note-item {
    background: white;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.note-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

/* Progress bars */
#hourlyDetailTable .progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

#hourlyDetailTable .progress-bar {
    border-radius: 10px;
}

/* Badge styling */
#hourlyDetailTable .badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Table row hover effect */
#hourlyDetailTable tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05) !important;
    transition: background-color 0.2s ease;
}

/* Status badges */
.bg-success { background: linear-gradient(135deg, #28a745, #20c997) !important; }
.bg-warning { background: linear-gradient(135deg, #ffc107, #fd7e14) !important; }
.bg-danger { background: linear-gradient(135deg, #dc3545, #c92a2a) !important; }
.bg-info { background: linear-gradient(135deg, #17a2b8, #0dcaf0) !important; }
.bg-primary { background: linear-gradient(135deg, #0d6efd, #4dabf7) !important; }

/* Cell highlighting */
.table-info td {
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-left: 4px solid #0d6efd !important;
}

/* Responsive */
@media (max-width: 1400px) {
    #hourlyDetailTable {
        font-size: 0.8rem;
    }
    
    #hourlyDetailTable th,
    #hourlyDetailTable td {
        padding: 8px 6px;
    }
    
    .srord-container,
    .notes-list-container {
        max-height: 150px;
        padding: 8px;
    }
}

@media (max-width: 1200px) {
    #hourlyDetailModal .modal-xl {
        max-width: 100%;
        margin: 10px;
    }
    
    #hourlyDetailTable {
        font-size: 0.75rem;
    }
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Modal khusus untuk foto full size */
.photo-fullsize-modal .modal-body {
    padding: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-fullsize-modal .modal-content {
    background: transparent;
    border: none;
}

.photo-fullsize-modal .btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1060;
    filter: invert(1);
    opacity: 0.8;
}

.photo-fullsize-modal .btn-close:hover {
    opacity: 1;
}

/* Fix untuk table hover issue */
.table-hover tbody tr:hover td {
    background-color: transparent !important;
}
/* PERBAIKAN UNTUK IPQC MODAL DENGAN SCROLL */
.ipqc-modal-detail .modal-dialog {
    max-width: 95%;
    max-height: 95vh;
    margin: 10px auto;
}

.ipqc-modal-detail .modal-content {
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

#ipqcModalBody {
    flex: 1;
    min-height: 0; /* PENTING: Agar flex child bisa scroll */
    overflow-y: auto;
    padding: 0 !important;
}

/* Container untuk konten dengan scroll independen */
.modal-scrollable-container {
    height: 100%;
    overflow-y: auto;
    padding: 15px;
}

/* Responsive modal untuk mobile */
@media (max-width: 768px) {
    .ipqc-modal-detail .modal-dialog {
        max-width: 100%;
        margin: 0;
        height: 100vh;
    }
    
    .ipqc-modal-detail .modal-content {
        height: 100vh;
        border-radius: 0;
    }
    
    #ipqcModalBody {
        max-height: calc(100vh - 120px); /* Sesuaikan dengan tinggi header+footer */
    }
}

/* PERBAIKAN UNTUK TABEL DI DALAM MODAL */
#ipqcModalBody table {
    font-size: 12px !important;
}

#ipqcModalBody th, 
#ipqcModalBody td {
    padding: 6px 8px !important;
    white-space: nowrap;
}

/* PERBAIKAN UNTUK FOTO DI DALAM MODAL */
#ipqcModalBody .ipqc-thumbnails {
    max-width: 100%;
    overflow-x: auto;
}

#ipqcModalBody .ipqc-thumbnail {
    width: 70px;
    height: 70px;
    flex-shrink: 0; /* Penting agar thumbnail tidak menyusut */
}

/* PERBAIKAN ZOOM */
#ipqcModalBody img {
    max-width: 100%;
    height: auto;
}

#ipqcModalBody video {
    max-width: 100%;
    height: auto;
}
/* CSS untuk All Categories Table Compact */
.category-table-brown {
    width: 100%;
    margin-bottom: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 11px !important;
    color: #8B4513 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.category-table-brown th {
    background-color: #8B4513 !important;
    color: #FFF8DC !important;
    font-weight: 600 !important;
    padding: 6px 4px !important;
    border: none !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-size: 10px !important;
    text-transform: uppercase;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.category-table-brown td {
    padding: 8px 4px !important;
    border-bottom: 1px solid #DEB887 !important;
    color: #8B4513 !important;
    text-align: center !important;
    vertical-align: middle !important;
    background-color: #FFF8DC !important;
    transition: background-color 0.2s ease !important;
}

.category-table-brown tbody tr {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.category-table-brown tbody tr:hover {
    background-color: rgba(139, 69, 19, 0.1) !important;
}

.table-responsive-brown {
    border-radius: 6px !important;
    border: 1px solid #8B4513 !important;
    background-color: #FFF8DC !important;
    max-height: 200px;
    overflow-y: auto;
}

.table-responsive-brown::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-responsive-brown::-webkit-scrollbar-track {
    background: #F5DEB3;
    border-radius: 3px;
}

.table-responsive-brown::-webkit-scrollbar-thumb {
    background: #D2691E;
    border-radius: 3px;
}

.table-responsive-brown::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}

/* Tombol utama */
#captureReportBtn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

#captureReportBtn:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

#captureReportBtn:active {
    transform: translateY(0);
}

/* Tambahkan di bagian CSS yang ada */
.modal-navigation {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-navigation:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-navigation.prev {
    left: 10px;
}

.modal-navigation.next {
    right: 10px;
}

.modal-navigation.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Swipe hint untuk mobile */
.swipe-hint {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 10px;
    margin: 0 20px;
}

/* Progress indicator */
.modal-progress {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 1000;
}
/* Modal report */
#reportScreenshotModal .modal-xl {
    max-width: 95%;
}

#reportScreenshotModal .modal-body {
    max-height: 85vh;
    overflow-y: auto;
}
/* CSS untuk zoom container */
#zoomContainer {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#zoomImage {
    transition: transform 0.1s ease-out;
    max-height: 90vh;
    max-width: 90vw;
}

/* Touch feedback untuk mobile */
@media (max-width: 768px) {
    #zoomContainer {
        -webkit-overflow-scrolling: touch;
    }
    
    #zoomImage {
        touch-action: none;
    }
}

/* Fullscreen video styling */
video:fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

video:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

/* Loading indicator untuk gambar besar */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Style untuk screenshot report */
.watermark {
    pointer-events: none;
}

.report-section {
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.report-section-title {
    background: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
    color: #1e40af;
}

.report-section-content {
    padding: 20px;
    background: white;
}

/* Floating Camera Button */
#floatingCameraBtn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #floatingCameraBtn {
        top: auto;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
}

/* Improve screenshot modal */
#reportScreenshotModal canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* Performance strip colors for total row */
.line-performance-table tfoot td.bg-primary {
    background: linear-gradient(90deg, 
        rgba(13, 110, 253, 0.1) 0%,
        rgba(13, 110, 253, 0.3) 25%,
        rgba(13, 110, 253, 0.5) 50%,
        rgba(13, 110, 253, 0.3) 75%,
        rgba(13, 110, 253, 0.1) 100%
    ) !important;
    background-size: 200% 100% !important;
    animation: performanceStrip 3s ease-in-out infinite !important;
}

@keyframes performanceStrip {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Color coding for performance percentages */
.line-performance-table tbody tr td:nth-child(5) .progress-bar {
    animation: none !important;
}

.line-performance-table tbody tr td:nth-child(5) {
    position: relative;
    overflow: hidden;
}

/* Gradient background based on performance */
.line-performance-table tbody tr td:nth-child(5)[class*="text-success"] {
    background: linear-gradient(90deg,
        rgba(25, 135, 84, 0.05) 0%,
        rgba(25, 135, 84, 0.1) 100%
    ) !important;
}

.line-performance-table tbody tr td:nth-child(5)[class*="text-warning"] {
    background: linear-gradient(90deg,
        rgba(255, 193, 7, 0.05) 0%,
        rgba(255, 193, 7, 0.1) 100%
    ) !important;
}

.line-performance-table tbody tr td:nth-child(5)[class*="text-danger"] {
    background: linear-gradient(90deg,
        rgba(220, 53, 69, 0.05) 0%,
        rgba(220, 53, 69, 0.1) 100%
    ) !important;
}

/* Total performance strip with dynamic color */
.line-performance-table tfoot tr td:nth-child(5) {
    position: relative;
    overflow: hidden;
}
/* GANTI GRADIENT DENGAN WARNA SOLID */
.line-performance-table tfoot tr td:nth-child(5).text-success {
    background-color: #d1e7dd !important; /* Hijau muda solid */
    animation: none !important;
}

.line-performance-table tfoot tr td:nth-child(5).text-warning {
    background-color: #fff3cd !important; /* Kuning muda solid */
    animation: none !important;
}

.line-performance-table tfoot tr td:nth-child(5).text-danger {
    background-color: #f8d7da !important; /* Merah muda solid */
    animation: none !important;
}
@keyframes successStrip {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes warningStrip {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes dangerStrip {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print styles */
@media print {
    .no-print, .modal-footer, button, .btn {
        display: none !important;
    }
}
/* Style untuk screenshot report */
#compactReportContainer table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 11px !important;
}

#compactReportContainer th {
    padding: 6px 4px !important;
    font-weight: bold !important;
    font-size: 10px !important;
    white-space: nowrap !important;
}

#compactReportContainer td {
    padding: 5px 3px !important;
    font-size: 10px !important;
    vertical-align: middle !important;
}

#compactReportContainer .progress-bar {
    height: 6px !important;
    border-radius: 3px !important;
}

#compactReportContainer .badge {
    font-size: 9px !important;
    padding: 2px 5px !important;
}

/* Modal untuk hasil screenshot */
#screenshotResultModal .modal-fullscreen {
    max-width: 95%;
}

#screenshotResultModal .modal-body {
    max-height: 85vh;
    overflow-y: auto;
}

/* Tombol capture yang lebih baik */
#captureReportBtn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s;
}

#captureReportBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Style untuk tombol kamera kecil */
#smallCameraBtn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

#smallCameraBtn:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#smallCameraBtn:active {
    transform: translateY(0);
}
/* Fullscreen Modal Styles */
.modal-fullscreen .modal-content {
    height: 100vh;
    border-radius: 0;
    border: none;
}

.modal-fullscreen .modal-body {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.modal-fullscreen .modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #dee2e6;
}

/* CSS untuk Photo Gallery dengan Swipe Support */
.photo-gallery {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.photo-gallery::-webkit-scrollbar {
    height: 6px;
}

.photo-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.photo-gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.photo-gallery::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.photo-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    position: relative;
}

.photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.photo-item.active {
    border-color: #0d6efd;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-number {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 3px;
    font-size: 10px;
    padding: 1px 3px;
    font-weight: bold;
}

/* Photo Navigation Buttons */
.photo-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.photo-navigation button {
    pointer-events: all;
    transition: all 0.3s ease;
}

.photo-navigation button:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .photo-item {
        width: 70px;
        height: 70px;
    }
    
    .photo-gallery {
        gap: 6px;
    }
}

/* Touch-friendly styles */
@media (hover: none) and (pointer: coarse) {
    .photo-gallery {
        padding: 15px 0;
    }
    
    .photo-item {
        min-width: 70px;
        min-height: 70px;
    }
    
    .photo-navigation button {
        padding: 8px;
        opacity: 0.8;
    }
}
.modal-fullscreen .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
}

/* Optimasi tampilan untuk konten fullscreen */
#modalContent .container-fluid {
    padding: 1.5rem;
}

#modalContent .card {
    margin-bottom: 1.5rem;
}

#modalContent .table {
    font-size: 0.9rem;
}

#modalContent .stats-card {
    margin-bottom: 1rem;
}
/* Swipe hint untuk mobile */
.swipe-hint {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 10px;
    margin: 0 20px;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Modal navigation arrows */
.modal-navigation {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.modal-navigation:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-navigation.prev {
    left: 10px;
}

.modal-navigation.next {
    right: 10px;
}

.modal-navigation.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-progress {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 1000;
}

/* Optimasi untuk touch */
.modal-scrollable-container {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

/* Untuk tablet dan mobile */
@media (max-width: 768px) {
    .modal-navigation {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .modal-navigation.prev {
        left: 5px;
    }
    
    .modal-navigation.next {
        right: 5px;
    }
    
    .swipe-hint {
        font-size: 11px;
        padding: 6px;
        margin: 0 10px;
    }
}

/* Responsive adjustments untuk fullscreen */
@media (max-width: 768px) {
    .modal-fullscreen .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-fullscreen .modal-body {
        padding: 1rem;
    }
    
    #modalContent .container-fluid {
        padding: 1rem;
    }
    
    #modalContent .table-responsive {
        font-size: 0.8rem;
    }
}
/* Atau untuk floating button */
#floatingCameraBtn {
    animation: pulse 2s infinite;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: 2px solid white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

@media (max-width: 768px) {
    #floatingCameraBtn {
        top: auto;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}
/* ================================ */
/* LOSETIME CATEGORY TABLE - BROWN THEME */
/* ================================ */
.category-table-brown {
    width: 100%;
    margin-bottom: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 12px !important;
    color: #8B4513 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.category-table-brown th {
    background: linear-gradient(135deg, #8B4513, #A0522D) !important;
    color: #FFF8DC !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border: none !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.category-table-brown th:first-child {
    border-radius: 6px 0 0 0 !important;
}

.category-table-brown th:last-child {
    border-radius: 0 6px 0 0 !important;
}

.category-table-brown td {
    padding: 10px 12px !important;
    border-bottom: 1px solid #DEB887 !important;
    color: #8B4513 !important;
    text-align: center !important;
    vertical-align: middle !important;
    background-color: #FFF8DC !important;
    transition: background-color 0.2s ease !important;
}
/* CSS untuk video */
.ipqc-media {
    transition: all 0.3s ease;
}

.ipqc-media:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* Video thumbnail styling */
.video-thumbnail {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
}

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.video-thumbnail:hover::before {
    background: rgba(0,0,0,0.5);
}

.video-thumbnail .fa-play {
    transition: transform 0.3s ease;
}

.video-thumbnail:hover .fa-play {
    transform: scale(1.2);
}

/* Video player controls */
video::-webkit-media-controls-panel {
    background: linear-gradient(0deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
}

/* Responsive video */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.category-table-brown tbody tr {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.category-table-brown tbody tr:hover {
    background-color: rgba(139, 69, 19, 0.1) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.1);
}

.category-table-brown tbody tr:last-child td {
    border-bottom: none !important;
}

/* Alternating row colors */
.category-table-brown tbody tr:nth-child(even) {
    background-color: #FAF0E6 !important;
}

.category-table-brown tbody tr:nth-child(even):hover {
    background-color: rgba(139, 69, 19, 0.15) !important;
}

/* Column-specific styles */
.category-table-brown td:first-child {
    font-weight: 600 !important;
    color: #A52A2A !important;
    text-align: left !important;
}

.category-table-brown td:nth-child(2) { /* Total Minutes */
    font-weight: 700 !important;
    color: #B22222 !important;
    font-size: 13px !important;
}

.category-table-brown td:nth-child(3), /* Events */
.category-table-brown td:nth-child(4) { /* Avg Min/Event */
    font-weight: 500 !important;
    color: #8B4513 !important;
}

.category-table-brown td:nth-child(5) { /* Percentage */
    min-width: 120px;
}

.category-table-brown td:last-child { /* Description */
    text-align: left !important;
    color: #8B4513 !important;
    line-height: 1.4;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge inside table */
.category-table-brown .badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
    background-color: #D2691E !important;
    color: white !important;
}

/* Progress bar inside table */
.category-table-brown .progress {
    height: 6px !important;
    background-color: #F5DEB3 !important;
    border-radius: 3px !important;
    margin-right: 8px !important;
    min-width: 50px;
}

.category-table-brown .progress-bar {
    border-radius: 3px !important;
}
/* Tambahkan ke style CSS yang ada */
@media (max-width: 768px) {
    /* Modal responsive */
    .ipqc-modal-detail .modal-dialog {
        margin: 5px !important;
        max-width: calc(100vw - 10px) !important;
        width: calc(100vw - 10px) !important;
    }
    
    /* Touch-friendly scrolling */
    .modal-scrollable-container {
        -webkit-overflow-scrolling: touch !important;
        overflow-y: auto !important;
        touch-action: pan-y !important;
    }
    
    /* Touch-friendly tables */
    .table-responsive {
        touch-action: pan-x !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Touch-friendly images */
    .ipqc-thumbnail, .ipqc-main-photo {
        touch-action: manipulation !important;
    }
    
    /* Prevent text selection on touch */
    .modal-content {
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* Allow selection on inputs/textarea */
    .modal-content input,
    .modal-content textarea,
    .modal-content [contenteditable="true"] {
        user-select: text;
        -webkit-user-select: text;
    }
}
/* Color classes for progress bars - Brown Theme */
.category-table-brown .category-color-1 .progress-bar { background-color: #8B4513 !important; }
.category-table-brown .category-color-2 .progress-bar { background-color: #A0522D !important; }
.category-table-brown .category-color-3 .progress-bar { background-color: #D2691E !important; }
.category-table-brown .category-color-4 .progress-bar { background-color: #B22222 !important; }
.category-table-brown .category-color-5 .progress-bar { background-color: #8B0000 !important; }
.category-table-brown .category-color-6 .progress-bar { background-color: #DAA520 !important; }
.category-table-brown .category-color-7 .progress-bar { background-color: #B8860B !important; }
.category-table-brown .category-color-8 .progress-bar { background-color: #CD853F !important; }
.category-table-brown .category-color-9 .progress-bar { background-color: #A52A2A !important; }
.category-table-brown .category-color-10 .progress-bar { background-color: #8B7355 !important; }

/* Table container for scroll */
.table-responsive-brown {
    border-radius: 8px !important;
    border: 2px solid #8B4513 !important;
    background-color: #FFF8DC !important;
    max-height: 400px;
    overflow-y: auto;
}

/* Scrollbar styling for brown theme */
.table-responsive-brown::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive-brown::-webkit-scrollbar-track {
    background: #F5DEB3;
    border-radius: 4px;
}

.table-responsive-brown::-webkit-scrollbar-thumb {
    background: #D2691E;
    border-radius: 4px;
}

.table-responsive-brown::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}
/* CSS untuk penyesuaian tinggi */
.dashboard-section {
    position: relative;
}

.section-content {
    position: relative;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .modal-navigation {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .modal-navigation.prev {
        left: 5px;
    }
    
    .modal-navigation.next {
        right: 5px;
    }
    
    .modal-progress {
        top: 5px;
        right: 5px;
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .swipe-hint {
        font-size: 11px;
        padding: 4px;
        margin: 0 10px;
    }
}

/* Animation for navigation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-scrollable-container {
    animation: slideIn 0.3s ease-out;
}
/* Penyesuaian untuk tabel yang tinggi */
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* Penyesuaian untuk hourly table */
.hourly-table-compact th,
.hourly-table-compact td {
    padding: 3px 4px !important;
    font-size: 0.8rem !important;
}

.hourly-table-compact .line-header {
    font-size: 0.85rem !important;
}

/* Penyesuaian untuk modal */
.modal-body-scrollable {
    max-height: 80vh;
    overflow-y: auto;
}

/* Sticky header untuk tabel panjang */
.table-dark.sticky-top {
    z-index: 1020 !important;
}

/* Penyesuaian untuk chart canvas */
/* PERBAIKAN UNTUK CANVAS CHART */
.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    min-height: 200px !important;
    max-height: 250px !important;
}

.chart-wrapper {
    position: relative !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 250px !important;
    width: 100% !important;
}

/* Responsive height untuk card */
.card.h-100 {
    height: 350px !important;
    display: flex !important;
    flex-direction: column !important;
}

.chart-card .card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 15px !important;
}

.card-body .chart-wrapper {
    flex: 1 !important;
    min-height: 180px !important;
}
.serial-number {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Modal yang lebih lebar untuk detail */
.swal-wide {
    width: 1000px !important;
    max-width: 90vw !important;
}

/* Styling untuk tabel defect */
.defect-table tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.05);
}

/* Badge untuk status */
.status-badge-open {
    background-color: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.status-badge-resolved {
    background-color: #198754;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}



/* =====================================================
   FINAL OVERRIDE FIX - MOBILE, MODAL, CARD, TOPBAR
   Tempel paling bawah file CSS
===================================================== */

/* Anti geser kanan kiri */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Container aman */
.container,
.container-fluid {
    max-width: 100% !important;
}

/* Jangan semua card-body jadi flex aneh */
.card-body {
    display: block !important;
    flex: unset !important;
}

/* Khusus chart aja yang boleh flex */
.chart-card .card-body,
.card-body .chart-wrapper {
    display: flex !important;
    flex-direction: column !important;
}

/* Table aman scroll */
.table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Modal aman */
.modal {
    padding-right: 0 !important;
}

.modal-dialog {
    max-width: 95vw !important;
}

.modal-content {
    overflow: hidden !important;
}

.modal-body {
    overflow-y: auto !important;
}

/* =====================================================
   TOPBAR MOBILE FIX
===================================================== */

@media screen and (max-width: 768px) {

    nav.navbar {
        padding: 8px 10px !important;
        overflow: visible !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1050 !important;
    }

    nav.navbar .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    nav.navbar .container > .d-flex {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    nav.navbar .container > .d-flex > .d-flex:first-child {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 8px !important;
    }

    nav.navbar .container > .d-flex > .d-flex:last-child {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        align-items: stretch !important;
    }

    nav.navbar .compact-text,
    nav.navbar .d-none.d-md-inline {
        display: none !important;
    }

    nav.navbar .navbar-brand {
        color: white !important;
        font-size: 14px !important;
        max-width: calc(100vw - 55px) !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
    }

    nav.navbar .logo-box {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        border-radius: 9px !important;
    }

    nav.navbar .logo-box i {
        font-size: 13px !important;
    }

    nav.navbar .btn-login {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 38px !important;
        padding: 8px 4px !important;
        font-size: 10.5px !important;
        line-height: 1.15 !important;
        border-radius: 9px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    nav.navbar .btn-login i {
        font-size: 10px !important;
        margin-right: 3px !important;
    }
}

/* HP kecil: tombol jadi turun 1-1 biar aman */
@media screen and (max-width: 430px) {
    nav.navbar .container > .d-flex > .d-flex:last-child {
        grid-template-columns: 1fr !important;
    }

    nav.navbar .btn-login {
        font-size: 12px !important;
        padding: 9px 10px !important;
    }
}

/* =====================================================
   MOBILE GENERAL LAYOUT FIX
===================================================== */

@media screen and (max-width: 768px) {

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    [class*="col-"] {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .filter-section {
        padding: 12px !important;
        margin: 10px 0 !important;
    }

    .dashboard-section {
        padding: 10px !important;
        border-radius: 12px !important;
        min-height: auto !important;
    }

    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .section-title {
        font-size: 14px !important;
        line-height: 1.3 !important;
    }

    .compact-text-xs {
        font-size: 11px !important;
    }

    .card {
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }

    .card-body {
        padding: 12px !important;
    }

    .card-header {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .btn {
        min-height: 38px !important;
    }

    .table {
        font-size: 11px !important;
    }

    .table th,
    .table td {
        padding: 5px 6px !important;
        white-space: nowrap !important;
    }

    .hourly-table-compact {
        min-width: 720px !important;
        font-size: 11px !important;
    }

    .line-performance-table {
        min-width: 650px !important;
    }
}

/* =====================================================
   MODAL MOBILE FULLSCREEN FIX
===================================================== */

@media screen and (max-width: 768px) {

    .modal-dialog,
    .modal-xl,
    .modal-lg {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        margin: 0 !important;
    }

    .modal-content {
        width: 100% !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .modal-header {
        flex-shrink: 0 !important;
        padding: 10px 12px !important;
    }

    .modal-title {
        font-size: 15px !important;
        line-height: 1.3 !important;
    }

    .modal-body {
        flex: 1 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: auto !important;
        padding: 10px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .modal-footer {
        flex-shrink: 0 !important;
        padding: 10px 12px !important;
        gap: 6px !important;
    }

    .modal-footer .btn {
        flex: 1 1 auto !important;
        font-size: 12px !important;
        padding: 8px !important;
    }
}

/* =====================================================
   SWEETALERT MOBILE FIX
===================================================== */

@media screen and (max-width: 768px) {
    .swal2-popup {
        width: 95vw !important;
        max-width: 95vw !important;
        padding: 0 !important;
    }

    .swal2-html-container {
        margin: 0 !important;
        padding: 10px !important;
        overflow-x: auto !important;
    }
}

/* =====================================================
   IMAGE / PHOTO / VIDEO MOBILE FIX
===================================================== */

@media screen and (max-width: 768px) {

    img,
    video,
    canvas {
        max-width: 100% !important;
    }

    .photo-gallery,
    .ipqc-thumbnails {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .photo-item,
    .ipqc-thumbnail {
        flex-shrink: 0 !important;
        width: 68px !important;
        height: 68px !important;
    }

    .ipqc-main-photo {
        max-height: 220px !important;
        object-fit: contain !important;
    }

    .photo-zoom-container {
        max-height: 70vh !important;
        overflow: auto !important;
    }
}
@media(max-width:768px){

    nav.navbar .container > .d-flex{
        flex-direction:column!important;
        align-items:stretch!important;
        gap:8px!important;
    }

    nav.navbar .container > .d-flex > div:last-child{
        display:grid!important;
        grid-template-columns:repeat(3,1fr)!important;
        width:100%!important;
        gap:6px!important;
    }

    nav.navbar .btn-login{
        width:100%!important;
        justify-content:center!important;
        font-size:11px!important;
        padding:8px 6px!important;
    }

    nav.navbar .compact-text,
    nav.navbar .d-none.d-md-inline{
        display:none!important;
    }

    .modal-dialog{
        margin:0!important;
        width:100%!important;
        max-width:100%!important;
    }

    .modal-content{
        min-height:100vh!important;
        border-radius:0!important;
    }
}

@media(max-width:430px){

    nav.navbar .container > .d-flex > div:last-child{
        grid-template-columns:1fr!important;
    }
}
/* =========================
   OQC COLOR THEME
   ========================= */
.oqc-section {
    --oqc-primary: #4f46e5;
    --oqc-dark: #312e81;
    --oqc-soft: #eef2ff;
    --oqc-border: #c7d2fe;
    --oqc-danger: #dc2626;
}

.oqc-section .section-title i {
    color: var(--oqc-primary) !important;
}

.oqc-badge {
    background: var(--oqc-primary) !important;
    color: #fff !important;
}

.oqc-header {
    background: linear-gradient(135deg, var(--oqc-dark), var(--oqc-primary)) !important;
    color: #fff !important;
}

.oqc-card {
    border: 1px solid var(--oqc-border) !important;
}

.oqc-soft-bg {
    background: var(--oqc-soft) !important;
}

.oqc-stat-icon {
    background: linear-gradient(135deg, var(--oqc-dark), var(--oqc-primary)) !important;
}

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

.oqc-btn {
    background: var(--oqc-primary) !important;
    border-color: var(--oqc-primary) !important;
    color: #fff !important;
}

.oqc-btn:hover {
    background: var(--oqc-dark) !important;
    border-color: var(--oqc-dark) !important;
    color: #fff !important;
}
/* ==================================================
   SCREENSHOT PRODUCTION REPORT - FINAL FIX
   ================================================== */

.report-capture-area {
    background: #ffffff !important;
    padding: 12px;
    border-radius: 12px;
}

.report-capture-area.capture-mode {
    background: #ffffff !important;
    padding: 18px !important;
    opacity: 1 !important;
    filter: none !important;
}

.report-capture-area.capture-mode,
.report-capture-area.capture-mode *,
.report-capture-area.capture-mode .dashboard-section,
.report-capture-area.capture-mode .card,
.report-capture-area.capture-mode .card-body,
.report-capture-area.capture-mode .section-content {
    opacity: 1 !important;
    filter: none !important;
}

.report-capture-area.capture-mode .table-responsive,
.report-capture-area.capture-mode .table-responsive-brown {
    overflow: hidden !important;
}

.report-capture-area.capture-mode .sticky-top,
.report-capture-area.capture-mode .sticky-left,
.report-capture-area.capture-mode [style*="position: sticky"] {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
}

/* Tombol tetap muncul normal */
.no-capture {
    visibility: visible !important;
}

/* Saat screenshot baru disembunyikan */
.capture-mode .no-capture {
    display: none !important;
}

#captureProductionReportBtn {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

#captureProductionReportBtn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
    transform: translateY(-1px);
}

#captureProductionReportBtn:disabled {
    opacity: 0.75;
    cursor: wait;
}

body.screenshot-loading {
    cursor: wait !important;
}