:root {
  --bg: #050201;
  --bg-2: #0f0503;
  --panel: rgba(26, 20, 18, 0.76);
  --panel-strong: rgba(20, 14, 12, 0.92);
  --option-bg: #130c0a;
  --line: rgba(255, 255, 255, 0.12);
  --line-copper: rgba(224, 142, 85, 0.36);
  --text: #f5f5f4;
  --muted: #a8a29e;
  --soft: #d6d3d1;
  --copper: #e08e55;
  --copper-2: #f0a670;
  --copper-dark: #4a2510;
  --blue: #4f7bff;
  --green: #22c55e;
  --red: #ef4444;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* 全站占位文字：统一亮度，暗色底上可读（默认浏览器灰对比不足） */
::placeholder {
  color: #8f8984;
  opacity: 1;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(5, 2, 1, 0.78), rgba(5, 2, 1, 0.98)),
    linear-gradient(118deg, rgba(83, 39, 16, 0.72) 0%, rgba(30, 13, 7, 0.18) 34%, rgba(5, 2, 1, 0.82) 68%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 96px),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Heiti SC", system-ui, sans-serif;
  letter-spacing: 0;
}

/* 中文排版：段落/提示条避免孤字悬挂（如「自动转移。」的「移。」单独成行） */
p,
.form-note,
.confirm-message {
  text-wrap: pretty;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* 键盘导航焦点环（鼠标点击不显示，Tab 键聚焦可见） */
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(240, 166, 112, 0.75);
  outline-offset: 2px;
  border-radius: 4px;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, transparent 0 42%, rgba(224, 142, 85, 0.08) 42% 43%, transparent 43% 100%),
    repeating-linear-gradient(120deg, rgba(224, 142, 85, 0.05) 0 1px, transparent 1px 80px);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.18));
  opacity: 0.7;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: 64px;
  padding: 12px 20px;
  /* 提高底色不透明度并减小模糊半径：吸顶滚动时重绘成本更低、更流畅 */
  background: rgba(5, 2, 1, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 96px;
  height: 34px;
  object-fit: contain;
}

.brand span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

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

.top-actions a,
.top-actions button {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--soft);
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.top-actions a:hover,
.top-actions button:hover {
  color: var(--copper-2);
  border-color: var(--line-copper);
}

/* 顶栏右上角搜索栏（从左侧筛选栏迁入）：紧贴右侧快捷操作，视觉上位于右上角 */
.top-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 300px;
  margin-left: auto;
  gap: 8px;
  min-width: 0;
}

.top-search select,
.top-search input {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.top-search input {
  flex: 1 1 120px;
  min-width: 0;
  max-width: 340px;
}

.top-search select:focus,
.top-search input:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

.top-search button {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--copper-2);
  font-size: 13px;
  background: rgba(224, 142, 85, 0.12);
  border: 1px solid var(--line-copper);
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
}

.top-search button:hover {
  background: rgba(224, 142, 85, 0.18);
}

/* 重置搜索降级为次要操作：铜金强调只留给「搜索」主按钮 */
.top-search #clearSearch {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.top-search #clearSearch:hover {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
}

/* 检索方式自定义下拉在顶栏内的紧凑尺寸 */
.top-search .cselect {
  display: inline-block;
  width: auto;
  min-width: 122px;
}

.top-search .cselect-trigger {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
}

/* 管理员登录后顶栏控件最多（多出「邀请码/银行别名」+ 用户徽章），
   先让品牌文字与搜索框让位，避免整条顶栏被挤到第二行 */
@media (max-width: 1500px) {
  .app-header .brand span { display: none; }
}

@media (max-width: 1240px) {
  .app-header { flex-wrap: wrap; }
  .top-search {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  width: min(1480px, calc(100vw - 40px));
  margin: 26px auto 56px;
}

.filters {
  position: sticky;
  top: calc(var(--header-h, 72px) + 24px);
  align-self: start;
  display: grid;
  gap: 16px;
  padding: 20px;
  /* 背景加不透明度（原 0.76 + blur 滚动重绘开销大）：玻璃观感保留、内滚流畅 */
  background: rgba(26, 20, 18, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  /* 侧栏内部滚动：内容超高时只滚筛选栏，页面整体不动 */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 142, 85, 0.35) rgba(255, 255, 255, 0.05);
}

.filter-title,
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filter-title span {
  color: var(--copper-2);
  font-weight: 700;
}

.filter-title strong {
  min-width: 54px;
  padding: 6px 10px;
  color: var(--copper-2);
  text-align: center;
  border: 1px solid var(--line-copper);
  border-radius: 999px;
  background: rgba(224, 142, 85, 0.12);
}

.filters label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filters input,
.filters select,
.filters textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.filters input:focus,
.filters select:focus,
.filters textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

.filters textarea {
  min-height: 104px;
  /* 关闭手动缩放：固定尺寸更稳定，去掉右下角缩放角标视觉噪声 */
  resize: none;
  line-height: 1.55;
}

.need-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.need-actions button,
.tag-filter > button {
  min-height: 38px;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.12);
  border: 1px solid var(--line-copper);
  border-radius: 8px;
}

.need-actions button:hover,
.tag-filter > button:hover {
  background: rgba(224, 142, 85, 0.18);
}

/* 「匹配案例」是主操作：实心铜金；「清空需求」降级为次要文字按钮 */
.need-actions #matchNeed {
  color: #1c1207;
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  font-weight: 700;
}

.need-actions #matchNeed:hover {
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  filter: brightness(1.06);
}

.need-actions #clearNeed {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.need-actions #clearNeed:hover {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
}

.tag-filter {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.filter-subtitle {
  color: var(--copper-2);
  font-size: 13px;
  font-weight: 700;
}

.active-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 26px;
}

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

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  color: var(--text);
  background: rgba(79, 123, 255, 0.12);
  border: 1px solid rgba(79, 123, 255, 0.34);
  border-radius: 999px;
  font-size: 12px;
}

.active-tag span {
  color: var(--copper-2);
}

.legend {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  color: var(--soft);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
}

.dot.copper { background: var(--copper); }
.dot.blue { background: var(--blue); }
.dot.green { background: var(--green); }

/* 已验证：绿底打勾，与「ROI 证据」的纯绿点区分（图例不再双义） */
.dot.check {
  position: relative;
  background: var(--green);
}

.dot.check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  color: #04120a;
  font-size: 7px;
  font-weight: 900;
  line-height: 9px;
  text-align: center;
}

.content {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--copper-2);
  text-decoration: none;
  /* 扩大点击区（原 17px 高偏小），负 margin 抵消 padding 避免布局位移 */
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 6px;
  transition: background-color 0.16s ease;
}

.breadcrumb a:hover {
  background: rgba(224, 142, 85, 0.12);
}

.hero {
  padding: 30px;
  background: linear-gradient(135deg, rgba(224, 142, 85, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line-copper);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: end;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--copper-2);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  max-width: 880px;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.12;
  /* 平衡换行：避免「…场景地 / 图」这类孤字断行 */
  text-wrap: balance;
}

.hero p {
  max-width: 760px;
  margin-top: 16px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.7;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi,
.mini-card,
.case-item,
.detail-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.kpi {
  padding: 16px;
}

.kpi strong {
  display: block;
  color: var(--copper-2);
  font-size: 28px;
}

/* 零值指标弱化为中性色，铜金只留给正向数据（如 0 已验证擂台） */
.kpi strong.zero {
  color: var(--muted);
}

.kpi span {
  color: var(--soft);
  font-size: 13px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.mini-card {
  position: relative;
  min-height: 156px;
  padding: 18px 18px 24px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.mini-card:hover {
  border-color: var(--line-copper);
  transform: translateY(-2px);
}

.mini-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.mini-card p {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
  /* 固定两行高度 + 截断：说明长短不一也不会让进度条上下跳动 */
  min-height: calc(13px * 1.6 * 2);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card .count {
  position: absolute;
  right: 18px;
  bottom: 22px;
  color: rgba(240, 166, 112, 0.88);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  min-width: 56px;
  text-align: right;
  z-index: 1;
}

.bar {
  width: max(80px, calc(100% - 104px));
  height: 8px;
  margin-top: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.bar span {
  display: block;
  height: 100%;
  /* 与品牌铜金体系一致的单色渐变（原橙→蓝与主视觉脱节） */
  background: linear-gradient(90deg, rgba(224, 142, 85, 0.45), var(--copper));
  border-radius: 999px;
}

.roi-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
  /* 「高 ROI 推荐」按钮滚动定位：停在吸顶栏下方，避免面板顶被遮/偏下 */
  scroll-margin-top: calc(var(--header-h, 72px) + 18px);
}

/* ROI 面板标题行（占据整行）：与列表区 list-head 同款结构，消除面板「凭空出现/被遮挡」感 */
.roi-panel .list-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.roi-card {
  padding: 16px;
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 12px;
}

.roi-card h3 {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 16px;
}

.roi-card p {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.list-shell {
  margin-top: 22px;
  padding: 22px;
  background: rgba(5, 2, 1, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.list-head {
  margin-bottom: 16px;
}

.list-head h2 {
  font-size: 26px;
}

#listMeta {
  color: var(--muted);
  font-size: 13px;
}

/* 检索/筛选激活时：收起地图总览大标签与分类卡片，让结果列表直接置顶展示 */
body.is-searching .hero,
body.is-searching .cards,
body.is-searching .roi-panel {
  display: none;
}

body.is-searching .list-shell {
  margin-top: 0;
}

.case-list {
  display: grid;
  gap: 12px;
}

.case-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  padding: 16px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.case-item:hover {
  border-color: var(--line-copper);
  background: rgba(224, 142, 85, 0.04);
}

.case-item h3 {
  margin-bottom: 9px;
  font-size: 17px;
}

.case-item p {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.tag.source {
  color: var(--copper-2);
  border-color: var(--line-copper);
}

/* 维度总标签（场景标签区行首的「收益类型/客群/…」）：组标题，不可点击，与值标签视觉区分 */
.tag.tag-dim {
  min-width: 60px;
  justify-content: center;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.14);
  border-color: rgba(224, 142, 85, 0.42);
  border-radius: 6px;
  font-weight: 700;
  cursor: default;
}

/* 纯信息标签（场景 ID / 案例数 / 命中数 / 擂主行）：虚线描边 + 默认光标，明确不可点击 */
.tag.static {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
  cursor: default;
}

.tag.static:hover {
  border-color: var(--line);
}

.tag-button {
  appearance: none;
  cursor: pointer;
}

.tag-button:hover {
  color: var(--text);
  border-color: var(--copper);
  background: rgba(224, 142, 85, 0.14);
}

.tag-button.rate {
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.14);
  border-color: var(--line-copper);
  font-weight: 600;
}

.tag-button.danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.tag-button.danger:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
}

.case-actions {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 10px;
  color: var(--soft);
  font-size: 12px;
  text-align: right;
}

.case-open {
  align-self: center;
  min-width: 86px;
  min-height: 34px;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.12);
  border: 1px solid var(--line-copper);
  border-radius: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  /* 遮罩不宜过黑：保留背景 20%-30% 可读轮廓，配合轻微模糊聚焦前景 */
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: absolute;
  top: 44px;
  right: max(28px, calc((100vw - 1480px) / 2));
  width: min(720px, calc(100vw - 56px));
  max-height: calc(100vh - 88px);
  padding: 26px 26px 34px;
  overflow: auto;
  background: var(--panel-strong);
  border: 1px solid var(--line-copper);
  border-radius: 18px;
  box-shadow: var(--shadow);
  /* 弹窗内滚动条：细窄铜色，滚动边界可辨识 */
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 142, 85, 0.4) transparent;
}

.modal-card::-webkit-scrollbar {
  width: 8px;
}

.modal-card::-webkit-scrollbar-thumb {
  background: rgba(224, 142, 85, 0.35);
  border-radius: 999px;
}

.modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-close:hover {
  color: var(--copper-2);
  border-color: var(--line-copper);
  background: rgba(224, 142, 85, 0.12);
}

.detail-title {
  padding-right: 56px;
}

.detail-title h2 {
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.25;
}

/* ===== 居中确认框（confirmModal，替代浏览器 confirm） ===== */
#confirmModal {
  /* 确认框必须在所有业务弹窗（case/form/invite 均 z-index:80）之上，否则会被盖住点不到 */
  z-index: 100;
}

.modal-center .modal-card {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 40px));
}

.confirm-message {
  margin-top: 14px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.confirm-actions .ghost {
  min-height: 38px;
  padding: 8px 18px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.confirm-actions .ghost:hover {
  color: var(--text);
  border-color: var(--copper);
}

.confirm-actions .primary {
  min-height: 38px;
  padding: 8px 20px;
  color: #1c1207;
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  border: 1px solid var(--line-copper);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.confirm-actions .primary:hover {
  filter: brightness(1.06);
}

/* 危险操作（删除/作废）：确认按钮用危险红，与普通确认区分 */
.confirm-actions .primary.danger {
  color: #fff;
  background: linear-gradient(120deg, #f87171, var(--red));
  border-color: rgba(239, 68, 68, 0.5);
}

/* 上传表单：对外别名勾选开关 */
.alias-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--soft);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.alias-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--copper);
}

/* 案例详情互评明细（非匿名） */
.rating-details-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.rating-detail-row {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.rating-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rating-detail-time {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.rating-detail-dims {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rating-comment {
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
}

/* 旧格式评分（无四维明细）的空态提示 */
.dims-empty {
  font-size: 12px;
  font-style: italic;
}

/* 「查看评论」按钮：次级操作，统一样式（不管几条评分都显示） */
.rating-more {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.08);
  border: 1px solid var(--line-copper);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rating-more:hover {
  background: rgba(224, 142, 85, 0.16);
  border-color: var(--copper);
}

/* ===== 评分明细分页弹窗（ratingListModal） ===== */
.rating-list-body {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rating-list-row {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.rating-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rating-list-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.rating-list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rating-list-meta {
  color: var(--muted);
  font-size: 13px;
}

.rating-list-nav {
  display: flex;
  gap: 8px;
}

.rating-list-nav button {
  min-height: 32px;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 7px;
}
.rating-list-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 案例详情内表单（银行互评区）：与 formModal 的 .arena-form 控件视觉一致
   （互评表单在 caseModal 里，未包 arena-form，需单独补齐控件样式） */
.detail-section .form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.detail-section .form-grid input,
.detail-section .form-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

.detail-section .form-grid textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.55;
}

.detail-section .form-grid input:focus,
.detail-section .form-grid textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

/* 互评四维数字输入：隐藏浏览器原生 spinner（0-100 整数，键盘直接输入更干净） */
.detail-section .form-grid .v-dim {
  appearance: textfield;
  -moz-appearance: textfield;
  font-variant-numeric: tabular-nums;
}
.detail-section .form-grid .v-dim::-webkit-outer-spin-button,
.detail-section .form-grid .v-dim::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 评分维度说明：小字次级色，与维度名区分层级 */
.dim-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 400;
}

/* 意见评论（textarea 在 label 内，需撑满） */
.detail-section .form-grid + label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* 互评提交操作区：与表单内容分隔，留白充足 */
.detail-section .form-submit {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-section .form-grid + label textarea {
  width: 100%;
  min-height: 88px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.55;
}

.detail-section .form-grid + label textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

/* ===== 居中轻提示 Toast（替代浏览器 alert） ===== */
#toastWrap {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: min(520px, calc(100vw - 48px));
  padding: 14px 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast-icon {
  flex: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: #1c1207;
}

.toast.success .toast-icon {
  background: linear-gradient(120deg, #4ade80, var(--green));
}

.toast.error .toast-icon {
  background: linear-gradient(120deg, #f87171, var(--red));
}

.toast.info .toast-icon {
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
}

.toast-msg {
  color: var(--soft);
}

/* ===== 邀请码专用大弹窗（inviteModal） ===== */
.modal-wide .modal-card {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: min(880px, calc(100vw - 48px));
}

.invite-body {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.invite-gen {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.invite-gen-field {
  flex: 1;
}

.invite-gen-field label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.invite-gen-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.invite-gen-field input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

.invite-gen .primary {
  flex: none;
  min-height: 42px;
  padding: 9px 24px;
  color: #1c1207;
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  border: 1px solid var(--line-copper);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.invite-gen .primary:hover {
  filter: brightness(1.06);
}

.invite-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.invite-list-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--soft);
}

.invite-list-meta {
  color: var(--muted);
  font-size: 12.5px;
}

.invite-cards {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  max-height: 44vh;
  overflow-y: auto;
  scrollbar-color: rgba(224, 142, 85, 0.35) rgba(255, 255, 255, 0.05);
}

/* 邀请码列表翻页控件 */
.invite-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.invite-pager button {
  min-height: 34px;
  padding: 6px 14px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.invite-pager button:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--line-copper);
}

.invite-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.invite-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.invite-card:hover {
  border-color: var(--line-copper);
}

.invite-code {
  flex: none;
  min-width: 148px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--copper-2);
}

.invite-copy {
  flex: none;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.1);
  border: 1px solid var(--line-copper);
  border-radius: 7px;
  cursor: pointer;
}

.invite-copy:hover {
  background: rgba(224, 142, 85, 0.2);
}

.invite-bank {
  color: var(--soft);
  font-size: 13px;
}

.invite-status {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.invite-status.fresh {
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

.invite-status.used {
  color: #93c5fd;
  border: 1px solid rgba(79, 123, 255, 0.4);
  background: rgba(79, 123, 255, 0.1);
}

.invite-status.void {
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.invite-status.expired {
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}

.invite-expire {
  color: var(--muted);
  font-size: 12.5px;
}

.invite-revoke {
  flex: none;
  margin-left: auto;
  padding: 5px 12px;
  font-size: 12.5px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 7px;
  cursor: pointer;
}

.invite-revoke:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.6);
}

.invite-empty {
  padding: 22px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* 场景/案例详情标题下的统计信息行（区别于可交互标签） */
.detail-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.detail-section {
  padding: 14px;
}

.detail-section strong {
  display: block;
  margin-bottom: 8px;
  color: var(--copper-2);
}

.detail-section p,
.detail-section li {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.65;
}

.detail-section ul {
  margin: 0;
  padding-left: 18px;
}

.path-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--copper-2);
  word-break: break-all;
}

.empty {
  padding: 36px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* 列表尾部提示（如「已显示前 120 个结果」）：紧凑文字条，区别于空态虚线框 */
.list-end-note {
  padding: 14px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .hero-grid,
  .cards,
  .roi-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .app-header {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
  }

  .top-search {
    order: 3;
    width: 100%;
    flex: none;
    margin-left: 0;
  }

  .top-search input {
    flex: 1 1 auto;
    max-width: none;
  }

  .layout {
    width: min(100% - 24px, 1480px);
    margin-top: 14px;
  }

  .hero {
    padding: 22px;
  }

  .hero-grid,
  .cards,
  .roi-panel,
  .kpis,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .case-item {
    grid-template-columns: 1fr;
  }

  .case-actions {
    justify-items: start;
    text-align: left;
  }
}

/* ===== 以下为擂台扩展样式（追加段，未改动上方 ai4fin-map 原版规则） ===== */

:root {
  --amber: #f59e0b;
}

.dot.amber { background: var(--amber); }

body:not(.is-admin) .admin-only {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  appearance: none;
}

.badge.verified {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.42);
}

.badge.unverified {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.42);
}

/* 详情弹窗顶部的纯展示状态徽章：与可点击徽章同视觉，但不可点击 */
.badge.is-static {
  cursor: default;
}

.champion-card {
  margin-top: 18px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(224, 142, 85, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line-copper);
  border-radius: 14px;
}

.champion-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.champion-card h3 {
  font-size: 19px;
}

.champion-card .bank {
  color: var(--muted);
  font-size: 13px;
}

.champion-score {
  margin-left: auto;
  color: var(--copper-2);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.dim-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dim-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.dim-row .bar {
  width: 100%;
  margin-top: 0;
}

.dim-row .val {
  color: var(--copper-2);
  text-align: right;
  font-weight: 700;
}

.arena-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.arena-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.arena-row.is-champion {
  border-color: var(--line-copper);
}

.arena-row h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.arena-row .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.arena-row .official {
  color: var(--copper-2);
  font-size: 22px;
  font-weight: 800;
  text-align: right;
}

.arena-row .official.none {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.arena-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.arena-actions button {
  min-height: 36px;
  padding: 8px 14px;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.12);
  border: 1px solid var(--line-copper);
  border-radius: 8px;
}

.arena-actions button:hover {
  background: rgba(224, 142, 85, 0.2);
}

.arena-actions button.danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}

.arena-actions button.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.arena-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 8px;
  color: var(--copper-2);
  font-weight: 700;
}

/* 场景标签：详情按维度分组 / 表单标签选择器 */
.tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tag-picker-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.tag-picker-actions .hint {
  font-size: 12px;
  color: var(--muted);
}
#sfChips, #seChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
/* 标签值自定义下拉：与全站 .cselect 视觉一致（触发器是输入框，可自由输入） */
.tag-value-picker {
  position: relative;
  display: flex;
  align-items: center;
}
.tag-value-picker input.cselect-trigger {
  cursor: text;
  width: 100%;
  padding-right: 30px;
}
.tag-value-picker .cselect-caret {
  position: absolute;
  right: 12px;
  pointer-events: none;
}
.tag-value-menu .tag-value-empty {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.arena-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.arena-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.arena-form input,
.arena-form select,
.arena-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

/* 展开的下拉列表不继承 select 的半透明背景，会退回系统白底导致浅色文字看不清 */
.filters select option,
.arena-form select option {
  background: var(--option-bg);
  color: var(--text);
}

.arena-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.arena-form input:focus,
.arena-form select:focus,
.arena-form textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-note {
  padding: 12px 14px;
  color: var(--soft);
  /* 信息提示条：铜金低饱和，与主题统一（原蓝色与暗金体系脱节） */
  background: rgba(224, 142, 85, 0.08);
  border: 1px solid rgba(224, 142, 85, 0.28);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.form-note.warn {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.34);
}

.form-submit {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 视觉与 tab 顺序统一为「取消 → 确认」（与确认弹窗右侧主按钮惯例一致） */
.form-submit .primary {
  order: 2;
}

.form-submit .ghost {
  order: 1;
}

.form-submit button {
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 8px;
}

.form-submit .primary {
  color: #1c1207;
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  border: 1px solid var(--line-copper);
  font-weight: 700;
}

.form-submit .ghost {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

@media (max-width: 720px) {
  .form-grid,
  .arena-row {
    grid-template-columns: 1fr;
  }
}

/* ===== 自定义下拉组件 ===== */

.filters::-webkit-scrollbar { width: 8px; }
.filters::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); border-radius: 999px; }
.filters::-webkit-scrollbar-thumb { background: rgba(224, 142, 85, 0.4); border-radius: 999px; }
.filters::-webkit-scrollbar-thumb:hover { background: rgba(224, 142, 85, 0.6); }

/* 原生 select 视觉隐藏（保留在 DOM 中供取值 / 触发 change 事件） */
select.cselect-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  pointer-events: none;
}

.cselect {
  position: relative;
  width: 100%;
}

.cselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.cselect-trigger:hover {
  border-color: var(--line-copper);
}

.cselect-trigger[aria-expanded="true"],
.cselect-trigger:focus-visible {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

.cselect-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect-caret {
  flex: none;
  color: var(--copper-2);
  font-size: 12px;
  transition: transform 160ms ease;
}

.cselect-trigger[aria-expanded="true"] .cselect-caret {
  transform: rotate(180deg);
}

/* 组合框菜单（银行/标签值）：选项直接挂在菜单上（无 .cselect-options 包裹层），
   限制最多显示 6 个选项（≈218px，含内边距/边框），超出内部滚动；
   否则长词表（61 家银行）会把菜单撑满屏幕、上下越界 */
.tag-value-menu {
  max-height: 218px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 142, 85, 0.35) rgba(255, 255, 255, 0.05);
}

.tag-value-menu::-webkit-scrollbar { width: 8px; }
.tag-value-menu::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); border-radius: 999px; }
.tag-value-menu::-webkit-scrollbar-thumb { background: rgba(224, 142, 85, 0.4); border-radius: 999px; }

.cselect-menu {
  display: none;
  position: fixed;
  z-index: 200;
  min-width: 120px;
  max-width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  padding: 5px;
  background: var(--option-bg);
  border: 1px solid var(--line-copper);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* 过滤框常驻在菜单顶部不参与滚动，只有选项区滚动 */
.cselect-options {
  position: relative;
  max-height: 232px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 142, 85, 0.35) rgba(255, 255, 255, 0.05);
}

.cselect-options::-webkit-scrollbar { width: 8px; }
.cselect-options::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); border-radius: 999px; }
.cselect-options::-webkit-scrollbar-thumb { background: rgba(224, 142, 85, 0.4); border-radius: 999px; }

.cselect-empty {
  padding: 10px;
  color: var(--soft);
  font-size: 13px;
  text-align: center;
}

.cselect-option {
  padding: 8px 10px;
  color: var(--text);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.cselect-option:hover,
.cselect-option.is-hover {
  background: rgba(224, 142, 85, 0.16);
}

.cselect-option.is-selected {
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.22);
  font-weight: 700;
}

.cselect-option.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 用户区（登录 / 已登录状态）===== */
.user-area {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  /* 与前方导航按钮分组：细分隔线 + 留白，降低顶栏信息密度 */
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.user-login {
  min-height: 34px;
  padding: 7px 14px;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.12);
  border: 1px solid var(--line-copper);
  border-radius: 8px;
  font-weight: 600;
}

.user-login:hover {
  color: var(--text);
  background: rgba(224, 142, 85, 0.2);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  /* 上下 padding 归零：徽章高度由 min-height 决定，避免比顶栏其它按钮高一截把顶栏撑开 */
  padding: 0 5px 0 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.user-name {
  color: var(--text);
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge {
  padding: 3px 10px;
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.14);
  border: 1px solid var(--line-copper);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.user-badge.is-admin {
  color: #ffd28a;
  background: rgba(255, 200, 110, 0.12);
  border-color: rgba(255, 200, 110, 0.4);
}

/* 需比 `.top-actions button` 更具体，否则会继承其 34px 高度把徽章顶高 */
.user-chip .user-logout {
  min-height: 24px;
  padding: 3px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
}

.user-chip .user-logout:hover {
  color: var(--text);
  border-color: var(--line);
}

/* ===== 登录 / 注册（独立页 login.html）===== */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab {
  min-height: 36px;
  padding: 7px 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-tab.is-active {
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.12);
  border-color: var(--line-copper);
  font-weight: 600;
}

.auth-fields {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-fields input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.auth-fields input:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(224, 142, 85, 0.13);
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  color: #ff9d9d;
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid rgba(255, 120, 120, 0.35);
  border-radius: 8px;
  font-size: 13px;
}

.auth-submit {
  min-height: 42px;
  color: var(--text);
  background: rgba(224, 142, 85, 0.85);
  border: 1px solid var(--line-copper);
  border-radius: 8px;
  font-weight: 600;
}

.auth-submit:hover {
  background: var(--copper);
}

@media (max-width: 900px) {
  .user-name { max-width: 84px; }
  .user-chip { padding-left: 10px; }
}


/* ===== 管理员：邀请码 / 银行别名 ===== */
.admin-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
}

.admin-actions button {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.admin-actions button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th {
  color: var(--soft);
  font-weight: 600;
  white-space: nowrap;
}

.admin-table code {
  color: var(--copper-2);
  background: rgba(224, 142, 85, 0.1);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
}

.alias-scroll {
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 12px;
}

.alias-scroll .admin-table {
  margin-top: 0;
}

.alias-scroll .mono {
  font-family: var(--mono, ui-monospace, Consolas, monospace);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.alias-input {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
}

.alias-input:focus {
  outline: none;
  border-color: var(--copper);
}

button.ghost.small {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  cursor: pointer;
}

button.ghost.small:hover {
  color: var(--text);
  border-color: var(--copper);
}

.form-grid label.wide {
  grid-column: 1 / -1;
}

/* ===== 银行互评 ===== */
.rating-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.rating-form input {
  width: 90px;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
}

.rating-form input:focus {
  outline: none;
  border-color: var(--copper);
}

.rating-form .primary {
  color: #1c1207;
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  border: 1px solid var(--line-copper);
  font-weight: 700;
}

/* ===== 我的评分卡片（已评分状态） ===== */
.my-rating {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(224, 142, 85, 0.06);
  border: 1px dashed var(--line-copper);
  border-radius: 10px;
}

.my-rating-score {
  flex: none;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #1c1207;
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(224, 142, 85, 0.35);
}

.my-rating-body p {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 13px;
}

.my-rating-body .rating-cancel {
  min-height: 30px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 7px;
  cursor: pointer;
}

.my-rating-body .rating-cancel:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.6);
}

/* ===== 评分明细独立页（rating-details.html） ===== */
.rd-body {
  min-height: 100vh;
}

.rd-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.rd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.rd-back {
  color: var(--copper-2);
  font-size: 14px;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.rd-back:hover {
  border-color: var(--line-copper);
  background: rgba(224, 142, 85, 0.1);
}

.rd-topbar-title {
  color: var(--muted);
  font-size: 13px;
}

.rd-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.rd-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.rd-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 18px;
}

.rd-eyebrow {
  color: var(--copper-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.rd-title {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.35;
}

.rd-case-tag {
  flex: none;
  padding: 6px 12px;
  color: var(--copper-2);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: 1px solid var(--line-copper);
  border-radius: 999px;
  background: rgba(224, 142, 85, 0.1);
}

/* 评分明细分页弹窗：案例 ID 标签独立一行时与标题保持垂直间距（h2 为块级，tag 紧随其下） */
#ratingListModal .detail-title .rd-case-tag {
  display: inline-block;
  margin-top: 12px;
}

.rd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 28px 24px;
}

.rd-stat {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.rd-stat-label {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 8px;
}

.rd-stat-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
}

.rd-stat-num.copper {
  color: var(--copper-2);
}

.rd-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
}

.rd-list-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--soft);
}

.rd-list-meta {
  color: var(--muted);
  font-size: 12.5px;
}

.rd-rows {
  padding: 0 28px 28px;
}

.rd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.rd-row:hover {
  border-color: var(--line-copper);
}

.rd-seq {
  min-width: 26px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.rd-rater {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  color: var(--text);
  font-weight: 700;
  font-size: 13.5px;
}

.rd-rater-bank {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.rd-score {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  color: #1c1207;
  background: linear-gradient(120deg, var(--copper-2), var(--copper));
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(224, 142, 85, 0.3);
}

.rd-dims {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rd-dim-tag {
  padding: 3px 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.rd-comment {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.rd-time {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: auto;
}

.rd-time-rel {
  color: var(--soft);
  font-size: 13.5px;
}

.rd-time-abs {
  color: var(--muted);
  font-size: 12px;
}

.rd-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* ===== 下拉打字过滤 ===== */
.cselect-filter {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  margin-bottom: 4px;
  padding: 6px 10px;
  color: var(--text);
  background: var(--option-bg);
  border: 1px solid var(--line-copper);
  border-radius: 7px;
  font-size: 13px;
}

.cselect-filter:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 2px rgba(224, 142, 85, 0.13);
}

/* 全局：hidden 属性必须真正隐藏（否则 display:inline-flex 等会覆盖它） */
[hidden] {
  display: none !important;
}

/* ===== 独立登录页 login.html ===== */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(400px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 32px 0;
}

.login-brand img {
  filter: drop-shadow(0 0 14px rgba(224, 142, 85, 0.25));
}

.login-card {
  width: 100%;
  padding: 26px 26px 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
