.image-upload-box {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    width: 300px; /* ukuran preview kecil */
    height: 168px; /* 300 / 1.784 = 168 (rasio 2000x1121) */
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-box input[type="file"] {
    display: none;
}

.image-upload-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-upload-placeholder {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

img.img-client {
    filter: grayscale(100%);
    margin: auto;
    width: auto;
    height: 60px;
    padding: 0 0.25rem;
    object-fit: contain !important;
    transition: all 0.2s;
}

img.img-client:hover {
    filter: grayscale(0%) !important;
}

/* Ubah background dan border Dropzone */
#dropzone {
    border: 2px dashed #6c757d;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 150px;
    background-color: #f9f9f9;
    position: relative;
}

#dropzone::before {
    content: "Klik atau tarik gambar ke sini untuk upload";
    color: #6c757d;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

#dropzone.dz-started::before {
    display: none;
}

#dropzone:hover {
    background: #e9ecef;
    border-color: #495057;
}

/* Preview gambar */
.dropzone .dz-image {
    border-radius: 8px;
    overflow: hidden;
    width: 100%; /* Pastikan gambar mengisi lebar container */
    height: 100%; /* Pastikan gambar mengisi tinggi container */
}

/* Mengatur gambar di dalam kotak agar tetap proporsional */
.dropzone .dz-image img {
    width: 100%; /* Gambar mengisi lebar kotak */
    height: 100%; /* Gambar mengisi tinggi kotak */
    object-fit: contain; /* Menjaga proporsi gambar agar tidak terdistorsi */
}

/* Atur ukuran kotak preview jika Anda ingin ukuran thumbnail yang lebih konsisten */
.dropzone .dz-preview {
    width: 300; /* Tentukan ukuran lebar thumbnail sesuai kebutuhan */
    height: 300; /* Tentukan ukuran tinggi thumbnail sesuai kebutuhan */
    overflow: hidden; /* Pastikan gambar tidak meluap keluar */
    border-radius: 8px;
}

/* Animasi saat gambar di-drop/upload */
.dropzone .dz-preview.dz-image-preview {
    opacity: 1;
    transform: scale(1);
}

.dropzone .dz-preview.dz-processing {
    opacity: 1;
    transform: scale(1);
}

.dropzone .dz-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dropzone .dz-remove {
    margin-top: 10px;
    position: static;
    display: inline-block;
    background: #dc3545;
    color: #fff;
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    z-index: 1;
    pointer-events: auto;
    transition: background 0.2s ease-in-out;
}

.dropzone .dz-remove:hover {
    background: #c82333;
}

/* Progress bar */
.dropzone .dz-upload {
    background: #007bff;
}

/* Label nama file */
.dropzone .dz-details .dz-filename span {
    font-weight: 500;
    font-size: 14px;
}
