/* ============================================================
   报告售卖站全局样式
   来源：report-site (2).zip 的 style.css，并扩展登录/分页/用户态样式
   主色：深蓝（专业、可信）；强调：分类色（蓝/绿/橙/紫/粉/红）
   ============================================================ */
:root {
  /* 表面 */
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-hover: #f9fafb;
  --surface-muted: #f5f5f4;

  /* 文字（4.5:1+ 对比度） */
  --text: #18181b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --text-light: #a1a1aa;

  /* 边框 / 分隔 */
  --border: #e7e5e4;
  --border-strong: #d6d3d1;

  /* 品牌主色：深蓝（专业、可信） */
  --primary: #1e40af;
  --primary-hover: #1e3a8a;
  --primary-light: #dbeafe;
  --primary-faint: #eff6ff;

  /* 语义色 */
  --success: #047857;
  --success-light: #d1fae5;
  --success-faint: #ecfdf5;
  --danger: #b91c1c;
  --danger-light: #fee2e2;
  --danger-faint: #fef2f2;
  --warning: #b45309;
  --warning-light: #fef3c7;

  /* 6 大分类色（柔和版本，用于图标与封面） */
  --cat-industry:   #3b82f6;
  --cat-market:     #10b981;
  --cat-competitor: #f59e0b;
  --cat-policy:     #8b5cf6;
  --cat-trend:      #ec4899;
  --cat-credit:     #ef4444;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.10);
  --shadow-xl: 0 24px 48px rgba(0,0,0,0.14);

  /* 形状 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  /* 间距（4 / 8 节奏） */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* 字号（阶梯） */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 44px;

  /* 动效 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ============================================================
   Focus 状态（全局可访问性）
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible,
.topbar__link:focus-visible {
  outline-offset: 3px;
}
.search-box:focus-visible {
  outline-offset: 1px;
}

/* ============================================================
   顶部栏（极简风）
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-4);
}

.topbar__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.topbar__logo svg {
  color: var(--primary);
}

.topbar__spacer { flex: 1; }

.topbar__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.topbar__link:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.topbar__link--active { background: var(--primary-faint); color: var(--primary); }

/* 用户态区域 */
.topbar__user {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.topbar__user-name {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 500;
}
.topbar__user-name svg { color: var(--primary); }

/* ============================================================
   移动端顶栏（2026-08-20）
   小屏下导航链接与用户区收为纯图标，防止文字竖排换行挤压顶栏；
   报告页顶栏左侧让出目录汉堡钮位置（汉堡钮收进顶栏内）。
   ============================================================ */
@media (max-width: 767px) {
  .topbar { padding: 0 12px; gap: 4px; }
  .topbar__logo { flex-shrink: 0; white-space: nowrap; font-size: 16px; }
  .topbar__link { flex-shrink: 0; padding: var(--space-2); }
  .topbar__link > span { display: none; }
  .topbar__user { flex-shrink: 0; gap: 4px; }
  .topbar__user-name-text { display: none; }
  .report-page .topbar { padding-left: 56px; }
}

/* ============================================================
   容器
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

/* ============================================================
   搜索框
   ============================================================ */
.search-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto var(--space-6);
}
.search-box {
  width: 100%;
  padding: 14px var(--space-4) 14px 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-md);
  background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-box::placeholder { color: var(--text-light); }
.search-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.10);
}
.search-wrap__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================================================
   分类 Tab
   ============================================================ */
.category-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.category-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.category-tab svg { opacity: 0.7; }
.category-tab--active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
}
.category-tab--active svg { opacity: 1; color: white; }
/* 选中项悬浮时保持白字、背景加深，避免 :hover 的黑字覆盖成"蓝底黑字"（2026-08-10 视觉优化） */
.category-tab--active:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
}

/* ============================================================
   报告卡片网格
   ============================================================ */
.report-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
@media (max-width: 1199px) {
  .report-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}
@media (max-width: 767px) {
  .report-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
}
@media (max-width: 480px) {
  .report-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

.report-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  text-decoration: none;
}

/* 抽象封面：彩色 SVG 全幅图 */
.report-card__cover {
  position: relative;
  aspect-ratio: 8 / 5; /* 与封面 SVG viewBox(240x150) 一致，避免 slice 裁切内容 */
  overflow: hidden;
}
.report-card__cover svg {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform var(--t-base) var(--ease);
}
.report-card:hover .report-card__cover svg {
  transform: scale(1.04);
}

/* 分类徽章：底部行右端 chip（2026-08-21 从封面浮层挪入正文底部；颜色由 inline style 注入分类色+浅底） */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 卡片底部行：左「免费」右分类徽章（2026-08-21）；付费报告左侧为空，徽章靠 margin-left:auto 钉在右端
   （space-between 只有一个子元素时会靠左，单靠它不够）；
   margin-top:auto 使底行在 flex 列中贴底，免费/付费卡片底行垂直位置一致 */
.report-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
}
.report-card__foot .category-badge {
  margin-left: auto;
}

/* 卡片正文 */
.report-card__body {
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.report-card__title {
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  letter-spacing: -0.005em;
}

.report-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  gap: var(--space-2);
}

.report-card__price {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
}
.report-card__price-now {
  color: var(--danger);
  font-weight: 700;
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
}
.report-card__price-old {
  color: var(--text-light);
  text-decoration: line-through;
  font-size: var(--fs-xs);
  font-weight: 400;
}

.report-card__price-free {
  color: var(--success);
  background: var(--success-faint);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
}

/* ============================================================
   详情页
   ============================================================ */
.detail-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-8);
  align-items: start;
}
@media (max-width: 767px) {
  .detail-header { grid-template-columns: 1fr; gap: var(--space-6); }
}

.detail-cover {
  width: 100%;
  aspect-ratio: 8 / 5; /* 与封面 SVG viewBox(240x150) 一致，避免 slice 裁切内容 */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.detail-cover svg { width: 100%; height: 100%; display: block; }

.detail-info__category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: white;
  margin-bottom: var(--space-3);
}

.detail-info__title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  color: var(--text);
}
@media (max-width: 767px) {
  .detail-info__title { font-size: var(--fs-2xl); }
}

.detail-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-5);
}
.detail-info__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.detail-info__summary {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  font-size: var(--fs-md);
}

.detail-info__price-box {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, var(--surface-muted), var(--primary-faint));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.detail-info__price {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.detail-info__price--free {
  color: var(--success);
}

/* 精简详情头部：主标题由阅读器 .report-header 横幅承担（双标题去重，2026-08-11），
   此处只保留分类标签 + 日期/大小 + 价格/购买操作条，一行排开、窄屏换行 */
.detail-header--slim {
  display: block;
  margin-bottom: var(--space-6);
}
.detail-header--slim .detail-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}
.detail-header--slim .detail-info__category { margin-bottom: 0; }
.detail-header--slim .detail-info__meta {
  margin-bottom: 0;
  gap: var(--space-4);
}
.detail-header--slim .detail-info__price-box {
  flex: 1;
  min-width: 260px;
  padding: var(--space-3) var(--space-5);
}
.detail-header--slim .detail-info__price { font-size: var(--fs-2xl); }
@media (max-width: 767px) {
  .detail-header--slim .detail-info__price-box { flex-basis: 100%; min-width: 0; }
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--primary);
  color: white;
}
.btn--primary:hover { background: var(--primary-hover); }

.btn--success {
  background: var(--success);
  color: white;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface-hover); }

.btn--danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}
.btn--danger:hover { background: var(--danger-faint); }

.btn--lg {
  padding: 14px var(--space-8);
  font-size: var(--fs-md);
}

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

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============================================================
   目录 / 阅读区（外层包装，报告内容渲染由 viewer.css 接管）
   ============================================================ */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
}
.toc__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.toc__list { list-style: none; }
.toc__item a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  color: var(--text);
  font-size: var(--fs-sm);
  border-radius: var(--radius-xs);
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.toc__item a:hover {
  color: var(--primary);
  text-decoration: none;
}
.toc__item--h3 a {
  padding-left: var(--space-5);
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.progress-bar {
  position: sticky;
  top: 64px;
  z-index: 50;
  height: 3px;
  background: transparent;
  margin-bottom: var(--space-4);
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cat-trend));
  transition: width var(--t-base) var(--ease);
}

.reader-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-10) var(--space-12);
  line-height: 1.85;
  font-size: var(--fs-md);
  position: relative;
  color: var(--text-secondary);
}
@media (max-width: 767px) {
  .reader-wrap { padding: var(--space-6); }
}

.paywall {
  position: relative;
  margin-top: var(--space-10);
}
.paywall__overlay {
  position: absolute;
  top: -200px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--surface) 90%);
  pointer-events: none;
}
.paywall__cta {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
}
.paywall__cta h3 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text);
}
.paywall__cta p { color: var(--text-muted); margin-bottom: var(--space-5); }

/* 锁定章节点击付费墙时的提示脉冲动画（viewer.js goPaywall 触发）：
   光晕向外扩散 2 次 + 轻微放大，边框闪主题色，播完由 JS 移除类以便下次重播 */
.paywall__cta--pulse {
  animation: paywall-pulse 0.9s ease-out 2;
  border-color: var(--primary);
}
@keyframes paywall-pulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(30, 64, 175, 0); }
  35%  { transform: scale(1.035); box-shadow: 0 0 0 14px rgba(30, 64, 175, 0.16); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(30, 64, 175, 0); }
}

/* ============================================================
   分页
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
  flex-wrap: wrap;
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.pagination__btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-hover);
}
.pagination__btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination__info {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-left: var(--space-4);
}

/* ============================================================
   登录页
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.login-page .topbar {
  position: relative;
}
.login-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-6);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}
.login-card__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  text-align: center;
  color: var(--text);
}
.login-card__subtitle {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
  /* 收窄与标题的间距：负 margin 抵消标题的 margin-bottom */
  margin: calc(-1 * var(--space-4)) 0 var(--space-6);
}
.login-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.login-tab {
  flex: 1;
  padding: var(--space-3) 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--t-fast) var(--ease);
}
.login-tab:hover { color: var(--text); }
.login-tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.login-form__group { display: flex; flex-direction: column; gap: var(--space-1); }
.login-form__label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
}
.login-form__input {
  width: 100%;
  padding: 12px var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.login-form__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.10);
  outline: none;
}
.login-form__row {
  display: flex;
  gap: var(--space-3);
}
.login-form__row .login-form__input { flex: 1; }
.login-form__code-btn {
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
  color: var(--primary);
  background: var(--primary-faint);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
}
.login-form__code-btn:hover:not(:disabled) { background: var(--primary-light); }
.login-form__code-btn:disabled {
  border-color: var(--border);
  color: var(--text-muted);
  background: var(--surface-muted);
  cursor: not-allowed;
}
.login-form__tip {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
}
.login-form__error {
  color: var(--danger);
  font-size: var(--fs-sm);
  min-height: 20px;
}
/* 绑定页「暂不绑定，退出登录」出口（2026-08-12） */
.login-card__exit {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border);
  text-align: center;
}
.login-card__exit .link-btn {
  color: var(--text-muted);
}
.qr-wrap {
  text-align: center;
  padding: var(--space-6) 0;
}
.qr-frame {
  width: 300px;
  height: 400px;
  margin: 0 auto var(--space-4);
  background: #fff;
  overflow: hidden;
  position: relative;
}
.qr-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

/* ============================================================
   绑定微信扫码弹窗（auth.js openBindWechatModal 注入）
   ============================================================ */
.bind-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bind-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.bind-modal__box {
  position: relative;
  width: 360px;
  max-width: calc(100vw - 32px);
  /* 二维码加高到 400 后，矮视口下防溢出：内容超高时盒内滚动，避免底部再次被裁（2026-08-12） */
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.bind-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  line-height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.bind-modal__close:hover { background: var(--surface-muted); color: var(--text); }
.bind-modal__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
}
.bind-modal__tip {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.bind-modal__qr {
  width: 300px;
  /* 高度 300→400（2026-08-12 修复）：与登录页 .qr-frame 对齐，否则 300 高会把
     微信授权页二维码底部裁掉（用户反馈绑定二维码底部被遮挡） */
  height: 400px;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-sm);
}
.bind-modal__qr iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

/* ============================================================
   用户中心页（user.html）—— 复用 login-card 卡片风格（2026-08-11 新增）
   ============================================================ */
.login-card--wide { max-width: 640px; }

.user-section { margin-bottom: var(--space-6); }
.user-section:last-of-type { margin-bottom: 0; }
.user-section__title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

/* 设置行：label / value / action 横向排布（仿 .pay-method 结构） */
.user-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}
.user-row__icon { color: var(--primary); flex-shrink: 0; display: inline-flex; }
.user-row__label {
  width: 96px;
  flex-shrink: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.user-row__value {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-base);
  color: var(--text);
  word-break: break-all;
}
.user-row__value .login-form__input { padding: 8px var(--space-3); font-size: var(--fs-sm); }
.user-row__action { flex-shrink: 0; }

/* 设置行下的说明文字 */
.user-tip {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin: var(--space-1) 0 0 calc(96px + var(--space-3));
}

/* 链接式轻量按钮（手机号「显示完整号码」切换等） */
.link-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: var(--fs-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.link-btn:hover { color: var(--primary-hover); text-decoration: underline; }

/* 确认浮层内的按钮排布（解绑微信等二次确认；复用 .bind-modal 盒模型） */
.bind-modal__btns {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-5);
}

/* 顶栏用户名由 span 改为 <a> 链接（跳个人中心），补 hover 态 */
.topbar__user-name {
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  margin: calc(-1 * var(--space-1)) calc(-1 * var(--space-2));
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.topbar__user-name:hover { background: var(--surface-hover); color: var(--primary); text-decoration: none; }
.topbar__user-name:hover svg { color: var(--primary); }
.topbar__user-name--static { cursor: default; pointer-events: none; }
.topbar__user-name--static:hover { background: transparent; color: var(--text-secondary); }

/* ============================================================
   关联推荐 / 空态
   ============================================================ */
.related {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--border);
}
.related__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  color: var(--text);
  letter-spacing: -0.01em;
}

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  color: var(--text-muted);
}
.empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.empty-state__text {
  font-size: var(--fs-md);
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

.result-stats {
  margin-top: var(--space-8);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ============================================================
   提示条
   ============================================================ */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 1000;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast--error { background: var(--danger); }
.toast--success { background: var(--success); }

/* ============================================================
   报告页顶部栏适配（避免与左侧目录侧边栏重叠）
   report.html 的 <body class="report-page"> 触发。
   报告页正文很长，#app 容器本身很短，position:sticky 只在容器内生效，
   一滚出 #app 顶栏就消失，所以报告页顶栏必须用 fixed 固定在视口顶部。
   ============================================================ */
.report-page .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;   /* 高于侧栏(1000)/目录开关(1100)，低于进度条(2000)/提示层(3000) */
}
body.report-page {
  padding-top: 64px;   /* 顶栏脱离文档流后，正文整体下移，避免被 fixed 顶栏遮挡 */
}

/* ============================================================
   减少动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   全局加载动画（首页 / 已购 / 登录页通用）
   report.html 同时引入 viewer.css，同名样式重复声明无副作用
   ============================================================ */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 30vh; gap: 18px; }
.spinner { width: 44px; height: 44px; border: 4px solid #eee; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-secondary); font-size: 15px; }

/* ============================================================
   支付弹窗（真实支付：微信扫码 / 支付宝）
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 24, 27, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn var(--t-base) var(--ease);
}
.modal {
  width: min(440px, calc(100vw - 32px));
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-8);
  animation: modalUp var(--t-base) var(--ease);
}
.modal__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.modal__desc {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}
.modal__price {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--danger);
  margin-bottom: var(--space-6);
  letter-spacing: -0.01em;
}
.modal__close {
  display: block;
  width: 100%;
  margin-top: var(--space-4);
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.modal__close:hover { background: var(--surface-muted); color: var(--text); }

/* 支付方式选择（初始步骤） */
.pay-methods { display: flex; flex-direction: column; gap: var(--space-3); }
.pay-method {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--fs-md);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
}
.pay-method:hover { border-color: var(--primary); background: var(--primary-faint); box-shadow: var(--shadow-sm); }
.pay-method:disabled { opacity: 0.6; cursor: not-allowed; }
.pay-method__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.pay-method__icon--wx { background: #07c160; color: #fff; }
.pay-method__icon--ali { background: #1677ff; color: #fff; }
.pay-method__label { font-weight: 600; }

/* 支付进行中（二维码 / 等待支付宝） */
.pay-progress { text-align: center; }
.pay-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-qr img { width: 100%; height: 100%; object-fit: contain; }
.pay-progress__tip {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}
.pay-progress__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.pay-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 我的收藏（2026-08-19） ===== */

/* 卡片收藏星标：封面右上角，半透明白底玻璃拟态（对齐 category-badge 风格） */
.report-card__fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(4px);
  color: #94a3b8;
  cursor: pointer;
  transition: color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.report-card__fav:hover { transform: scale(1.12); color: var(--primary); }
.report-card__fav--on { color: #f59e0b; }
.report-card__fav--on:hover { color: #f59e0b; }

/* 卡片「已购」标记：星标左侧 */
.report-card__purchased {
  position: absolute;
  top: 8px;
  right: 46px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .92);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
}

/* 详情页收藏按钮 */
.report-fav-btn--on { color: #f59e0b; border-color: #f59e0b; }

/* 收藏页失效卡片（报告已被删除）：灰态、不可跳转 */
.report-card--invalid { cursor: default; opacity: .75; }
.report-card--invalid:hover { transform: none; box-shadow: none; border-color: var(--border); }
.report-card__invalid-cover {
  position: relative;
  aspect-ratio: 8 / 5; /* 与正常封面一致，卡片高度不跳动 */
  background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 12px, #edf2f7 12px, #edf2f7 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-card__off-badge {
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(100, 116, 139, .9);
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
}
.report-card__remove { font-size: 13px; padding: 4px 12px; }

/* ===== 企业管理页（2026-08-20 新增） ===== */

/* 企业信息卡：名称、名额、可见范围 */
.enterprise-info { margin-bottom: var(--space-2); }
.enterprise-info__name {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
}
.enterprise-info__quota {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.enterprise-info__quota span { font-weight: 700; color: var(--primary); }
.enterprise-info__scope { font-size: var(--fs-sm); color: var(--text-muted); }

/* 成员列表表格：小屏可横向滚动 */
.enterprise-table-wrap { overflow-x: auto; }
.enterprise-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.enterprise-members-table th,
.enterprise-members-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
.enterprise-members-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--surface-muted);
}
.enterprise-members-table tr:last-child td { border-bottom: none; }
@media (max-width: 767px) {
  .enterprise-members-table th,
  .enterprise-members-table td { padding: var(--space-2) var(--space-3); font-size: var(--fs-xs); }
}

/* 成员状态徽章 */
.enterprise-status--active {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--success-light);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}
.enterprise-status--pending {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warning-light);
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
}

/* 添加成员表单 */
.enterprise-add-form {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.enterprise-add-form .login-form__input { flex: 1; min-width: 200px; }
.enterprise-add-form .login-form__error { flex-basis: 100%; }

/* 报告详情页企业权益标识（绿色 pill，仿收藏页「已购」徽章风格） */
.report-ent-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .92);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
}
