:root {
  --bg: #eef4fb;
  --card: rgba(255, 255, 255, 0.62);
  --card-hover: rgba(255, 255, 255, 0.82);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-deep: #1e3a8a;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --border: rgba(148, 163, 184, 0.28);
  --success: #059669;
  --warn: #d97706;
  --danger: #dc2626;
  --glass-shadow: 0 10px 40px -10px rgba(30, 58, 138, 0.18);
  --glass-shadow-strong: 0 18px 48px -12px rgba(30, 58, 138, 0.24);
  --glass-blur: blur(18px) saturate(180%);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 35%, #f0f9ff 65%, #e0f2fe 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 1;
}

.app-header {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  position: relative;
  box-shadow: 0 1px 12px rgba(37, 99, 235, 0.06);
  z-index: 10;
}

.app-footer {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.app-header h1 {
  margin: 0;
  font-size: 28px;
  text-align: center;
  font-weight: 700;
  padding: 8px 0;
  background: linear-gradient(135deg, #1d4ed8, #2563eb, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-header .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.header-nav {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

.header-nav .button-link {
  font-size: 14px;
  padding: 6px 12px;
}

.card {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: var(--glass-shadow);
  color: var(--text);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: all 0.6s ease;
  pointer-events: none;
}

.card:hover::before {
  left: 150%;
}

.card:hover {
  background: var(--card-hover);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.button-link,
button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.button-link:hover,
button:hover {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  background: #94a3b8;
  color: #fff;
  transform: none;
}

button.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

button.btn-secondary:hover {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

/* 上传表单样式 */
.upload-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.file-type-selector {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
}

.file-type-selector:hover {
  border-color: var(--accent);
}

.file-type-selector:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.progress-summary {
  color: var(--muted);
  margin-bottom: 8px;
}

.file-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.file-list li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

/* 上传列表中的徽标 */
.file-list li {
  position: relative;
  padding-left: 8px;
}

.file-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.file-name {
  vertical-align: middle;
}

/* Markdown内容基础样式 */
.markdown-body {
  line-height: 1.8;
  font-size: 15px;
  color: var(--text);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.markdown-body h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 20px;
}

.markdown-body h3 {
  font-size: 18px;
  color: #1d4ed8;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 28px;
  margin: 16px 0;
}

.markdown-body li {
  margin: 8px 0;
  line-height: 1.7;
}

.markdown-body li>ul,
.markdown-body li>ol {
  margin: 4px 0;
}

/* 表格样式 */
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  table-layout: fixed;
  /* 启用固定布局以控制列宽 */
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  word-wrap: break-word;
  /* 允许换行 */
  overflow-wrap: break-word;
}

.markdown-body th {
  background-color: rgba(37, 99, 235, 0.06);
  font-weight: 600;
  color: var(--text);
}

/* 调整具体列宽（五列模块审查表：序号 | 审查项 | 参考标准 | 评估结论 | 结论） */
.review-report table:not(.oar-summary-table):has(thead th:nth-child(5):last-child) th:nth-child(1) {
  width: 45px;
  text-align: center;
}

.review-report table:not(.oar-summary-table):has(thead th:nth-child(5):last-child) td:nth-child(1) {
  text-align: center;
}

.review-report table:not(.oar-summary-table):has(thead th:nth-child(5):last-child) th:nth-child(2) {
  width: 15%;
}

.review-report table:not(.oar-summary-table):has(thead th:nth-child(5):last-child) th:nth-child(3) {
  width: 25%;
}

.review-report table:not(.oar-summary-table):has(thead th:nth-child(5):last-child) th:nth-child(5) {
  width: 85px;
  text-align: center;
}

.review-report table:not(.oar-summary-table):has(thead th:nth-child(5):last-child) td:nth-child(5) {
  text-align: center;
}

/* 非五列辅助表格：默认自适应布局 */
.review-report table.oar-summary-table,
.review-report table:not(:has(thead th:nth-child(5))) {
  table-layout: auto;
}

.review-report table.oar-summary-table {
  table-layout: fixed;
  width: 100%;
}

.review-report table:not(:has(thead th:nth-child(5))) th:nth-child(1),
.review-report table:not(:has(thead th:nth-child(5))) td:nth-child(1) {
  width: 12%;
  min-width: 108px;
  max-width: 150px;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: normal;
  line-height: 1.4;
}

.review-report table:not(:has(thead th:nth-child(5))) th:nth-child(2),
.review-report table:not(:has(thead th:nth-child(5))) td:nth-child(2) {
  width: 22%;
}

.review-report table:not(:has(thead th:nth-child(5))) th:nth-child(3),
.review-report table:not(:has(thead th:nth-child(5))) td:nth-child(3) {
  width: 66%;
}

/* OAR 指南依据汇总表（七列）：窄屏保持列宽并在表内横向滚动 */
.review-report .oar-summary-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.review-report .oar-summary-table-scroll:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.review-report table.oar-summary-table th:nth-child(1),
.review-report table.oar-summary-table td:nth-child(1) {
  width: 5%;
  text-align: center;
  white-space: nowrap;
}

.review-report table.oar-summary-table th:nth-child(2),
.review-report table.oar-summary-table td:nth-child(2) {
  width: 11%;
}

.review-report table.oar-summary-table th:nth-child(3),
.review-report table.oar-summary-table td:nth-child(3) {
  width: 17%;
}

.review-report table.oar-summary-table th:nth-child(4),
.review-report table.oar-summary-table td:nth-child(4) {
  width: 15%;
}

.review-report table.oar-summary-table th:nth-child(5),
.review-report table.oar-summary-table td:nth-child(5) {
  width: 18%;
}

.review-report table.oar-summary-table th:nth-child(6),
.review-report table.oar-summary-table td:nth-child(6) {
  width: 28%;
}

.review-report table.oar-summary-table th:nth-child(7),
.review-report table.oar-summary-table td:nth-child(7) {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

.review-report table.oar-summary-table th,
.review-report table.oar-summary-table td {
  vertical-align: top;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 8px 7px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: hidden;
}

.review-report table.oar-summary-table {
  min-width: 760px;
}

@media (min-width: 900px) {
  .review-report table.oar-summary-table {
    min-width: 0;
  }
}

@media print {
  .review-report table.oar-summary-table {
    min-width: 0;
  }
}

.review-report table.oar-summary-table .oar-evidence-summary {
  display: block;
  margin-bottom: 4px;
}

.review-report table.oar-summary-table .oar-evidence-source {
  color: #0f172a;
  font-weight: 700;
}

.review-report table.oar-summary-table .oar-evidence-more {
  display: block;
  margin: 2px 0 6px;
  color: #64748b;
  font-size: 12px;
}

.review-report table.oar-summary-table .oar-evidence-verdict {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.review-report table.oar-summary-table details.oar-evidence-details {
  margin-top: 6px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.04);
  color: var(--text);
}

.review-report table.oar-summary-table details.oar-evidence-details:not([open]),
.review-report table.oar-summary-table details.oar-evidence-details > summary {
  display: none;
}

.review-report table.oar-summary-table .oar-evidence-detail-list {
  padding: 0 8px 8px;
}

.review-report table.oar-summary-table .oar-evidence-detail-item {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.review-report table.oar-summary-table .oar-evidence-detail-source {
  margin-bottom: 3px;
  color: #0f172a;
  font-weight: 700;
}

.review-report table.oar-summary-table .oar-evidence-label {
  color: #475569;
  font-weight: 600;
}

.review-report .oar-global-evidence-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -24px -24px 18px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px 12px 0 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.review-report .oar-global-evidence-toolbar button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.24);
}

.review-report .oar-global-evidence-toolbar button:hover {
  background: #1d4ed8;
}

@media (max-width: 640px) {
  .review-report .oar-global-evidence-toolbar {
    margin: -16px -16px 16px;
    padding: 10px 16px;
  }

  .review-report .oar-global-evidence-toolbar button {
    flex: 1 1 0;
    padding-inline: 8px;
    font-size: 13px;
  }
}

@media print {
  .review-report .oar-global-evidence-toolbar {
    display: none !important;
  }
}

.review-report table.oar-summary-table .oar-evidence-empty {
  color: #64748b;
}

/* 状态徽章样式 */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge-pass {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-badge-warn {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.status-badge-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* 总结卡片样式 */
.summary-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.summary-item {
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid transparent;
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}

.summary-item.high {
  background: rgba(254, 226, 226, 0.5);
  border-color: #ef4444;
}

.summary-item.medium {
  background: rgba(254, 249, 195, 0.5);
  border-color: #f59e0b;
}

.summary-item.low {
  background: rgba(220, 252, 231, 0.5);
  border-color: #10b981;
}

.summary-item h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 700;
}

.summary-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.markdown-body th {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  font-weight: 600;
  color: #1e40af;
}

.markdown-body tr:nth-child(even) td {
  background: rgba(241, 245, 249, 0.5);
}

.markdown-body tr:hover td {
  background: rgba(219, 234, 254, 0.5);
}

.tips {
  color: var(--text);
  margin-top: 20px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tips strong {
  color: #1d4ed8;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.tips ul {
  margin: 0;
  padding-left: 20px;
}

.tips li {
  margin-bottom: 6px;
  line-height: 1.5;
}

/* 审查总结样式 */
.summary-section {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.summary-section h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  color: var(--text);
}

.summary-section h3 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1d4ed8;
}

.summary-section ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.summary-section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.summary-section em {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
}

/* 风险等级标记 */
.risk-high::before {
  content: "🟡";
  font-size: 14px;
}

/* 批评者报告特定样式 */
.critic-report .markdown-body h2 {
  color: #7c3aed;
  border-bottom-color: #a78bfa;
  position: relative;
  padding-left: 28px;
}

.critic-report .markdown-body h2::before {
  content: "📋";
  position: absolute;
  left: 0;
  font-size: 20px;
}

.critic-report .markdown-body h3 {
  color: #6d28d9;
  margin-top: 20px;
  padding: 8px 12px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.12), transparent);
  border-left: 3px solid #a78bfa;
  border-radius: 0 6px 6px 0;
}

/* 批评者报告中的核心内容框 */
.critic-report .markdown-body>ul:first-of-type {
  background: linear-gradient(135deg, rgba(243, 232, 255, 0.6) 0%, rgba(233, 213, 255, 0.2) 100%);
  padding: 16px 20px 16px 36px;
  border-radius: 8px;
  border: 1px solid #e9d5ff;
  margin: 20px 0;
}

/* 批评意见列表项样式 */
.critic-report .markdown-body li {
  position: relative;
  padding-left: 8px;
}

/* 绿色勾选项 */
.critic-report .markdown-body li.status-pass {
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.08), transparent);
  padding: 8px 12px;
  margin: 12px 0;
  border-left: 3px solid #059669;
  border-radius: 0 6px 6px 0;
}

/* 警告项 */
.critic-report .markdown-body li.status-warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent);
  padding: 8px 12px;
  margin: 12px 0;
  border-left: 3px solid #f59e0b;
  border-radius: 0 6px 6px 0;
}

/* 错误/高风险项 */
.critic-report .markdown-body li.status-error {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), transparent);
  padding: 8px 12px;
  margin: 12px 0;
  border-left: 3px solid #ef4444;
  border-radius: 0 6px 6px 0;
}

/* 数值高亮 */
.critic-report .markdown-body strong {
  color: #6d28d9;
  font-weight: 600;
  background: rgba(167, 139, 250, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
}

/* 补充发现部分的样式 */
.critic-report .markdown-body h3 {
  transition: all 0.2s ease;
}

/* 各种列表项悬停效果 */
.critic-report .markdown-body li.status-pass:hover,
.critic-report .markdown-body li.status-warning:hover,
.critic-report .markdown-body li.status-error:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 批评者报告表格样式优化 */
.critic-report .markdown-body table {
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.1);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e9d5ff;
}

.critic-report .markdown-body th {
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  color: #6d28d9;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.critic-report .markdown-body td {
  transition: all 0.2s ease;
}

.critic-report .markdown-body tr:hover td {
  background: rgba(167, 139, 250, 0.06);
}

/* 仲裁者报告样式 - 蓝色主题 */
.arbitrator-report .markdown-body h2 {
  color: #1e40af;
  border-bottom-color: #3b82f6;
  padding-left: 28px;
}

.arbitrator-report .markdown-body h2::before {
  content: "⚖️";
  position: absolute;
  left: 0;
  font-size: 20px;
}

.arbitrator-report .markdown-body h3 {
  color: #2563eb;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent);
  border-left: 3px solid #3b82f6;
  margin-top: 20px;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
}

/* 仲裁者报告表格样式 - 蓝色主题 */
.arbitrator-report .markdown-body table {
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dbeafe;
}

.arbitrator-report .markdown-body th {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  color: #1e40af;
  font-weight: 600;
}

.arbitrator-report .markdown-body tr:hover td {
  background: rgba(59, 130, 246, 0.06);
}

.risk-medium::before {
  content: "🟡";
  font-size: 14px;
}

.risk-low::before {
  content: "🟢";
  font-size: 14px;
}

/* Agent卡片样式 */
.agent-card {
  position: relative;
  overflow: hidden;
}

.agent-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.agent-icon {
  font-size: 28px;
}

.agent-header h2 {
  margin: 0;
  font-size: 20px;
}

.agent-status {
  margin-bottom: 16px;
}

.status-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-text {
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}

.agent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-retry {
  background: var(--warn);
}

.codex-run-info {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
  color: #334155;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.codex-run-info code {
  color: #1e3a8a;
  white-space: pre-wrap;
  word-break: break-all;
}

.codex-artifact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

.codex-run-info a:not([href]) {
  display: none;
}

/* 文件卡片样式 */
.file-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(224,242,254,0.4) 100%);
  border-color: #93c5fd;
}

/* MD转换进度条 */
.md-convert-progress {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(239,246,255,0.8) 0%, rgba(219,234,254,0.5) 100%);
  border: 1px solid #93c5fd;
  border-radius: 10px;
}

.md-convert-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.md-convert-icon {
  font-size: 1.15em;
}

.md-convert-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e40af;
}

.md-convert-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.md-convert-bar {
  flex: 1;
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.md-convert-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #22d3ee 100%);
  border-radius: 5px;
  transition: width 0.4s ease;
  position: relative;
  overflow: hidden;
}

.md-convert-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 2s infinite;
}

.md-convert-bar-fill.done {
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.md-convert-bar-fill.done::after {
  animation: none;
}

.md-convert-bar-fill.error {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.md-convert-bar-fill.error::after {
  animation: none;
}

.md-convert-percent {
  min-width: 40px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.md-convert-detail {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #64748b;
  min-height: 1.2em;
}

/* 审查Agent主题色 - 蓝色系 */
.review-agent {
  background: linear-gradient(135deg, rgba(239,246,255,0.7) 0%, rgba(219,234,254,0.5) 100%);
  border-color: #93c5fd;
}

.review-agent .agent-header h2 {
  color: #1e40af;
}

.review-agent .status-text {
  color: #2563eb;
}

/* 批评者Agent主题色 - 紫色系 */
.critic-agent {
  background: linear-gradient(135deg, rgba(243,232,255,0.7) 0%, rgba(233,213,255,0.5) 100%);
  border-color: #c4b5fd;
}

.critic-agent .agent-header h2 {
  color: #6d28d9;
}

.critic-agent .status-text {
  color: #7c3aed;
}

/* 仲裁者Agent主题色 - 绿色系 */
.arbitrator-agent {
  background: linear-gradient(135deg, rgba(236,253,245,0.7) 0%, rgba(209,250,229,0.5) 100%);
  border-color: #6ee7b7;
}

.arbitrator-agent .agent-header h2 {
  color: #047857;
}

.arbitrator-agent .status-text {
  color: #059669;
}

/* 进度动画 */
.progress-spinner {
  display: inline-flex;
  align-items: center;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 状态样式 */
.agent-card.processing .status-text {
  font-weight: 600;
}

.agent-card.completed .status-text {
  color: var(--success);
  font-weight: 600;
}

.agent-card.error .status-text {
  color: var(--danger);
  font-weight: 600;
}

.error-message {
  color: #991b1b;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
}

/* 示例文件区域样式 */
.sample-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.sample-section h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.sample-section p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--muted);
}

.sample-files {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.sample-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 16px 12px 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.sample-file-item:hover {
  background: #e0f2fe;
  border-color: #60a5fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sample-file-item.selected {
  background: #f0fdf4;
  border-color: #34d399;
}

.sample-file-item .checkmark {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.sample-file-item.selected .checkmark {
  display: flex;
}

/* 徽标样式 */
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.badge-review {
  background: #2563eb;
  /* 蓝色：审查文件 */
}

.badge-basis {
  background: #6b7280;
  /* 灰色：审查依据（放疗医嘱） */
}

.sample-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.file-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-info strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.file-info small {
  font-size: 12px;
  color: var(--muted);
}

/* 详细进度显示样式 */
.detailed-progress {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

/* 进度条容器 */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.progress-bar {
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #22d3ee 100%);
  border-radius: 6px;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

/* 进度条动画效果 */
.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progress-percentage {
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
  min-width: 45px;
}

/* 简化的进度信息样式 */
.progress-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.progress-row {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.progress-item {
  flex: 1;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 13px;
}

.progress-item.pending {
  color: var(--muted);
  background: transparent;
}

.progress-item.processing {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  font-weight: 500;
}

.progress-item.completed {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  font-weight: 500;
}

.progress-item.error {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  font-weight: 500;
}

.progress-separator {
  margin: 0 6px;
  color: var(--muted);
  font-size: 14px;
  opacity: 0.6;
}

/* 分割线样式 */
.progress-divider {
  margin: 10px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.6), transparent);
  position: relative;
}

.progress-divider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 1px;
  background: var(--border);
}

/* LLM统计信息 */
.llm-stats {
  margin-top: 0;
  padding: 8px 10px;
  background: transparent;
  border-radius: 6px;
  border: none;
}

.stats-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stats-line {
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.3;
  flex-wrap: wrap;
}

.stats-line>span {
  margin-right: 4px;
  white-space: nowrap;
}

.stats-line .separator {
  margin: 0 6px;
  color: var(--muted);
  opacity: 0.5;
}

.stats-line .tokens-count,
.stats-line .tokens-speed,
.stats-line .elapsed-time,
.stats-line .cost-estimate {
  font-weight: 600;
  color: var(--text);
  margin: 0 2px;
}

/* 费用高亮 */
.cost-estimate {
  color: #dc2626;
  font-weight: 700;
}

/* Agent卡片内进度显示优化 */
.agent-card.processing .detailed-progress {
  display: block !important;
  animation: none;
  /* 防止处理中的闪烁动画 */
}

.agent-card.processing .progress-spinner {
  display: none !important;
}

/* 防止闪屏优化 */
.agent-card * {
  transition: none;
}

.agent-card.processing *,
.agent-card.completed * {
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

/* 通用评估项样式 */
.markdown-body li[data-status="pass"]::before {
  content: "✅";
  margin-right: 6px;
}

.markdown-body li[data-status="warning"]::before {
  content: "⚠️";
  margin-right: 6px;
}

.markdown-body li[data-status="error"]::before {
  content: "❌";
  margin-right: 6px;
}

/* 响应式设计 */
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .markdown-body {
    font-size: 14px;
  }

  .markdown-body h2 {
    font-size: 18px;
  }

  .markdown-body h3 {
    font-size: 16px;
  }

  .progress-item {
    font-size: 13px;
    padding: 8px;
  }

  .progress-icon {
    font-size: 16px;
  }
}

/* 平滑折叠动画 */
.detailed-progress {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 进度项动画 */
.progress-item {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 任务恢复提示框 */
.restore-prompt {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeInPrompt 0.3s ease;
}

.restore-prompt-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.restore-prompt h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.3rem;
}

.restore-prompt p {
  margin: 10px 0;
  color: #666;
  font-size: 0.95rem;
}

.restore-prompt-actions {
  margin-top: 25px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.restore-prompt-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 120px;
}

.restore-prompt-actions .btn-primary {
  background: #007bff;
  color: white;
}

.restore-prompt-actions .btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.restore-prompt-actions .btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.restore-prompt-actions .btn-secondary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

@keyframes fadeInPrompt {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 任务完成卡片 */
.task-complete-card {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: white;
  margin-bottom: 20px;
}

.task-complete-content {
  text-align: center;
  padding: 20px;
}

.task-complete-content h2 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.task-complete-content p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.task-complete-content .btn-primary {
  background: white;
  color: #2563eb;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.task-complete-content .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* 专家反馈按钮样式 */
.btn-expert-feedback {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-expert-feedback:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

/* 专家反馈对话框样式 */
.feedback-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeInPrompt 0.3s ease;
}

.feedback-dialog {
  background: white;
  border-radius: 16px;
  padding: 0;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.feedback-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.feedback-dialog-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.feedback-dialog-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.feedback-dialog-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.feedback-dialog-body {
  padding: 24px;
}

.feedback-dialog-body label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #374151;
  font-size: 15px;
}

.feedback-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.feedback-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.feedback-input::placeholder {
  color: #9ca3af;
}

.feedback-dialog-footer {
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.btn-feedback-ok {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  min-width: 120px;
}

.btn-feedback-ok:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-feedback-ok:active {
  transform: translateY(0);
}

/* 审查确认对话框样式 */
.review-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.review-confirm-dialog {
  background: white;
  border-radius: 20px;
  padding: 0;
  max-width: 95vw;
  width: 95%;
  max-height: 92vh;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  animation: slideUpBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

@keyframes slideUpBounce {
  0% {
    transform: translateY(100px) scale(0.8);
    opacity: 0;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.review-confirm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.review-confirm-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.confirm-header-icon {
  font-size: 28px;
  margin-right: 12px;
  animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-10deg);
  }

  75% {
    transform: rotate(10deg);
  }
}

.review-confirm-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  flex: 1;
  z-index: 1;
}

.review-confirm-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  z-index: 1;
}

.review-confirm-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.review-confirm-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.confirm-hint {
  margin: 0 0 24px 0;
  color: #6b7280;
  font-size: 15px;
  text-align: center;
  padding: 12px 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  animation: fadeInDown 0.5s ease 0.2s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confirm-section {
  margin-bottom: 24px;
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}

.confirm-section:nth-child(2) {
  animation-delay: 0.1s;
}

.confirm-section:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confirm-section:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.confirm-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
}

.section-icon {
  font-size: 24px;
}

.confirm-section-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  flex: 1;
}

.file-count {
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.confirm-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.confirm-file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  animation: slideInLeft 0.4s ease both;
}

.confirm-file-list li:nth-child(1) {
  animation-delay: 0.1s;
}

.confirm-file-list li:nth-child(2) {
  animation-delay: 0.15s;
}

.confirm-file-list li:nth-child(3) {
  animation-delay: 0.2s;
}

.confirm-file-list li:nth-child(4) {
  animation-delay: 0.25s;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.confirm-file-list li:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #3b82f6;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.confirm-file-list .file-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.confirm-file-list .file-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.confirm-file-list .file-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.prompt-preview-section {
  border-style: dashed;
  border-color: #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.prompt-source-badge {
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  background: #e0f2fe;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
}

.prompt-preview-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-preview-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #eef2ff;
  border: 1px dashed #c7d2fe;
  color: #1d4ed8;
  border-radius: 10px;
  font-size: 14px;
}

.prompt-preview-error {
  display: none;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecdd3;
  color: #b91c1c;
  border-radius: 10px;
  font-size: 14px;
}

.prompt-preview-hint {
  font-size: 13px;
  color: #6b7280;
}

.prompt-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .prompt-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prompt-block {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.prompt-block-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.prompt-block pre,
.prompt-block textarea.prompt-textarea {
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  margin: 0;
  max-height: 550px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.prompt-block textarea.prompt-textarea {
  width: 100%;
  min-height: 400px;
  border: 1px solid #334155;
  resize: vertical;
  box-sizing: border-box;
}

.prompt-block textarea.prompt-textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.review-confirm-footer {
  padding: 20px 28px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.model-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-selector label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.model-selector select {
  padding: 8px 14px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.model-selector select:hover {
  border-color: #3b82f6;
}

.model-selector select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auto-report-variant-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.auto-report-variant-selector select {
  padding: 8px 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: white;
  cursor: pointer;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
}

.btn-confirm-cancel {
  background: white;
  color: #6b7280;
  border: 2px solid #d1d5db;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 100px;
}

.btn-confirm-cancel:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-confirm-start {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  min-width: 140px;
  position: relative;
  overflow: hidden;
}

.btn-confirm-start::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-confirm-start:hover::before {
  width: 300px;
  height: 300px;
}

.btn-confirm-start:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-confirm-start:active {
  transform: translateY(-1px);
}

/* 空列表提示 */
.confirm-file-list .empty-list-hint {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  padding: 16px;
  background: transparent;
  border: 2px dashed #d1d5db;
}

/* 审查依据子部分样式 */
.basis-subsection {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.basis-subsection:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.basis-subsection:first-child {
  margin-top: 12px;
}

.subsection-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.subsection-icon {
  font-size: 20px;
}

.subsection-title {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  flex: 1;
}

.file-count-small {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 10px;
  border-radius: 999px;
}

/* RAG知识库样式 */
.rag-status-badge {
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #10b981, #059669);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  animation: pulse-success 2s ease-in-out infinite;
}

@keyframes pulse-success {

  0%,
  100% {
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  }

  50% {
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
  }
}

.rag-info {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #d1fae5;
  border-radius: 8px;
  padding: 14px;
  margin-top: 8px;
}

.rag-description {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #047857;
  line-height: 1.5;
}

.rag-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rag-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #d1fae5;
  border-radius: 6px;
  font-size: 13px;
  color: #059669;
  font-weight: 500;
  transition: all 0.2s ease;
}

.rag-stat-item:hover {
  background: #f0fdf4;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.rag-stat-item .stat-icon {
  font-size: 16px;
}

.rag-stat-item .stat-text {
  font-weight: 500;
}

/* 审查对象和依据区域特殊样式 */
.review-objects-section {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.review-objects-section:hover {
  border-color: #60a5fa;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
}

.review-basis-section {
  border-color: #d1d5db;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.review-basis-section:hover {
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(156, 163, 175, 0.15);
}

/* 进度步骤条样式 */
.progress-stepper-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
}

.stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.stepper-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stepper-icon {
  font-size: 24px;
  transition: all 0.3s ease;
}

.stepper-check {
  position: absolute;
  font-size: 28px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stepper-label {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-align: center;
  transition: all 0.3s ease;
}

.stepper-line {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  margin: 0 -12px;
  margin-bottom: 40px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.stepper-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 待处理状态 */
.stepper-item[data-status="pending"] .stepper-circle {
  border-color: #e2e8f0;
  background: #fff;
}

.stepper-item[data-status="pending"] .stepper-label {
  color: #9ca3af;
}

/* 进行中状态 */
.stepper-item[data-status="active"] .stepper-circle {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  animation: pulse-ring 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3);
}

@keyframes pulse-ring {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }
}

.stepper-item[data-status="active"] .stepper-icon {
  transform: scale(1.1);
}

.stepper-item[data-status="active"] .stepper-label {
  color: #2563eb;
  font-weight: 600;
}

/* 已完成状态 */
.stepper-item[data-status="completed"] .stepper-circle {
  border-color: #10b981;
  background: linear-gradient(135deg, #10b981, #059669);
}

.stepper-item[data-status="completed"] .stepper-icon {
  opacity: 0;
  transform: scale(0);
}

.stepper-item[data-status="completed"] .stepper-check {
  opacity: 1;
  transform: scale(1);
  color: white;
}

.stepper-item[data-status="completed"] .stepper-label {
  color: #059669;
  font-weight: 600;
}

.stepper-item[data-status="completed"]+.stepper-line::after {
  width: 100%;
}

/* 回到顶部按钮 */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
}

.back-to-top-btn.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

.back-to-top-btn:active {
  transform: translateY(-2px);
}

.back-to-top-btn svg {
  transition: transform 0.3s ease;
}

.back-to-top-btn:hover svg {
  transform: translateY(-2px);
}

/* Agent卡片折叠样式 */
.agent-card.collapsed {
  cursor: pointer;
}

.agent-card.collapsed .agent-status,
.agent-card.collapsed .agent-actions {
  display: none !important;
}

.agent-card.collapsed .agent-header {
  padding: 16px;
}

.agent-card.collapsed .agent-header::after {
  content: '▼';
  position: absolute;
  right: 20px;
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.agent-card:not(.collapsed) .agent-header::after {
  content: '▲';
  position: absolute;
  right: 20px;
  font-size: 14px;
  color: var(--muted);
}

.agent-card .agent-header {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.agent-card .agent-header:hover {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  margin: -8px;
  padding: 8px;
}

/* ==================== 上传标签页样式 ==================== */
.upload-tabs-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.upload-tabs-card h2 {
  margin-bottom: 20px;
  color: #1e293b;
  font-weight: 600;
}

/* 标签页导航 */
.upload-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
}

.upload-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: -2px;
}

.upload-tab:hover {
  color: #3b82f6;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
}

.upload-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.08) 100%);
}

.upload-tab .tab-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.upload-tab:hover .tab-icon {
  transform: scale(1.1);
}

.upload-tab.active .tab-icon {
  animation: tab-icon-bounce 0.5s ease;
}

@keyframes tab-icon-bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.upload-tab .tab-label {
  font-weight: 500;
}

/* 标签页内容 */
.upload-tab-content {
  position: relative;
  min-height: 200px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-description {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
}

/* DICOM 任务信息盒子 */
.dicom-task-info {
  margin-bottom: 24px;
}

.info-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.info-box .info-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.info-box .info-content {
  flex: 1;
}

.info-box .info-content strong {
  display: block;
  color: #1e40af;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-box .info-content p {
  color: #3b82f6;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* 示例文件在标签页中的样式优化 */
.tab-pane[data-tab="samples"] .sample-files {
  margin-bottom: 20px;
}

.tab-pane[data-tab="samples"] .sample-file-item {
  transition: all 0.3s ease;
}

.tab-pane[data-tab="samples"] .sample-file-item:hover {
  transform: translateX(4px);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .upload-tabs {
    gap: 4px;
  }

  .upload-tab {
    padding: 10px 12px;
    font-size: 13px;
    flex-direction: column;
    gap: 4px;
  }

  .upload-tab .tab-icon {
    font-size: 20px;
  }

  .upload-tab .tab-label {
    font-size: 12px;
  }

  .tab-description {
    font-size: 13px;
    padding: 10px 12px;
  }

  .info-box {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .restore-prompt-content {
    padding: 20px;
  }

  .restore-prompt-actions {
    flex-direction: column;
  }

  .restore-prompt-actions button {
    width: 100%;
  }

  .task-complete-content h2 {
    font-size: 1.3rem;
  }

  .feedback-dialog {
    max-width: 95%;
    width: 95%;
  }

  .feedback-dialog-header {
    padding: 16px 20px;
  }

  .feedback-dialog-body {
    padding: 20px;
  }

  .feedback-input {
    font-size: 16px;
    /* 防止iOS自动缩放 */
  }

  .review-confirm-dialog {
    max-width: 95%;
    width: 95%;
    max-height: 90vh;
  }

  .review-confirm-header {
    padding: 20px 24px;
  }

  .review-confirm-header h3 {
    font-size: 18px;
  }

  .review-confirm-body {
    padding: 20px;
  }

  .confirm-section {
    padding: 16px;
  }

  .review-confirm-footer {
    padding: 16px 20px;
    flex-direction: column;
  }

  .model-selector {
    width: 100%;
    justify-content: space-between;
  }

  .model-selector select {
    flex: 1;
  }

  .confirm-buttons {
    width: 100%;
    flex-direction: column;
  }

  .confirm-buttons button {
    width: 100%;
  }
}

/* 检索计划器详情面板样式 */
.retrieval-plan-details,
.knowledge-results-details {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  font-weight: 600;
}

.detail-header h4 {
  margin: 0;
  font-size: 14px;
}

.detail-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.detail-content {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.retrieval-plan-content {
  background: #1e293b;
  color: #f1f5f9;
  padding: 16px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-x: auto;
  margin: 0;
}

.knowledge-item {
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  overflow: hidden;
}

.knowledge-item h5 {
  margin: 0;
  padding: 12px 16px;
  background: #f1f5f9;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
}

.knowledge-content {
  padding: 16px;
  color: #374151;
  line-height: 1.6;
  font-size: 14px;
}

/* 检索统计样式增强 */
.retrieval-stats {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
}

/* 查看按钮样式 */
.btn-view-plan,
.btn-view-results {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-right: 8px;
  transition: all 0.2s;
}

.btn-view-plan:hover,
.btn-view-results:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* 进度项状态颜色 */
.progress-item.completed {
  color: var(--success);
  font-weight: 600;
}

.progress-item.processing {
  color: var(--accent);
  font-weight: 600;
}

.progress-item.error {
  color: var(--danger);
  font-weight: 600;
}

.progress-item.pending {
  color: var(--muted);
}

/* Pipeline progress card */
.pipeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  transition: border-color 0.3s, background 0.3s;
}

.pipeline-item.running {
  border-color: #4285f4;
  background: #e8f0fe;
}

.pipeline-item.done {
  border-color: #34a853;
  background: #e6f4ea;
}

.pipeline-item.error {
  border-color: #ea4335;
  background: #fce8e6;
}

.pipeline-item.skipped {
  border-color: #999;
  background: #f5f5f5;
  opacity: 0.7;
}

.pipeline-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.pipeline-info {
  flex: 1;
  min-width: 0;
}

.pipeline-label {
  font-weight: 600;
  font-size: 14px;
}

.pipeline-detail {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-status {
  font-size: 18px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   History Panel (Slide-in Drawer)
   ═══════════════════════════════════════════════════════════════ */

/* Header button */
.header-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-history {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
  text-decoration: none;
}

.btn-history:hover {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.35);
  transform: translateY(-1px);
}

/* ── History standalone page ─────────────────────────────── */

.history-page {
  padding-top: 24px;
  padding-bottom: 40px;
  max-width: 1060px;
}

.history-page-summary {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.history-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.history-loading-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* Row list */
.hp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-row {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hp-row:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
}

.hp-row-main {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
}

.hp-row-num {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #6d28d9;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hp-row-info {
  flex: 1;
  min-width: 0;
}

.hp-row-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.hp-row-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.hp-badge-model,
.hp-badge-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.hp-badge-model {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #6d28d9;
}

.hp-badge-status {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.hp-badge-elapsed {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.hp-row-files {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-row-counts {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.hp-row-counts span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 6px;
}

.hp-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-hp-detail {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(139, 92, 246, 0.2);
  white-space: nowrap;
}

.btn-hp-detail:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.btn-hp-delete {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
  white-space: nowrap;
}

.btn-hp-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: translateY(-1px);
  box-shadow: none;
}

/* Detail expand panel */
.hp-detail-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.hp-detail-panel.open {
  max-height: 2000px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.hp-detail-content {
  padding: 18px 20px 20px;
  animation: hpFadeIn 0.3s ease;
}

@keyframes hpFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hp-detail-loading {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.hp-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  background: rgba(241, 245, 249, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}

.hp-detail-meta-row strong {
  color: var(--text);
  font-weight: 600;
}

.hp-detail-meta-row {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-detail-files-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

/* File groups in detail */
.hp-file-group {
  margin-bottom: 14px;
}

.hp-file-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
  padding-left: 4px;
}

.hp-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(241, 245, 249, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.hp-file-item:hover {
  background: #fff;
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hp-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

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

.hp-file-size {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 8px;
}

.hp-file-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 8px;
}

.btn-file-preview,
.btn-file-download {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-file-preview:hover {
  background: #ede9fe;
  color: #7c3aed;
  border-color: #c4b5fd;
  transform: none;
  box-shadow: none;
}

.btn-file-download:hover {
  background: #dbeafe;
  color: #2563eb;
  border-color: #93c5fd;
  transform: none;
  box-shadow: none;
}

/* File preview modal */
.history-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.history-preview-overlay.open {
  opacity: 1;
  visibility: visible;
}

.history-preview-dialog {
  background: #fff;
  border-radius: 16px;
  width: 90vw;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.history-preview-overlay.open .history-preview-dialog {
  transform: scale(1);
}

.history-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.history-preview-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-preview-close {
  background: none;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--muted);
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  padding: 0;
  flex-shrink: 0;
}

.history-preview-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: none;
  box-shadow: none;
}

.history-preview-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.history-preview-body pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.6;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 0;
}

.history-preview-body iframe {
  width: 100%;
  height: 100%;
  min-height: 60vh;
  border: none;
  border-radius: 8px;
}

.history-preview-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.history-preview-header-actions .btn-file-download {
  text-decoration: none;
}

.hp-preview-code {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.6;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 0;
  max-height: 70vh;
  overflow: auto;
}

.hp-preview-md {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  padding: 8px 0;
}

.hp-preview-md h1,
.hp-preview-md h2,
.hp-preview-md h3 {
  margin: 18px 0 8px;
  font-weight: 700;
  color: var(--text);
}

.hp-preview-md h1 { font-size: 22px; }
.hp-preview-md h2 { font-size: 18px; }
.hp-preview-md h3 { font-size: 15px; }

.hp-preview-md code {
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 12px;
}

.hp-preview-md ul {
  padding-left: 20px;
  margin: 8px 0;
}

/* Pagination */
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hp-page-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

.hp-page-btn:hover:not(.disabled):not(.active) {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #7c3aed;
  transform: none;
  box-shadow: none;
}

.hp-page-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.hp-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hp-page-ellipsis {
  padding: 0 6px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 640px) {
  .hp-row-main {
    flex-wrap: wrap;
    gap: 10px;
  }
  .hp-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .hp-detail-meta {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   2026 UI/UX Beautification Layer (overrides)
   - Refined glass-morphism, polished typography & motion
   - Pro SVG icon styling with animations
   - Modern drag & drop upload zone
   ============================================================ */

/* ---------- 1. Global background & texture ---------- */
body {
  background:
    radial-gradient(circle at 12% 18%, rgba(13, 148, 136, 0.10), transparent 45%),
    radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.14), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(125, 211, 252, 0.12), transparent 55%),
    linear-gradient(135deg, #e0eaff 0%, #eff6ff 35%, #f0fdfa 65%, #ecfeff 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 58, 138, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 138, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 75%);
}

/* ---------- 2. Header refinements ---------- */
.app-header {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(30, 58, 138, 0.10);
  box-shadow: 0 4px 24px -8px rgba(30, 58, 138, 0.10);
}

.app-header h1 {
  font-size: 30px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  padding: 12px 0 8px;
}

.app-header h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #2563eb, #0d9488, transparent);
  opacity: 0.7;
}

.app-header .container {
  text-align: center;
  position: relative;
}

/* ---------- 3. Card glass-morphism polish ---------- */
.card {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  transition: transform 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              background 0.3s ease,
              border-color 0.3s ease;
}

.card:hover {
  background: var(--card-hover);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow:
    var(--glass-shadow-strong),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

/* ---------- 4. Buttons - refined depth & gradient ---------- */
.button-link,
button {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 4px 12px -2px rgba(30, 58, 138, 0.32);
  letter-spacing: 0.4px;
  transition: transform 0.25s var(--ease-spring),
              box-shadow 0.25s ease,
              background 0.25s ease;
}

.button-link:hover,
button:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 8px 24px -4px rgba(30, 58, 138, 0.45);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

/* ---------- 5. Agent card folding (smooth height transition) ---------- */
.agent-card {
  border-radius: 20px;
  transition: transform 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              border-color 0.3s ease,
              padding 0.4s var(--ease-smooth);
}

.agent-card .agent-status,
.agent-card .agent-actions {
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transition: max-height 0.5s var(--ease-smooth),
              opacity 0.3s ease 0.1s,
              margin 0.4s ease;
}

.agent-card.collapsed .agent-status,
.agent-card.collapsed .agent-actions {
  display: block !important;
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
  transition: max-height 0.4s var(--ease-smooth),
              opacity 0.2s ease,
              margin 0.4s ease;
}

.agent-card.collapsed {
  padding: 8px 20px;
}

.agent-card.collapsed .agent-header {
  margin-bottom: 0;
}

.agent-card .agent-header::after,
.agent-card.collapsed .agent-header::after {
  content: '';
  position: absolute;
  right: 24px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.35s var(--ease-spring);
  font-size: 0;
  color: transparent;
}

.agent-card.collapsed .agent-header::after {
  transform: translateY(-30%) rotate(-135deg);
}

/* ---------- 6. Agent icon container — gradient glass plate ---------- */
.agent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(219, 234, 254, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 4px 12px -2px rgba(30, 58, 138, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s ease;
  flex-shrink: 0;
  font-size: 0;
}

.agent-icon svg {
  width: 26px;
  height: 26px;
  color: #1d4ed8;
  transition: transform 0.5s var(--ease-spring), color 0.3s ease;
}

.agent-card:hover .agent-icon {
  transform: translateY(-2px) rotate(-3deg);
  box-shadow:
    0 8px 18px -2px rgba(30, 58, 138, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.agent-card:hover .agent-icon svg {
  transform: scale(1.08);
}

.agent-card.processing .agent-icon svg {
  animation: agentBreath 2.4s ease-in-out infinite;
}

@keyframes agentBreath {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.12); opacity: 0.85; }
}

/* Per-agent color variations */
.review-agent .agent-icon { background: linear-gradient(135deg, #ffffff, #dbeafe); }
.review-agent .agent-icon svg { color: #1d4ed8; }

.retrieval-agent .agent-icon { background: linear-gradient(135deg, #ffffff, #ccfbf1); }
.retrieval-agent .agent-icon svg { color: #0d9488; }

.critic-agent .agent-icon { background: linear-gradient(135deg, #ffffff, #ede9fe); }
.critic-agent .agent-icon svg { color: #6d28d9; }

.arbitrator-agent .agent-icon { background: linear-gradient(135deg, #ffffff, #d1fae5); }
.arbitrator-agent .agent-icon svg { color: #047857; }

/* ---------- 7. Section headers (h2 inside cards) ---------- */
.card > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px 0;
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.2px;
}

.card > h2 svg.section-svg {
  width: 22px;
  height: 22px;
  color: #1d4ed8;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-spring);
}

.card:hover > h2 svg.section-svg {
  transform: rotate(-6deg) scale(1.08);
}

/* ---------- 8. SVG icon helpers ---------- */
.svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Stepper SVG icons */
.stepper-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0;
}

.stepper-icon svg {
  width: 26px;
  height: 26px;
  color: #94a3b8;
  transition: color 0.3s ease, transform 0.4s var(--ease-spring);
}

.stepper-item[data-status="active"] .stepper-icon svg {
  color: #2563eb;
  transform: scale(1.12);
}

.stepper-item[data-status="completed"] .stepper-icon svg {
  color: white;
}

.stepper-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.stepper-check svg {
  width: 28px;
  height: 28px;
  color: white;
  stroke-width: 3;
}

/* Pipeline SVG icons */
.pipeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(219, 234, 254, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
  font-size: 0;
}

.pipeline-icon svg {
  width: 18px;
  height: 18px;
  color: #1d4ed8;
}

.pipeline-item.running .pipeline-icon svg {
  animation: agentBreath 1.8s ease-in-out infinite;
  color: #2563eb;
}

.pipeline-item.done .pipeline-icon svg {
  color: #059669;
}

.pipeline-item.error .pipeline-icon svg {
  color: #dc2626;
}

.pipeline-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 0;
}

.pipeline-status svg {
  width: 22px;
  height: 22px;
  color: #94a3b8;
}

.pipeline-item.running .pipeline-status svg { color: #2563eb; animation: spin 1.4s linear infinite; }
.pipeline-item.done    .pipeline-status svg { color: #059669; }
.pipeline-item.error   .pipeline-status svg { color: #dc2626; }

/* History link icon */
.btn-history svg {
  width: 16px;
  height: 16px;
  margin-right: 2px;
}

/* Header nav link icon */
.header-nav .button-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-nav .button-link svg {
  width: 14px;
  height: 14px;
}

/* Browse button icon */
#btnBrowseDcm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btnBrowseDcm svg {
  width: 16px;
  height: 16px;
}

/* Confirm dialog header icon */
.confirm-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0;
  margin-right: 12px;
  animation: rotate 2s ease-in-out infinite;
}

.confirm-header-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

/* Confirm section sub-icons */
.section-icon,
.subsection-icon,
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.section-icon svg {
  width: 22px;
  height: 22px;
  color: #1d4ed8;
}

.subsection-icon svg {
  width: 18px;
  height: 18px;
  color: #475569;
}

.stat-icon svg {
  width: 16px;
  height: 16px;
  color: #059669;
}

/* Feedback dialog header icon */
.feedback-dialog-header h3 svg.dialog-svg-icon {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  margin-right: 8px;
  color: white;
}

/* Detail panel close button stays as text × */

/* ---------- 9. Task complete card icon ---------- */
.task-complete-content h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.task-complete-content h2 svg {
  width: 28px;
  height: 28px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  padding: 4px;
}

/* ---------- 10. Modern Drag & Drop Upload Zone ---------- */
.upload-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.upload-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 28px;
  border-radius: 18px;
  border: 2px dashed rgba(59, 130, 246, 0.45);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.7) 0%, rgba(236, 254, 255, 0.55) 100%);
  transition: all 0.3s var(--ease-smooth);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  user-select: none;
}

.upload-dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.upload-dropzone:hover {
  border-color: #3b82f6;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.85) 0%, rgba(204, 251, 241, 0.65) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(59, 130, 246, 0.35);
}

.upload-dropzone:hover::before {
  opacity: 1;
}

.upload-dropzone.is-dragover {
  border-color: #1d4ed8;
  border-style: solid;
  background:
    linear-gradient(135deg, rgba(191, 219, 254, 0.95) 0%, rgba(167, 243, 208, 0.85) 100%);
  box-shadow:
    0 0 0 6px rgba(59, 130, 246, 0.12),
    0 16px 40px -8px rgba(30, 58, 138, 0.4);
  transform: scale(1.01);
  animation: dropzoneRunningBorder 1.6s linear infinite;
}

@keyframes dropzoneRunningBorder {
  0%   { background-position: 0 0; }
  100% { background-position: 24px 0; }
}

.upload-dropzone.is-dragover .dropzone-icon {
  transform: translateY(-6px) scale(1.08);
}

.upload-dropzone.is-dragover .dropzone-icon svg {
  color: #1d4ed8;
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 8px 20px -4px rgba(30, 58, 138, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s ease;
  font-size: 0;
}

.dropzone-icon svg {
  width: 26px;
  height: 26px;
  color: #2563eb;
  transition: color 0.3s ease;
}

.upload-dropzone:hover .dropzone-icon {
  transform: translateY(-3px) rotate(-4deg);
  box-shadow:
    0 12px 28px -4px rgba(30, 58, 138, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dropzone-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.2px;
}

.dropzone-title .dropzone-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(37, 99, 235, 0.4);
  transition: text-decoration-color 0.2s ease;
}

.upload-dropzone:hover .dropzone-link {
  text-decoration-color: #2563eb;
}

.dropzone-hint {
  font-size: 12.5px;
  color: var(--muted);
}

.dropzone-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.dropzone-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 11.5px;
  color: #475569;
  font-weight: 500;
}

.dropzone-meta-item svg {
  width: 12px;
  height: 12px;
  color: #2563eb;
}

/* Upload mode toolbar (file type + actions) */
.upload-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.upload-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-toolbar-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.upload-toolbar-label svg {
  width: 14px;
  height: 14px;
  color: #1d4ed8;
}

.upload-toolbar .file-type-selector {
  min-width: 180px;
}

.upload-toolbar-actions {
  display: flex;
  gap: 8px;
}

#btnUpload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btnUpload svg {
  width: 16px;
  height: 16px;
}

/* Selected files preview list (in dropzone) */
.dropzone-preview {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.dropzone-preview.has-files {
  display: flex;
}

.dropzone-preview-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  padding-left: 4px;
}

.dropzone-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  font-size: 13px;
  color: #0f172a;
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.dropzone-preview-item .pdf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  flex-shrink: 0;
}

.dropzone-preview-item .pdf-icon svg {
  width: 14px;
  height: 14px;
  color: #dc2626;
}

.dropzone-preview-item .pdf-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.dropzone-preview-item .pdf-size {
  font-size: 11.5px;
  color: var(--muted);
  flex-shrink: 0;
}

/* DICOM dropzone — same family of dropzone but distinct in subtle ways */
#dcmPathSection {
  border-top: 1px dashed rgba(148, 163, 184, 0.4) !important;
  padding-top: 20px !important;
}

.dicom-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 28px;
  border-radius: 18px;
  border: 2px dashed rgba(13, 148, 136, 0.45);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.7) 0%, rgba(236, 254, 255, 0.55) 100%);
  transition: all 0.3s var(--ease-smooth);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  user-select: none;
  outline: none;
}

.dicom-dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.dicom-dropzone:hover {
  border-color: #0d9488;
  background: linear-gradient(135deg, rgba(204, 251, 241, 0.85) 0%, rgba(207, 250, 254, 0.65) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(13, 148, 136, 0.35);
}

.dicom-dropzone:hover::before {
  opacity: 1;
}

.dicom-dropzone:focus-visible {
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.18);
}

.dicom-dropzone.is-dragover {
  border-color: #0f766e;
  border-style: solid;
  background: linear-gradient(135deg, rgba(167, 243, 208, 0.95) 0%, rgba(165, 243, 252, 0.85) 100%);
  box-shadow:
    0 0 0 6px rgba(13, 148, 136, 0.14),
    0 16px 40px -8px rgba(13, 148, 136, 0.4);
  transform: scale(1.01);
}

.dicom-dropzone.is-dragover .dicom-dropzone-icon {
  transform: translateY(-6px) scale(1.08) rotate(-4deg);
}

.dicom-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #ccfbf1 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 6px 18px -3px rgba(13, 148, 136, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s ease;
  font-size: 0;
}

.dicom-dropzone-icon svg {
  width: 22px;
  height: 22px;
  color: #0d9488;
  transition: color 0.3s ease;
}

.dicom-dropzone:hover .dicom-dropzone-icon {
  transform: translateY(-3px) rotate(-4deg);
  box-shadow:
    0 10px 24px -4px rgba(13, 148, 136, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.dicom-dropzone-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dicom-dropzone-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.2px;
}

.dicom-dropzone-link {
  color: #0d9488;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(13, 148, 136, 0.4);
  transition: text-decoration-color 0.2s ease;
}

.dicom-dropzone:hover .dicom-dropzone-link {
  text-decoration-color: #0d9488;
}

.dicom-dropzone-hint {
  font-size: 12.5px;
  color: var(--muted);
}

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

.dicom-browse-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85) !important;
  color: #0d9488 !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px -1px rgba(13, 148, 136, 0.15) !important;
  transition: all 0.25s var(--ease-spring) !important;
}

.dicom-browse-btn svg {
  width: 16px;
  height: 16px;
}

.dicom-browse-btn:hover {
  background: #ffffff !important;
  color: #0f766e !important;
  border-color: #0d9488 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 14px -2px rgba(13, 148, 136, 0.3) !important;
}

/* Already-selected path display (replaces text/title once a folder chosen) */
.dicom-dropzone.has-path {
  flex-direction: column;
  padding: 22px 22px;
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.75) 0%, rgba(219, 234, 254, 0.55) 100%);
  border-color: rgba(5, 150, 105, 0.4);
  border-style: solid;
}

.dicom-dropzone.has-path:hover {
  background: linear-gradient(135deg, rgba(187, 247, 208, 0.85) 0%, rgba(191, 219, 254, 0.7) 100%);
  border-color: #059669;
  box-shadow: 0 12px 28px -10px rgba(5, 150, 105, 0.32);
}

.dicom-dropzone.has-path .dicom-dropzone-icon,
.dicom-dropzone.has-path .dicom-dropzone-text {
  display: none;
}

.dicom-dropzone-path {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 12px;
  box-shadow: 0 2px 6px -2px rgba(5, 150, 105, 0.18);
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.dicom-path-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0;
  flex-shrink: 0;
}

.dicom-path-icon svg {
  width: 26px;
  height: 26px;
  color: #059669;
}

.dicom-path-info {
  flex: 1;
  min-width: 0;
}

.dicom-path-label {
  font-size: 12px;
  font-weight: 600;
  color: #047857;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.dicom-path-text {
  font-size: 13.5px;
  font-weight: 500;
  color: #0f172a;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  word-break: break-all;
  line-height: 1.5;
}

.dicom-path-clear {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.7) !important;
  color: #64748b !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-radius: 8px !important;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.dicom-path-clear svg {
  width: 16px;
  height: 16px;
}

.dicom-path-clear:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
  transform: rotate(90deg) !important;
}

/* "Start one-click processing" — themed blue gradient, centered */
.auto-process-actions {
  margin-top: 22px !important;
  display: flex;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

#btnAutoProcess {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border: none !important;
  letter-spacing: 0.8px;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 12px 40px !important;
  border-radius: 12px !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 8px 22px -4px rgba(37, 99, 235, 0.45) !important;
  position: relative;
  overflow: hidden;
}

#btnAutoProcess svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease-spring);
}

#btnAutoProcess::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

#btnAutoProcess:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%) !important;
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 14px 32px -6px rgba(30, 58, 138, 0.55) !important;
}

#btnAutoProcess:hover::before {
  left: 130%;
}

#btnAutoProcess:hover svg {
  transform: scale(1.15) rotate(-8deg);
}

#btnAutoProcess:active {
  transform: translateY(0);
}

#btnAutoProcess:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- 11. Mobile tweaks for dropzone ---------- */
@media (max-width: 640px) {
  .upload-dropzone {
    padding: 28px 18px;
  }

  .dropzone-icon {
    width: 56px;
    height: 56px;
  }

  .dropzone-icon svg {
    width: 28px;
    height: 28px;
  }

  .dropzone-title {
    font-size: 15px;
  }

  .upload-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-toolbar-actions {
    justify-content: flex-end;
  }
}

/* ============================================================
   兼容上传工具栏强制隐藏（双保险：HTML hidden 失效时由 CSS 兜底）
   ============================================================ */
#fileTypeSelect,
#btnUpload,
.upload-toolbar,
.upload-row {
  display: none !important;
}

/* ============================================================
   Uploaded File List — 卡片化每行展示已上传文件
   ============================================================ */
.file-card .file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 抑制原 .file-list li 的 border-top */
.file-card .file-list li {
  border-top: none !important;
  padding: 0 !important;
}

.uploaded-file-stats {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
}

.ufs-total {
  color: #475569;
}

.ufs-total strong {
  color: #0f172a;
  font-weight: 700;
}

.ufs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.ufs-chip svg {
  width: 13px;
  height: 13px;
}

.ufs-chip.object {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.ufs-chip.basis {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.ufs-chip strong {
  font-weight: 700;
}

.uploaded-file-row {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px 14px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 250, 252, 0.7) 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  transition: all 0.25s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

.uploaded-file-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  transition: width 0.25s ease;
}

.uploaded-file-row.file-type-review_object::before {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
}

.uploaded-file-row.file-type-review_basis::before {
  background: linear-gradient(180deg, #64748b, #475569);
}

.uploaded-file-row:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(239, 246, 255, 0.7) 100%);
  transform: translateX(2px);
  box-shadow: 0 4px 14px -4px rgba(30, 58, 138, 0.18);
}

.uploaded-file-row:hover::before {
  width: 5px;
}

.uf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  flex-shrink: 0;
  font-size: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.3s var(--ease-spring);
}

.uf-icon svg {
  width: 18px;
  height: 18px;
  color: #dc2626;
}

.uploaded-file-row:hover .uf-icon {
  transform: rotate(-6deg) scale(1.05);
}

.uf-info {
  flex: 1;
  min-width: 0;
}

.uf-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}

.uf-meta {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.uf-size {
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 11px;
}

.file-card .file-list .file-badge {
  margin-right: 0 !important;
  padding: 4px 12px !important;
  font-size: 11.5px !important;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.15);
}

.file-card .file-list .file-badge.badge-review {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

.file-card .file-list .file-badge.badge-basis {
  background: linear-gradient(135deg, #64748b, #475569) !important;
}

.uf-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  flex-shrink: 0;
  font-size: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.uf-status svg {
  width: 14px;
  height: 14px;
  color: #047857;
}

.dicom-only-placeholder {
  padding: 14px 16px !important;
  background: rgba(255, 251, 235, 0.7) !important;
  border: 1px dashed #fcd34d !important;
  border-radius: 10px !important;
  color: #92400e !important;
  font-size: 13.5px;
  text-align: center;
}

@media (max-width: 540px) {
  .uploaded-file-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .uf-info {
    flex: 1 1 calc(100% - 60px);
    min-width: 0;
  }

  .file-card .file-list .file-badge {
    order: 3;
  }

  .uf-status {
    order: 4;
  }
}

/* ============================================================
   File Classify Dialog (PDF 上传后弹出，逐文件分类)
   ============================================================ */
.classify-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 10002;
  animation: fadeInOverlay 0.25s ease;
  padding: 20px;
  padding-top: 260px;
  overflow-y: auto;
}

.classify-dialog {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px -10px rgba(15, 23, 42, 0.4);
  animation: slideUpBounce 0.4s var(--ease-spring);
  overflow: hidden;
}

.classify-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.classify-dialog-header::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.classify-dialog-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

.classify-dialog-header h3 svg {
  width: 22px;
  height: 22px;
}

.classify-dialog-close {
  background: rgba(255, 255, 255, 0.18) !important;
  border: none !important;
  color: #fff !important;
  font-size: 24px !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  cursor: pointer;
  line-height: 1 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transition: all 0.25s ease !important;
  position: relative;
  z-index: 1;
}

.classify-dialog-close:hover {
  background: rgba(255, 255, 255, 0.32) !important;
  transform: rotate(90deg) !important;
}

.classify-dialog-body {
  padding: 22px 22px 8px;
  overflow-y: auto;
  flex: 1;
}

.classify-hint {
  margin: 0 0 16px 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.5), rgba(207, 250, 254, 0.5));
  border-left: 3px solid #2563eb;
  border-radius: 6px;
  font-size: 13.5px;
  color: #1e3a8a;
  line-height: 1.6;
}

.classify-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(241, 245, 249, 0.6);
  border-radius: 10px;
}

.classify-quick-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}

.classify-quick-btn {
  background: #fff !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring) !important;
  box-shadow: none !important;
}

.classify-quick-btn:hover {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px -1px rgba(37, 99, 235, 0.25) !important;
}

.classify-file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 2px;
}

.classify-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.25s ease;
  animation: fadeIn 0.3s ease;
}

.classify-file-item:hover {
  border-color: #93c5fd;
  box-shadow: 0 3px 10px -2px rgba(59, 130, 246, 0.15);
}

.classify-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  flex-shrink: 0;
  font-size: 0;
}

.classify-file-icon svg {
  width: 20px;
  height: 20px;
  color: #dc2626;
}

.classify-file-info {
  flex: 1;
  min-width: 0;
}

.classify-file-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.classify-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.classify-file-meta .auto-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  border-radius: 999px;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.3px;
}

.classify-file-meta .auto-tag svg {
  width: 10px;
  height: 10px;
}

.classify-type-switch {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  flex-shrink: 0;
}

.classify-type-btn {
  background: transparent !important;
  color: #64748b !important;
  border: none !important;
  padding: 6px 14px !important;
  border-radius: 7px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth) !important;
  box-shadow: none !important;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.classify-type-btn:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.7) !important;
  transform: none !important;
}

.classify-type-btn.active[data-type="review_object"] {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px -1px rgba(37, 99, 235, 0.4) !important;
}

.classify-type-btn.active[data-type="review_basis"] {
  background: linear-gradient(135deg, #64748b, #475569) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px -1px rgba(71, 85, 105, 0.4) !important;
}

.classify-dialog-footer {
  padding: 14px 22px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.classify-summary {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.classify-summary .summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11.5px;
}

.classify-summary .summary-chip.object {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.classify-summary .summary-chip.basis {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.classify-buttons {
  display: flex;
  gap: 10px;
}

.classify-buttons .btn-confirm-start svg {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

@media (max-width: 540px) {
  .classify-dialog-overlay {
    padding-top: 180px;
  }

  .classify-dialog {
    max-height: 92vh;
  }

  .classify-file-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .classify-type-switch {
    width: 100%;
  }

  .classify-type-btn {
    flex: 1;
    text-align: center;
  }

  .classify-dialog-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .classify-buttons {
    justify-content: flex-end;
  }
}

/* 简洁版审查报告：宽版、紧凑、异常优先表格 */
.concise-report-page {
  background: #f5f7fb;
  color: #172033;
}

.concise-report-page .app-header {
  background: #ffffff;
  border-bottom: 1px solid #dbe3ef;
  box-shadow: 0 1px 2px rgba(18, 32, 55, 0.04);
}

.concise-report-page .container,
.concise-report-page main.container,
.concise-report-page .app-header .container,
.concise-report-page .app-footer .container {
  max-width: 1320px;
}

.concise-report-page .breadcrumbs {
  margin: 14px 0 12px;
}

.report.concise-report {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  padding: 24px 28px;
  overflow: visible;
}

.report.concise-report .markdown-body {
  color: #182033;
  font-size: 13px;
  line-height: 1.48;
  overflow-x: auto;
}

.report.concise-report .markdown-body h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 10px;
  padding: 0 0 8px;
  border-bottom: 1px solid #d9e2ef;
  color: #102033;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.report.concise-report .markdown-body h2:first-child {
  margin-top: 0;
}

.report.concise-report .section-count {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #cdd8e6;
  border-radius: 999px;
  background: #f8fafc;
  color: #526070;
  font-size: 12px;
  font-weight: 600;
}

.report .markdown-body table.one-vote-veto-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  overflow: visible;
  font-size: 13px;
}

.report .one-vote-veto-table th {
  background: #fff1f2;
  color: #7f1d1d;
}

.report .one-vote-veto-table th,
.report .one-vote-veto-table td {
  padding: 8px 10px;
  vertical-align: top;
  box-sizing: border-box;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.report .one-vote-veto-table th:nth-child(1),
.report .one-vote-veto-table td:nth-child(1) {
  width: 9%;
  text-align: center;
  font-weight: 700;
  color: #b91c1c;
}

.report .one-vote-veto-table th:nth-child(2),
.report .one-vote-veto-table td:nth-child(2) {
  width: 10%;
  font-weight: 700;
}

.report .one-vote-veto-table th:nth-child(3),
.report .one-vote-veto-table td:nth-child(3) {
  width: 15%;
}

.report .one-vote-veto-table th:nth-child(4),
.report .one-vote-veto-table td:nth-child(4),
.report .one-vote-veto-table th:nth-child(5),
.report .one-vote-veto-table td:nth-child(5),
.report .one-vote-veto-table th:nth-child(6),
.report .one-vote-veto-table td:nth-child(6) {
  width: 17%;
}

.report .one-vote-veto-table th:nth-child(7),
.report .one-vote-veto-table td:nth-child(7) {
  width: 15%;
}

.report.concise-report .markdown-body table {
  width: 100%;
  min-width: 1180px;
  margin: 10px 0 24px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.42;
}

.report.concise-report .markdown-body thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3f8;
  color: #26364d;
  font-weight: 700;
  white-space: nowrap;
}

.report.concise-report .markdown-body th,
.report.concise-report .markdown-body td {
  padding: 7px 8px;
  border-right: 1px solid #e2e9f2;
  border-bottom: 1px solid #e2e9f2;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: anywhere;
}

.report.concise-report .markdown-body tr:last-child td {
  border-bottom: none;
}

.report.concise-report .markdown-body th:last-child,
.report.concise-report .markdown-body td:last-child {
  border-right: none;
}

.report.concise-report .markdown-body tbody tr:nth-child(even) {
  background: #fafcff;
}

.report.concise-report .markdown-body tbody tr:hover {
  background: #f1f7ff;
}

.report.concise-report .concise-exception-table th:nth-child(1),
.report.concise-report .concise-exception-table td:nth-child(1) {
  width: 74px;
  min-width: 74px;
  text-align: center;
}

.report.concise-report .concise-exception-table th:nth-child(2),
.report.concise-report .concise-exception-table td:nth-child(2),
.report.concise-report .concise-pass-table th:nth-child(1),
.report.concise-report .concise-pass-table td:nth-child(1) {
  width: 58px;
  min-width: 58px;
  text-align: center;
  color: #334155;
  font-weight: 600;
}

.report.concise-report .concise-exception-table th:nth-child(3),
.report.concise-report .concise-exception-table td:nth-child(3) {
  width: 150px;
  min-width: 150px;
}

.report.concise-report .concise-exception-table th:nth-child(4),
.report.concise-report .concise-exception-table td:nth-child(4) {
  width: 285px;
  min-width: 285px;
}

.report.concise-report .concise-exception-table th:nth-child(5),
.report.concise-report .concise-exception-table td:nth-child(5) {
  width: 124px;
  min-width: 124px;
}

.report.concise-report .concise-exception-table th:nth-child(6),
.report.concise-report .concise-exception-table td:nth-child(6) {
  width: 145px;
  min-width: 145px;
}

.report.concise-report .concise-exception-table th:nth-child(7),
.report.concise-report .concise-exception-table td:nth-child(7) {
  width: 205px;
  min-width: 205px;
}

.report.concise-report .concise-exception-table th:nth-child(8),
.report.concise-report .concise-exception-table td:nth-child(8) {
  width: 180px;
  min-width: 180px;
}

.report.concise-report .concise-pass-table th:nth-child(2),
.report.concise-report .concise-pass-table td:nth-child(2) {
  width: 180px;
  min-width: 180px;
}

.report.concise-report .concise-pass-table th:nth-child(3),
.report.concise-report .concise-pass-table td:nth-child(3) {
  width: 300px;
  min-width: 300px;
}

.report.concise-report .concise-pass-table th:nth-child(4),
.report.concise-report .concise-pass-table td:nth-child(4) {
  width: 128px;
  min-width: 128px;
}

.report.concise-report .concise-pass-table th:nth-child(5),
.report.concise-report .concise-pass-table td:nth-child(5) {
  width: 185px;
  min-width: 185px;
}

.report.concise-report .concise-pass-table th:nth-child(6),
.report.concise-report .concise-pass-table td:nth-child(6) {
  width: 230px;
  min-width: 230px;
}

.report.concise-report .concise-pass-table th:nth-child(7),
.report.concise-report .concise-pass-table td:nth-child(7) {
  width: 74px;
  min-width: 74px;
  text-align: center;
}

.report.concise-report .status-badge,
.report.concise-report .source-badge,
.report.concise-report .muted-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.report.concise-report .status-badge.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.report.concise-report .status-badge.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.report.concise-report .status-badge.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.report.concise-report .source-badge {
  justify-content: flex-start;
  border-radius: 6px;
  background: #eef6ff;
  color: #1d4f91;
  border: 1px solid #cce3ff;
  white-space: normal;
  text-align: left;
}

.report.concise-report .source-badge.conflict {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.report.concise-report .muted-badge {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

.report.concise-report .markdown-body hr {
  margin: 24px 0 10px;
  border: none;
  border-top: 1px solid #d9e2ef;
}

.report.concise-report .markdown-body p {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .report.concise-report {
    padding: 16px;
  }

  .report.concise-report .markdown-body table {
    min-width: 1120px;
  }
}
