/* OCR-TJ custom styles */

.upload-zone {
    border: 2px dashed var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--pico-primary);
    background: var(--pico-primary-focus);
}

.upload-zone input[type="file"] {
    display: none;
}

.doc-preview {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-muted-border-color);
}

.doc-preview-large {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-draft { background: #e3e8ef; color: #4a5568; }
.status-ocr_processing { background: #fef3c7; color: #92400e; }
.status-ocr_done { background: #d1fae5; color: #065f46; }
.status-ocr_partial { background: #fef3c7; color: #92400e; }
.status-ocr_failed { background: #fee2e2; color: #991b1b; }
.status-filled { background: #dbeafe; color: #1e40af; }
.status-generated { background: #c7d2fe; color: #3730a3; }
.status-error { background: #fee2e2; color: #991b1b; }

.ocr-empty {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
}

.ocr-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0;
}

.ocr-error-banner {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0;
}

.ocr-stats {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    margin-bottom: 1rem;
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-indicator .step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    background: var(--pico-muted-border-color);
    color: var(--pico-muted-color);
}

.step-indicator .step.active {
    background: var(--pico-primary);
    color: white;
}

.step-indicator .step.done {
    background: var(--pico-ins-color);
    color: white;
}

.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--pico-muted-border-color);
    border-top-color: var(--pico-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.field-group {
    background: var(--pico-card-background-color);
    padding: 1.5rem;
    border-radius: var(--pico-border-radius);
    margin-bottom: 1rem;
}

.field-group h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.lang-switcher {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-switcher a {
    opacity: 0.6;
}

.lang-switcher a:hover {
    opacity: 1;
}
