/* ============================================================
 * PVE 静态原型公共样式
 * 基于 Tailwind CDN,这里只放 Tailwind 不便覆盖的细节
 * ============================================================ */

:root {
  --color-bg: #ffffff;
  --color-fg: #0f172a;
  --color-muted: #64748b;
  --color-muted-bg: #f1f5f9;
  --color-border: #e2e8f0;
  --color-primary: #2563eb;
  --color-primary-soft: rgba(37, 99, 235, 0.12);
  --color-destructive: #dc2626;
  --color-card: #ffffff;
  --color-sidebar: #fafafa;

  --stage-s1: #3b82f6;
  --stage-s2: #6366f1;
  --stage-s3: #8b5cf6;
  --stage-s4: #a855f7;
  --stage-s5: #d946ef;
  --stage-s6: #f97316;
  --stage-s7: #f59e0b;
  --stage-s8: #84cc16;
  --stage-s9: #10b981;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--color-fg);
  background: var(--color-bg);
  font-size: 14px;
}

/* 关闭多种滚动条,只保留主区 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  scrollbar-width: none;
}

/* 通用骨架 */
.skeleton-row {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 自定义阶段色 utility */
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9999px;
  color: white;
}
.stage-s1 { background: var(--stage-s1); }
.stage-s2 { background: var(--stage-s2); }
.stage-s3 { background: var(--stage-s3); }
.stage-s4 { background: var(--stage-s4); }
.stage-s5 { background: var(--stage-s5); }
.stage-s6 { background: var(--stage-s6); }
.stage-s7 { background: var(--stage-s7); }
.stage-s8 { background: var(--stage-s8); }
.stage-s9 { background: var(--stage-s9); }

.stage-soft-s1 { background: rgba(59, 130, 246, 0.12); color: var(--stage-s1); }
.stage-soft-s2 { background: rgba(99, 102, 241, 0.12); color: var(--stage-s2); }
.stage-soft-s3 { background: rgba(139, 92, 246, 0.12); color: var(--stage-s3); }
.stage-soft-s4 { background: rgba(168, 85, 247, 0.12); color: var(--stage-s4); }
.stage-soft-s5 { background: rgba(217, 70, 239, 0.12); color: var(--stage-s5); }
.stage-soft-s6 { background: rgba(249, 115, 22, 0.12); color: var(--stage-s6); }
.stage-soft-s7 { background: rgba(245, 158, 11, 0.12); color: var(--stage-s7); }
.stage-soft-s8 { background: rgba(132, 204, 22, 0.12); color: var(--stage-s8); }
.stage-soft-s9 { background: rgba(16, 185, 129, 0.12); color: var(--stage-s9); }

/* 侧边栏导航选中态 */
.nav-active {
  background: #dde0e9;
  color: #020617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.pve-sidebar-shell {
  width: 242px;
  flex-shrink: 0;
  height: 100vh;
  border-right: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f5f6fa 0%, #eff1f6 100%);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease;
}

.pve-sidebar-scroll {
  flex: 1;
  overflow: auto;
  padding: 10px 8px 20px;
}

.sidebar-brand-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 10px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.72);
}

.sidebar-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.sidebar-brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(to bottom right, #3B82F6, #60A5FA);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.sidebar-brand-mark::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.98);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-28deg);
}

.sidebar-brand-mark::after {
  content: '';
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.98);
}

.sidebar-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-brand-title {
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
  color: #0a1220;
  letter-spacing: -0.03em;
}

.sidebar-brand-subtitle {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.2;
  color: #7f90a8;
}

.sidebar-brand-toggle {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-brand-toggle:hover {
  background: rgba(226, 232, 240, 0.95);
  color: #111827;
}

.sidebar-top-action {
  padding-bottom: 10px;
}

.sidebar-new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar-new-chat:hover {
  background: #f8fafc;
  border-color: #dbe2ea;
  transform: translateY(-1px);
}

.sidebar-block {
  margin-top: 16px;
}

.sidebar-block > .sidebar-section-title {
  display: block;
  padding: 0 10px;
  margin-bottom: 10px;
}

.sidebar-section-title {
  font-size: 12px;
  line-height: 1.2;
  color: #c7cdd4;
  font-weight: 500;
}

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 12px;
  color: #111827;
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-nav-item:hover {
  background: rgba(15, 23, 42, 0.045);
}

.sidebar-nav-item-sub {
  padding-left: 22px;
}

.sidebar-nav-item-sub .sidebar-nav-icon-wrap {
  color: #94a3b8;
}

.sidebar-nav-item-sub .sidebar-nav-label {
  font-weight: 500;
  color: #475569;
}

.sidebar-nav-icon-wrap {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  flex-shrink: 0;
}

.sidebar-nav-item.nav-active .sidebar-nav-icon-wrap {
  color: #020617;
}

.sidebar-nav-icon {
  width: 18px;
  height: 18px;
}

.sidebar-nav-copy {
  flex: 1;
  min-width: 0;
}

.sidebar-nav-label-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.sidebar-nav-label {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  color: inherit;
}

.sidebar-nav-item.nav-active .sidebar-nav-label {
  font-weight: 700;
}

.sidebar-nav-meta {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}

.sidebar-hint-card {
  margin-top: 10px;
  padding: 9px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.72);
}

.sidebar-hint-card-soft {
  background: rgba(255, 255, 255, 0.38);
  border-style: dashed;
}

.sidebar-hint-title {
  padding: 0 2px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.sidebar-hint-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: #111827;
}

.sidebar-hint-link:hover {
  background: rgba(226, 232, 240, 0.72);
}

.sidebar-block-team {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  margin-bottom: 12px;
}

.sidebar-section-action {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-section-action:hover {
  background: rgba(226, 232, 240, 0.9);
  color: #475569;
}

.sidebar-team-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 108px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 1px dashed #d1d5db;
  background: rgba(255, 255, 255, 0.22);
  color: #94a3b8;
  font-size: 12.5px;
}

.sidebar-team-empty-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
}

.sidebar-team-empty-text {
  line-height: 1.2;
}

.sidebar-team-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sidebar-team-empty-cta:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1f2937;
}

.sidebar-team-empty i {
  color: inherit;
}

.sidebar-footer {
  padding: 10px 8px 8px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #111827;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-footer-link:hover {
  background: rgba(15, 23, 42, 0.045);
}

.sidebar-footer-link .sidebar-nav-icon-wrap {
  color: inherit;
}

.sidebar-footer-link-copy {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
}

.sidebar-footer-link.nav-active .sidebar-footer-link-copy {
  font-weight: 700;
}

.sidebar-profile {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease;
}

.sidebar-profile:hover {
  background: rgba(15, 23, 42, 0.045);
}

.sidebar-profile-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px -12px rgba(34, 197, 94, 0.9);
}

.sidebar-profile-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-profile-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

.sidebar-profile-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.14);
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-profile-caret {
  color: #94a3b8;
  flex-shrink: 0;
}

.pve-sidebar-shell.collapsed {
  width: 44px;
  border-right-color: #edf1f5;
  background: linear-gradient(180deg, #f8f9fc 0%, #f4f6fa 100%);
}

.pve-sidebar-shell.collapsed .sidebar-brand-shell {
  justify-content: center;
  padding: 10px 0 14px;
  border-bottom: none;
}

.pve-sidebar-shell.collapsed .sidebar-brand {
  display: none;
}

.pve-sidebar-shell.collapsed .sidebar-brand-toggle {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  color: #111827;
  opacity: 0.82;
}

.pve-sidebar-shell.collapsed .sidebar-brand-toggle i {
  width: 10px;
  height: 10px;
}

.pve-sidebar-shell.collapsed .sidebar-brand-toggle:hover {
  background: transparent;
  opacity: 1;
}

.pve-sidebar-shell.collapsed .sidebar-brand-copy,
.pve-sidebar-shell.collapsed .sidebar-new-chat span,
.pve-sidebar-shell.collapsed .sidebar-block > .sidebar-section-title,
.pve-sidebar-shell.collapsed .sidebar-nav-copy,
.pve-sidebar-shell.collapsed .sidebar-hint-card,
.pve-sidebar-shell.collapsed .sidebar-block-team,
.pve-sidebar-shell.collapsed .sidebar-footer-link-copy,
.pve-sidebar-shell.collapsed .sidebar-profile-copy,
.pve-sidebar-shell.collapsed .sidebar-profile-caret {
  display: none;
}

.pve-sidebar-shell.collapsed .pve-sidebar-scroll {
  padding: 2px 0 18px;
}

.pve-sidebar-shell.collapsed .sidebar-top-action {
  display: flex;
  justify-content: center;
  padding-bottom: 26px;
}

.pve-sidebar-shell.collapsed .sidebar-block {
  margin-top: 0;
}

.pve-sidebar-shell.collapsed .sidebar-nav-list {
  align-items: center;
  gap: 20px;
}

.pve-sidebar-shell.collapsed .sidebar-new-chat {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
  border-color: #e9edf3;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pve-sidebar-shell.collapsed .sidebar-new-chat i {
  width: 14px;
  height: 14px;
}

.pve-sidebar-shell.collapsed .sidebar-new-chat:hover {
  background: #ffffff;
  border-color: #e5e7eb;
  transform: none;
}

.pve-sidebar-shell.collapsed .sidebar-nav-item,
.pve-sidebar-shell.collapsed .sidebar-footer-link,
.pve-sidebar-shell.collapsed .sidebar-profile {
  width: 22px;
  height: 22px;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  border-radius: 6px;
  opacity: 0.88;
}

.pve-sidebar-shell.collapsed .sidebar-nav-item.nav-active,
.pve-sidebar-shell.collapsed .sidebar-footer-link.nav-active {
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.pve-sidebar-shell.collapsed .sidebar-nav-item.nav-active .sidebar-nav-icon-wrap,
.pve-sidebar-shell.collapsed .sidebar-footer-link.nav-active .sidebar-nav-icon-wrap {
  color: #111827;
}

.pve-sidebar-shell.collapsed .sidebar-nav-item:hover,
.pve-sidebar-shell.collapsed .sidebar-footer-link:hover,
.pve-sidebar-shell.collapsed .sidebar-profile:hover {
  background: transparent;
  opacity: 1;
}

.pve-sidebar-shell.collapsed .sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0 14px;
  border-top-color: rgba(226, 232, 240, 0.88);
  background: transparent;
}

.pve-sidebar-shell.collapsed .sidebar-profile {
  margin-top: 0;
}

.pve-sidebar-shell.collapsed .sidebar-profile-avatar {
  width: 18px;
  height: 18px;
  font-size: 10px;
  box-shadow: none;
}

.pve-sidebar-shell.collapsed .sidebar-nav-icon-wrap,
.pve-sidebar-shell.collapsed .sidebar-footer-link .sidebar-nav-icon-wrap {
  width: 13px;
  height: 13px;
  color: #475569;
}

.pve-sidebar-shell.collapsed .sidebar-nav-icon {
  width: 13px;
  height: 13px;
}

/* ============================================================
 * 移动端 / 小屏:侧边栏抽屉化 (<= 768px)
 * ============================================================ */
.pve-mobile-trigger {
  display: none;
}
.pve-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
@media (max-width: 768px) {
  /* 侧栏脱离正常文档流, 默认隐藏在左侧 */
  #pve-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }
  #pve-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 18px 50px -14px rgba(15, 23, 42, 0.45);
  }
  /* 小屏强制以展开形态展示(忽略 collapsed 状态) */
  #pve-sidebar .pve-sidebar-shell.collapsed {
    width: 242px;
  }
  #pve-sidebar .pve-sidebar-shell.collapsed .sidebar-brand,
  #pve-sidebar .pve-sidebar-shell.collapsed .sidebar-brand-copy,
  #pve-sidebar .pve-sidebar-shell.collapsed .sidebar-new-chat span,
  #pve-sidebar .pve-sidebar-shell.collapsed .sidebar-nav-copy,
  #pve-sidebar .pve-sidebar-shell.collapsed .sidebar-footer-link-copy,
  #pve-sidebar .pve-sidebar-shell.collapsed .sidebar-profile-copy {
    display: flex;
  }

  /* 主区接管全宽 */
  body main.flex-1 {
    width: 100% !important;
  }

  /* 顶部悬浮触发按钮 */
  .pve-mobile-trigger {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 50;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.2);
    color: var(--color-fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .pve-mobile-trigger:active { transform: scale(0.96); }

  /* 各页 header / 主内容左侧让位汉堡 */
  body main.flex-1 > header { padding-left: 56px !important; }
  /* 把 px-10 这种比较大的水平内边距适当压缩 */
  body main.flex-1 > .px-10,
  body main.flex-1 > header.px-10 {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* header 行内汉堡占了 56px 后,仍补充压缩 */
  body main.flex-1 > header.px-10 { padding-left: 56px !important; }

  /* header 的水平 flex 改成纵向堆叠, 避免标题被挤换行 */
  body main.flex-1 > header.flex {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }
  /* header 内固定宽度输入框/搜索改为全宽 */
  body main.flex-1 > header input[type='text'] {
    width: 100% !important;
    min-width: 0 !important;
  }
  body main.flex-1 > header .relative {
    width: 100%;
  }

  /* 一些常见的 grid-cols-2/3/4 在小屏强制单列 */
  body main.flex-1 .grid.grid-cols-2:not(.keep-grid),
  body main.flex-1 .grid.sm\\:grid-cols-2:not(.keep-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 背景遮罩 */
  body.pve-mobile-nav-open .pve-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  /* 抽屉打开时阻止 body 滚动穿透 */
  body.pve-mobile-nav-open {
    overflow: hidden;
  }
}

/* 卡片 hover 上抬 */
.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.12);
}

/* 聊天消息淡入 */
.msg-fade-in {
  animation: msgFadeIn 0.32s ease-out;
}
@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 打字光标 */
.typing-cursor::after {
  content: '▌';
  color: var(--color-primary);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* 思维链时间线 */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--color-border);
}
.timeline-dot {
  position: absolute;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.timeline-dot.success { border-color: var(--stage-s9); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.timeline-dot.error { border-color: var(--color-destructive); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); }
.timeline-dot.running { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* 弹窗背景 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open {
  display: flex;
  animation: backdropFade 0.18s ease;
}
@keyframes backdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 浮层 popup 动画 */
.popup-enter {
  animation: popupEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popupEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 自定义滚动条 */
.thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }

/* 入场动画 */
.fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 登录页背景渐变 */
.login-bg {
  background: radial-gradient(circle at top left, #F0F9FF 0%, #E0F2FE 50%, #FFFFFF 100%);
}

/* 项目侧栏小色点 */
.proj-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* 阶段色徽章(项目工作台头部) */
.stage-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-muted);
}
.stage-step.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.stage-step.done {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--stage-s9);
}

/* utility: 文本截断多行 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 头部 watermark 漂移 */
.float-slow {
  animation: floatSlow 14s ease-in-out infinite;
}
@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(8px, -10px) rotate(6deg); }
}

/* hero gradient */
.hero-gradient {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(99, 102, 241, 0.06) 50%, rgba(168, 85, 247, 0.04) 100%);
}
.hero-gradient-personal {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.08) 0%, rgba(183, 148, 244, 0.06) 50%, rgba(168, 85, 247, 0.04) 100%);
}

/* tab 下划线指示 */
.tab-underline {
  position: relative;
}
.tab-underline.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* 通用产物预览右栏 (挤压式) */
.previewer {
  flex: 0 0 0;
  width: 0;
  overflow: hidden;
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--color-border);
  background: white;
}
.previewer.open {
  width: 480px;
}

/* 输入栏圆角白卡 */
.chat-input-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.1);
}

/* tooltip 简易 */
.has-tooltip { position: relative; }
.has-tooltip:hover .tooltip-content {
  opacity: 1;
  transform: translate(-50%, -4px);
}
.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 0);
  background: #0f172a;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s ease;
  z-index: 50;
}

/* dropdown 简易 */
.dropdown-menu {
  position: absolute;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.15);
  padding: 4px;
  min-width: 160px;
  z-index: 50;
  display: none;
}
.dropdown-menu.open { display: block; }
.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--color-fg);
  border-radius: 4px;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}
.dropdown-menu button:hover { background: var(--color-muted-bg); }
.dropdown-menu button.danger { color: var(--color-destructive); }

/* ============================================================
 * Stage Stepper(阶段流程进度)
 * ============================================================ */
.stage-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 4px 2px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stage-stepper::-webkit-scrollbar { display: none; }

.stage-node-wrap {
  flex: 1 0 auto;
  min-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.stage-node-wrap + .stage-node-wrap::before {
  content: '';
  position: absolute;
  top: 13px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.stage-node-wrap.past::before,
.stage-node-wrap.current::before {
  background: var(--stage-s9);
}
.stage-node {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.stage-node-wrap.past .stage-node {
  background: var(--stage-s9);
  border-color: var(--stage-s9);
  color: white;
}
.stage-node-wrap.current .stage-node {
  background: var(--stage-current, var(--color-primary));
  border-color: var(--stage-current, var(--color-primary));
  color: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
  animation: stageNodePulse 1.6s ease-in-out infinite;
}
@keyframes stageNodePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.08); }
}
.stage-node-wrap:hover:not(.current) .stage-node {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.stage-node-label {
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  color: var(--color-muted);
  white-space: nowrap;
}
.stage-node-wrap.current .stage-node-label {
  color: var(--color-fg);
  font-weight: 600;
}
.stage-node-wrap.past .stage-node-label {
  color: var(--stage-s9);
}

/* 当前阶段上下文卡 */
.stage-context-card {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(248, 250, 252, 0.95));
  position: relative;
  overflow: hidden;
}
.stage-context-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--stage-current, var(--color-primary));
}
.stage-context-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--stage-current-soft, rgba(37, 99, 235, 0.1));
  color: var(--stage-current, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-context-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 4px;
}
.stage-context-meta strong {
  color: var(--color-fg);
  font-weight: 600;
}

/* mini progress bar */
.mini-progress {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mini-progress-track {
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-muted-bg);
  overflow: hidden;
}
.mini-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--stage-current, var(--color-primary)), var(--stage-s9));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* dock 上的小角标 */
.dock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  background: var(--color-primary);
  color: white;
  margin-left: 4px;
}
.dock-badge.warn { background: #F59E0B; }
.dock-badge.success { background: var(--stage-s9); }

/* 阶段切换 toast 增强 */
.stage-transition-toast {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 30;
  box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.stage-transition-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: stageTransitionPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes stageTransitionPop {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.92); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 项目详情 / 首页通用的阶段 strip */
.stage-strip {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: rgba(248, 250, 252, 0.6);
}
.stage-strip-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--color-muted);
  background: transparent;
  transition: all 0.15s ease;
  cursor: default;
}
.stage-strip-pill .code {
  font-weight: 600;
  font-size: 11px;
}
.stage-strip-pill.past {
  color: var(--stage-s9);
  background: rgba(16, 185, 129, 0.06);
}
.stage-strip-pill.current {
  color: white;
  background: var(--stage-current, var(--color-primary));
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.5);
}

/* =========================================================
   思维链 v2:步骤细节增强 + 执行抽屉
   ========================================================= */

/* 思维链单步:容器 */
.chain-step {
  position: relative;
  padding-bottom: 10px;
}
.chain-step:last-child { padding-bottom: 0; }
.chain-step .dot {
  position: absolute;
  left: -21px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid #CBD5E1;
  z-index: 1;
}
.chain-step .dot.success {
  border-color: var(--stage-s9);
  background: var(--stage-s9);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.chain-step .dot.error {
  border-color: var(--color-destructive);
  background: var(--color-destructive);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.chain-step .dot.running {
  border-color: var(--color-primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
  animation: pulse 1.4s ease-in-out infinite;
}
.chain-step .dot.waiting {
  border-color: #F59E0B;
  background: white;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  animation: pulse 1.4s ease-in-out infinite;
}
/* 步骤头 */
.chain-step-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.chain-step-head .kind-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #EEF2FF;
  color: #4F46E5;
  flex-shrink: 0;
}
.chain-step-head.success .kind-ico { background: rgba(16, 185, 129, 0.1); color: var(--stage-s9); }
.chain-step-head.error .kind-ico { background: rgba(220, 38, 38, 0.1); color: var(--color-destructive); }
.chain-step-head.waiting .kind-ico { background: rgba(245, 158, 11, 0.12); color: #B45309; }
.chain-step-head .running-spin {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(37, 99, 235, 0.18);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-left: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.chain-step-head .dur {
  font-size: 11px;
  color: #94A3B8;
  margin-left: auto;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.chain-step-head .caret {
  width: 12px; height: 12px; color: #94A3B8; flex-shrink: 0;
  transition: transform 0.18s ease;
}
.chain-step.open .chain-step-head .caret { transform: rotate(90deg); }
/* 步骤内容(可折叠) */
.chain-step-body {
  display: none;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px dashed #E2E8F0;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.6;
}
.chain-step.open .chain-step-body { display: block; }
.chain-step-body .kv {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 8px;
  margin-bottom: 4px;
}
.chain-step-body .kv .k { color: #94A3B8; }
.chain-step-body .kv .v { color: #334155; }
.chain-step-body .sub-list {
  margin-top: 4px;
  padding-left: 0;
  list-style: none;
}
.chain-step-body .sub-list li {
  position: relative;
  padding: 2px 0 2px 14px;
  color: #475569;
  font-size: 11px;
}
.chain-step-body .sub-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 8px;
  height: 1px;
  background: #CBD5E1;
}
.chain-step-body .sub-list li.done { color: #0F766E; }
.chain-step-body .sub-list li.done::before { background: var(--stage-s9); }
.chain-step-body .links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.chain-step-body .link-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 10.5px;
  color: var(--color-muted);
  cursor: pointer;
}
.chain-step-body .link-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* 思维链摘要头 */
.think-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748B;
  margin-bottom: 8px;
}
.think-summary .live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-primary);
  font-weight: 500;
  font-size: 10.5px;
}
.think-summary .live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse 1.4s ease-in-out infinite;
}
.think-summary .done-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.08);
  color: var(--stage-s9);
  font-weight: 500;
  font-size: 10.5px;
}
.think-summary .open-drawer-btn {
  margin-left: auto;
  font-size: 11px;
  color: var(--color-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 0;
}
.think-summary .open-drawer-btn:hover { text-decoration: underline; }

/* HITL 卡片增强 */
.hitl-card.waiting {
  border-color: #FCD34D;
  background: linear-gradient(120deg, #FFFBEB, #FFFFFF);
}
.hitl-card.approved {
  border-color: #A7F3D0;
  background: #ECFDF5;
}
.hitl-card.modified {
  border-color: #C7D2FE;
  background: #EEF2FF;
}
.hitl-card .hitl-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.16);
  color: #B45309;
  font-weight: 500;
  margin-left: 4px;
}
.hitl-card.approved .hitl-status-pill { background: rgba(16, 185, 129, 0.14); color: var(--stage-s9); }
.hitl-card.modified .hitl-status-pill { background: rgba(99, 102, 241, 0.14); color: #4338CA; }
.hitl-card.waiting .hitl-block-note {
  margin-top: 6px;
  font-size: 11px;
  color: #B45309;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 执行抽屉 */
.exec-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  height: 100vh;
  background: white;
  border-left: 1px solid var(--color-border);
  box-shadow: -16px 0 40px -16px rgba(15, 23, 42, 0.18);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.exec-drawer.open { right: 0; }
.exec-drawer .drawer-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.exec-drawer .drawer-head h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-fg);
  display: flex;
  align-items: center;
  gap: 6px;
}
.exec-drawer .drawer-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--color-border);
  background: #F8FAFC;
  font-size: 11.5px;
  color: var(--color-muted);
}
.exec-drawer .drawer-stats .stat {
  display: flex;
  align-items: center;
  gap: 4px;
}
.exec-drawer .drawer-stats .stat strong {
  color: var(--color-fg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.exec-drawer .drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px;
}
.exec-drawer .drawer-body .timeline-v {
  position: relative;
  padding-left: 22px;
}
.exec-drawer .drawer-body .timeline-v::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--color-border);
}
.exec-drawer .empty {
  text-align: center;
  color: var(--color-muted);
  font-size: 12px;
  padding: 40px 0;
}

/* 思维链卡片自身 timeline 竖线 */
.think-card .chain-timeline {
  position: relative;
  padding-left: 22px;
}
.think-card .chain-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--color-border);
}

/* =========================================================
   通用工具组件:Toast / Confirm / Breadcrumb / Empty / Search
   ========================================================= */

/* Toast 撤销按钮 */
.pve-toast {
  min-width: 240px;
  max-width: 360px;
}
.pve-toast-undo-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: 500;
}
.pve-toast-undo-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* loader-2 spin(给 Tailwind animate-spin 兜底) */
.animate-spin { animation: spin 0.9s linear infinite; }

/* 面包屑 */
.pve-bc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.pve-bc .pve-bc-link {
  color: var(--color-muted);
  transition: color 0.15s ease;
}
.pve-bc .pve-bc-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.pve-bc .pve-bc-current {
  color: #0F172A;
  font-weight: 500;
}

/* 空态 */
.pve-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-muted);
}
.pve-empty .pve-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--color-muted-bg);
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pve-empty .pve-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}
.pve-empty .pve-empty-desc {
  font-size: 12px;
  color: var(--color-muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 列表搜索条 */
.pve-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.pve-search input {
  padding: 6px 10px 6px 30px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: white;
  font-size: 13px;
  width: 240px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pve-search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.pve-search .pve-search-ico {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #94A3B8;
  pointer-events: none;
}
.pve-search .pve-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E2E8F0;
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pve-search input:not(:placeholder-shown) ~ .pve-search-clear {
  display: inline-flex;
}

/* ============================================================
 * 列表/管理页 标准页头与页面骨架
 * 用 .pve-page-header + .pve-page-body 替代各页面自定义的 header/page 样式
 * ============================================================ */
.pve-page-header {
  padding: 32px 40px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pve-page-header-copy {
  min-width: 0;
  flex: 1;
}
.pve-page-title {
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.pve-page-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.5;
}
.pve-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pve-page-body {
  padding: 24px 40px 40px;
}
.pve-page-narrow {
  max-width: 1280px;
  margin-inline: auto;
}

/* 标准主按钮 */
.pve-btn-primary {
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 16px -10px rgba(37, 99, 235, 0.45);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.pve-btn-primary:hover {
  background: #1d4ed8;
}
.pve-btn-ghost {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pve-btn-ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* 页头版搜索框（基于 .pve-search，加 .pve-search-md 修饰符） */
.pve-search.pve-search-md input {
  width: 260px;
  height: 36px;
  padding: 0 12px 0 34px;
  border-radius: 10px;
  font-size: 13px;
}
.pve-search.pve-search-md .pve-search-ico {
  width: 15px;
  height: 15px;
  left: 11px;
}

/* 窄屏 */
@media (max-width: 768px) {
  .pve-page-header {
    padding: 24px 20px 14px;
    flex-direction: column;
    align-items: stretch;
  }
  .pve-page-body {
    padding: 20px 20px 32px;
  }
  .pve-page-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .pve-search.pve-search-md {
    flex: 1;
  }
  .pve-search.pve-search-md input {
    width: 100%;
  }
}

/* 全局键盘 hint */
kbd.pve-kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  font-size: 10.5px;
  color: #64748B;
  font-family: inherit;
}
