.table-excel-source { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); gap: 16px; }
.table-excel-source textarea { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.table-excel-file { display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px dashed #a9c3e9; border-radius: 12px; background: #f4f8ff; }
.table-excel-file input { padding: 8px 0; border: 0; background: transparent; }
.table-excel-settings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.table-excel-settings .field { min-width: 0; }
.table-excel-help { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.table-excel-contract { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle, #fafbfd); }
.table-excel-contract h3 { margin: 0; }
.table-excel-contract-file { position: relative; overflow: hidden; cursor: pointer; }
.table-excel-contract-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.table-excel-template-rows { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.table-excel-template-rows input { width: 5rem; min-width: 0; padding: 7px 8px; }
.table-excel-contract-warning { margin: 10px 0 0; color: #805b0d; }
.table-excel-preview { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.table-excel-preview[hidden], .table-excel-result[hidden] { display: none; }
.table-excel-preview h3, .table-excel-result h3 { margin-bottom: 6px; }
.table-excel-preview-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-excel-preview-table { min-width: 680px; margin-top: 10px; font-size: .86rem; }
.table-excel-preview-table th, .table-excel-preview-table td { white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.table-excel-types { margin-top: 16px; }
.table-excel-types { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-excel-types td:last-child { width: 180px; }
.table-excel-types select { min-width: 145px; padding: 7px 9px; }
.table-excel-result { margin-top: 18px; padding: 14px; border: 1px solid #9bcdaa; border-radius: 12px; background: #f2fbf5; }
.table-excel-result p { margin: 0; }
.table-excel-result .actions { margin-bottom: 0; }
.table-excel-warnings { margin: 10px 0 0; padding-left: 20px; color: #805b0d; }
.xlsx-intake-panel { margin-top: 18px; padding: 14px; border: 1px solid #9bcdaa; border-radius: 12px; background: #f6fcf8; }
.xlsx-intake-panel[hidden], .xlsx-intake-preview[hidden] { display: none; }
.xlsx-intake-panel h3, .xlsx-intake-panel h4 { margin: 0 0 8px; }
.xlsx-intake-panel h4 { margin-top: 14px; }
.xlsx-intake-contract { display: grid; gap: 6px; margin: 12px 0; padding: 10px 12px; border: 1px dashed #a9c3e9; border-radius: 9px; background: #f8fbff; }
.xlsx-intake-contract input[type="file"] { max-width: 100%; }
.xlsx-intake-contract .table-excel-help { margin: 0; }
.xlsx-intake-sheets { margin: 8px 0; padding-left: 20px; color: var(--muted); }
.xlsx-intake-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; }
.xlsx-intake-columns label { display: flex; gap: 7px; align-items: flex-start; min-width: 0; }
.xlsx-intake-preview { margin-top: 12px; overflow-x: auto; }
@media (max-width: 760px) {
  .table-excel-source, .table-excel-settings { grid-template-columns: 1fr; }
  .table-excel-source textarea { min-height: 210px; }
  .table-excel-contract .actions { align-items: stretch; }
  .table-excel-contract .actions > * { max-width: 100%; }
  .table-excel-template-rows { justify-content: space-between; }
}
