.detail-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    font-family: 'Poppins', sans-serif;
}

.section-title {
    color: #237227;
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.detail-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.left-panel {
    flex: 2;
    min-width: 300px;
}

.right-panel {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 30px;
}

.data-item {
    display: flex;
    flex-direction: column;
}

.data-item .label {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.data-item .value {
    font-size: 14px;
    color: #888888;
    font-weight: 400;
    word-break: break-word;
}

.product-image-box {
    width: 100%;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.product-image-box img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.action-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-action-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-color: transparent;
    transition: color 0.4s ease-in-out;
}

.btn-action-custom i {
    margin-right: 10px;
    font-size: 16px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-action-custom:hover i {
    transform: translateX(5px) scale(1.2);
}

.btn-navy-slide {
    color: white;
}

.btn-navy-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #237227;
    z-index: -2;
}

.btn-navy-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #ffffff;
    z-index: -1;
    transition: width 0.4s ease-in-out;
}

.btn-navy-slide:hover {
    color: #237227;
    border: 1px solid #237227;
}

.btn-navy-slide:hover::after {
    width: 100%;
}

.btn-gray-slide {
    color: white;
}

.btn-gray-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #237227;
    z-index: -2;
}

.btn-gray-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #ffffff;
    z-index: -1;
    transition: width 0.4s ease-in-out;
}

.btn-gray-slide:hover {
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-gray-slide:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .detail-layout {
        flex-direction: column-reverse;
    }

    .data-grid {
        grid-template-columns: 1fr;
    }
}

.img-zoom-container {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 26, 74, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-overlay i {
    color: white;
    font-size: 1.2rem;
}

.img-zoom-container:hover .zoom-overlay {
    opacity: 1;
}

.img-zoom-container:hover .item-thumb {
    transform: scale(1.1);
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content-img {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    animation: zoomIn 0.3s ease;
}

.modal-content-img img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 2px solid white;
}

.image-caption {
    margin-top: 10px;
    color: white;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.close-btn:hover {
    color: #bbb;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media only screen and (max-width: 700px) {
    .modal-content-img {
        max-width: 95%;
    }
}

.status-pill {
    color: white;
    background-color: green;
}

.btn-pdf {
    background-color: #237227;
    color: var(--text-white);
    box-shadow: 0 4px 6px rgba(13, 26, 74, 0.2);
    border: 2px solid #ffffff;
}

.btn-pdf:hover {
    background-color: #237227;
    color: var(--text-white);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 26, 74, 0.3);
}

/* --- CSS MODAL BIRU GRADIENT (Untuk Unit #modalQR & Master #modalQRMaster) --- */
#modalQR .modal-content,
#modalQRMaster .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(13, 26, 74, 0.3);
    background: linear-gradient(135deg, #237227 0%, #1a2d6e 100%);
}

#modalQR .modal-header,
#modalQRMaster .modal-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

#modalQR .modal-title,
#modalQRMaster .modal-title {
    color: #ffffff !important;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

#modalQR .close:hover,
#modalQRMaster .close:hover {
    transform: rotate(90deg);
    transition: 0.3s;
}

#modalQR .modal-body,
#modalQRMaster .modal-body {
    padding: 2.5rem;
    background: linear-gradient(135deg, #237227 0%, #1a2d6e 100%);
}

#modalQR .modal-body h4,
#modalQRMaster .modal-body h4 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#modalQR .qr-container,
#modalQRMaster .qr-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1rem;
    display: inline-block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

#modalQR .qr-container img,
#modalQRMaster .qr-container img {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    display: block;
}

#modalQR .error-message,
#modalQRMaster .error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 2px solid rgba(244, 67, 54, 0.3);
    border-radius: 15px;
    padding: 2rem;
    color: #ff5252;
}

#modalQR .text-muted,
#modalQRMaster .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

#modalQR .modal-footer,
#modalQRMaster .modal-footer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1.5rem;
}

#modalQR .btn-secondary,
#modalQRMaster .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

#modalQR .btn-primary,
#modalQRMaster .btn-primary {
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
}

/* --- KHUSUS MEMPERBESAR QR MASTER --- */
#modalQRMaster .qr-container img {
    width: 400px !important;
    /* Paksa jadi 400px */
    height: 400px !important;
    /* Paksa jadi 400px */
    max-width: 100%;
    /* Agar responsif di HP kecil */
}

/* Agar container membungkus gambar besar dengan rapi */
#modalQRMaster .qr-container {
    padding: 1.5rem;
    /* Tambah padding sedikit */
}

/* Perlebar Modal Master agar gambar muat */
@media (min-width: 576px) {
    #modalQRMaster .modal-dialog {
        max-width: 600px;
        /* Modal lebih lebar */
    }
}

/* --- CUSTOM PAGINATION DATATABLES --- */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0 !important;
    margin: 0 2px;
    border: none !important;
    background: none !important;
}

/* Warna tombol Pagination Aktif */
.page-item.active .page-link {
    background-color: #101a32 !important;
    border-color: #101a32 !important;
    color: #fff !important;
    border-radius: 4px;
}

/* Warna tombol Pagination Biasa */
.page-link {
    color: #101a32 !important;
    border-radius: 4px;
    margin: 0 2px;
}

.page-link:hover {
    background-color: #f0f0f0 !important;
    color: #1a2b50 !important;
}



/* Styling Input Search & Length */
.dataTables_filter input,
.dataTables_length select {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 4px 8px;
    outline: none;
    transition: 0.3s;
}

.dataTables_filter input:focus,
.dataTables_length select:focus {
    border-color: #101a32;
    box-shadow: 0 0 0 2px rgba(16, 26, 50, 0.1);
}

/* Styling Dropdown Jumlah Data (Pojok Kiri Atas) */
.dataTables_length {
    margin-bottom: 15px;
    font-weight: 600;
    color: #101a32;
}

.dataTables_length select {
    border: 1px solid #101a32;
    /* Border Biru Tua */
    border-radius: 6px;
    padding: 4px 10px;
    margin: 0 5px;
    background-color: #fff;
    cursor: pointer;
    min-width: 60px;
}

.dataTables_length select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 26, 50, 0.2);
}

.card-modern {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: none;
}

.card-body-modern {
    padding: 40px;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    color: #101a32;
    margin-bottom: 35px;
}

.left-panel {
    padding-right: 40px;
    border-right: 1px solid #e0e0e0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 30px;
    column-gap: 20px;
}

.info-group label {
    font-size: 15px;
    font-weight: 700;
    color: #101a32;
    margin-bottom: 6px;
}

.info-group .value {
    font-size: 15px;
    color: #8898aa;
    font-weight: 400;
}

.right-panel {
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-image-container {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 4/3;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding: 10px;
    border: 1px solid #f0f0f0;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.action-buttons {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-dark-blue {
    background-color: #101a32;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.btn-dark-blue:hover {
    background-color: #237227;
    color: #fff;
    text-decoration: none;
}

.btn-icon-simple {
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #555;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-icon-simple:hover {
    background: #101a32;
    color: #fff;
    border-color: #101a32;
}

.badge-code {
    font-family: monospace;
    color: #101a32;
    font-weight: 600;
    background: #f6f9fc;
    padding: 4px 8px;
    border-radius: 4px;
}

.bg-success-soft {
    background: #e0f2f1;
    color: #00695c !important;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.bg-warning-soft {
    background: #fff8e1;
    color: #ff8f00 !important;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

@media (max-width: 992px) {
    .left-panel {
        padding-right: 0;
        border-right: none;
        margin-bottom: 40px;
        border-bottom: 1px solid #eee;
        padding-bottom: 40px;
    }

    .right-panel {
        padding-left: 0;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}
