/* ==========================================================================
   三平标书助手 · SanPingBidPilot — 前端样式（纯静态，无外部依赖）
   双皮肤：暗色霓虹（默认） / 浅色克制白底
   主题通过 html[data-theme="dark" | "light"] 切换，所有颜色/阴影均为 CSS 变量
   ========================================================================== */

:root {
  color-scheme: dark;

  /* 基础色板 —— 暗色霓虹 */
  --bg: #08090d;
  --bg-2: #0d0b18;

  --cyan: #00e5ff;
  --magenta: #ff2d95;
  --purple: #a855f7;
  --green: #39ff14;

  --amber: #ffd166;
  --red: #ff4d6d;
  --gray: #8b93b0;
  --blue: #4d8dff;

  --text: #e8ecff;
  --text-dim: #b3bbd8;
  --text-mute: #7d86a8;
  --heading: #eef2ff;
  --brand-title: #f2f6ff;
  --hover-fg: #ffffff;

  --line: rgba(120, 140, 255, 0.2);
  --line-soft: rgba(120, 140, 255, 0.12);
  --line-strong: rgba(120, 140, 255, 0.3);
  --line-mid: rgba(120, 140, 255, 0.22);

  --card-bg-a: rgba(22, 25, 44, 0.82);
  --card-bg-b: rgba(10, 11, 20, 0.88);
  --card-border: linear-gradient(135deg, rgba(0, 229, 255, 0.5), rgba(168, 85, 247, 0.38) 48%, rgba(255, 45, 149, 0.42));

  --body-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(0, 229, 255, 0.16), transparent 62%),
    radial-gradient(900px 560px at 92% 0%, rgba(168, 85, 247, 0.18), transparent 62%),
    radial-gradient(800px 600px at 50% 112%, rgba(255, 45, 149, 0.1), transparent 65%),
    linear-gradient(160deg, #08090d 0%, #0d0b18 58%, #0a0a12 100%);

  --grid-opacity: 1;
  --grid-color: rgba(120, 140, 255, 0.055);
  --scan-opacity: 0.32;
  --cursor-display: block;

  --focus-ring: rgba(0, 229, 255, 0.7);

  --radius: 18px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Microsoft YaHei", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;

  /* 表面 / 填充（用于替换各处 rgba 白/黑叠加） */
  --surface-faint: rgba(255, 255, 255, 0.018);
  --surface-subtle: rgba(255, 255, 255, 0.026);
  --surface-stat: rgba(255, 255, 255, 0.022);
  --surface-tabs: rgba(8, 9, 16, 0.6);
  --surface-table: rgba(6, 7, 13, 0.35);
  --surface-thead: rgba(11, 13, 24, 0.97);
  --surface-bar: rgba(255, 255, 255, 0.055);
  --surface-inset: rgba(7, 8, 15, 0.72);
  --hover-row: rgba(0, 229, 255, 0.045);
  --health-bg: rgba(10, 12, 22, 0.72);

  /* 语义色块 */
  --tint-accent: rgba(0, 229, 255, 0.08);
  --tint-accent-soft: rgba(0, 229, 255, 0.055);
  --tint-accent-line: rgba(0, 229, 255, 0.35);
  --tint-accent-strong: rgba(0, 229, 255, 0.16);
  --tint-purple: rgba(168, 85, 247, 0.08);
  --tint-purple-strong: rgba(168, 85, 247, 0.18);
  --tint-purple-line: rgba(168, 85, 247, 0.3);
  --tint-pink: rgba(255, 45, 149, 0.08);
  --tint-ok: rgba(57, 255, 20, 0.07);
  --tint-ok-line: rgba(57, 255, 20, 0.38);
  --tint-warn: rgba(255, 209, 102, 0.08);
  --tint-warn-line: rgba(255, 209, 102, 0.4);
  --tint-danger: rgba(255, 77, 109, 0.08);
  --tint-danger-line: rgba(255, 77, 109, 0.42);
  --tint-info: rgba(77, 141, 255, 0.09);
  --tint-info-line: rgba(77, 141, 255, 0.45);
  --tint-neutral: rgba(139, 147, 176, 0.09);
  --tint-neutral-line: rgba(139, 147, 176, 0.38);

  /* 文本局部色 */
  --mono-accent: #9fe9ff;
  --mono-table: #a9e9ff;
  --tag-fg: #dcc7ff;
  --gap-fg: #ffc9d3;
  --review-fg: #a9d1ff;
  --file-kind-fg: #bff4ff;
  --run-counts-fg: #9fb6e8;
  --run-error-fg: #ffb3b8;
  --file-missing-fg: #ffb3b8;
  --dot-idle: #5b6280;
  --placeholder: #6b7392;
  --health-online-line: rgba(57, 255, 20, 0.35);
  --health-rule-line: rgba(0, 229, 255, 0.4);
  --health-offline-line: rgba(139, 147, 176, 0.32);
  --health-demo-line: rgba(168, 85, 247, 0.42);
  --chip-x-fg: #ff9db0;

  /* 输入 / 按钮 */
  --input-bg: rgba(7, 8, 15, 0.72);
  --input-border: rgba(120, 140, 255, 0.24);
  --primary-bg: linear-gradient(100deg, #00e5ff 0%, #a855f7 52%, #ff2d95 100%);
  --primary-fg: #06060b;
  --ghost-bg: rgba(20, 24, 42, 0.6);
  --ghost-border: rgba(120, 140, 255, 0.3);
  --ghost-hover-border: rgba(0, 229, 255, 0.65);
  --spinner-border: rgba(255, 255, 255, 0.28);

  /* 皮肤切换控件 */
  --toggle-track: rgba(8, 9, 16, 0.6);
  --toggle-active-bg: linear-gradient(100deg, rgba(0, 229, 255, 0.18), rgba(168, 85, 247, 0.22));
  --toggle-active-fg: #eafaff;
  --toggle-active-border: rgba(0, 229, 255, 0.35);

  /* 渐变文字 */
  --grad-brand: linear-gradient(100deg, var(--cyan), var(--magenta));
  --grad-stat: linear-gradient(120deg, var(--cyan), var(--purple));
  --grad-pct: linear-gradient(120deg, #00e5ff, #a855f7 55%, #ff2d95);
  --grad-bar: linear-gradient(90deg, #00e5ff, #a855f7 55%, #ff2d95);
  --grad-text-color: transparent;
  --filter-brand: drop-shadow(0 0 10px rgba(0, 229, 255, 0.45));
  --filter-pct: drop-shadow(0 0 14px rgba(0, 229, 255, 0.4));
  --filter-dz: drop-shadow(0 0 12px rgba(0, 229, 255, 0.65));

  /* 文字霓虹 */
  --ts-brand: 0 0 14px rgba(0, 229, 255, 0.4), 0 0 34px rgba(168, 85, 247, 0.28);
  --ts-panel: 0 0 16px rgba(0, 229, 255, 0.22);
  --ts-stage: 0 0 14px rgba(0, 229, 255, 0.25);

  /* 阴影 / 发光 */
  --sh-card: 0 18px 46px -24px rgba(0, 0, 0, 0.9), 0 0 30px -14px rgba(0, 229, 255, 0.35), 0 0 46px -26px rgba(168, 85, 247, 0.5);
  --sh-health-hover: 0 0 20px -8px rgba(0, 229, 255, 0.6);
  --sh-health-online: 0 0 22px -10px rgba(57, 255, 20, 0.75);
  --sh-health-rule: 0 0 22px -10px rgba(0, 229, 255, 0.7);
  --sh-dot-online: 0 0 10px rgba(57, 255, 20, 0.9);
  --sh-dot-rule: 0 0 10px rgba(0, 229, 255, 0.9);
  --sh-dot-demo: 0 0 10px rgba(168, 85, 247, 0.8);
  --sh-notice-icon: 0 0 12px rgba(255, 209, 102, 0.6);
  --sh-dz-hover: 0 0 30px -10px rgba(0, 229, 255, 0.65), inset 0 0 34px -24px rgba(0, 229, 255, 0.9);
  --sh-dz-drag: 0 0 46px -8px rgba(0, 229, 255, 0.8), inset 0 0 40px -18px rgba(0, 229, 255, 0.85);
  --sh-chip-x: 0 0 16px -4px rgba(255, 77, 109, 0.8);
  --sh-focus: 0 0 0 1px rgba(0, 229, 255, 0.28), 0 0 22px -8px rgba(0, 229, 255, 0.7);
  --sh-primary: 0 8px 26px -12px rgba(0, 229, 255, 0.9), 0 0 26px -12px rgba(255, 45, 149, 0.8);
  --sh-primary-hover: 0 12px 34px -10px rgba(0, 229, 255, 0.95), 0 0 44px -8px rgba(255, 45, 149, 0.85);
  --sh-ghost-hover: 0 0 22px -8px rgba(0, 229, 255, 0.7);
  --sh-stage-running: 0 0 18px -8px rgba(0, 229, 255, 0.8);
  --sh-stage-success: 0 0 18px -9px rgba(57, 255, 20, 0.8);
  --sh-stage-failed: 0 0 18px -8px rgba(255, 77, 109, 0.8);
  --sh-step-done: 0 0 10px rgba(57, 255, 20, 0.8);
  --sh-step-active: 0 0 26px -8px rgba(0, 229, 255, 0.6), inset 0 0 26px -16px rgba(0, 229, 255, 0.9);
  --sh-step-active-dot: 0 0 12px rgba(0, 229, 255, 0.95);
  --sh-step-failed: 0 0 24px -10px rgba(255, 77, 109, 0.7);
  --sh-step-failed-dot: 0 0 12px rgba(255, 77, 109, 0.9);
  --sh-tab-active: inset 0 0 0 1px rgba(0, 229, 255, 0.35), 0 0 20px -10px rgba(0, 229, 255, 0.8);
  --sh-file-hover: 0 0 30px -10px rgba(0, 229, 255, 0.65);
  --sh-badge-dot: 0 0 8px currentColor;
  --sh-toast: 0 16px 42px -20px rgba(0, 0, 0, 0.95);
  --sh-retry: 0 0 32px -14px rgba(255, 176, 32, 0.75);
  --sh-retry-dot: 0 0 12px rgba(255, 176, 32, 0.9);
  --sh-run-hover: 0 0 28px -12px rgba(0, 229, 255, 0.7);
  --sh-toggle-active: 0 0 18px -8px rgba(0, 229, 255, 0.65);

  /* 特殊区域 */
  --scroll-thumb: #3a4a80;
  --scroll-track: #141827;
  --mask: rgba(4, 6, 14, 0.62);
  --toast-bg: rgba(12, 14, 26, 0.95);
  --toast-border: rgba(120, 140, 255, 0.3);
  --notice-bg: linear-gradient(100deg, rgba(255, 209, 102, 0.1), rgba(255, 45, 149, 0.06));
  --notice-fg: #ffe3a3;
  --notice-line: rgba(255, 209, 102, 0.35);
  --notice-code-fg: #ffe9b0;
  --notice-code-bg: rgba(0, 0, 0, 0.36);
  --retry-bg: linear-gradient(100deg, rgba(255, 176, 32, 0.14), rgba(255, 45, 149, 0.1));
  --retry-fg: #ffe6b8;
  --retry-line: rgba(255, 176, 32, 0.55);
  --retry-dot: #ffb020;
  --thead-line: rgba(120, 140, 255, 0.25);
  --row-line: rgba(255, 255, 255, 0.05);
  --missing-opacity: 0.62;
}

/* ---------- 浅色 / 白底皮肤 ---------- */

html[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f7f9;
  --bg-2: #eef1f5;

  --cyan: #2563eb;
  --magenta: #b45309;
  --purple: #4f46e5;
  --green: #15803d;

  --amber: #b45309;
  --red: #b91c1c;
  --gray: #64748b;
  --blue: #1d4ed8;

  --text: #1f2328;
  --text-dim: #475467;
  --text-mute: #5b6472;
  --heading: #111827;
  --brand-title: #111827;
  --hover-fg: #111827;

  --line: #e3e7ee;
  --line-soft: #eef1f5;
  --line-strong: #cfd6e0;
  --line-mid: #dfe4ec;

  --card-bg-a: #ffffff;
  --card-bg-b: #fcfdff;
  --card-border: linear-gradient(180deg, #e5e9f0, #e5e9f0);

  --body-image: linear-gradient(180deg, #f8f9fb 0%, #f5f7fa 55%, #f7f8fa 100%);
  --grid-opacity: 0;
  --scan-opacity: 0;
  --cursor-display: none;

  --focus-ring: rgba(37, 99, 235, 0.65);

  --surface-faint: #fbfcfd;
  --surface-subtle: #fafbfc;
  --surface-stat: #fafbfc;
  --surface-tabs: #f3f5f8;
  --surface-table: #ffffff;
  --surface-thead: #ffffff;
  --surface-bar: #eef1f5;
  --surface-inset: #ffffff;
  --hover-row: #f5f8ff;
  --health-bg: #ffffff;

  --tint-accent: #eff4ff;
  --tint-accent-soft: #f5f8ff;
  --tint-accent-line: #c7d8f7;
  --tint-accent-strong: #e8f0ff;
  --tint-purple: #f4f2ff;
  --tint-purple-strong: #ece9ff;
  --tint-purple-line: #ddd6fe;
  --tint-pink: #fff4f7;
  --tint-ok: #effaf3;
  --tint-ok-line: #b7e4c7;
  --tint-warn: #fffbeb;
  --tint-warn-line: #f0d49a;
  --tint-danger: #fef2f2;
  --tint-danger-line: #f3c0c0;
  --tint-info: #eff5ff;
  --tint-info-line: #bfd3f7;
  --tint-neutral: #f3f4f6;
  --tint-neutral-line: #d8dde4;

  --mono-accent: #1d4ed8;
  --mono-table: #1d4ed8;
  --tag-fg: #5b21b6;
  --gap-fg: #b91c1c;
  --review-fg: #1d4ed8;
  --file-kind-fg: #1d4ed8;
  --run-counts-fg: #1d4ed8;
  --run-error-fg: #b91c1c;
  --file-missing-fg: #b91c1c;
  --dot-idle: #9aa3af;
  --placeholder: #6b7280;
  --health-online-line: #bbe5c9;
  --health-rule-line: #bfd3f7;
  --health-offline-line: #d8dde4;
  --health-demo-line: #ddd6fe;
  --chip-x-fg: #b91c1c;

  --input-bg: #ffffff;
  --input-border: #d5dbe3;
  --primary-bg: #2563eb;
  --primary-fg: #ffffff;
  --ghost-bg: #ffffff;
  --ghost-border: #d5dbe3;
  --ghost-hover-border: #2563eb;
  --spinner-border: rgba(255, 255, 255, 0.45);

  --toggle-track: #eef1f5;
  --toggle-active-bg: #ffffff;
  --toggle-active-fg: #1f2328;
  --toggle-active-border: #d5dbe3;

  --grad-brand: none;
  --grad-stat: none;
  --grad-pct: none;
  --grad-bar: #2563eb;
  --grad-text-color: #2563eb;
  --filter-brand: none;
  --filter-pct: none;
  --filter-dz: none;

  --ts-brand: none;
  --ts-panel: none;
  --ts-stage: none;

  --sh-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px -18px rgba(16, 24, 40, 0.18);
  --sh-health-hover: none;
  --sh-health-online: none;
  --sh-health-rule: none;
  --sh-dot-online: none;
  --sh-dot-rule: none;
  --sh-dot-demo: none;
  --sh-notice-icon: none;
  --sh-dz-hover: none;
  --sh-dz-drag: none;
  --sh-chip-x: none;
  --sh-focus: 0 0 0 3px rgba(37, 99, 235, 0.16);
  --sh-primary: 0 1px 2px rgba(16, 24, 40, 0.08), 0 4px 12px -8px rgba(37, 99, 235, 0.4);
  --sh-primary-hover: 0 2px 4px rgba(16, 24, 40, 0.1), 0 8px 18px -10px rgba(37, 99, 235, 0.45);
  --sh-ghost-hover: none;
  --sh-stage-running: none;
  --sh-stage-success: none;
  --sh-stage-failed: none;
  --sh-step-done: none;
  --sh-step-active: none;
  --sh-step-active-dot: none;
  --sh-step-failed: none;
  --sh-step-failed-dot: none;
  --sh-tab-active: inset 0 0 0 1px #2563eb;
  --sh-file-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 8px 20px -12px rgba(16, 24, 40, 0.22);
  --sh-badge-dot: none;
  --sh-toast: 0 12px 32px -16px rgba(16, 24, 40, 0.24);
  --sh-retry: none;
  --sh-retry-dot: none;
  --sh-run-hover: 0 2px 4px rgba(16, 24, 40, 0.05);
  --sh-toggle-active: 0 1px 2px rgba(16, 24, 40, 0.08);

  --scroll-thumb: #c1c7d0;
  --scroll-track: #f1f3f5;
  --mask: rgba(15, 23, 42, 0.4);
  --toast-bg: #ffffff;
  --toast-border: #dfe4ec;
  --notice-bg: #fffbeb;
  --notice-fg: #7c4a03;
  --notice-line: #f0cf8e;
  --notice-code-fg: #7c4a03;
  --notice-code-bg: #fff4d6;
  --retry-bg: #fff8e8;
  --retry-fg: #7c4a03;
  --retry-line: #f0c36d;
  --retry-dot: #d97706;
  --thead-line: #e6eaf0;
  --row-line: #eef1f5;
  --missing-opacity: 0.72;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--body-image);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 滚动条（两套皮肤都覆盖） */
html {
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: var(--scroll-thumb);
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

/* ---------- 背景层：网格 + 扫描线（浅色下整体隐藏） ---------- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: var(--grid-opacity);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, rgba(0, 0, 0, 0.65) 45%, transparent 82%);
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, rgba(0, 0, 0, 0.65) 45%, transparent 82%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: var(--scan-opacity);
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.028) 0,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 4px
  );
  animation: scanDrift 14s linear infinite;
}

@keyframes scanDrift {
  from { background-position: 0 0; }
  to { background-position: 0 64px; }
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 320px;
  z-index: 0;
  display: var(--cursor-display);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.13), rgba(168, 85, 247, 0.07) 45%, transparent 70%);
  filter: blur(6px);
  mix-blend-mode: screen;
  transition: opacity 0.35s ease;
  will-change: transform;
}

/* ---------- 通用 ---------- */

h1, h2, h3, p, dl, dd {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.mono {
  font-family: var(--mono);
}

.glass {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, var(--card-bg-a), var(--card-bg-b)) padding-box,
    var(--card-border) border-box;
  box-shadow: var(--sh-card);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: calc(100% - 44px);
  max-width: 1680px;
  margin: 14px auto 0;
  padding: 14px 20px;
  animation: panelIn 0.5s cubic-bezier(0.22, 0.85, 0.25, 1) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  display: block;
  height: 30px;
  width: auto;
  background: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-title);
  text-shadow: var(--ts-brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text .dot-sep {
  color: var(--text-mute);
  text-shadow: none;
}

.brand-en {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--grad-text-color);
  -webkit-text-fill-color: var(--grad-text-color);
  filter: var(--filter-brand);
}

.brand-text p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.health {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--health-bg);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.health:hover {
  border-color: var(--line-strong);
  box-shadow: var(--sh-health-hover);
}

.logout-btn {
  padding: 7px 10px;
  flex: 0 0 auto;
}

.health .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot-idle);
}

.health-text {
  font-weight: 600;
  color: var(--text);
}

.health-ver {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
}

.health-ver:empty {
  display: none;
}

.health.online {
  border-color: var(--health-online-line);
  box-shadow: var(--sh-health-online);
}

.health.online .dot {
  background: var(--green);
  box-shadow: var(--sh-dot-online);
  animation: dotPulse 2s ease-in-out infinite;
}

.health.rule {
  border-color: var(--health-rule-line);
  box-shadow: var(--sh-health-rule);
}

.health.rule .dot {
  background: var(--cyan);
  box-shadow: var(--sh-dot-rule);
}

.health.offline {
  border-color: var(--health-offline-line);
}

.health.demo {
  border-color: var(--health-demo-line);
}

.health.demo .dot {
  background: var(--purple);
  box-shadow: var(--sh-dot-demo);
}

.health.checking .dot {
  background: var(--text-mute);
  animation: dotPulse 1.2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- 离线提示条 ---------- */

.notice {
  display: none;
  align-items: center;
  gap: 10px;
  width: calc(100% - 44px);
  max-width: 1680px;
  margin: 12px auto 0;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--notice-line);
  background: var(--notice-bg);
  color: var(--notice-fg);
  font-size: 13px;
  line-height: 1.6;
}

.notice.show {
  display: flex;
}

.notice-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #1b1503;
  background: var(--amber);
  box-shadow: var(--sh-notice-icon);
}

.notice code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--notice-code-fg);
  background: var(--notice-code-bg);
}

/* ---------- 三栏布局 ---------- */

.layout {
  display: grid;
  grid-template-columns: 330px 348px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px 22px 48px;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.col-mid,
.col-right {
  min-width: 0;
}

.panel {
  padding: 18px;
  animation: panelIn 0.55s cubic-bezier(0.22, 0.85, 0.25, 1) both;
}

.col-left > .panel:nth-child(1) { animation-delay: 0.06s; }
.col-left > .panel:nth-child(2) { animation-delay: 0.12s; }
.col-mid { animation-delay: 0.18s; }
.col-right { animation-delay: 0.24s; }

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.panel-head h2 {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--heading);
  text-shadow: var(--ts-panel);
  white-space: nowrap;
}

.panel-tag {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--tint-accent-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  white-space: nowrap;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 上传区 ---------- */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 16px 22px;
  border-radius: 14px;
  border: 1.5px dashed var(--tint-accent-line);
  background: linear-gradient(180deg, var(--tint-accent-soft), var(--tint-purple));
  text-align: center;
  cursor: pointer;
  transition: border-color 0.22s, box-shadow 0.28s, transform 0.22s, background 0.22s;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--cyan);
  box-shadow: var(--sh-dz-hover);
}

.dropzone.drag {
  border-color: var(--cyan);
  background: linear-gradient(180deg, var(--tint-accent), var(--tint-pink));
  box-shadow: var(--sh-dz-drag);
  transform: translateY(-1px);
}

.dz-icon {
  color: var(--cyan);
  filter: var(--filter-dz);
}

.dz-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.dz-sub {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--tint-accent-line);
  background: var(--tint-accent-soft);
  animation: panelIn 0.3s ease-out both;
}

.chip-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid var(--tint-accent-line);
  background: var(--tint-accent);
}

.chip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.chip-name {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-size {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
}

.chip-x {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--tint-danger-line);
  background: var(--tint-danger);
  color: var(--chip-x-fg);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.chip-x:hover {
  background: var(--tint-danger);
  color: var(--red);
  box-shadow: var(--sh-chip-x);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.field label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s;
}

.input::placeholder {
  color: var(--placeholder);
}

.input:focus {
  border-color: var(--cyan);
  box-shadow: var(--sh-focus);
}

/* ---------- 按钮 ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.26s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: saturate(0.5);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.btn-primary {
  color: var(--primary-fg);
  background: var(--primary-bg);
  box-shadow: var(--sh-primary);
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow: var(--sh-primary-hover);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.55) 50%, transparent 72%);
  transform: translateX(-130%);
  transition: transform 0.62s ease;
  pointer-events: none;
}

.btn-primary:not(:disabled):hover::after {
  transform: translateX(130%);
}

html[data-theme="light"] .btn-primary::after {
  display: none;
}

.btn-ghost {
  color: var(--text);
  border-color: var(--ghost-border);
  background: var(--ghost-bg);
}

.btn-ghost:not(:disabled):hover {
  color: var(--hover-fg);
  border-color: var(--ghost-hover-border);
  box-shadow: var(--sh-ghost-hover);
}

#btnStart {
  margin-top: 14px;
}

.hint {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-mute);
}

.name-hint {
  margin-top: 0;
}

.name-hint.is-auto {
  color: var(--cyan);
}

/* ---------- 当前任务 ---------- */

.kv {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px 12px;
  font-size: 12.5px;
}

.kv dt {
  color: var(--text-mute);
}

.kv dd {
  color: var(--text-dim);
  word-break: break-all;
  line-height: 1.5;
}

.kv dd.mono {
  font-size: 11.5px;
  color: var(--mono-accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: var(--surface-stat);
}

.stat-num {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  background: var(--grad-stat);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--grad-text-color);
  -webkit-text-fill-color: var(--grad-text-color);
}

.stat-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}

/* ---------- 进度区 ---------- */

.stage-pill {
  flex: 0 0 auto;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-mute);
  background: var(--surface-subtle);
  white-space: nowrap;
}

.stage-pill[data-state="running"] {
  color: var(--cyan);
  border-color: var(--tint-accent-line);
  background: var(--tint-accent);
  box-shadow: var(--sh-stage-running);
}

.stage-pill[data-state="success"] {
  color: var(--green);
  border-color: var(--tint-ok-line);
  background: var(--tint-ok);
  box-shadow: var(--sh-stage-success);
}

.stage-pill[data-state="failed"] {
  color: var(--red);
  border-color: var(--tint-danger-line);
  background: var(--tint-danger);
  box-shadow: var(--sh-stage-failed);
}

.progress-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.progress-stage {
  font-size: 15px;
  font-weight: 650;
  color: var(--heading);
  text-shadow: var(--ts-stage);
}

.progress-msg {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-mute);
}

.progress-pct {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad-pct);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--grad-text-color);
  -webkit-text-fill-color: var(--grad-text-color);
  filter: var(--filter-pct);
}

.bar {
  position: relative;
  height: 10px;
  margin: 14px 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-bar);
  overflow: hidden;
}

.bar-fill {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad-bar);
  box-shadow: var(--sh-stage-running);
  transition: width 0.55s cubic-bezier(0.22, 0.85, 0.25, 1);
}

.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  background-size: 200% 100%;
  animation: barShine 1.9s linear infinite;
  opacity: 0.6;
}

html[data-theme="light"] .bar-fill::after {
  display: none;
}

@keyframes barShine {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}

/* 时间轴 */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: linear-gradient(180deg, var(--tint-accent-line), var(--tint-purple-strong), var(--tint-pink));
  opacity: 0.8;
  pointer-events: none;
}

html[data-theme="light"] .timeline::before {
  opacity: 1;
  background: var(--line);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: var(--surface-faint);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.step .dot {
  width: 11px;
  height: 11px;
  margin-left: 3px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: transparent;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.step-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.25s;
}

.step-label em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  margin-left: 4px;
}

.step-desc {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-status {
  justify-self: end;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  font-size: 10.5px;
  color: var(--text-mute);
  white-space: nowrap;
}

.step[data-state="done"] {
  border-color: var(--tint-ok-line);
}

.step[data-state="done"] .dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: var(--sh-step-done);
}

.step[data-state="done"] .step-label {
  color: var(--green);
}

.step[data-state="done"] .step-status {
  color: var(--green);
  border-color: var(--tint-ok-line);
  background: var(--tint-ok);
}

.step[data-state="active"] {
  border-color: var(--tint-accent-line);
  background: linear-gradient(90deg, var(--tint-accent), var(--tint-purple));
  box-shadow: var(--sh-step-active);
}

.step[data-state="active"] .dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--sh-step-active-dot);
  animation: dotPulse 1.3s ease-in-out infinite;
}

.step[data-state="active"] .step-label {
  color: var(--heading);
}

.step[data-state="active"] .step-status {
  color: var(--cyan);
  border-color: var(--tint-accent-line);
  background: var(--tint-accent);
}

.step[data-state="active"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(0, 229, 255, 0.12) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: stepFlow 2s linear infinite;
  pointer-events: none;
}

html[data-theme="light"] .step[data-state="active"]::after {
  display: none;
}

@keyframes stepFlow {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}

.step[data-state="failed"] {
  border-color: var(--tint-danger-line);
  background: var(--tint-danger);
  box-shadow: var(--sh-step-failed);
}

.step[data-state="failed"] .dot {
  background: var(--red);
  border-color: var(--red);
  box-shadow: var(--sh-step-failed-dot);
}

.step[data-state="failed"] .step-label {
  color: var(--red);
}

.step[data-state="failed"] .step-status {
  color: var(--red);
  border-color: var(--tint-danger-line);
  background: var(--tint-danger);
}

.step[data-state="skipped"] {
  border-color: var(--tint-warn-line);
  background: var(--tint-warn);
}

.step[data-state="skipped"] .dot {
  background: var(--amber);
  border-color: var(--amber);
}

.step[data-state="skipped"] .step-label {
  color: var(--amber);
}

.step[data-state="skipped"] .step-status {
  color: var(--amber);
  border-color: var(--tint-warn-line);
  background: var(--tint-warn);
}

.alert-error {
  display: none;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--tint-danger-line);
  background: var(--tint-danger);
  color: var(--red);
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.alert-error.show {
  display: block;
  animation: panelIn 0.3s ease-out both;
}

/* ---------- 结果区 ---------- */

.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-tabs);
}

.tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.25s, box-shadow 0.25s;
}

.tab:hover {
  color: var(--hover-fg);
}

.tab[aria-selected="true"] {
  color: var(--hover-fg);
  background: linear-gradient(100deg, var(--tint-accent), var(--tint-purple));
  box-shadow: var(--sh-tab-active);
}

html[data-theme="light"] .tab[aria-selected="true"] {
  background: var(--tint-accent);
}

.tab .count {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-dim);
}

.tab[aria-selected="true"] .count {
  color: var(--cyan);
  background: var(--tint-accent);
}

.tab-panels {
  margin-top: 14px;
}

.tab-panel {
  animation: panelIn 0.32s ease-out both;
}

.table-wrap {
  max-height: 430px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--surface-table);
}

.table-wrap::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: var(--scroll-thumb);
}

.table-wrap::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
  font-size: 12.5px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  border-bottom: 1px solid var(--thead-line);
  background: var(--surface-thead);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--row-line);
  color: var(--text);
  line-height: 1.6;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: var(--hover-row);
}

td.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--mono-table);
  white-space: nowrap;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--tint-purple-line, rgba(168, 85, 247, 0.3));
  background: var(--tint-purple);
  font-size: 11.5px;
  color: var(--tag-fg);
  white-space: nowrap;
}

td .gap {
  color: var(--gap-fg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: var(--sh-badge-dot);
}

.badge.full {
  color: var(--green);
  background: var(--tint-ok);
  border-color: var(--tint-ok-line);
}

.badge.partial {
  color: var(--amber);
  background: var(--tint-warn);
  border-color: var(--tint-warn-line);
}

.badge.none {
  color: var(--red);
  background: var(--tint-danger);
  border-color: var(--tint-danger-line);
}

.badge.missing {
  color: var(--gray);
  background: var(--tint-neutral);
  border-color: var(--tint-neutral-line);
}

/* needs_review=true 的“待核”角标：不新增状态值，只做附加标记 */
.review-flag {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px dashed var(--tint-info-line);
  background: var(--tint-info);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--review-fg);
  white-space: nowrap;
  vertical-align: middle;
}

/* 页签上的“需复核 N 条” */
.review-count {
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--tint-info-line);
  background: var(--tint-info);
  font-size: 10px;
  font-weight: 600;
  color: var(--review-fg);
  white-space: nowrap;
}

.empty {
  padding: 26px 12px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-mute);
}

/* 文件下载 */
.file-note {
  margin: 0 0 10px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 11px;
}

.file-grid > .empty {
  grid-column: 1 / -1;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-radius: 13px;
  border: 1px solid var(--line-mid);
  background: var(--surface-subtle);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.22s, box-shadow 0.26s, background 0.22s;
}

.file-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: var(--tint-accent-soft);
  box-shadow: var(--sh-file-hover);
}

.file-kind {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--tint-accent-line);
  background: linear-gradient(140deg, var(--tint-accent-strong), var(--tint-purple-strong));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--file-kind-fg);
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.file-name {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-arrow {
  flex: 0 0 auto;
  color: var(--cyan);
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}

.file-card:hover .file-arrow {
  opacity: 1;
  transform: translateY(2px);
}

.render-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.render-bar .hint {
  margin: 0;
  flex: 1;
  min-width: 150px;
}

/* ---------- Toast ---------- */

.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--toast-border);
  border-left: 3px solid var(--cyan);
  background: var(--toast-bg);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
  box-shadow: var(--sh-toast);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  animation: toastIn 0.28s ease-out both;
}

.toast.out {
  animation: toastOut 0.24s ease-in both;
}

.toast.success { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--amber); }
.toast.error { border-left-color: var(--red); }

.toast-msg {
  flex: 1;
  word-break: break-word;
}

.toast-x {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.toast-x:hover {
  color: var(--hover-fg);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ---------- 响应式 ---------- */

/* 1280 及以上：三栏 */
@media (max-width: 1279px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .col-right {
    grid-column: 1 / -1;
  }
  .table-wrap {
    max-height: 400px;
  }
}

/* 1024 及以下：单栏堆叠 */
@media (max-width: 1080px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 16px 40px;
    gap: 14px;
  }
  .col-right {
    grid-column: auto;
  }
  .topbar {
    width: calc(100% - 32px);
    padding: 12px 14px;
  }
  .notice {
    width: calc(100% - 32px);
  }
  .brand-text h1 {
    font-size: 18px;
  }
  .brand-text p {
    display: none;
  }
  .progress-pct {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand-logo {
    height: 26px;
  }
  .brand-text h1 {
    font-size: 16px;
  }
  .health {
    padding: 6px 11px;
    font-size: 12px;
  }
  .panel {
    padding: 15px 14px;
  }
  .tabs {
    flex-wrap: nowrap;
  }
  .tab {
    font-size: 11.5px;
    padding: 7px 6px;
  }
  .tab .count {
    font-size: 9.5px;
  }
  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .render-bar .btn {
    width: 100%;
  }
  .bar {
    margin: 12px 0 15px;
  }
  .step-desc {
    display: none;
  }
  .theme-opt span {
    display: none;
  }
  .theme-opt {
    padding: 6px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-glow {
    display: none;
  }
}

/* ---------- 顶栏动作区 ---------- */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* 皮肤切换：分段按钮，两套皮肤下都清晰可辨 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--toggle-track);
  flex: 0 0 auto;
}

.theme-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-mute);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.theme-opt:hover {
  color: var(--text);
}

.theme-opt[aria-pressed="true"],
html[data-theme="dark"] .theme-opt[data-theme-target="dark"],
html[data-theme="light"] .theme-opt[data-theme-target="light"] {
  color: var(--toggle-active-fg);
  background: var(--toggle-active-bg);
  border-color: var(--toggle-active-border);
  box-shadow: var(--sh-toggle-active);
}

.theme-opt svg {
  display: block;
}

.history-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.history-btn .count {
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--tint-accent-soft);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* ---------- 常驻重连提示条 ---------- */

.retry-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: calc(100% - 44px);
  max-width: 1680px;
  margin: 10px auto 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--retry-line);
  background: var(--retry-bg);
  color: var(--retry-fg);
  font-size: 12.5px;
  box-shadow: var(--sh-retry);
}

.retry-bar[hidden] {
  display: none;
}

.retry-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--retry-dot);
  box-shadow: var(--sh-retry-dot);
  animation: retryPulse 1.2s ease-in-out infinite;
}

.retry-text {
  flex: 1;
  min-width: 0;
}

.retry-help {
  flex: 1 0 100%;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed var(--retry-line);
  font-size: 11.5px;
  line-height: 1.65;
}

.retry-help[hidden] {
  display: none;
}

.retry-help-code {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--retry-line);
  background: var(--notice-code-bg);
  color: var(--retry-fg);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.retry-help-note {
  color: var(--retry-fg);
}

@keyframes retryPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ---------- 历史任务抽屉 ---------- */

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--mask);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.drawer-mask[hidden] {
  display: none;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(92vw, 430px);
  padding: 18px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 16px 0 0 16px;
  border-right: 0;
  overflow: hidden;
  animation: drawerIn 0.3s cubic-bezier(0.22, 0.85, 0.25, 1) both;
}

.drawer[hidden] {
  display: none;
}

@keyframes drawerIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-head h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-title);
}

.drawer-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-hint {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-mute);
}

.run-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 4px;
}

.run-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.run-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-mid);
  background: var(--surface-subtle);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.24s;
}

.run-row:hover {
  border-color: var(--cyan);
  background: var(--tint-accent-soft);
  box-shadow: var(--sh-run-hover);
}

.run-row.is-current {
  border-color: var(--cyan);
  background: var(--tint-accent);
}

.run-row.is-locked {
  cursor: default;
  opacity: 0.92;
}

.run-row.is-locked:hover {
  border-color: var(--line-mid);
  background: var(--surface-subtle);
  box-shadow: none;
}

.run-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.run-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-meta,
.run-counts {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
}

.run-counts {
  color: var(--run-counts-fg);
}

.run-error {
  font-size: 11px;
  line-height: 1.5;
  color: var(--run-error-fg);
  word-break: break-word;
}

.run-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.run-empty {
  padding: 22px 10px;
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
}

.run-status {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.run-status.ok {
  border: 1px solid var(--tint-ok-line);
  background: var(--tint-ok);
  color: var(--green);
}

.run-status.running {
  border: 1px solid var(--tint-accent-line);
  background: var(--tint-accent);
  color: var(--cyan);
}

.run-status.failed {
  border: 1px solid var(--tint-danger-line);
  background: var(--tint-danger);
  color: var(--red);
}

/* ---------- 文件未生成 ---------- */

.file-card.is-missing {
  cursor: default;
  opacity: var(--missing-opacity);
  border-style: dashed;
}

.file-card.is-missing:hover {
  transform: none;
  border-color: var(--line-mid);
  background: var(--surface-subtle);
  box-shadow: none;
}

.file-card.is-missing .file-arrow {
  display: none;
}

.file-card.is-missing .file-kind {
  border-color: var(--tint-neutral-line);
  background: var(--tint-neutral);
  color: var(--text-dim);
}

.file-missing {
  color: var(--file-missing-fg);
}

/* ---------- 生成按钮 loading ---------- */

.btn .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--spinner-border);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.btn.loading .spinner {
  display: inline-block;
}

.btn.loading > svg:first-child {
  display: none;
}

.btn.loading {
  cursor: progress;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 失败重跑 ---------- */

.alert-actions {
  margin-top: 10px;
}

.alert-actions[hidden] {
  display: none;
}

@media (max-width: 600px) {
  .topbar-actions {
    gap: 6px;
  }
  .history-btn {
    padding: 6px 9px;
  }
  .retry-bar {
    width: calc(100% - 32px);
  }
}

/* ============ 解析模式切换 / AI Key（2026-11 新增） ============ */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.mode-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.mode-opt:hover { border-color: var(--line-strong); }
.mode-opt.is-active {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, .08);
  color: var(--text);
}
.mode-title { font-size: 13px; font-weight: 600; }
.mode-sub { font-size: 11px; color: var(--text-mute); }
.mode-opt.is-active .mode-sub { color: var(--text-dim); }
.ai-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(127, 140, 255, .04);
}
.ai-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.ai-state {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--text-mute);
}
.ai-state[data-state="on"] {
  color: var(--green);
  border-color: rgba(57, 255, 20, .45);
}
.ai-state[data-state="off"] {
  color: var(--amber);
  border-color: rgba(255, 209, 102, .4);
}
.ai-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px;
  align-items: center;
}
.ai-row .input { min-width: 0; }
html[data-theme="light"] .mode-opt.is-active {
  border-color: #0a84ff;
  background: rgba(10, 132, 255, .08);
}
html[data-theme="light"] .ai-state[data-state="on"] {
  color: #087f5b;
  border-color: rgba(8, 127, 91, .35);
}
html[data-theme="light"] .ai-state[data-state="off"] {
  color: #a15c00;
  border-color: rgba(161, 92, 0, .35);
}

/* ============ 历史清理（P-G-19）：克制的警示色 ============ */
.drawer-stats{display:flex;flex-wrap:wrap;gap:10px 14px;margin:8px 0 10px;padding:10px 12px;
  border:1px solid var(--line-soft);border-radius:10px;background:var(--panel-2,transparent);
  font-size:12px;color:var(--text-mute);}
.drawer-stats b{color:var(--text-dim);font-weight:600;}
.drawer-foot{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0 2px;
  border-top:1px solid var(--line-soft);margin-top:8px;}
.keep-label{font-size:12px;color:var(--text-mute);display:inline-flex;align-items:center;gap:6px;}
.keep-input{width:52px;padding:3px 6px;border:1px solid var(--line);border-radius:6px;
  background:transparent;color:var(--text-dim);font-size:12px;}
.run-del{border:1px solid rgba(180,84,76,.35);background:transparent;color:#a9605a;
  font-size:11px;padding:2px 8px;border-radius:6px;cursor:pointer;margin-left:auto;}
.run-del:hover{border-color:rgba(180,84,76,.65);background:rgba(180,84,76,.08);}
.run-del:disabled{opacity:.4;cursor:not-allowed;border-color:var(--line);color:var(--text-mute);}
.danger-btn{border:1px solid rgba(180,84,76,.4);background:rgba(180,84,76,.08);color:#a9605a;
  padding:5px 12px;border-radius:8px;font-size:12px;cursor:pointer;}
.danger-btn:hover{background:rgba(180,84,76,.14);border-color:rgba(180,84,76,.7);}
.run-ref{display:block;font-size:11px;color:var(--text-mute);margin-top:4px;}
.modal-mask{position:fixed;inset:0;background:rgba(10,14,28,.5);z-index:80;}
.modal-card{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:81;
  width:min(520px,92vw);max-height:78vh;overflow:auto;padding:18px 20px;border-radius:16px;
  border:1px solid var(--line);background:var(--panel, #161a2b);box-shadow:0 24px 70px rgba(0,0,0,.45);}
.modal-card h3{margin:0 0 10px;font-size:15px;color:var(--text);}
.modal-body p{margin:6px 0;font-size:12.5px;line-height:1.65;color:var(--text-dim);}
.modal-body .warn-text{color:#a9605a;}
.modal-body .clean-list{margin:4px 0 10px;padding-left:18px;max-height:150px;overflow:auto;
  font-size:11.5px;color:var(--text-mute);}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;}
html[data-theme="light"] .modal-card{background:#fff;}
html[data-theme="light"] .modal-mask{background:rgba(20,26,40,.35);}
html[data-theme="light"] .run-del,html[data-theme="light"] .danger-btn{color:#974d47;
  border-color:rgba(151,77,71,.4);}

/* ============ 第一批：证据库 / 佐证联动 / 钉钉数据源（只读） ============ */
.ev-drawer{width:min(40vw,620px);min-width:360px;}
.ev-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line-soft);padding-bottom:8px;}
.ev-tabs .tab{padding:6px 12px;border-radius:8px;border:1px solid var(--line-soft);background:transparent;
  color:var(--text-mute);font-size:12.5px;cursor:pointer;}
.ev-tabs .tab.active{border-color:var(--brand-line,rgba(90,200,250,.5));color:var(--brand-title);
  background:var(--brand-soft,rgba(90,200,250,.08));}
.ev-body{flex:1;min-height:0;overflow:auto;padding-right:2px;}
.ev-panel{display:flex;flex-direction:column;gap:10px;min-height:100%;}
.ev-panel[hidden]{display:none;}
.ev-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.ev-toolbar .input{flex:1 1 160px;min-width:120px;padding:7px 10px;border:1px solid var(--line);
  border-radius:8px;background:transparent;color:var(--text-dim);font-size:12px;}
.ev-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;}
.ev-table-wrap{overflow:auto;max-height:none;}
.ev-table-wrap table{min-width:860px;font-size:11.5px;}
.ev-table-wrap td,.ev-table-wrap th{padding:6px 8px;vertical-align:top;}
.ev-fname{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ev-path{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-mute);}
.ev-st{display:inline-block;padding:1px 7px;border-radius:999px;font-size:11px;border:1px solid transparent;white-space:nowrap;}
.ev-ok{color:#5ecb9a;border-color:rgba(94,203,154,.35);background:rgba(94,203,154,.08);}
.ev-miss{color:#e0796f;border-color:rgba(224,121,111,.35);background:rgba(224,121,111,.08);}
.ev-chg{color:#e0b15e;border-color:rgba(224,177,94,.35);background:rgba(224,177,94,.08);}
.ev-warn{color:#c9a24d;border-color:rgba(201,162,77,.35);}
.ev-pager{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:4px;}
.ev-detail-head{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.ev-req{font-weight:700;color:var(--brand-title);font-size:13px;}
.ev-text{font-size:12px;line-height:1.65;color:var(--text-dim);margin:6px 0 2px;}
.ev-hit{border:1px solid var(--line-soft);border-radius:10px;padding:10px 12px;background:var(--panel-2,transparent);}
.ev-hit.ev-focus{border-color:rgba(90,200,250,.55);box-shadow:0 0 0 2px rgba(90,200,250,.14) inset;}
.ev-hit-head{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12.5px;}
.ev-hit-meta{font-size:11px;color:var(--text-mute);margin:4px 0 8px;}
.ev-reuse{margin:6px 0;padding:6px 9px;border-left:3px solid rgba(90,200,250,.55);
  background:rgba(90,200,250,.07);font-size:11.5px;color:var(--brand-title);border-radius:0 6px 6px 0;}
.ev-file{display:flex;gap:8px;align-items:center;padding:5px 0;border-top:1px dashed var(--line-soft);font-size:11.5px;}
.ev-file .ev-fname{flex:1;}
.ev-empty{padding:14px;border:1px dashed var(--line-soft);border-radius:10px;font-size:12px;color:var(--text-mute);}
.ev-error{color:#e0796f;border-color:rgba(224,121,111,.4);}
.ev-verify{border:1px solid var(--line-soft);border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:8px;}
.ev-verify[hidden]{display:none;}
.ev-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:11.5px;}
.ev-chip{padding:2px 9px;border-radius:999px;border:1px solid var(--line-soft);font-size:11.5px;}
.ev-row-hit{outline:2px solid rgba(90,200,250,.6);outline-offset:-2px;background:rgba(90,200,250,.08);}
.ev-cell{white-space:nowrap;}
.ev-link{font-size:11px;padding:2px 8px;}
.sync-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.sync-card{border:1px solid var(--line-soft);border-radius:9px;padding:9px 11px;background:var(--panel-2,transparent);}
.sync-name{font-size:12.5px;font-weight:600;color:var(--text-dim);margin-bottom:5px;}
.sync-meta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:11px;color:var(--text-mute);}
.sync-meta b{color:var(--text-dim);}
.ev-sub{margin:4px 0 0;font-size:12.5px;color:var(--text-dim);}
.sync-logs{display:flex;flex-direction:column;gap:6px;}
.sync-log{display:flex;gap:10px;align-items:center;font-size:11.5px;padding:6px 8px;border:1px solid var(--line-soft);border-radius:8px;}
.sync-diff-table{border:1px solid var(--line-soft);border-radius:9px;padding:9px 11px;margin-top:8px;font-size:11.5px;}
.sync-line{padding:3px 0;border-top:1px dashed var(--line-soft);word-break:break-all;}
.sync-line s{color:var(--text-mute);}
.ev-preview{position:absolute;inset:0;z-index:8;display:flex;flex-direction:column;gap:8px;padding:18px;
  background:var(--panel,#161a2b);border-radius:16px 0 0 16px;}
.ev-preview[hidden]{display:none;}
.ev-preview-head{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12.5px;color:var(--text-dim);}
.ev-preview-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto;}
.ev-preview-body iframe{width:100%;height:100%;border:0;border-radius:8px;background:#fff;}
.ev-preview-body img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;}
html[data-theme="light"] .ev-ok{color:#1f7a4d;border-color:rgba(31,122,77,.3);background:rgba(31,122,77,.07);}
html[data-theme="light"] .ev-miss{color:#974d47;border-color:rgba(151,77,71,.3);background:rgba(151,77,71,.07);}
html[data-theme="light"] .ev-chg{color:#8a5a12;border-color:rgba(138,90,18,.3);background:rgba(138,90,18,.07);}
html[data-theme="light"] .ev-reuse{background:rgba(20,120,170,.06);border-left-color:rgba(20,120,170,.5);}
@media (max-width:1100px){
  .ev-drawer{width:100vw;min-width:0;border-radius:0;padding:14px;}
  .ev-preview{border-radius:0;padding:14px;}
  .sync-grid{grid-template-columns:1fr;}
}
.ev-list{display:flex;flex-direction:column;gap:8px;}
.ev-item{border:1px solid var(--line-soft);border-radius:10px;padding:8px 10px;background:var(--panel-2,transparent);}
.ev-item-top{display:flex;align-items:center;gap:7px;font-size:11.5px;}
.ev-id{font-weight:700;color:var(--brand-title);}
.ev-grow{flex:1;}
.ev-item-main{display:flex;gap:8px;align-items:baseline;margin:5px 0 2px;font-size:12px;min-width:0;}
.ev-item-main strong{color:var(--text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55%;}
.ev-item-main .ev-fname{color:var(--text-mute);font-size:11px;flex:1;}
.ev-item-path{font-size:10.5px;color:var(--text-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ev-item-meta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:10.5px;color:var(--text-mute);margin-top:4px;}
.ev-item-meta b{color:var(--text-dim);}
.ev-toolbar .input{flex:1 1 46%;}
.ev-toolbar #evCat,.ev-toolbar #evStatus{flex:0 1 116px;}
.ev-toolbar .input{width:auto;min-width:0;flex:1 1 120px;}

/* ===== P-G-23～P-G-26 证据映射写操作：改绑 / 裁决 / 变更记录 ===== */
.ev-tabs{flex-wrap:wrap;}
.ev-bind{border:1px dashed var(--line-soft);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:6px;margin-top:8px;min-width:0;}
.ev-bind-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.ev-bind-file{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--text-mute);min-width:0;}
.ev-bind-file select{flex:1 1 220px;min-width:0;max-width:100%;padding:4px 6px;border-radius:6px;border:1px solid var(--line-soft);background:transparent;color:var(--text);font-size:12px;}
.ev-bind-actions{display:flex;gap:8px;flex-wrap:wrap;}
.ev-adj-card{border:1px solid var(--line-soft);border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:8px;}
.ev-adj-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border-top:1px dashed var(--line-soft);padding-top:8px;}
.ev-adj-unit{display:flex;flex-direction:column;gap:2px;flex:1 1 260px;min-width:0;word-break:break-all;}
.ev-adj-unit .mono{font-size:12px;}
.ev-cat{font-size:11px;color:var(--text-mute);border:1px solid var(--line-soft);border-radius:999px;padding:1px 8px;}
.ev-issue{border:1px solid var(--line-soft);border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:4px;}
.ev-issue .mono{font-size:12px;word-break:break-all;}
.ev-chg-item{display:flex;flex-direction:column;gap:4px;}
.ev-chg-meta{font-size:12px;color:var(--text-mute);}
.ev-chg-btns{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px;}
.ev-chg-detail{border-top:1px dashed var(--line-soft);padding-top:8px;display:flex;flex-direction:column;gap:6px;min-width:0;}
.ev-chg-detail[hidden]{display:none;}
.ev-json{margin:0;padding:8px;border-radius:8px;background:rgba(127,127,127,.06);font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-all;max-height:220px;overflow:auto;}
.ev-verify-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.ev-verify-meta{font-size:12px;color:var(--text-mute);word-break:break-all;}
.ev-verify-list{display:flex;flex-direction:column;gap:4px;}
.ev-verify-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0;}
.ev-verify-row .mono{font-size:12px;word-break:break-all;}
.ev-write-inline{border:1px solid var(--line-soft);border-radius:10px;padding:8px 10px;margin:8px 0;}
.ev-write-inline[hidden]{display:none;}
.ev-bind-inline-head{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:4px;}
.ev-bind-inline-head strong{font-size:13px;word-break:break-all;}
