.batch-workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.batch-input { padding: 26px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 24px rgb(24 38 62 / 5%); }
textarea { width: 100%; min-height: 160px; resize: vertical; padding: 14px; border: 1px solid #aeb7c4; border-radius: 8px; background: white; color: var(--text); font: 1rem/1.65 var(--sans); font-variant-numeric: tabular-nums; }
textarea[aria-invalid="true"] { border-color: var(--error); }
.batch-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.batch-options label, .import-body > label, #import-preview > label { display: grid; gap: 7px; min-width: 0; font-size: 0.85rem; font-weight: 650; }
.batch-options select, .import-body select { width: 100%; min-height: 44px; padding: 9px; border: 1px solid #aeb7c4; border-radius: 6px; background: white; font-size: 0.85rem; }
.batch-format { margin-top: 18px; }
.batch-format summary, .file-import summary { min-height: 44px; padding: 10px 0; font-size: 0.9rem; font-weight: 650; }
.batch-format .batch-options { margin: 8px 0 20px; }
.batch-actions, .export-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.action-primary, .action-secondary { min-height: 44px; padding: 10px 16px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: white; font-weight: 650; font-size: 0.9rem; text-decoration: none; }
.action-secondary { border-color: #aeb7c4; background: var(--surface); color: var(--text); }
.action-primary:hover { background: #1049b5; }
.action-secondary:hover { border-color: var(--blue); background: var(--blue-soft); }
.action-primary:disabled, .action-secondary:disabled { opacity: 0.45; cursor: default; }
.local-note { margin: 16px 0 0; color: var(--muted); font-size: 0.8rem; }
.file-import { padding: 12px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.import-body { padding: 6px 0 12px; }
.import-body p { color: var(--muted); font-size: 0.85rem; }
.import-body > label { margin-bottom: 16px; }
.import-body input[type="file"] { width: 100%; padding: 10px 0; font-size: 0.8rem; font-weight: 400; }
.import-body .checkbox-label { display: flex; align-items: center; min-height: 44px; font-weight: 400; }
.checkbox-label input { width: 18px; height: 18px; margin-right: 8px; }
#column-preview { max-height: 180px; padding: 12px; overflow: auto; border-radius: 6px; background: var(--result-surface); color: var(--text); font: 0.85rem/1.7 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.workflow-tip { padding: 28px 10px; }
.workflow-tip h2 { margin-bottom: 12px; font-size: 1.15rem; }
.workflow-tip p { margin-bottom: 12px; color: var(--muted); font-size: 0.9rem; }
.workflow-tip a { color: var(--blue); }
.batch-output { padding: 42px 0 0; }
.results-heading h2 { margin-bottom: 8px; font-size: 1.6rem; }
#batch-summary { color: var(--muted); font-size: 0.95rem; }
.export-actions { margin-top: 18px; }
.table-scroll { margin-top: 22px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: white; }
.table-scroll table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; }
.table-scroll th { padding: 14px; border-bottom: 1px solid var(--border); background: var(--result-surface); white-space: nowrap; }
.table-scroll td { min-width: 120px; max-width: 290px; padding: 14px; border-bottom: 1px solid var(--border); vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.table-scroll td:first-child { min-width: 40px; color: var(--muted); }
.table-scroll td:nth-child(4) { min-width: 220px; }
.table-scroll td:nth-child(5) { min-width: 160px; }
.table-scroll .row-error td:last-child { color: var(--error); }
.table-scroll .row-blank { color: var(--muted); }
.table-scroll tr:last-child td { border-bottom: 0; }
#results-title { scroll-margin-top: 24px; }
.notice { padding: 16px; border: 1px solid var(--border); background: white; }
@media (max-width: 760px) {
  .batch-workspace { grid-template-columns: 1fr; gap: 18px; }
  .batch-input { padding: 20px; }
  .workflow-tip { padding: 20px 4px 0; }
  .batch-output { padding-top: 32px; }
}
@media (max-width: 430px) {
  .batch-options { grid-template-columns: 1fr; }
  .batch-actions > button { flex: 1; padding: 10px; }
  .export-actions > button { flex: 1 0 45%; }
}
@media (max-width: 600px) {
  .table-scroll { overflow: visible; border: 0; background: transparent; }
  .table-scroll table, .table-scroll tbody { display: block; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-scroll tr { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .table-scroll td, .table-scroll td:first-child, .table-scroll td:nth-child(4), .table-scroll td:nth-child(5) { display: block; min-width: 0; max-width: none; padding: 8px; border: 0; }
  .table-scroll td::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 650; content: attr(data-label); }
  .table-scroll td:first-child { grid-column: 1 / -1; padding-bottom: 0; font-weight: 700; }
  .table-scroll td:first-child::before { display: inline; margin-right: 6px; }
  .table-scroll td:nth-child(4), .table-scroll td:nth-child(5) { grid-column: 1 / -1; }
  .table-scroll td:nth-child(4) { font-size: 1rem; }
}
