.upload-area {
    border: 2px dashed #d0d5dd;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafbfc;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #2563eb;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.upload-text {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.4rem;
}

.upload-link {
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.82rem;
    color: #999;
}

.file-info {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

.file-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    background: #f8f9fb;
    border-bottom: 1px solid #e8eaf0;
}

.file-name {
    font-size: 0.88rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-change {
    font-size: 0.82rem;
    color: #2563eb;
    background: none;
    border: 1px solid #2563eb;
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-change:hover {
    background: #f0f4ff;
}

.file-meta {
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    color: #888;
}

.task-options {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    background: #fff;
}

.option-group {
    margin-bottom: 0.8rem;
}

.option-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.format-hint {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.7;
}

.ocr-result {
    margin-top: 1.2rem;
    padding: 1.25rem;
    border: 1px solid #e8eaf0;
    border-radius: 12px;
    background: #fff;
}

.result-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.result-sub {
    margin-top: 0.3rem;
    color: #6b7280;
    font-size: 0.86rem;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.result-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.metric-card {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid #dbeafe;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
}

.metric-value {
    font-size: 1.45rem;
    color: #2563eb;
}

.text-panel,
.page-results {
    display: grid;
    gap: 0.55rem;
}

.page-results {
    margin-top: 1rem;
}

.panel-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.ocr-textarea {
    width: 100%;
    min-height: 280px;
    padding: 0.95rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font: inherit;
    line-height: 1.7;
    color: #111827;
    resize: vertical;
    background: #fff;
}

.page-results-list {
    display: grid;
    gap: 0.9rem;
}

.page-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    padding: 1rem;
}

.page-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.55rem;
}

.page-card-title {
    font-weight: 700;
    color: #111827;
}

.page-card-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.page-card-text {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.75;
    color: #374151;
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .file-info-header,
    .result-head,
    .page-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .result-metrics {
        grid-template-columns: 1fr;
    }
}
