:root {
  --bg-0: #05060d;
  --bg-1: #0a0d1c;
  --bg-2: #10142a;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.06);
  --accent-1: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #ff6bcb;
  --text-0: #f4f6fd;
  /* 二级 / 三级文字提亮：原 #a8adc4 / #6b7090 在深底上对比度不足（未达 WCAG AA），
     正文与 hint 偏灰难读。提亮到 #bcc1d6 / #8990ac 后可读性明显改善，同时保持层级。 */
  --text-1: #bcc1d6;
  --text-2: #8990ac;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(124, 92, 255, 0.35);
  /* 分层阴影体系（更有“深度/高级感”）：卡片、悬浮、弹层各一档 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30), 0 2px 8px -4px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px -4px rgba(0,0,0,0.45), 0 12px 32px -12px rgba(0,0,0,0.55);
  --shadow-lg: 0 8px 24px -8px rgba(0,0,0,0.5), 0 30px 70px -24px rgba(0,0,0,0.65);
  /* 统一的“弹性”过渡曲线，让交互更灵动、有质感 */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --focus-ring: 0 0 0 3px rgba(124, 92, 255, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  /* 更现代的系统字体栈：优先 Win11 的 Segoe UI Variable / system-ui（比旧 Segoe UI 更精致），
     再回退到各平台原生 UI 字体，保证中英文都清晰。 */
  font-family: "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-0);
  color: var(--text-0);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-1); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.24); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- animated aurora background ---------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, #0d1130 0%, var(--bg-0) 55%);
}
.aurora-bg .blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}
.aurora-bg .blob.b1 {
  top: -12%; left: -10%;
  background: radial-gradient(circle, var(--accent-1), transparent 70%);
  animation: float1 22s ease-in-out infinite;
}
.aurora-bg .blob.b2 {
  bottom: -18%; right: -8%;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation: float2 26s ease-in-out infinite;
}
.aurora-bg .blob.b3 {
  top: 35%; left: 55%;
  width: 34vw; height: 34vw;
  background: radial-gradient(circle, var(--accent-3), transparent 70%);
  animation: float3 30s ease-in-out infinite;
}
.aurora-bg .grain {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.5;
}
@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 8vh) scale(1.12); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-7vw, -6vh) scale(1.08); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, 6vh) scale(0.92); }
}

/* ---------- glass surfaces ---------- */
.glass {
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* 顶部一道内高光 + 分层外阴影，玻璃更有厚度与立体感 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), var(--shadow-lg);
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent-2), var(--accent-1) 55%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-0);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-out), border-color 0.2s ease, background 0.2s ease;
}
/* 悬停时一道柔和高光扫过，提升“质感/高级感” */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-1.5px); border-color: rgba(255,255,255,0.22); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 0.08s; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:disabled::after { display: none; }

.btn-primary {
  border: none;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.65);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(124, 92, 255, 0.8); }

.btn-danger {
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-1);
}
.btn-ghost:hover { color: var(--text-0); background: var(--glass); }

.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 13px; color: var(--text-1); font-weight: 600; letter-spacing: 0.2px; }

input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], textarea, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-0);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--text-2); }
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="url"]:focus, textarea:focus, select:focus {
  border-color: var(--accent-1);
  background: rgba(124, 92, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}
/* 覆盖 Chrome / Edge 自动填充造成的白底黑字，保持暗色主题一致 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text-0) !important;
  caret-color: var(--text-0);
  border: 1px solid var(--border);
  -webkit-box-shadow: 0 0 0 1000px #141830 inset !important;
  box-shadow: 0 0 0 1000px #141830 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}
input:-webkit-autofill:focus {
  border-color: var(--accent-1);
}
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8adc4' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
  color-scheme: dark;
}
/* 【V24】select 展开时的 popup 是 OS 原生渲染,默认白底黑字,和暗色主题严重不搭。
   给 option 显式深色背景 + 亮字,Chrome/Edge/Firefox 都会应用到 popup。
   配合 select 上的 color-scheme:dark,Chromium 会把滚动条/边框也切成深色。 */
select option, select optgroup {
  background-color: #141830;
  color: #e4e7ef;
}
select option:checked, select option:hover {
  background: linear-gradient(0deg, rgba(124,92,255,0.35), rgba(124,92,255,0.35)), #141830;
  color: #fff;
}

.hint { font-size: 12px; color: var(--text-2); }
.char-count { text-align: right; font-size: 12px; color: var(--text-2); }

/* ---------- pill selector group ---------- */
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}
.pill:hover { border-color: rgba(255,255,255,0.25); color: var(--text-0); }
.pill.active {
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(124, 92, 255, 0.7);
}

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.2px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { color: var(--success); background: rgba(52, 211, 153, 0.12); }
.badge-danger { color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.badge-warning { color: var(--warning); background: rgba(251, 191, 36, 0.12); }
.badge-info { color: var(--accent-2); background: rgba(34, 211, 238, 0.12); }
.badge-muted { color: var(--text-1); background: rgba(255,255,255,0.06); }

/* ---------- toasts ---------- */
#toast-root {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.toast {
  min-width: 260px; max-width: 360px;
  padding: 14px 16px; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500;
  animation: toast-in 0.3s ease;
  border: 1px solid var(--border);
  background: rgba(14,16,28,0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0,0,0,0.45);
}
.toast.success { border-color: rgba(52,211,153,0.5); color: #bdf5df; }
.toast.error { border-color: rgba(248,113,113,0.5); color: #fecaca; }
.toast.info { border-color: rgba(34,211,238,0.5); color: #cffafe; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.leaving { animation: toast-out 0.25s ease forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(-16px); } }

/* ---------- view transitions ---------- */
.view { display: none; }
.view.active { display: block; animation: view-in 0.42s cubic-bezier(.2,.8,.2,1); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: skeleton-shine 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- spinner ---------- */
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.18);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- scrollreveal-ish fade ---------- */
.fade-up { animation: fade-up 0.5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(2, 4, 12, 0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-box {
  width: min(720px, 92vw); max-height: 86vh; overflow: auto;
  padding: 28px; transform: scale(0.94) translateY(10px); transition: transform 0.25s cubic-bezier(.2,.8,.2,1);
}
.modal-backdrop.open .modal-box { transform: scale(1) translateY(0); }

/* ---------- confirm dialog ---------- */
.confirm-modal { z-index: 300; }
.confirm-box {
  width: min(400px, 92vw);
  padding: 30px 28px 24px;
  text-align: center;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.24s cubic-bezier(.2,.8,.2,1);
}
.confirm-modal.open .confirm-box { transform: scale(1) translateY(0); }
.confirm-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  background: rgba(34,211,238,0.12); color: var(--accent-2);
}
.confirm-icon.danger { background: rgba(248,113,113,0.14); color: var(--danger); }
.confirm-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.confirm-msg { margin: 0 0 24px; font-size: 14px; color: var(--text-1); line-height: 1.6; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-actions .btn { min-width: 104px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-state svg { opacity: 0.4; margin-bottom: 12px; }

.progress-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.step-row { display: flex; align-items: center; gap: 10px; }
.step-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.step-dot.active { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(34,211,238,0.18); }
.step-dot.done { background: var(--success); }
.step-line { width: 34px; height: 2px; background: rgba(255,255,255,0.12); }
.step-line.done { background: var(--success); }

.progress-bar-track {
  width: 220px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.12); overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-1));
  transition: width 0.6s ease;
}

/* ---------- 键盘可达性：仅键盘聚焦时显示清晰焦点环（鼠标点击不打扰） ---------- */
.btn:focus-visible, .pill:focus-visible, a:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---------- 尊重系统“减少动效”偏好（无障碍 / 晕动症友好） ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .aurora-bg .blob { animation: none !important; }
}

@media (max-width: 900px) {
  .aurora-bg .blob { width: 70vw; height: 70vw; }
}

/* ---------- responsive: tablet & phone ---------- */
@media (max-width: 640px) {
  .modal-box { padding: 20px; width: min(560px, 94vw); border-radius: var(--radius-md); }
  .confirm-box { padding: 26px 20px 20px; }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions .btn { width: 100%; }
  #toast-root { top: 12px; width: calc(100vw - 24px); align-items: center; }
  .toast { width: 100%; min-width: 0; max-width: 100%; }
  .btn { padding: 11px 18px; }
  .btn-sm { padding: 7px 12px; }
}

/* ================ V114 · 2026-09-16 批量生成样式 ================ */
/* ---------- Excel 批量:顶部标题栏 ---------- */
.batch-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.batch-hero-title h3 { display: flex; align-items: center; gap: 8px; }

/* ---------- 上传两列:Excel 卡 + 参考图卡 ---------- */
.batch-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.batch-upload-card {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 22px; min-height: 108px;
  background: rgba(255,255,255,0.025);
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.batch-upload-card:hover { border-color: rgba(124,92,255,0.55); background: rgba(124,92,255,0.06); transform: translateY(-1px); }
.batch-upload-card.dragging, .batch-upload-card.batch-upload-loaded { border-style: solid; border-color: rgba(124,92,255,0.55); background: rgba(124,92,255,0.08); }
.batch-upload-icon {
  flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
}
.batch-upload-icon-excel { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); box-shadow: 0 6px 16px rgba(22,163,74,0.25); }
.batch-upload-icon-refimg { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); box-shadow: 0 6px 16px rgba(124,92,255,0.25); }
.batch-upload-body { flex: 1 1 auto; min-width: 0; }
.batch-upload-body h4 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.batch-upload-body p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.batch-upload-count { display: inline-block; padding: 1px 8px; font-size: 11.5px; opacity: 0.75; background: rgba(255,255,255,0.08); border-radius: 999px; font-weight: normal; }
.batch-upload-plus { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.06); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 300; opacity: 0.55; transition: all 0.18s; }
.batch-upload-card:hover .batch-upload-plus { background: rgba(124,92,255,0.25); opacity: 1; }

/* 参考图卡 · 已上传缩略图内嵌 */
.batch-refimg-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; width: 100%; }
.batch-refimg-thumbs:empty { display: none; }

/* ---------- 批量任务设置卡 ---------- */
.batch-config-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.batch-config-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.batch-config-model { font-weight: 600; padding: 4px 10px; background: rgba(124,92,255,0.15); border-radius: 6px; color: #d0c9ff; }
.batch-config-tip { font-size: 12.5px; opacity: 0.65; }

/* ---------- 预览 toolbar(在预览表上方) ---------- */
.batch-preview-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; margin-top: 14px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(124,92,255,0.06) 0%, rgba(124,92,255,0.02) 100%);
  border: 1px solid rgba(124,92,255,0.15);
  border-radius: 10px;
  animation: batch-fade-in-up 0.35s ease-out;
}
.batch-preview-info { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.batch-preview-count-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(124,92,255,0.15);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  color: #d0c9ff;
}
.batch-preview-count-tag b { color: #fff; font-weight: 700; }
/* 消耗徽章 · 大字醒目 · pulse 动画 */
.batch-preview-cost-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255,199,44,0.18) 0%, rgba(255,159,28,0.10) 100%);
  border: 1px solid rgba(255,199,44,0.35);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: #ffe4a3;
  box-shadow: 0 2px 12px rgba(255,199,44,0.12);
  animation: batch-cost-pulse 2.4s ease-in-out infinite;
}
.batch-preview-cost-badge b { color: #ffd166; font-size: 15px; font-weight: 700; letter-spacing: 0.3px; margin: 0 2px; }
.batch-preview-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; opacity: 0.55; }
.batch-preview-actions { display: flex; align-items: center; gap: 8px; }
.batch-preview-actions .btn { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- 预览表 · 支持单元格编辑 ---------- */
.batch-preview-table {
  max-height: 460px; overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
}
.batch-preview-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
  animation: batch-row-fade 0.28s ease-out both;
}
.batch-preview-row:hover:not(.batch-preview-head) { background: rgba(124,92,255,0.04); }
.batch-preview-row:last-child { border-bottom: none; }
.batch-preview-row.batch-preview-head {
  position: sticky; top: 0;
  background: linear-gradient(180deg, rgba(30,37,64,1) 0%, rgba(30,37,64,0.98) 100%);
  font-weight: 600; opacity: 0.85; z-index: 2;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  animation: none;
}
.batch-preview-cell-index { flex: 0 0 46px; opacity: 0.6; font-family: monospace; padding-top: 3px; }
.batch-preview-cell-ratio { flex: 0 0 60px; padding-top: 3px; }
.batch-preview-cell-duration { flex: 0 0 60px; padding-top: 3px; }
.batch-preview-cell-filename { flex: 0 0 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 3px; }
.batch-preview-cell-prompt {
  flex: 1 1 auto; min-width: 0;
  padding: 4px 8px; border-radius: 5px;
  border: 1px solid transparent;
  transition: all 0.15s;
  cursor: text;
  word-break: break-word;
  line-height: 1.55;
  outline: none;
}
.batch-preview-cell-prompt:hover { background: rgba(255,255,255,0.03); border-color: rgba(124,92,255,0.2); }
.batch-preview-cell-prompt:focus {
  background: rgba(124,92,255,0.06);
  border-color: rgba(124,92,255,0.5);
  box-shadow: 0 0 0 2px rgba(124,92,255,0.10);
}
.batch-preview-cell-prompt.batch-cell-edited { border-color: rgba(255,199,44,0.35); background: rgba(255,199,44,0.03); }
/* @参考图 高亮 · 与单个生成的 prompt-mirror 保持一致三色系
   焦点在的 cell 显示纯文本(避免 caret 跳出 <mark>),失焦时才染色 · 用户看得到但不影响输入 */
.batch-preview-cell-prompt mark {
  background: transparent;
  color: inherit;
  padding: 1px 3px;
  margin: 0 -1px;
  border-radius: 3px;
  font-weight: 600;
}
.batch-preview-cell-prompt mark.hl-ref-img {
  background: rgba(244,114,182,0.28);
  box-shadow: inset 0 0 0 1px rgba(244,114,182,0.55);
  color: #fbcfe8;
}
.batch-preview-cell-prompt mark.hl-ref-vid {
  background: rgba(167,139,250,0.28);
  box-shadow: inset 0 0 0 1px rgba(167,139,250,0.52);
  color: #ddd6fe;
}
.batch-preview-cell-prompt mark.hl-ref-aud {
  background: rgba(94,234,212,0.28);
  box-shadow: inset 0 0 0 1px rgba(94,234,212,0.50);
  color: #99f6e4;
}
/* focus 时高亮不显示(避免 caret 卡在 mark 里跳位置) */
.batch-preview-cell-prompt:focus mark { background: transparent; box-shadow: none; color: inherit; font-weight: normal; padding: 0; }
.batch-preview-cell-cost {
  flex: 0 0 72px; text-align: right; padding-top: 3px;
  font-family: monospace; font-weight: 600; color: #ffd166;
}

/* ---------- 预览表分页 ---------- */
.batch-preview-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-top: 10px;
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 12.5px;
  animation: batch-fade-in-up 0.35s ease-out 0.05s both;
}
.batch-preview-pager .hint b { opacity: 0.95; color: #d0c9ff; font-weight: 600; }
.batch-preview-pager-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.batch-preview-page-size-select {
  padding: 4px 24px 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  color: inherit; font-size: 12.5px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239aa4b2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  cursor: pointer;
  min-width: 60px;
}
.batch-preview-page-size-select:hover { border-color: rgba(124,92,255,0.4); }
.batch-preview-nav {
  min-width: 34px; padding: 5px 10px !important;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.batch-preview-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.batch-preview-nav:not(:disabled):hover { background: rgba(124,92,255,0.15); border-color: rgba(124,92,255,0.4); transform: translateY(-1px); }
.batch-preview-nav:not(:disabled):active { transform: translateY(0); }

/* ---------- 提交按钮 loading 动画 ---------- */
.batch-submit-btn.batch-submitting {
  pointer-events: none;
  background: linear-gradient(135deg, rgba(124,92,255,0.4) 0%, rgba(94,62,255,0.4) 100%) !important;
}
.batch-submit-btn.batch-submitting::before {
  content: "";
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: batch-spin 0.85s linear infinite;
  margin-right: 4px;
}
.batch-submit-btn.batch-submitting svg { display: none; }
/* 提交后 5 卡片 pulse 高亮 · 让用户看到提交生效 */
.batch-stat-card.batch-pulse { animation: batch-stat-pulse 1.2s ease-out; }

/* ---------- Excel/参考图卡片加载态强化 · 已上传打勾角 ---------- */
.batch-upload-loaded::after {
  content: "✓";
  position: absolute; top: 10px; right: 46px;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  color: #fff; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(34,197,94,0.35);
  animation: batch-tick-pop 0.3s ease-out;
}

/* ---------- 关键动画 ---------- */
@keyframes batch-fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes batch-row-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes batch-cost-pulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(255,199,44,0.12); }
  50% { box-shadow: 0 4px 20px rgba(255,199,44,0.32); }
}
@keyframes batch-spin { to { transform: rotate(360deg); } }
@keyframes batch-stat-pulse {
  0% { transform: scale(1); border-color: rgba(255,255,255,0.06); }
  30% { transform: scale(1.04); border-color: rgba(124,92,255,0.6); box-shadow: 0 6px 22px rgba(124,92,255,0.32); }
  100% { transform: scale(1); border-color: rgba(255,255,255,0.06); }
}
@keyframes batch-tick-pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

/* ================ V115 · 批量记录页 ================ */
.bh-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; margin-bottom: 18px;
  border-radius: 14px;
}
.bh-hero h3 { display: flex; align-items: center; gap: 8px; }
.bh-hero p { font-size: 12.5px; opacity: 0.7; }

.bh-filter-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.bh-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bh-pills .pill { padding: 6px 14px; font-size: 12.5px; }
.bh-search-wrap {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; margin-left: auto;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  min-width: 240px;
  transition: border-color 0.15s;
}
.bh-search-wrap:focus-within { border-color: rgba(124,92,255,0.5); }
.bh-search-wrap svg { opacity: 0.55; flex: 0 0 auto; }
.bh-search-wrap input {
  flex: 1 1 auto; background: transparent; border: 0; outline: none;
  color: inherit; font-size: 12.5px;
}
.bh-search-clear {
  flex: 0 0 auto;
  width: 20px; height: 20px; padding: 0;
  background: rgba(255,255,255,0.08); border: 0; border-radius: 50%;
  color: inherit; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.bh-search-clear:hover { background: rgba(239,68,68,0.4); }
.bh-refresh-btn { padding: 6px 10px; }

/* 批次卡片列表 · 每个批次 = 一张大卡片 */
.bh-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.bh-card {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.028) 0%, rgba(255,255,255,0.012) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  animation: batch-fade-in-up 0.35s ease-out both;
}
.bh-card:hover {
  border-color: rgba(124,92,255,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(124,92,255,0.12);
}
.bh-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.bh-card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.bh-card-title h4 { margin: 0; font-size: 15px; font-weight: 600; }
.bh-card-id { font-family: monospace; font-size: 11.5px; opacity: 0.45; padding: 2px 6px; background: rgba(255,255,255,0.05); border-radius: 4px; }
.bh-card-time { font-size: 11.5px; opacity: 0.5; }
/* 状态徽章 */
.bh-status-badge {
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.bh-status-pending { background: rgba(148,163,184,0.15); color: #cbd5e1; }
.bh-status-submitting { background: rgba(59,130,246,0.18); color: #93c5fd; }
.bh-status-running { background: rgba(245,158,11,0.15); color: #fbbf24; }
.bh-status-completed { background: rgba(22,163,74,0.18); color: #86efac; }
.bh-status-failed { background: rgba(239,68,68,0.18); color: #fca5a5; }
.bh-status-cancelled { background: rgba(239,68,68,0.12); color: #fca5a5; }

/* 中间的模型/进度信息条 */
.bh-card-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; opacity: 0.75; margin-bottom: 12px; }
.bh-card-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.bh-card-meta b { color: #d0c9ff; font-weight: 600; }
.bh-model-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(124,92,255,0.12);
  color: #d0c9ff;
  font-weight: 600;
}

/* 进度条 */
.bh-progress-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bh-progress-bar {
  flex: 1 1 auto;
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
}
.bh-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cff 0%, #4ade80 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
  position: relative;
}
.bh-progress-fill.bh-progress-partial-fail {
  background: linear-gradient(90deg, #7c5cff 0%, #f59e0b 60%, #ef4444 100%);
}
.bh-progress-fill::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; width: 30px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  animation: bh-progress-shimmer 1.6s ease-in-out infinite;
}
.bh-progress-fill[data-done="true"]::after { animation: none; }
.bh-progress-percent { font-size: 12px; font-weight: 700; color: #86efac; font-family: monospace; min-width: 42px; text-align: right; }

/* 统计数字条 */
.bh-card-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11.5px; margin-bottom: 14px; }
.bh-stat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.bh-stat-chip b { color: #fff; }
.bh-stat-succ b { color: #86efac; }
.bh-stat-fail b { color: #fca5a5; }
.bh-stat-run b { color: #fbbf24; }

/* 操作按钮组 */
.bh-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bh-card-actions .btn-sm { padding: 6px 14px; font-size: 12.5px; }
.bh-card-actions .btn-primary { display: inline-flex; align-items: center; gap: 4px; }

/* 批次名列表 · hover 高亮 */
.bh-card-name { font-weight: 600; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 分页(复用 batch-preview-pager 样式,单独轻微微调) */
.bh-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-top: 16px;
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  font-size: 12.5px;
}
.bh-pager-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bh-pager .hint b { color: #d0c9ff; font-weight: 600; }

@keyframes bh-progress-shimmer {
  0% { transform: translateX(-30px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(30px); opacity: 0; }
}

@media (max-width: 800px) {
  .bh-search-wrap { margin-left: 0; width: 100%; }
  .bh-card-head { flex-direction: column; align-items: flex-start; }
  .bh-card-actions { width: 100%; }
}

/* ================ V115 · 更新弹窗(居中·美化·强制清缓存) ================ */
.seed-update-modal {
  position: fixed; inset: 0; z-index: 2000000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.seed-update-modal.open { opacity: 1; pointer-events: auto; }
.seed-update-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(90,60,180,0.45) 0%, rgba(6,10,25,0.85) 60%, rgba(6,10,25,0.95) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.seed-update-box {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  padding: 32px 30px 26px;
  background: linear-gradient(160deg, rgba(35,32,68,0.98) 0%, rgba(20,22,45,0.98) 100%);
  border: 1px solid rgba(124,92,255,0.35);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03) inset, 0 0 60px rgba(124,92,255,0.25);
  text-align: center;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  color: #e6e8ee;
  animation: seed-update-glow 3.6s ease-in-out infinite;
}
.seed-update-modal.open .seed-update-box { transform: translateY(0) scale(1); }
.seed-update-icon {
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7c5cff 0%, #4a3ec8 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(124,92,255,0.45);
  animation: seed-update-spin 4.5s linear infinite;
}
.seed-update-badge-tag {
  display: inline-block;
  padding: 3px 12px; margin-bottom: 10px;
  background: rgba(124,92,255,0.18);
  border: 1px solid rgba(124,92,255,0.5);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.4px;
  color: #d0c9ff;
}
.seed-update-title {
  margin: 0 0 10px;
  font-size: 22px; font-weight: 700;
  background: linear-gradient(90deg, #fff 0%, #d0c9ff 60%, #7c5cff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.seed-update-sub {
  margin: 0 0 22px;
  font-size: 13px; line-height: 1.65; opacity: 0.75;
}
.seed-update-version {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 22px;
  padding: 14px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.seed-update-vrow { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 0; }
.seed-update-vrow span { font-size: 11px; opacity: 0.55; }
.seed-update-vrow b { font-family: monospace; font-size: 14px; font-weight: 600; }
.seed-update-vrow .v-old { color: #fca5a5; }
.seed-update-vrow .v-new { color: #86efac; }
.seed-update-arrow { color: rgba(255,255,255,0.35); }
.seed-update-actions { display: flex; align-items: center; justify-content: center; }
.seed-update-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px;
  background: linear-gradient(135deg, #7c5cff 0%, #4a3ec8 100%);
  border: 0; border-radius: 10px;
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(124,92,255,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.seed-update-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(124,92,255,0.5);
}
.seed-update-primary:active { transform: translateY(0); }
.seed-update-primary:disabled { opacity: 0.7; cursor: default; }
.seed-update-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: batch-spin 0.85s linear infinite;
}

@keyframes seed-update-glow {
  0%, 100% { box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03) inset, 0 0 60px rgba(124,92,255,0.25); }
  50% { box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03) inset, 0 0 80px rgba(124,92,255,0.45); }
}
@keyframes seed-update-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ================ V115 · 批次详情模态框 · 复用现有 confirm-modal 骨架 ================ */
.bd-modal {
  position: fixed; inset: 0; z-index: 1900000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
  padding: 24px;
}
.bd-modal.open { opacity: 1; pointer-events: auto; }
.bd-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(6,10,25,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.bd-modal-box {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  padding: 0;
  background: linear-gradient(160deg, rgba(30,32,58,0.98) 0%, rgba(18,20,40,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.bd-modal.open .bd-modal-box { transform: translateY(0) scale(1); }

.bd-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.bd-modal-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.bd-modal-title h3 { margin: 0; font-size: 16px; font-weight: 600; }
.bd-modal-close {
  padding: 6px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: inherit; font-size: 18px; line-height: 1; cursor: pointer;
  transition: all 0.15s;
}
.bd-modal-close:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #fca5a5; }

.bd-modal-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(124,92,255,0.03);
}
.bd-modal-toolbar .btn-sm { padding: 6px 14px; font-size: 12.5px; }
.bd-modal-toolbar .bd-selectbar { margin-left: auto; font-size: 12.5px; opacity: 0.75; display: inline-flex; align-items: center; gap: 6px; }

.bd-modal-body {
  flex: 1 1 auto; overflow-y: auto;
  padding: 20px 24px;
}
.bd-modal-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 20px;
  margin-bottom: 18px;
  font-size: 12.5px;
}
.bd-modal-meta > div { display: flex; flex-direction: column; gap: 3px; }
.bd-modal-meta span { opacity: 0.55; font-size: 11.5px; }
.bd-modal-meta b { color: #e6e8ee; }

.bd-progress-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.bd-progress-bar {
  flex: 1 1 auto;
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden; position: relative;
}
.bd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cff 0%, #4ade80 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.bd-progress-percent { font-family: monospace; font-weight: 700; color: #86efac; font-size: 12px; min-width: 48px; text-align: right; }

.bd-task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
/* 复用 .batch-task-card 样式 · 无需重写 */

.bd-modal-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12.5px;
  background: rgba(255,255,255,0.015);
}
.bd-modal-pager-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bd-modal-pager select {
  padding: 4px 22px 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  color: inherit; font-size: 12.5px;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
}

/* ================ V116 · 专业导演优化选择器 ================ */
.director-picker-field {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124,92,255,0.06) 0%, rgba(244,114,182,0.04) 100%);
  border: 1px solid rgba(124,92,255,0.18);
  border-radius: 12px;
}
.director-toggle-label {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  cursor: pointer; user-select: none;
  font-size: 13.5px; font-weight: 500;
}
.director-toggle-label input[type="checkbox"] { accent-color: #7c5cff; width: 16px; height: 16px; margin: 0; }
.director-toggle-hint { font-size: 11.5px; opacity: 0.6; font-weight: normal; flex-basis: 100%; margin-left: 26px; }
.director-select {
  width: 100%;
  padding: 9px 32px 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: inherit; font-size: 13px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa4b2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.director-select:hover, .director-select:focus { border-color: rgba(124,92,255,0.5); outline: none; }
.director-select optgroup { color: #d0c9ff; font-weight: 600; background: rgba(20,22,45,1); }
.director-select option { color: #e6e8ee; background: rgba(30,32,58,1); padding: 4px; }

.director-preview {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 10px; padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(124,92,255,0.2);
  border-radius: 10px;
  animation: batch-fade-in-up 0.3s ease-out;
}
.director-preview-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,92,255,0.25) 0%, rgba(244,114,182,0.20) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.director-preview-info { flex: 1 1 auto; min-width: 0; }
.director-preview-name { font-size: 14px; font-weight: 600; color: #ffd166; margin-bottom: 3px; }
.director-preview-works { font-size: 11.5px; opacity: 0.65; margin-bottom: 4px; }
.director-preview-style { font-size: 12px; color: #d0c9ff; opacity: 0.9; }

/* 优化中 loading 提示(toast 增强版) */
.director-loading-toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  z-index: 1500000;
  padding: 12px 22px;
  background: linear-gradient(135deg, rgba(124,92,255,0.95) 0%, rgba(74,62,200,0.95) 100%);
  border-radius: 999px;
  color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 26px rgba(124,92,255,0.4);
  display: inline-flex; align-items: center; gap: 10px;
  animation: batch-fade-in-up 0.3s ease-out;
}
.director-loading-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: batch-spin 0.85s linear infinite;
}

/* ---------- 5 统计卡片 ---------- */
.batch-stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 22px; margin-bottom: 22px; }
.batch-stat-card {
  padding: 22px 20px; text-align: left;
  background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  min-height: 92px;
  transition: border-color 0.18s, transform 0.18s;
}
.batch-stat-card:hover { border-color: rgba(124,92,255,0.35); transform: translateY(-1px); }
.batch-stat-card-label { font-size: 13px; opacity: 0.6; margin-bottom: 8px; }
.batch-stat-card-value { font-size: 30px; font-weight: 700; letter-spacing: 0.5px; line-height: 1; }
.batch-stat-warn { color: #fbbf24; }
.batch-stat-ok { color: #86efac; }
.batch-stat-err { color: #fca5a5; }

/* 老 batch-stat-box 兼容(不用了但留着不删) */
.batch-stat-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 14px 12px; text-align: center; }
.batch-stat-label { font-size: 12px; opacity: 0.6; margin-bottom: 6px; }
.batch-stat-value { font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }

/* ---------- 任务列表面板 ---------- */
.batch-list-panel { padding: 20px 22px; }
/* toolbar 现在是两行:top(标题+过滤) · actions(主操作+auto+危险) */
.batch-list-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.batch-list-toolbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.batch-list-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.batch-list-title h3 { font-size: 16px; }
.batch-list-title .hint { font-size: 12.5px; opacity: 0.55; }
.batch-list-utils { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.batch-list-toolbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.batch-action-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.batch-action-group .btn-sm { padding: 6px 12px; font-size: 12.5px; }
.batch-action-danger { margin-left: auto; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.08); }
.batch-auto-append { margin-left: 6px; }
/* 主 CTA 按钮:开始批量创建 - 更明显 */
.batch-submit-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; box-shadow: 0 4px 14px rgba(124,92,255,0.28); }
/* checkbox 徽章 */
.batch-toolbar-check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; background: rgba(124,92,255,0.10); font-size: 12.5px; cursor: pointer; user-select: none; white-space: nowrap; }
.batch-toolbar-check input[type="checkbox"] { margin: 0; accent-color: #7c5cff; }
/* 状态过滤下拉:限宽 · 不再拉满 */
.batch-status-filter { padding: 6px 28px 6px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); border-radius: 6px; color: inherit; font-size: 12.5px; min-width: 110px; max-width: 140px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa4b2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; cursor: pointer; }
.batch-status-filter:hover { border-color: rgba(124,92,255,0.4); }
/* 图标按钮:方形 · 只放 svg */
.batch-icon-btn { padding: 6px 8px !important; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; }
.batch-icon-btn svg { display: block; }
/* 半透明危险按钮(次危险 · 比 btn-danger 弱) */
.btn-ghost-danger { background: rgba(239,68,68,0.08); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); padding: 6px 12px; border-radius: 6px; font-size: 12.5px; cursor: pointer; transition: all 0.15s; }
.btn-ghost-danger:hover { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.5); color: #fecaca; }

.batch-list-selectbar { padding: 8px 10px; margin-bottom: 10px; background: rgba(124,92,255,0.06); border-radius: 6px; font-size: 12.5px; }

/* 任务卡 */
#batch-task-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.batch-task-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s; position: relative; }
.batch-task-card:hover { border-color: rgba(124,92,255,0.35); }
.batch-task-card.batch-task-selected { border-color: rgba(124,92,255,0.7); background: rgba(124,92,255,0.06); }
.batch-task-card .btask-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.batch-task-card .btask-check { margin-right: 4px; accent-color: #7c5cff; cursor: pointer; }
.batch-task-card .btask-idx { opacity: 0.5; font-family: monospace; font-size: 11.5px; }
.batch-task-card .btask-status { padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.batch-task-card .btask-file { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.batch-task-card .btask-meta { font-size: 11.5px; opacity: 0.55; }
.batch-task-card .btask-taskid { font-family: monospace; font-size: 10.5px; opacity: 0.4; }
.btask-status-queued { background: rgba(59,130,246,0.15); color: #93c5fd; }
.btask-status-running { background: rgba(245,158,11,0.15); color: #fbbf24; }
.btask-status-succeeded { background: rgba(22,163,74,0.15); color: #86efac; }
.btask-status-failed { background: rgba(239,68,68,0.15); color: #fca5a5; }
.batch-task-card .btask-prompt { font-size: 12.5px; opacity: 0.75; line-height: 1.5; max-height: 3em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.batch-task-card .btask-actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.batch-task-card .btask-error { font-size: 11.5px; color: #fca5a5; background: rgba(239,68,68,0.08); padding: 6px 8px; border-radius: 6px; word-break: break-word; }
.batch-task-card .btask-video { width: 100%; border-radius: 8px; }

/* 空态 */
.batch-empty { padding: 60px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0.55; }
.batch-empty svg { opacity: 0.5; }
.batch-empty-title { font-size: 16px; margin-top: 6px; }

/* 分页 */
.batch-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 4px; margin-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 12.5px; flex-wrap: wrap; }
.batch-pager-right { display: flex; align-items: center; gap: 8px; }
.batch-pager select { padding: 4px 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; color: inherit; font-size: 12.5px; }

/* Excel 模式下:视频预览 panel 隐藏 · 左 panel 自动拉满整个 gen-grid 宽度 */
.gen-grid.excel-mode > .panel:nth-child(2) { display: none; }
.gen-grid.excel-mode { grid-template-columns: 1fr !important; }

@media (max-width: 900px) {
  .batch-upload-grid { grid-template-columns: 1fr; }
  .batch-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .batch-list-toolbar-right { width: 100%; }
}
@media (max-width: 600px) {
  #batch-task-list { grid-template-columns: 1fr; }
  .batch-hero { flex-direction: column; align-items: flex-start; }
  .batch-config-panel { flex-direction: column; align-items: flex-start; }
}
