/* SECAM Invoice Extractor Styles */
.secam-ie-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 15px; color: #1a1a1a; max-width: 980px; margin: 0 auto; }
.secam-ie-wrap *, .secam-ie-wrap *::before, .secam-ie-wrap *::after { box-sizing: border-box; }

.sie-drop-zone { border: 1.5px dashed #bbb; border-radius: 10px; padding: 2.5rem 1.5rem; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: #fff; margin-bottom: 1rem; }
.sie-drop-zone.drag-over { border-color: #185FA5; background: #f0f6ff; }
.sie-drop-zone svg { display: block; margin: 0 auto 10px; color: #999; }
.sie-drop-zone p { color: #666; font-size: 14px; line-height: 1.6; margin: 0; }
.sie-drop-zone span.link { color: #185FA5; cursor: pointer; text-decoration: underline; }

.sie-file-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; }
.sie-file-chip { background: #fff; border: 1px solid #e0e0dc; border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.sie-file-chip-top { display: flex; align-items: center; gap: 10px; }
.sie-fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sie-status { font-size: 12px; color: #888; min-width: 90px; text-align: right; }
.sie-status.done { color: #0F6E56; font-weight: 500; }
.sie-status.error { color: #c0392b; }
.sie-status.loading { color: #185FA5; }

.sie-page-range { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0ec; flex-wrap: wrap; }
.sie-page-range label { font-size: 12px; color: #666; white-space: nowrap; }
.sie-page-range input[type=number] { width: 60px; font-size: 13px; border: 1px solid #ddd; border-radius: 6px; padding: 4px 8px; outline: none; text-align: center; }
.sie-page-range input[type=number]:focus { border-color: #185FA5; }
.sie-page-range span { font-size: 12px; color: #aaa; }
.sie-page-info { font-size: 12px; color: #185FA5; margin-left: auto; }

.sie-progress-bar { height: 4px; border-radius: 2px; background: #e0e0dc; margin-bottom: 1rem; overflow: hidden; display: none; }
.sie-progress-fill { height: 100%; background: #185FA5; transition: width 0.3s; width: 0%; }

.sie-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.sie-btn { font-family: inherit; font-size: 14px; padding: 9px 20px; border-radius: 8px; cursor: pointer; border: 1px solid #ccc; background: #fff; color: #1a1a1a; transition: background 0.15s; }
.sie-btn:hover { background: #f0f0ec; }
.sie-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sie-btn.primary { background: #185FA5; color: #fff; border-color: #185FA5; }
.sie-btn.primary:hover { background: #0C447C; border-color: #0C447C; }
.sie-btn.primary:disabled { background: #185FA5; opacity: 0.4; }

.sie-error { font-size: 13px; color: #c0392b; margin-bottom: 1rem; padding: 10px 14px; background: #fdf0ef; border-radius: 8px; border-left: 3px solid #c0392b; display: none; }

.sie-results { display: none; }
.sie-summary-bar { display: flex; gap: 12px; margin-bottom: 1.25rem; flex-wrap: wrap; }
.sie-stat-card { background: #fff; border: 1px solid #e0e0dc; border-radius: 8px; padding: 10px 18px; min-width: 120px; }
.sie-stat-card .label { font-size: 12px; color: #888; margin-bottom: 3px; }
.sie-stat-card .value { font-size: 20px; font-weight: 600; color: #1a1a1a; }

.sie-results h2 { font-size: 16px; font-weight: 600; margin-bottom: 10px; color: #1a1a1a; }
.sie-table-wrap { overflow-x: auto; border: 1px solid #e0e0dc; border-radius: 10px; background: #fff; margin-bottom: 12px; }
.sie-table-wrap table { border-collapse: collapse; font-size: 12px; white-space: nowrap; width: 100%; }
.sie-table-wrap th { background: #f5f5f3; font-weight: 600; padding: 8px 12px; text-align: left; border-bottom: 1px solid #e0e0dc; color: #555; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.sie-table-wrap td { padding: 7px 12px; border-bottom: 1px solid #f0f0ec; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.sie-table-wrap tr:last-child td { border-bottom: none; }
.sie-table-wrap tr:hover td { background: #fafaf8; }
.sie-blank { color: #bbb; font-style: italic; }

.sie-note { font-size: 13px; color: #666; padding: 10px 14px; background: #f5f5f3; border-radius: 8px; border-left: 3px solid #ccc; margin-bottom: 14px; line-height: 1.5; }
.sie-export-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sie-rowcount { font-size: 12px; color: #888; }

/* Per-file result cards */
.sie-file-result { background: #fff; border: 1px solid #e0e0dc; border-radius: 10px; margin-bottom: 1.25rem; overflow: hidden; }
.sie-file-result-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #f5f5f3; border-bottom: 1px solid #e0e0dc; flex-wrap: wrap; gap: 10px; }
.sie-file-result .sie-table-wrap { border: none; border-radius: 0; }

/* Mode toggle */
.sie-mode-toggle { display: flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; flex-wrap: wrap; }
.sie-mode-label { font-size: 13px; color: #666; white-space: nowrap; }
.sie-toggle-group { display: flex; gap: 0; border: 1px solid #e0e0dc; border-radius: 8px; overflow: hidden; }
.sie-toggle-btn { font-family: inherit; font-size: 13px; padding: 8px 16px; cursor: pointer; border: none; background: #fff; color: #666; transition: background 0.15s, color 0.15s; }
.sie-toggle-btn:first-child { border-right: 1px solid #e0e0dc; }
.sie-toggle-btn.active { background: #185FA5; color: #fff; }
.sie-toggle-btn:hover:not(.active) { background: #f0f0ec; }
