.documentupload {
    padding: 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #0088CC;
    background-color: #f8f9fa;
}

.upload-content {
    color: #666;
}

.upload-text {
    margin-top: 15px;
    font-size: 0.9em;
}

.upload-formats {
    color: #999;
    font-size: 0.85em;
}

.hidden-upload {
    display: none;
}

.file-preview {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-file {
    margin-left: auto;
    color: #999;
    border: none;
    background: none;
    cursor: pointer;
}

.remove-file:hover {
    color: #dc3545;
}

.processing-status {
    margin: 15px 0;
}

.progress-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #0088CC;
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
    text-align: center;
}

.result-summary {
    margin: 15px 0;
    padding: 15px;
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    border-radius: 4px;
    color: #3c763d;
}

.scaninfo {
    margin-top: 15px;
    padding-left: 20px;
}

.scaninfo li {
    margin-bottom: 8px;
    position: relative;
}

.scaninfo li:before {
    content: "•";
    position: absolute;
    left: -15px;
    color: #0088CC;
}

.processing-button {
    position: relative;
    pointer-events: none;
}

.processing-button .fas.fa-spinner {
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}


.viewer-dialog {
    position: fixed;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    background: #fff;
    z-index: 1050;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    display: none;
}

.viewer-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.viewer-header {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-content {
    flex: 1;
    position: relative;
}

.viewer-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.viewer-footer {
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-selector input {
    width: 150px;
}

.file-preview {
    margin: 1em 0;
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.file-info i {
    font-size: 1.2em;
}

.remove-file {
    margin-left: auto;
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
}

.remove-file:hover {
    color: #bd2130;
}

.stat-box {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #444;
}
.stat-label {
    color: #666;
    margin-top: 5px;
}
.progress-bar {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 3px;
    margin-top: 10px;
}
.progress-fill {
    background-color: #007bff;
    height: 20px;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}