:root {
    --primary-color: #4e73df;
    --secondary-color: #f8f9fc;
    --accent-color: #2e59d9;
    --text-color: #5a5c69;
    --light-gray: #e3e6f0;
    --dark-gray: #d1d3e2;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: #f8f9fc;
    line-height: 1.6;
}

.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.35rem;
    font-weight: 600;
}

.upload-area {
    border: 2px dashed var(--dark-gray);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(78, 115, 223, 0.05);
}

.upload-area i {
    color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #17a673;
}

#imagePreviewContainer {
    min-height: 150px;
}

.image-preview-item {
    position: relative;
    margin-bottom: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 0.25rem;
    overflow: hidden;
    transition: all 0.2s;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.image-preview-info {
    padding: 0.5rem;
    background-color: white;
    font-size: 0.8rem;
}

.image-preview-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.image-preview-actions button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-preview-item:hover .image-preview-actions button {
    opacity: 1;
}

.image-preview-actions button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.sortable-container {
    min-height: 100px;
}

.sortable-item {
    cursor: move;
}

.sortable-ghost {
    opacity: 0.5;
    background: #c8ebfb;
}

.pdf-preview {
    min-height: 300px;
    background-color: white;
    border: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pdf-preview-page {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: auto;
}

.pdf-preview-image {
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pdf-preview-watermark {
    position: absolute;
    color: rgba(0, 0, 0, 0.2);
    font-weight: bold;
    pointer-events: none;
}

.empty-message {
    color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .card-header h5 {
        font-size: 1rem;
    }
    
    .image-preview-item img {
        height: 100px;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}