/* public/assets/css/pdf/image-to-excel.css */

.pdf-i2e-wrapper { padding: 32px 16px; position: relative; }
.pdf-i2e-header { text-align: center; margin-bottom: 32px; }
.pdf-i2e-title { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
.pdf-i2e-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; line-height: 1.6; }

.pdf-i2e-workspace { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 360px 1fr; gap: 32px; align-items: start; }

/* ==========================================
   左侧：设置区
   ========================================== */
.pdf-i2e-controls { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; gap: 24px; }
.control-section h4 { margin: 0 0 16px 0; font-size: 1rem; color: var(--text-main); border-bottom: 2px solid rgba(20, 184, 166, 0.2); padding-bottom: 8px; display: inline-block; }

.file-drop-area { border: 2px dashed #14b8a6; border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; transition: 0.3s; background: rgba(20, 184, 166, 0.03); position: relative; overflow: hidden; }
.file-drop-area:hover, .file-drop-area.drag-over { background: rgba(20, 184, 166, 0.08); border-color: #0d9488; }
.drop-text { margin-top: 12px; font-weight: 600; color: var(--text-main); font-size: 0.95rem; word-break: break-all; }
.file-input-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.input-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.input-group input, .input-group select { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-body); color: var(--text-main); font-size: 0.95rem; outline: none; transition: 0.2s; box-sizing: border-box; }
.input-group input:focus, .input-group select:focus { border-color: #14b8a6; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.helper-text { font-size: 0.75rem; color: #64748b; line-height: 1.4; }

.tips-box { background: rgba(20, 184, 166, 0.05); border: 1px solid rgba(20, 184, 166, 0.15); border-radius: 8px; padding: 12px; font-size: 0.85rem; color: #0f766e; line-height: 1.5; }
[data-theme="dark"] .tips-box { color: #2dd4bf; }

.pdf-btn-primary { background: #14b8a6; color: #fff; border: none; padding: 14px 20px; font-size: 1.05rem; font-weight: 800; border-radius: 12px; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 10px rgba(20, 184, 166, 0.3); width: 100%; }
.pdf-btn-primary:hover:not(:disabled) { background: #0d9488; transform: translateY(-2px); }
.pdf-btn-primary:disabled { background: #94a3b8; cursor: not-allowed; box-shadow: none; opacity: 0.7; }

/* ==========================================
   右侧：预览与状态区
   ========================================== */
.pdf-i2e-preview { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.status-box { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.status-text { font-size: 1.05rem; font-weight: 600; color: var(--text-main); margin-top: 12px;}
.loader-spinner { width: 32px; height: 32px; border: 4px solid var(--border-color); border-top-color: #14b8a6; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar-wrap { width: 100%; max-width: 300px; height: 8px; background: var(--bg-body); border-radius: 4px; overflow: hidden; border: 1px solid var(--border-color); box-sizing: border-box; }
.progress-bar-fill { width: 0%; height: 100%; background: #14b8a6; transition: width 0.2s linear; }

.image-preview-box { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); text-align: center; max-height: 200px; overflow-y: hidden; }
#imgPreview { max-width: 100%; max-height: 180px; border-radius: 4px; border: 1px solid var(--border-color); }

/* 数据表格预览 */
.preview-area { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; gap: 16px; }
.preview-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.preview-header h4 { margin: 0; font-size: 1rem; color: var(--text-main); }
.export-actions { display: flex; gap: 10px; }

.pdf-btn-success { background: #16a34a; color: #fff; border: none; padding: 8px 16px; font-weight: 700; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.pdf-btn-success:hover { background: #15803d; }
.pdf-btn-secondary { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border-color); padding: 8px 16px; font-weight: 700; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.pdf-btn-secondary:hover { border-color: #14b8a6; color: #14b8a6; }

.table-container { width: 100%; max-height: 400px; overflow: auto; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; }
#outTable { width: 100%; border-collapse: collapse; font-family: monospace; font-size: 0.85rem; white-space: nowrap; }
#outTable td { border: 1px solid #e2e8f0; padding: 6px 10px; color: #334155; }
#outTable tr:nth-child(even) { background-color: #f8fafc; }
#outTable tr:hover { background-color: #f1f5f9; }
[data-theme="dark"] .table-container { border-color: #334155; background: #0f172a; }
[data-theme="dark"] #outTable td { border-color: #334155; color: #cbd5e1; }
[data-theme="dark"] #outTable tr:nth-child(even) { background-color: #1e293b; }
[data-theme="dark"] #outTable tr:hover { background-color: #334155; }

.pdf-info-card { background: var(--bg-surface); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); box-sizing: border-box; max-width: 1200px; margin: 0 auto; }

/* 📱 响应式 */
@media (max-width: 900px) {
    .pdf-i2e-workspace { grid-template-columns: 1fr; }
}