/* ============= Batch Mode — multi-person / multi-background workflow ============= */

.batch-workspace {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 2px 0 32px;
}

.batch-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  margin-bottom: 20px;
  border: 1px solid rgba(99, 102, 241, 0.34);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 92% 20%, rgba(217, 70, 239, 0.18), transparent 35%), linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(15, 23, 42, 0.42));
  box-shadow: var(--shadow-sm);
}

.batch-kicker { color: #a5b4fc; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; }
.batch-hero h1 { margin: 5px 0 4px; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -0.025em; }
.batch-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 14px; }
.batch-hero-mark { width: 72px; height: 72px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(167, 139, 250, 0.35); border-radius: 22px; background: rgba(99, 102, 241, 0.16); font-size: 36px; box-shadow: 0 0 30px rgba(99, 102, 241, 0.2); }

.batch-layout { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.batch-input-column, .batch-control-column { display: grid; gap: 20px; min-width: 0; }
.batch-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(31, 41, 55, 0.66); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.batch-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.batch-panel-heading > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.batch-panel h2 { margin: 0; color: var(--text); font-size: 16px; font-weight: 700; }
.batch-step { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid rgba(129, 140, 248, 0.35); border-radius: 9px; background: rgba(99, 102, 241, 0.16); color: #c7d2fe; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 800; }
.batch-count, .batch-output-count { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 600; }

.batch-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 150px; padding: 22px 16px; border: 1.5px dashed rgba(129, 140, 248, 0.5); border-radius: var(--radius-md); background: rgba(15, 23, 42, 0.48); color: var(--muted); cursor: pointer; text-align: center; transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease; }
.batch-dropzone:hover, .batch-dropzone:focus-within, .batch-dropzone.dragover { border-color: #a5b4fc; background: rgba(99, 102, 241, 0.1); transform: translateY(-1px); }
.batch-dropzone-bg { border-color: rgba(6, 182, 212, 0.5); }
.batch-drop-icon { font-size: 31px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35)); }
.batch-dropzone strong { color: var(--text); font-size: 14px; }
.batch-dropzone > span:last-child { font-size: 11px; }

.batch-file-list { display: grid; gap: 7px; max-height: 178px; margin-top: 13px; overflow: auto; scrollbar-width: thin; }
.batch-file-row { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(15, 23, 42, 0.4); color: var(--text); font-size: 12px; }
.batch-file-row::before { content: "•"; color: var(--accent-cyan); font-size: 17px; line-height: 0; }
.batch-file-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-file-row small { margin-left: auto; flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.batch-empty-list { padding: 13px 8px; color: var(--muted); font-size: 12px; text-align: center; }

.batch-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.batch-field { min-width: 0; }
.batch-field-wide { grid-column: 1 / -1; }
.batch-field label, .batch-advanced-row label { display: block; margin-bottom: 6px; color: var(--text); font-size: 12px; font-weight: 600; }
.batch-field select, .batch-field input, .batch-advanced-row select { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(15, 23, 42, 0.78); color: var(--text); font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.3; }
.batch-field select:focus, .batch-field input:focus, .batch-advanced-row select:focus, .batch-advanced-row input:focus { border-color: var(--primary); outline: 2px solid rgba(99, 102, 241, 0.25); outline-offset: 1px; }
.batch-field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

.batch-advanced-row { display: grid; grid-template-columns: auto minmax(100px, 1fr) auto minmax(150px, 0.9fr); align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.batch-advanced-row label { margin: 0; white-space: nowrap; }
.batch-advanced-row output { color: #a5b4fc; font-variant-numeric: tabular-nums; }
.batch-advanced-row input[type="range"] { width: 100%; accent-color: var(--primary); }

.batch-plan-note, .batch-run-hint { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.batch-plan-list { display: grid; gap: 7px; max-height: 250px; overflow: auto; scrollbar-width: thin; }
.batch-plan-row { display: grid; grid-template-columns: minmax(100px, 0.85fr) 22px minmax(110px, 1fr); align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(15, 23, 42, 0.4); font-size: 11px; }
.batch-plan-person, .batch-plan-bg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-plan-person { color: #e0e7ff; }
.batch-plan-bg { color: #a5f3fc; }
.batch-plan-arrow { color: var(--muted); text-align: center; }
.batch-plan-more { padding: 8px; color: var(--muted); font-size: 11px; text-align: center; }

.batch-run-panel { border-color: rgba(16, 185, 129, 0.32); background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(31, 41, 55, 0.7)); }
.batch-run-summary { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.batch-run-summary > div { display: grid; gap: 2px; }
.batch-run-summary > div:last-child { text-align: right; }
.batch-run-label { color: var(--muted); font-size: 11px; }
.batch-run-summary strong { font-size: 14px; }
.batch-progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.batch-progress-track > div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-cyan), var(--success)); transition: width 0.25s ease; }
.batch-run-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0 9px; }
.batch-run-actions .btn { min-height: 40px; }
.batch-run-actions .btn-success { text-decoration: none; }
.batch-results-list { display: grid; gap: 6px; max-height: 200px; overflow: auto; }
.batch-result-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(15, 23, 42, 0.35); font-size: 11px; }
.batch-result-row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.batch-result-status { margin-left: auto; color: var(--muted); }
.batch-result-download { flex: 0 0 auto; color: #a5b4fc; font-weight: 600; text-decoration: none; }

@media (max-width: 1024px) {
  .batch-layout { grid-template-columns: 1fr; }
  .batch-input-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 680px) {
  .batch-workspace { padding-bottom: 16px; }
  .batch-hero { align-items: flex-start; padding: 22px 18px; }
  .batch-hero-mark { width: 52px; height: 52px; border-radius: 16px; font-size: 26px; }
  .batch-hero h1 { font-size: 23px; }
  .batch-hero p { font-size: 12px; }
  .batch-input-column { grid-template-columns: 1fr; }
  .batch-panel { padding: 16px; }
  .batch-form-grid { grid-template-columns: 1fr; }
  .batch-field-wide { grid-column: auto; }
  .batch-advanced-row { grid-template-columns: auto 1fr; }
  .batch-advanced-row label:nth-of-type(2) { grid-column: 1; }
  .batch-advanced-row select { grid-column: 2; }
  .batch-run-actions .btn-xl { width: 100%; }
}
