/* Batch workspace reuses the existing theme, controls and live task panel. */
.batch-workspace { min-width:0; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:24px; }
.batch-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.batch-heading h2 { font-size:23px; }
.batch-heading p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.batch-heading button { flex:none; }
.batch-section { margin-top:22px; padding-top:20px; border-top:1px solid var(--border); }
.batch-section h3 { margin:0 0 13px; font-size:14px; font-weight:650; }
.batch-file-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:16px; }
.batch-file-row button { min-height:37px; font-size:12px; }
.batch-file-name { min-width:0; max-width:100%; overflow-wrap:anywhere; font-size:12px; }
.batch-file-row .muted { margin-left:auto; }
.batch-fields { display:grid; gap:12px; }
.batch-parse-fields { grid-template-columns:1.4fr 1fr; }
.batch-parameter-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
.batch-fields label { display:flex; flex-direction:column; min-width:0; gap:7px; font-size:12px; color:var(--muted); }
.batch-fields input,.batch-fields select { width:100%; min-width:0; min-height:38px; font-size:12px; color:var(--text); }
.batch-option-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin:15px 0; }
.batch-help { font-size:11px; line-height:1.7; color:var(--muted); margin:9px 0 0; overflow-wrap:anywhere; }
.batch-fixed-details { border:1px solid var(--border); border-radius:9px; background:var(--field-bg); font-size:12px; }
.batch-fixed-details summary { padding:9px 11px; cursor:pointer; color:var(--muted); }
.batch-fixed-prompt { margin:0; padding:0 11px 11px; white-space:pre-wrap; overflow-wrap:anywhere; max-height:160px; overflow-y:auto; font-size:12px; }
.batch-check-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:17px; }
.batch-check-row button { font-size:12px; }
.batch-summary { color:var(--muted); font-size:12px; margin:0 0 12px; }
.batch-table-wrap { max-height:320px; overflow:auto; border:1px solid var(--border); border-radius:10px; }
.batch-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:11px; }
.batch-table th,.batch-table td { text-align:left; vertical-align:top; padding:10px 9px; overflow-wrap:anywhere; }
.batch-table th { position:sticky; top:0; z-index:1; background:var(--solid-surface); color:var(--muted); font-weight:500; }
.batch-table th:first-child { width:46px; }
.batch-table th:nth-child(2) { width:40%; }
.batch-table th:nth-child(3) { width:21%; }
.batch-table td { border-top:1px solid var(--border); }
.batch-table tr[data-status="submitting"] { background:var(--accent-soft); }
.batch-prompt-preview { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-wrap; }
.batch-item-state { display:inline-block; padding:2px 6px; border-radius:5px; background:var(--surface-soft); color:var(--muted); white-space:nowrap; }
.batch-item-state[data-status="ready"],.batch-item-state[data-status="submitted"] { background:var(--success-bg); color:var(--success-text); }
.batch-item-state[data-status="invalid"],.batch-item-state[data-status="failed"] { background:var(--error-bg); color:var(--error-text); }
.batch-item-state[data-status="submitting"],.batch-item-state[data-status="waiting"] { background:var(--pending-bg); color:var(--pending-text); }
.batch-item-state[data-status="warning"] { background:var(--pending-bg); color:var(--pending-text); }
.batch-item-warning { margin:5px 0 0; color:var(--pending-text); white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55; }
.batch-item-error { margin:5px 0 0; color:var(--error-text); white-space:pre-wrap; }
.batch-item-attempts { display:block; margin-top:4px; color:var(--muted); font-size:10px; }
.batch-cost { display:flex; align-items:center; flex-wrap:wrap; gap:7px 18px; margin-top:13px; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.batch-cost strong { font-weight:500; color:var(--text); }
.batch-error { border:1px solid color-mix(in srgb,var(--error-text) 35%,transparent); border-radius:8px; padding:9px 11px; background:var(--error-bg); color:var(--error-text); white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; margin:12px 0 0; }
.batch-warning { border:1px solid color-mix(in srgb,var(--pending-text) 45%,transparent); border-radius:8px; padding:9px 11px; background:var(--pending-bg); color:var(--pending-text); white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; margin:12px 0 0; }
.batch-actions { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.batch-actions button { min-height:39px; font-size:12px; }
.batch-actions .primary { flex:1 1 160px; }
.batch-progress-counts { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.batch-progress-counts strong { font-weight:550; color:var(--text); }
#batchProgress { width:100%; height:6px; display:block; margin:12px 0; appearance:none; border:0; border-radius:4px; overflow:hidden; background:var(--surface-soft); accent-color:var(--accent); }
#batchProgress::-webkit-progress-bar { background:var(--surface-soft); }
#batchProgress::-webkit-progress-value { background:var(--accent); }
#batchProgress::-moz-progress-bar { background:var(--accent); }
.batch-status { margin:0; font-size:12px; color:var(--accent-text); }
@media(max-width:1450px) { .batch-workspace { padding:20px; } }
@media(max-width:1100px) and (min-width:951px) { .batch-parameter-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:950px) { .batch-workspace { overflow:visible; } }
@media(max-width:560px) {
  .batch-workspace { padding:17px; }
  .batch-parameter-fields,.batch-parse-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .batch-model-field { grid-column:1/-1; }
  .batch-heading { gap:10px; }
  .batch-heading h2 { font-size:21px; }
  .batch-file-row .muted { margin-left:0; }
  .batch-table { min-width:430px; }
  .batch-actions .primary { flex-basis:100%; }
  .batch-actions button:not(.primary) { flex:1; }
}

