/* ==========================================================================
   风电行业项目数据库 —— 全局样式
   设计语言：深海蓝（稳重/工业感）+ 青绿（清洁能源）+ 大量留白与卡片
   ========================================================================== */

:root {
  --navy-900: #07263c;
  --navy-800: #0a3550;
  --navy-700: #0f4c75;
  --navy-600: #15628f;
  --cyan-500: #00a8c8;
  --cyan-600: #0090b0;
  --cyan-400: #22c3e0;
  --cyan-100: #e3f6fa;
  --green-500: #17a673;
  --amber-500: #e8a33d;
  --gold-500: #d4a017;
  --red-500: #d9534f;

  --bg: #f2f6f9;
  --card: #ffffff;
  --border: #e2ebf2;
  --border-strong: #cfdde8;
  --text: #17313f;
  --text-2: #4a6572;
  --text-3: #7d95a3;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(10, 53, 80, .04), 0 4px 14px rgba(10, 53, 80, .06);
  --shadow-md: 0 4px 24px rgba(10, 53, 80, .10);
  --header-h: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--cyan-500); }

/* ===================== 顶部导航 ===================== */
.app-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: linear-gradient(100deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--navy-600) 100%);
  box-shadow: 0 2px 12px rgba(7, 38, 60, .18);
  display: flex; align-items: center;
  padding: 0 20px;
}

.brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-right: 28px; flex-shrink: 0; }
.brand svg { width: 26px; height: 26px; }
.brand .brand-logo { max-height: 30px; width: auto; max-width: 150px; object-fit: contain; border-radius: 7px; background: #fff; padding: 3px 7px; display: block; flex-shrink: 0; }
/* 前台处于深色顶栏：把黑字 logo 反相为白色并放大，去掉生硬白底方块，使其融入导航条 */
.app-header .brand .brand-logo {
  background: none; border-radius: 0; padding: 0;
  max-height: 34px; max-width: 210px;
  filter: brightness(0) invert(1);
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.brand-sub { font-size: 11px; opacity: .65; margin-left: 6px; letter-spacing: 1px; }

.main-nav { display: flex; gap: 2px; flex: 1; overflow: visible; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  color: rgba(255, 255, 255, .78);
  padding: 7px 14px; border-radius: 20px; font-size: 14px;
  white-space: nowrap; transition: all .15s;
}
.main-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.main-nav a.active { background: rgba(34, 195, 224, .18); color: #7fe4f5; font-weight: 600; }

/* 多级导航：分组 + 悬停级联（依赖 .main-nav 不裁剪竖向溢出）
   注意：全部选择器必须限定在 .main-nav 内 —— 后台侧栏也用 .nav-group/.nav-l1，
   全局 .nav-group 会因 display:flex 把后台竖向侧栏压成横排。 */
.main-nav .nav-group, .main-nav .nav-subgroup { position: relative; display: flex; }
.main-nav .nav-group-label, .main-nav .nav-sub-label {
  display: flex; align-items: center; gap: 4px;
  color: rgba(255, 255, 255, .78); padding: 7px 14px; border-radius: 20px;
  font-size: 14px; white-space: nowrap; cursor: pointer; transition: all .15s;
}
.main-nav .nav-group-label:hover, .main-nav .nav-sub-label:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.main-nav .nav-group-label .caret, .main-nav .nav-sub-label .caret-r { font-size: 10px; opacity: .8; }
.main-nav .nav-dropdown, .main-nav .nav-popout {
  display: none; position: absolute; min-width: 184px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-md); padding: 6px; z-index: 600;
}
.main-nav .nav-dropdown { top: 100%; left: 0; }
.main-nav .nav-popout { top: -7px; left: 100%; }
/* 悬停桥：弥补触发区与弹出层之间的间隙，鼠标移动时不丢失 hover */
.main-nav .nav-group::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.main-nav .nav-subgroup::after { content: ''; position: absolute; top: -7px; bottom: 0; left: 100%; width: 10px; }
.main-nav .nav-group:hover > .nav-dropdown, .main-nav .nav-subgroup:hover > .nav-popout { display: block; }
.main-nav .nav-dropdown a, .main-nav .nav-popout a {
  display: block; padding: 8px 12px; border-radius: 7px;
  color: var(--text); white-space: nowrap; font-size: 13.5px;
}
.main-nav .nav-dropdown a:hover, .main-nav .nav-popout a:hover,
.main-nav .nav-dropdown a.active, .main-nav .nav-popout a.active { background: #f1f5f4; color: var(--primary); }
/* 末级分组贴右，避免被 header-right 遮挡 */
.main-nav > .nav-group:last-child > .nav-dropdown { right: 0; left: auto; }

/* ---- 推荐导航项：浅色描边 + 小角标（克制，与整站风格协调） ---- */
.main-nav a.nav-hot {
  color: #7fe4f5; font-weight: 600;
  background: rgba(127, 228, 245, .14);
  box-shadow: inset 0 0 0 1px rgba(127, 228, 245, .42);
}
.main-nav a.nav-hot:hover { background: rgba(127, 228, 245, .24); color: #fff; }
.main-nav a.nav-hot.active { background: rgba(34, 195, 224, .26); color: #7fe4f5; box-shadow: inset 0 0 0 1px rgba(127, 228, 245, .55); }
/* 二级/三级下拉里同样高亮（浅底场景用主色字） */
.main-nav .nav-dropdown a.nav-hot, .main-nav .nav-popout a.nav-hot {
  color: #0f9bc4; background: rgba(127, 228, 245, .12); box-shadow: inset 0 0 0 1px rgba(127, 228, 245, .4);
}
.main-nav .nav-dropdown a.nav-hot:hover, .main-nav .nav-popout a.nav-hot:hover { color: #fff; background: #17a673; box-shadow: none; }
.nav-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  font-size: 10px; font-style: normal; line-height: 15px; font-weight: 700;
  color: #0f9bc4; background: rgba(127, 228, 245, .18);
  border-radius: 8px; vertical-align: 1px; letter-spacing: .3px;
}

/* ===== 后台：导航菜单编辑器 ===== */
.nav-tree { display: flex; flex-direction: column; gap: 6px; }
.nm-node { border-left: 2px solid var(--border); padding-left: 0; }
.nm-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 0; }
.nm-type { width: 96px; flex: 0 0 96px; }
.nm-label, .nm-page { min-width: 200px; flex: 1; max-width: 360px; }
.nm-row .btn-xs { padding: 2px 7px; font-size: 12px; line-height: 1.6; }

/* 工具栏：覆盖全局 input/select 的 width:100%（style.css:626），避免每个控件各占一行 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.toolbar-spacer { flex: 1 1 auto; }
.input-sm { height: 30px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 7px; font-size: 13px; font-family: inherit; color: var(--text-2); background: #fff; }
.toolbar > select,
.toolbar > input,
.toolbar > button,
.toolbar > .btn,
.toolbar > span,
.toolbar > a.btn { width: auto !important; max-width: none !important; flex: 0 0 auto; }
.toolbar input[type=text],
.toolbar input:not([type]),
.toolbar input[type=search],
.toolbar select { min-width: 150px; }
.toolbar input[type=date] { min-width: 142px; width: auto !important; }
.toolbar .muted { white-space: nowrap; }
.nm-tree-empty { color: var(--muted, #9ca3af); padding: 12px 0; }

.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.user-chip {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 5px 12px 5px 6px; border-radius: 22px;
  background: rgba(255, 255, 255, .10);
  color: #fff; border: 1px solid rgba(255, 255, 255, .14);
  position: relative; transition: background .15s;
}
.user-chip:hover { background: rgba(255, 255, 255, .18); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-400), var(--navy-600));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 13px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 用户名 + 会员等级 + 常驻到期时间：两行排布（第一行姓名+等级，第二行到期时间） */
.user-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.user-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.user-exp {
  display: flex; align-items: center; gap: 4px; max-width: 210px;
  font-size: 10.5px; line-height: 1.1; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-exp .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; opacity: .9; }
.user-exp .ue-sep { opacity: .45; margin: 0 1px; }
/* 深色头部三档配色：>90 天绿 / 30–90 天黄 / <30 天红 */
.user-exp.lv-ok { color: #6ee7b7; }
.user-exp.lv-warn { color: #fcd34d; }
.user-exp.lv-danger { color: #fca5a5; font-weight: 600; }
.user-exp.lv-none { color: rgba(255, 255, 255, .66); }
/* 白底处（下拉菜单 / 个人中心）的同口径配色 */
.exp-txt.lv-ok { color: #0e9f6e; }
.exp-txt.lv-warn { color: #b45309; }
.exp-txt.lv-danger { color: #d92d20; font-weight: 600; }
.exp-txt.lv-none { color: #6b7280; }

/* 「会员即将到期」弹窗 */
.exp-note { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid #f3d79a; background: linear-gradient(90deg, #fff8e8, #fffdf7); }
.exp-note.danger { border-color: #f6c4c0; background: linear-gradient(90deg, #fff1f0, #fffafa); }
.exp-note-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 15px; font-weight: 700; color: #fff; background: #d99a00; }
.exp-note.danger .exp-note-ico { background: #d92d20; }
.exp-note-main { min-width: 0; }
.exp-note-t { font-size: 14px; font-weight: 600; color: #1f2937; line-height: 1.5; }
.exp-note.danger .exp-note-t { color: #a4261b; }
.exp-note-t b { font-size: 16px; }
.exp-note-d { font-size: 12.5px; color: #6b7280; margin-top: 3px; }
.exp-note-d b { color: #374151; }
.exp-note-p { font-size: 12.5px; color: #4b5563; line-height: 1.7; margin: 12px 2px 0; }
/* 顶部「后台管理」按钮：与右侧用户胶囊同一视觉尺寸（图标显式定尺寸，避免 SVG 撑爆） */
.user-chip svg, .admin-chip svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-chip {
  display: inline-flex; align-items: center; gap: 6px;
  /* 与右侧用户胶囊等高（头像 28 + 上下 5 padding + 1 边框 = 40） */
  height: 40px; padding: 0 15px; border-radius: 20px; box-sizing: border-box;
  background: rgba(255, 255, 255, .10); color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px; line-height: 1; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.admin-chip:hover { background: rgba(255, 255, 255, .20); border-color: rgba(255, 255, 255, .3); color: #fff; }
.admin-chip.active { background: rgba(34, 195, 224, .22); border-color: rgba(34, 195, 224, .45); }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap;
}
.badge-vip { background: linear-gradient(135deg, #f5d485, #d4a017); color: #4a3600; }
.badge-trial { background: linear-gradient(135deg, #ffd9a8, #e8a33d); color: #5a3c00; }
.badge-normal { background: var(--cyan-100); color: var(--navy-700); }
.badge-pending { background: #eceff1; color: #607d8b; }
.badge-admin { background: linear-gradient(135deg, #7b8ff7, #4a5fc1); color: #fff; }
.badge-ok { background: #e6f7ef; color: var(--green-500); }
.badge-warn { background: #fdf3e3; color: var(--amber-500); }
.badge-danger { background: #fdeaea; color: var(--red-500); }
.badge-gray { background: #eef2f5; color: var(--text-3); }

.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-md); min-width: 190px; padding: 6px; display: none;
}
.dropdown.open { display: block; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 8px 12px; border-radius: 7px; color: var(--text);
  font-size: 13px; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.dropdown a svg, .dropdown button svg { width: 16px; height: 16px; flex-shrink: 0; }
.dropdown a:hover, .dropdown button:hover { background: var(--cyan-100); color: var(--navy-700); }
.dropdown .sep { height: 1px; background: var(--border); margin: 5px 0; }
.dropdown .muted { padding: 6px 12px; font-size: 12px; color: var(--text-3); }

/* ===================== 布局 ===================== */
.container { max-width: 1480px; margin: 0 auto; padding: 22px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 22px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head h3::before {
  content: ''; width: 3px; height: 15px; background: var(--cyan-500);
  border-radius: 2px; display: inline-block;
}
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
/* 网格子项默认 min-width:auto，内部 nowrap 表格会把 1fr 轨道撑到「内容宽度」而无法收缩，
 * 导致整行宽于容器 → 页面出现横向滚动条、左右两列宽度不一致（对不齐）。
 * 典型：首页「网站最近更新」卡片在 ≤1440px 视口下把整行撑到 1456px。
 * 放开收缩后，超宽表格交由 .table-wrap 自己横向滚动。 */
.grid > * { min-width: 0; }
/* 首页「最新中标动态 / 网站最近更新」两张概览小表：项目名称列限宽。
 * 这两张表其余固定列合计 ≈401px / 391px，而卡片正文宽只有 688px（1440 视口）/
 * 651px（1366 视口）。名称列沿用通用上限 320px 时整表 723/713px > 卡片宽，
 * 会触发卡片内横向滚动、末列（时间）被裁。压到 240px 后两表都能整表放下；
 * 更窄视口仍由 .table-wrap 的横向滚动兜底，完整名称见单元格 title 悬浮提示。 */
#latest .td-clip, #recent .td-clip { max-width: 240px !important; }

/* ===================== 统计卡 ===================== */
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
/* 可点击的统计卡：悬浮上浮 + 右侧箭头，提示可跳转 */
.stat.link { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stat.link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--cyan-500); }
.stat.link:hover .stat-value { color: var(--cyan-500); }
.stat.link::before {
  content: '›'; position: absolute; right: 12px; top: 10px;
  font-size: 20px; line-height: 1; color: var(--cyan-500); opacity: 0; transition: opacity .15s;
}
.stat.link:hover::before { opacity: .85; }
.stat::after {
  content: ''; position: absolute; right: -18px; top: -18px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 200, .10), transparent 70%);
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--cyan-100); color: var(--navy-700);
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-label { font-size: 12px; color: var(--text-3); }
.stat-value { font-size: 24px; font-weight: 700; color: var(--navy-800); line-height: 1.2; }
.stat-value small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
/* 需要管理员立即处理的告警卡（如待处理数据报错） */
.stat.alert { border-color: #f3c9c6; background: linear-gradient(180deg, #fff7f6, #fff); }
.stat.alert .stat-icon { color: var(--red-500); }
.stat.alert .stat-value { color: var(--red-500); }
.stat.alert { box-shadow: inset 3px 0 0 var(--red-500), var(--shadow); }
.stat.alert:hover { box-shadow: inset 3px 0 0 var(--red-500), var(--shadow-md); }
.stat.alert::after { background: radial-gradient(circle, rgba(224, 82, 74, .12), transparent 70%); }

/* 统计分析：数据明细（交叉矩阵 + 排名分布表） */
.xtab-note { padding: 8px 16px 12px; border-top: 1px solid var(--border); }
table.xtab th, table.xtab td { text-align: center; }
table.xtab .num { font-variant-numeric: tabular-nums; }
table.xtab td { color: var(--navy-800); }
.xtab .xtab-rh, table.xtab th.xtab-rh {
  text-align: right; text-align: -webkit-right; white-space: nowrap; font-weight: 600;
  color: var(--navy-800); background: #f6fafb; position: sticky; left: 0; z-index: 1;
}
.xtab .xtab-rh { text-align: right; }
table.xtab thead th { background: #eef4f8; color: var(--navy-800); font-weight: 600; }
table.xtab tbody tr:hover td, table.xtab tbody tr:hover th.xtab-rh { background-image: linear-gradient(rgba(0,0,0,.03), rgba(0,0,0,.03)); }
.xtab .xtab-tot { font-weight: 700; background: #f6fafb; }
.xtab tr.xtab-foot th, .xtab tr.xtab-foot td { background: #eef4f8; font-weight: 700; border-top: 2px solid var(--border); }
.xtab .muted.dim { opacity: .35; }

/* 排名徽章 + 内嵌分布条 */
.rk {
  display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px;
  background: #eef3f6; color: var(--text-2); font-size: 12px; font-weight: 600; text-align: center;
}
.rk.rk-top { background: linear-gradient(135deg, var(--navy-700), var(--cyan-500)); color: #fff; }
.mini-bar { display: inline-block; width: 100%; max-width: 190px; height: 8px; background: #eef3f6; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.mini-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-700), var(--cyan-500)); border-radius: 4px; }

/* 首页：中标结构分析时间区（明确区分「上方全量总体统计」与「下方受时间控制的分析图」） */
.range-panel { margin-bottom: 4px; border-left: 4px solid var(--cyan-500); }
.range-panel .card-head { align-items: baseline; }
.range-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.range-bar .filter-item { min-width: 130px; }
.yr-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  min-width: 46px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 16px;
  background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chip-btn:hover { background: #eaf3f8; border-color: var(--cyan-500); color: var(--navy-800); }

/* 富文本编辑器（后台长文编辑） */
.rte { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.rte-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 7px 8px; background: #f5f9fb; border-bottom: 1px solid var(--border);
}
.rte-btn {
  min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 12.5px; cursor: pointer; line-height: 1;
}
.rte-btn:hover { background: #e7eff5; border-color: var(--border); }
.rte-btn.active { background: #dbe9f2; border-color: var(--cyan-500); color: var(--navy-800); }
.rte-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.rte-area, .rte-src {
  min-height: 360px; max-height: 620px; overflow: auto; padding: 16px 18px; outline: none;
  font-size: 14px; line-height: 1.75; color: var(--text);
}
.rte-src { width: 100%; border: 0; resize: vertical; font-family: Consolas, Monaco, monospace; font-size: 12.5px; white-space: pre-wrap; }
/* 富文本渲染（前台长文 / 条款等） */
.richtext { font-size: 14.5px; line-height: 1.85; color: var(--text); }
.richtext h1, .richtext h2, .richtext h3 { margin: 20px 0 10px; color: var(--navy-800); line-height: 1.4; }
.richtext h1 { font-size: 22px; } .richtext h2 { font-size: 19px; } .richtext h3 { font-size: 16px; }
.richtext p { margin: 0 0 12px; }
.richtext ul, .richtext ol { margin: 0 0 12px; padding-left: 24px; }
.richtext li { margin: 4px 0; }
.richtext blockquote {
  margin: 12px 0; padding: 10px 14px; border-left: 4px solid var(--cyan-500);
  background: #f4f9fb; color: var(--text-2); border-radius: 0 6px 6px 0;
}
.richtext img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.richtext a { color: var(--cyan-600, #0f7ea8); text-decoration: underline; }
.richtext table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.richtext th, .richtext td { border: 1px solid var(--border); padding: 8px 10px; }
.richtext th { background: #f4f9fb; }
.richtext hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

.mt16 { margin-top: 16px; }

/* 行业数据 */
.ind-note {
  display: grid; gap: 5px; font-size: 13.5px; color: var(--text-2);
  padding: 12px 14px; border-radius: 10px; background: #f6fafb; border: 1px solid var(--border);
}
.stat.hl { border-color: rgba(0, 168, 200, .35); background: linear-gradient(180deg, #f4fbfd, #fff); }
.stat.hl .stat-value { color: var(--navy-700); }

/* 我的报错：处理流程说明 + 反馈内容 */
.mr-flow { display: grid; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.mr-step { display: flex; align-items: center; gap: 9px; }
.mr-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.mr-dot.pending { background: var(--amber-500); }
.mr-dot.processing { background: var(--cyan-500); }
.mr-dot.resolved { background: var(--green-500); }
.mr-dot.rejected { background: #b0bec5; }
.mr-note {
  padding: 7px 10px; border-radius: 8px; background: #f6fafb;
  border: 1px solid var(--border); white-space: pre-wrap; max-width: 320px;
}

/* 幽灵按钮（帮助等次要操作） */
.btn-ghost {
  background: transparent; border-color: transparent; color: var(--text-2);
  padding: 6px 10px;
}
.btn-ghost:hover { background: rgba(15, 76, 117, .07); color: var(--navy-700); border-color: transparent; }

/* 一级单位简称管理：别名标签 + 弹窗表单 */
.ua-chip i {
  font-style: normal; margin-left: 6px; cursor: pointer; opacity: .55; font-weight: 700;
}
.ua-chip i:hover { opacity: 1; color: var(--red-500); }
.ua-chips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  min-height: 34px; padding: 7px 10px; border: 1px dashed var(--border);
  border-radius: 8px; background: #fbfdfe;
}
.ua-add { display: flex; gap: 8px; margin-top: 8px; }
.ua-add input { flex: 1 1 auto; }
.ua-form .field { margin-bottom: 14px; }
.ua-form .grid { margin-bottom: 0; }
.ua-meta {
  margin-top: 4px; padding: 9px 12px; border-radius: 8px;
  background: #f6fafb; border: 1px solid var(--border);
}
.ua-merge-from {
  padding: 12px 14px; border-radius: 10px; background: #f6fafb;
  border: 1px solid var(--border); margin-bottom: 10px;
}
.ua-merge-name { font-size: 17px; font-weight: 700; color: var(--navy-700); margin: 4px 0 6px; }
.ua-merge-arrow { text-align: center; color: var(--text-3); font-size: 13px; margin: 2px 0 12px; }
.ua-form select[size] { width: 100%; }

/* 合并项目：可搜索 + 相关度排序的目标项目下拉 */
.mg-combo { position: relative; }
.mg-search { width: 100%; }
.mg-panel { margin-top: 6px; max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.mg-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f0f4f8; }
.mg-opt:last-child { border-bottom: none; }
.mg-opt:hover { background: #f3f9fb; }
.mg-opt.active { background: var(--cyan-100, #e6f7f9); box-shadow: inset 3px 0 0 var(--cyan-500, #13b5c7); }
.mg-name { font-weight: 600; color: var(--navy-700, #1f3a5f); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-sub { color: var(--text-3, #9bb0c0); font-size: 12px; white-space: nowrap; }
.mg-score { color: var(--cyan-600, #0e9aa7); font-size: 12px; font-weight: 700; white-space: nowrap; }
.mg-empty { padding: 12px; color: var(--text-3); text-align: center; }

/* 统计分析：使用说明帮助文档 */
.help-doc { font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.help-doc p { margin: 0 0 8px; }
.help-doc ul { margin: 0 0 8px; padding-left: 20px; }
.help-doc li { margin-bottom: 5px; }
.help-doc code {
  background: #f2f6f8; border: 1px solid var(--border); border-radius: 4px;
  padding: 0 5px; font-size: 12.5px;
}
.help-sec {
  padding: 14px 16px; margin-bottom: 12px; border-radius: 10px;
  background: #fbfdfe; border: 1px solid var(--border);
}
.help-sec h4 {
  margin: 0 0 10px; font-size: 14px; color: var(--navy-700); font-weight: 700;
}
.help-item {
  display: grid; grid-template-columns: 148px 1fr; gap: 12px;
  padding: 7px 0; border-top: 1px dashed var(--border);
}
.help-item:first-of-type { border-top: 0; }
.help-k { font-weight: 600; color: var(--text); font-size: 13px; }
.help-v { font-size: 13px; }
.help-tip { color: var(--navy-700); }
.help-warn { color: #b45309; }
.help-recipe { display: grid; gap: 7px; }
.help-recipe > div {
  padding: 8px 12px; border-radius: 8px; background: #fff;
  border: 1px solid var(--border); font-size: 13px;
}
.help-recipe b { color: var(--navy-700); margin-right: 4px; }
@media (max-width: 700px) {
  .help-item { grid-template-columns: 1fr; gap: 3px; }
}
.ua-chip {
  display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 10px;
  background: #eef4f8; color: #48697d; font-size: 12px; border: 1px solid #dbe6ee;
}

/* 运行概览：两栏布局 + 数据类别条形列表（替代稀疏大表格，消除留白） */
.sec-dash .dash-row { margin-top: 16px; align-items: start; }
.catbars { display: flex; flex-direction: column; gap: 9px; padding: 4px 2px; }
.catbar {
  display: grid; grid-template-columns: 130px 1fr 70px; align-items: center; gap: 12px;
  padding: 7px 9px; border-radius: 8px; cursor: pointer;
  transition: background .15s, transform .1s;
}
.catbar:hover { background: #f4f8fb; }
.catbar:active { transform: scale(.997); }
.catbar-name {
  font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.catbar-track { background: #eef3f6; height: 14px; border-radius: 7px; overflow: hidden; }
.catbar-fill {
  display: block; height: 100%; border-radius: 7px;
  background: linear-gradient(90deg, var(--navy-700), var(--cyan-500));
  transition: width .4s ease;
}
.catbar-fill.alt { background: linear-gradient(90deg, #e8a33d, #d4a017); }
.catbar-val { text-align: right; font-weight: 600; color: var(--navy-800); font-size: 13px; font-variant-numeric: tabular-nums; }
.catbar-link .catbar-name, .catbar-link .catbar-val { color: #b9770e; }
@media (max-width: 700px) { .catbar { grid-template-columns: 100px 1fr 56px; gap: 8px; } }

/* ===================== 表格 ===================== */
.table-wrap { overflow-x: auto; }
table.data { width: auto; min-width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  background: #f6fafc; color: var(--text-2); font-weight: 600; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--border-strong);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid #f0f5f8; vertical-align: top; white-space: nowrap; }
table.data tbody tr:hover { background: #f9fdfe; }
table.data td.nowrap, table.data th.nowrap { white-space: nowrap; }
/* 长文本列：允许换行并限宽，避免撑爆整表 */
table.data td.wrap { white-space: normal; max-width: 240px; word-break: break-word; }
table.data td.pname { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 后台记录列表：「已关联项目」列按列宽自动换行（此前整列 nowrap，超长项目名会一路撑爆整表、
   把后面的日期列与操作列挤到看不见），完整名称见 title 提示 */
table.data td.rp-cell { white-space: normal; }
table.data td.rp-cell .rp-name { display: inline-block; max-width: 100%; word-break: break-word; line-height: 1.45; }
/* 按列宽省略（不写死截断长度），完整内容见 title */
table.data td.clip-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
/* 用户管理列表：长文本列限宽并省略，避免整表被超长企业名/邮箱撑乱 */
table.data#u_table td.u-clip { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.link-cell { color: var(--navy-600); cursor: pointer; font-weight: 500; }
.link-cell:hover { color: var(--cyan-500); text-decoration: underline; }
/* 横向滚动条常显，避免列多时"看不到右边"却不知道能拖（Issue3） */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: #f2f6f8; border-radius: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: #c3d0d8; border-radius: 6px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #a4b6c2; }
/* 后台记录列表：按项目合并的分组行 / 子行（如海上清单一个项目 + N 条外挂机组） */
table.data tbody tr.rec-group { background: #eef6fb; }
table.data tbody tr.rec-group > td { border-bottom: 1px solid #d8e6ef; font-weight: 500; }
table.data tbody tr.rec-group .c2-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
table.data tbody tr.rec-child > td { background: #fbfdfe; padding-top: 7px; padding-bottom: 7px; }
table.data tbody tr.rec-child .cell2 { color: var(--text-2); }
.linklike { background: none; border: none; color: var(--cyan-600); cursor: pointer; font-size: 12px; padding: 0; }
.linklike:hover { text-decoration: underline; }
/* 操作列吸附右侧：横向滚动时按钮始终可见 */
/* 详情弹窗内的「机组构成」小表 */
table.data.compact { font-size: 12.5px; margin-bottom: 10px; }
table.data.compact th { padding: 6px 10px; background: #f7fafb; }
table.data.compact td { padding: 6px 10px; }
table.data.compact tbody tr:hover { background: #f9fdfe; }

table.data th.ops, table.data td.ops {
  position: sticky; right: 0; z-index: 3;
  background: #fff;
  box-shadow: -8px 0 10px -8px rgba(3, 25, 40, .22);
}
table.data th.ops { background: #f6fafc; z-index: 4; }
table.data tbody tr:hover td.ops { background: #f9fdfe; }
table.data td.ops { white-space: nowrap; }
/* 多按钮操作列：允许换行，避免列过宽把表格撑出横向滚动、进而被右侧吸附列遮住左侧内容 */
th.ops-col { min-width: 228px; }
table.data td.ops-col { white-space: normal; }
.ops-wrap { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
/* 长文本裁剪：宽度由列宽动态写入（见 common.js syncClipWidth），不再写死截断 */
.td-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
/* 两行式单元格（第1行主标题 / 第2行 简要描述）：不截断，按列宽自动换行 */
table.data td.cell2 { white-space: normal; }
table.data td.cell2 .c2-title { font-weight: 600; color: var(--text); word-break: break-word; }
table.data td.cell2 .c2-sub {
  font-size: 12px; color: var(--text-3); line-height: 1.45;
  margin-top: 2px; word-break: break-word;
}
table.data td.cell2 .c2-sub span + span::before { content: '·'; margin: 0 5px; opacity: .55; }

/* ---- 表头排序 ---- */
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--navy-700); background: #eef7fa; }
table.data th.sortable::after {
  content: '⇅'; margin-left: 5px; font-size: 11px; opacity: .35;
}
table.data th.sortable.sort-asc::after { content: '↑'; opacity: 1; color: var(--cyan-500); }
table.data th.sortable.sort-desc::after { content: '↓'; opacity: 1; color: var(--cyan-500); }
/* 列宽拖拽手柄 */
.col-resizer {
  position: absolute; top: 0; right: 0; width: 8px; height: 100%;
  cursor: col-resize; user-select: none; z-index: 6;
}
.col-resizer::after {
  content: ''; position: absolute; top: 20%; right: 3px; width: 1px; height: 60%;
  background: var(--border-strong, #d0d5dd);
}
.col-resizer:hover::after { background: var(--cyan-500, #00a8c8); width: 2px; }
table.data th.resizing { background: var(--cyan-100, #e0f4f8); }

/* ===================== 表单 ===================== */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--red-500); }
/* 记录编辑分组 */
.fg-title {
  grid-column: 1 / -1; margin: 16px 0 4px; padding-bottom: 5px;
  font-size: 13px; font-weight: 600; color: var(--primary, #0a6e5c);
  border-bottom: 1px dashed var(--border, #e5e7eb);
}
.fg-title:first-child { margin-top: 0; }
.rec-grid { margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 16px 18px; }
.rec-grid > .field { margin-bottom: 0; }
/* 字段按内容自适应宽度（Issue4） */
.field.w-half { flex: 1 1 300px; min-width: 230px; }
.field.w-full { flex: 1 1 100%; }
.field.w-short { flex: 0 1 180px; min-width: 140px; }
.field.w-full textarea { width: 100%; min-height: 54px; resize: vertical; }
.ro-val { padding: 8px 0; color: var(--text, #1f2937); line-height: 1.55; word-break: break-word; }
/* 机型组成块（Issue5） */
.model-block, .cand-block { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; margin: 2px 0 6px; }
/* 机型/候选块内首个字段（如「机型要求（总体）」）不应带大段下边距，否则机型1上方出现大量空白（Issue8） */
.model-block > .field, .cand-block > .field { margin-bottom: 0; }
/* 项目编辑器：机组 / 整机商 内联子表（Issue：项目级编辑，可挂 N 条机组） */
#turbTable { margin-top: 4px; }
#turbTable .turb-cell { padding: 4px 6px; vertical-align: middle; }
#turbTable .turb-cell input { width: 100%; min-width: 90px; box-sizing: border-box; }
#turbTable .turb-idx { text-align: center; width: 28px; }
#turbTable .turb-empty td { text-align: center; padding: 14px 0; }
#turbBody tr[data-turb] td { background: #fbfdfc; }
#turbBody tr[data-turb]:hover td { background: #f1f8f6; }
.model-hint { font-size: 12px; color: var(--text-2, #6b7280); margin: -4px 0 2px; }
.model-sub, .cand-row {
  border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 10px 12px; background: #fbfdfe;
}
.model-sub-title, .cand-row-title { font-size: 12.5px; font-weight: 600; color: var(--primary, #0a6e5c); margin-bottom: 10px; }
.cand-row-grid { width: 100%; }
/* 机型明细：功率 / 叶轮直径 / 塔筒高度 的下限~上限 三栏紧凑排布（Issue2） */
.model-detail {
  flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--border, #e5e7eb);
}
.model-detail-item { flex: 1 1 230px; min-width: 200px; }
.model-detail-label {
  font-size: 12px; font-weight: 600; color: var(--text-2, #6b7280);
  margin-bottom: 6px; letter-spacing: .2px;
}
.model-detail-pair { display: flex; align-items: center; gap: 8px; }
.model-detail-cell { flex: 1 1 0; min-width: 0; }
.model-detail-cell .field { margin-bottom: 0; }
.model-detail-sep { color: var(--text-2, #6b7280); font-size: 13px; flex: 0 0 auto; }
.field.no-label { padding-top: 0; }
.field.no-label input, .field.no-label .ro-val { padding-top: 0; }
.rec-view-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }

/* ===================== 筛选面板（前台/后台通用） ===================== */
.filter-panel { border-top: 1px solid var(--border, #e5e7eb); margin-top: 10px; }
.fgroup { border-bottom: 1px dashed var(--border, #e5e7eb); }
.fgroup:last-child { border-bottom: none; }
.fgroup-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 4px 8px; cursor: pointer; user-select: none;
  font-weight: 600; font-size: 13px; color: var(--text-2, #6b7280);
}
.fgroup-head .arrow { transition: transform .15s; font-size: 10px; }
.fgroup.open .arrow { transform: rotate(90deg); }
.fgroup-head .fcount { font-weight: 400; color: var(--primary, #0a6e5c); font-size: 12px; }
.fgroup-body { display: none; padding: 2px 4px 14px; }
.fgroup.open .fgroup-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; }
.filter-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-item > label { font-size: 12px; color: var(--text-2, #6b7280); }
.filter-item select,
.filter-item input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { width: 100%; min-width: 0; }
/* 区间（最小-最大）：两个输入框平分格子，绝不撑破列宽 —— 避免与右侧筛选项重叠 */
.pair { display: flex; gap: 6px; align-items: center; min-width: 0; }
.pair > * { flex: 1 1 0; min-width: 0; width: 100%; }
.pair > input, .pair > select { padding: 7px 8px; font-size: 13px; }
/* 「至」分隔符：必须重置 width（否则被上面的 .pair > * { width:100% } 撑满整行，把两侧输入框挤没） */
.pair > .sep { flex: 0 0 auto; width: auto; color: var(--text-3); font-size: 12px; }
/* 日期区间：原生 date 控件需要更宽才能完整显示年月日，让该项跨 2 列 */
.fgroup-body > .filter-item.fi-date { grid-column: span 2; }
/* 已选条件 chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 2px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,110,92,.08); color: var(--primary, #0a6e5c);
  border-radius: 12px; padding: 2px 10px; font-size: 12px;
}
.chip b { font-weight: 500; }
.chip .x { cursor: pointer; opacity: .6; }
.chip .x:hover { opacity: 1; }
/* 自定义筛选：枚举多选（复选框组） */
.chk-wrap { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 168px; overflow: auto; padding: 4px 2px; }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.chk input { width: auto; min-width: 0; margin: 0; }
.filter-card .clear-filters { margin-left: auto; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-row:empty { display: none; }
.fgroup-body .filter-item.fi-enum { grid-column: span 2; }

/* ---- 枚举筛选：单选 / 多选切换（App.upgradeEnumFilters） ---- */
.fsel-wrap { position: relative; min-width: 0; }
.fsel-wrap > select { width: 100%; }
/* 「单选 | 多选」两段式控件：两个选项常显，当前项填色，明确表达「可切换」而非状态提示 */
.filter-item > label .fmode {
  display: inline-flex; align-items: stretch; margin-left: 8px; padding: 0;
  line-height: 1; border: 1px solid var(--border-strong, #d1d5db); border-radius: 999px;
  background: #f5f7f9; color: var(--text-2, #6b7280); cursor: pointer;
  vertical-align: middle; font-family: inherit; overflow: hidden;
}
.filter-item > label .fmode:hover { border-color: var(--primary, #0a6e5c); }
.filter-item > label .fmode .fm-seg {
  padding: 3px 8px; font-size: 11px; line-height: 14px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.filter-item > label .fmode .fm-seg + .fm-seg { border-left: 1px solid var(--border-strong, #d1d5db); }
.filter-item > label .fmode .fm-seg.on {
  background: var(--primary, #0a6e5c); color: #fff; font-weight: 600;
}

.fmulti { position: relative; }
.fmulti-btn {
  width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border: 1px solid var(--border-strong, #d1d5db); border-radius: var(--radius-sm, 6px);
  background: #fff; color: var(--text, #1f2937); font: inherit; font-size: 13px;
  cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s;
}
.fmulti-btn:hover { border-color: var(--primary, #0a6e5c); }
.fmulti.open .fmulti-btn { border-color: var(--primary, #0a6e5c); box-shadow: 0 0 0 2px rgba(10,110,92,.12); }
.fmulti-btn .fm-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmulti-btn .fm-n { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: var(--primary, #0a6e5c); }
.fmulti-btn .fm-caret { flex: 0 0 auto; font-size: 10px; color: var(--text-2, #6b7280); }
.fmulti-pop {
  display: none; position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 280px; overflow-y: auto; background: #fff;
  border: 1px solid var(--border, #e5e7eb); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15,76,117,.16); padding: 4px 0;
}
.fmulti.open .fmulti-pop { display: block; }
.fmulti-all {
  display: flex; align-items: center; gap: 7px; padding: 7px 12px; margin-bottom: 2px;
  font-size: 12.5px; color: var(--text-2, #6b7280); cursor: pointer;
  border-bottom: 1px dashed var(--border, #eee);
}
/* 固定勾选框尺寸：页面级 `.filter-item input{width:100%}` 与本规则同优先级、且在文档中后置，
 * 会覆盖 `.fm-opt input{width:auto}`，把勾选框拉满整行并把右侧文字挤成 0 宽
 * （现象：多选面板只剩勾选框 + 横向滚动条）。这里用更高优先级的选择器锁死尺寸。 */
.fmulti .fmulti-pop input[type="checkbox"] {
  flex: 0 0 14px; width: 14px; min-width: 14px; height: 14px;
  margin: 0; padding: 0; accent-color: var(--primary, #0a6e5c);
}
.fmulti-all .fm-total { margin-left: auto; font-style: normal; color: var(--text-3, #9ca3af); font-size: 11.5px; }
.fm-opt { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 13px; color: var(--text, #1f2937); cursor: pointer; }
.fm-opt:hover { background: #f3f8fb; }
.fm-opt .fm-ot { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

input:not([type=file]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(0, 168, 200, .12);
}
input[readonly], input:disabled { background: #f5f8fa; color: var(--text-3); }
textarea { min-height: 80px; resize: vertical; }
/* 紧凑型输入框：与基础输入框同款边框/圆角/聚焦环，仅内边距与字号更小，用于表格单元格与工具栏 */
.inp-sm { width: 100%; padding: 6px 10px; font-size: 13px; }

/* 文件选择：统一原生「选择文件」按钮外观，与 .btn 风格一致（覆盖上传 / LOGO / 报告封面 / 报告附件等所有 input[type=file]） */
input[type=file] {
  display: inline-block; width: auto; max-width: 100%;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  padding: 4px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s;
}
input[type=file]:hover { border-color: var(--cyan-500); }
input[type=file]::file-selector-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0 8px 0 0; padding: 6px 14px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600)); color: #fff;
  font-size: 13px; font-family: inherit; font-weight: 500; cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); }

/* 项目表单内的数据集切换标签（tab-btn 此前无样式，统一为站点标签风格，对齐 .tabs button） */
.pj-tabs .tab-bar { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding: 0 2px; margin-bottom: 12px; }
.tab-btn {
  padding: 8px 14px; border: 1px solid transparent; background: transparent;
  font-size: 13.5px; font-family: inherit; color: var(--text-2); cursor: pointer;
  border-radius: 8px 8px 0 0; transition: all .15s; white-space: nowrap;
}
.tab-btn:hover { color: var(--navy-700); background: #f4f9fb; }
.tab-btn.active { color: var(--navy-700); font-weight: 600; background: #fff; border-color: var(--border); box-shadow: inset 0 -2px 0 var(--cyan-500); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14px; font-family: inherit; cursor: pointer; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--navy-700), var(--navy-600)); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); box-shadow: 0 3px 12px rgba(15, 76, 117, .28); }
.btn-cyan { background: var(--cyan-500); color: #fff; }
.btn-cyan:hover { background: var(--cyan-400); }
.btn-outline { background: #fff; border-color: var(--border-strong); color: var(--text-2); }
.btn-outline:hover { border-color: var(--cyan-500); color: var(--navy-700); background: #f9fdfe; }
.btn-danger { background: #fff; border-color: #f0c2c0; color: var(--red-500); }
.btn-danger:hover { background: #fdf2f1; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===================== 筛选栏（顶部横向一排，仅作用于 .filter-bar 内） ===================== */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  padding: 14px 18px; background: #fafcfd; border-bottom: 1px solid var(--border);
}
.filter-bar .filter-item { display: flex; flex-direction: column; gap: 4px; }
.filter-bar .filter-item label { font-size: 12px; color: var(--text-3); }
.filter-bar .filter-item input, .filter-bar .filter-item select { padding: 9px 12px; font-size: 14px; width: auto; min-width: 140px; }

/* ===================== 快速搜索栏（关键字常显，最常用功能，不依赖「筛选条件」展开） =====================
 * 关键字搜索是所有列表页最高频操作，固定显示在列表上方；「筛选条件」按钮仅折叠下方的字段筛选。
 * 输入框作为 flex 子项直接拉伸（flex-basis 优先于全局 width:100%），按钮不参与收缩。 */
.quick-search {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 13px 18px; background: #fafcfd;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.quick-search > input { flex: 1 1 300px; min-width: 180px; }
.quick-search > .btn { flex: 0 0 auto; }
/* 快速搜索栏紧跟折叠筛选面板时，去掉重复的分隔线与间距 */
.quick-search + .filter-panel { border-top: none; margin-top: 0; }

/* ===================== 分页 ===================== */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; }
.pager button {
  padding: 6px 12px; border: 1px solid var(--border-strong); background: #fff;
  border-radius: 7px; cursor: pointer; font-size: 13px; font-family: inherit; color: var(--text-2);
}
.pager button:hover:not(:disabled) { border-color: var(--cyan-500); color: var(--navy-700); }
.pager button.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .info { color: var(--text-3); font-size: 13px; margin-left: 8px; }

/* ===================== 提示 / 空状态 ===================== */
.alert {
  padding: 11px 15px; border-radius: var(--radius-sm); font-size: 13.5px;
  margin-bottom: 14px; display: flex; align-items: flex-start; gap: 8px;
}
.alert-info { background: var(--cyan-100); color: var(--navy-700); border: 1px solid #bfe8f2; }
.alert-warn { background: #fdf6e8; color: #8a5a00; border: 1px solid #f2ddb0; }
.alert-error { background: #fdf0ef; color: #a63d39; border: 1px solid #f3c9c6; }
.alert-ok { background: #eafaf3; color: #0f6b4a; border: 1px solid #b6e6d1; }

.empty { padding: 50px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 54px; height: 54px; opacity: .3; margin-bottom: 10px; }

/* ===== 「无权限访问提示语」（后台可配富文本，可含二维码图片） ===== */
.np-rich { text-align: center; max-width: 680px; margin: 0 auto; line-height: 1.8; color: var(--text-2); }
.np-rich img { max-width: 100%; height: auto; }
.np-rich p { margin: 0 0 8px; }
/* 提示语若渲染在网格容器（首页 #statCards 是 .grid.grid-4）内，必须跨满整行。
 * 否则它只占第 1 列（约 176px），text-align:center 只在那一列内居中 → 看起来仍靠左。 */
.grid > .np-rich, #statCards > .empty { grid-column: 1 / -1; }

/* ===================== 登录 / 注册 ===================== */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 60%, var(--navy-600) 100%);
  position: relative; overflow: hidden; padding: 20px;
}
.auth-wrap::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(34, 195, 224, .16), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(23, 166, 115, .14), transparent 45%);
}
/* 叠加的白色风电图腾（透明 PNG，线条已转白，融入渐变背景） */
.auth-wrap::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: url('/assets/bg-wind-white.png') right -50px bottom -40px / 120% auto no-repeat;
  opacity: .15;
}
.auth-deco { position: absolute; bottom: -30px; right: -20px; opacity: .10; }
.auth-deco svg { width: 420px; height: 420px; }
.auth-box {
  position: relative; width: 100%; max-width: 420px; z-index: 2;
  /* 登录/注册卡片：半透明白玻璃 + 背景模糊（毛玻璃质感），框后内容更模糊；细边框 + 轻投影，白字在模糊背景上依然清晰 */
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px; padding: 34px 34px 28px;
  box-shadow: 0 14px 36px rgba(3, 25, 40, .22);
  color: #fff;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.auth-box.wide { max-width: 560px; }
/* 毛玻璃内文字 / 输入框改为浅色，保证在透出的深色渐变上清晰可读 */
.auth-box .auth-title { color: #fff; }
.auth-box .auth-sub { color: rgba(255, 255, 255, .72); }
.auth-box .field label { color: rgba(255, 255, 255, .85); }
.auth-box .auth-foot { color: rgba(255, 255, 255, .7); }
.auth-box .auth-foot a { color: var(--cyan-500); }
.auth-box .agree-box { color: rgba(255, 255, 255, .82); }
.auth-box .agree-box a { color: var(--cyan-500); }
/* 玻璃卡内输入框：用 !important 压过全局 input{background:#fff}（全局选择器因多个 :not() 特异性更高，会盖掉普通写法） */
.auth-box input, .auth-box select, .auth-box textarea {
  background: rgba(255, 255, 255, .12) !important;
  border-color: rgba(255, 255, 255, .28) !important;
  color: #fff !important;
}
.auth-box input::placeholder { color: rgba(255, 255, 255, .65) !important; }
.auth-box input:focus { border-color: var(--cyan-500) !important; box-shadow: 0 0 0 3px rgba(0, 168, 200, .2) !important; }
/* 登录/注册提交按钮：改用全站品牌色（深蓝→品牌青）渐变，去掉荧光青与发光阴影，更稳重高级 */
.auth-box .btn-primary {
  background: var(--cyan-500);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(3, 25, 40, .3);
}
.auth-box .btn-primary:hover {
  background: #0093b0;
  box-shadow: 0 6px 18px rgba(3, 25, 40, .36);
}
/* 登录/注册框内站点 LOGO 强制纯白：SVG（未自定义图）用描边/填充；后台自定义的图片 LOGO 用滤镜 brightness(0) invert(1) 把任意彩色图转纯白（保留透明度形状） */
.auth-box .auth-logo svg { stroke: #fff !important; fill: #fff !important; }
.auth-box .auth-logo [data-site-logo] > img { filter: brightness(0) invert(1); }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 4px; text-align: center; }
.auth-logo svg { width: 30px; height: 30px; }
[data-site-logo] { display: inline-flex; align-items: center; justify-content: center; }
[data-site-logo] > svg { width: 26px; height: 26px; object-fit: contain; }
[data-site-logo] > img { max-height: 34px; width: auto; max-width: 220px; object-fit: contain; }
.auth-logo [data-site-logo] > svg { width: 34px; height: 34px; }
.auth-logo [data-site-logo] > img { max-height: 54px; width: auto; max-width: 320px; }
.auth-title { font-size: 21px; font-weight: 700; color: var(--navy-800); }
.auth-sub { font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-3); }

/* ===================== 模态框 ===================== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(7, 38, 60, .55);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 900px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(3, 25, 40, .4); animation: pop .18s ease-out;
}
.modal.sm { max-width: 520px; }
.modal.md { max-width: 680px; }
.modal.lg { max-width: 1080px; }
.modal-note {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-soft, #f6fafb); border: 1px solid var(--border);
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 15px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close {
  background: none; border: 0; font-size: 22px; cursor: pointer;
  color: var(--text-3); line-height: 1; padding: 0 4px; font-family: inherit;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* 可搜索下拉 */
.combo-list {
  z-index: 2000; background: #fff; border: 1px solid var(--border-strong, #d0d5dd);
  border-radius: 8px; box-shadow: 0 10px 28px rgba(3, 25, 40, .18);
  list-style: none; margin: 0; padding: 4px; max-height: 240px; overflow-y: auto;
}
.combo-list li { padding: 6px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text); }
.combo-list li:hover { background: rgba(10, 110, 92, .1); }
.combo-list li.empty { color: var(--muted, #6b7280); cursor: default; }
.combo-list li.empty:hover { background: none; }

/* 选项卡 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 18px; background: #fafcfd; flex-wrap: wrap; }
.tabs button {
  padding: 11px 16px; background: none; border: 0; border-bottom: 2px solid transparent;
  cursor: pointer; font-size: 14px; color: var(--text-2); font-family: inherit;
  display: flex; align-items: center; gap: 6px;
}
.tabs button:hover { color: var(--navy-700); }
.tabs button.active { color: var(--navy-700); border-bottom-color: var(--cyan-500); font-weight: 600; }
.tabs .cnt {
  background: var(--border); color: var(--text-2); border-radius: 9px;
  padding: 0 6px; font-size: 11px; line-height: 17px;
}
.tabs button.active .cnt { background: var(--cyan-500); color: #fff; }

/* ===================== 后台 ===================== */
.admin-layout { display: flex; min-height: calc(100vh - var(--header-h)); }
.admin-side {
  width: 208px; flex-shrink: 0; background: #fff;
  border-right: 1px solid var(--border); padding: 16px 0;
}
.admin-side .side-title { font-size: 11px; color: var(--text-3); padding: 10px 20px 6px; letter-spacing: 1px; }
.admin-side a {
  display: flex; align-items: center; gap: 9px; padding: 10px 20px;
  color: var(--text-2); font-size: 14px; border-left: 3px solid transparent;
}
.admin-side a:hover { background: #f7fbfc; color: var(--navy-700); }
.admin-side a.active { background: var(--cyan-100); color: var(--navy-800); border-left-color: var(--cyan-500); font-weight: 600; }
.admin-side a .caret { margin-left: auto; transition: transform .15s ease, color .15s ease, background .15s ease;
  font-size: 13px; opacity: .9; color: var(--cyan-600, #0e9aa7); font-weight: 700; }
.admin-side a.open .caret { transform: rotate(90deg); color: var(--navy-800, #1f3a5f); }

/* 「有子类」的菜单（如「数据记录」）用明显的小箭头胶囊标识，避免看不出可展开 */
.admin-side a.nav-has-sub { position: relative; }
.admin-side a.nav-has-sub .caret {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: 8px; border-radius: 5px;
  background: var(--cyan-100, #e6f7f8); color: var(--cyan-700, #0b7d87);
  font-size: 11px; opacity: 1; box-shadow: inset 0 0 0 1px var(--cyan-200, #bfe9ec);
}
.admin-side a.nav-has-sub.open .caret { background: var(--cyan-600, #0e9aa7); color: #fff; box-shadow: none; }
.admin-side a.nav-has-sub::after {
  content: '展开'; position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  font-size: 10px; line-height: 1; color: var(--text-3, #9bb0c0);
  padding: 2px 5px; border-radius: 4px; background: var(--cyan-50, #f2fbfc);
  opacity: 0; transition: opacity .15s ease; pointer-events: none;
}
.admin-side a.nav-has-sub:hover::after { opacity: 1; }
.admin-side a.nav-has-sub.open::after { content: '收起'; opacity: 1; }
.admin-side .side-sub { display: flex; flex-direction: column; background: #fbfdfe; border-left: 3px solid var(--cyan-100); margin: 2px 0; }
.admin-side .side-sub a { padding: 7px 20px 7px 30px; font-size: 13px; color: var(--text-2); border-left: none; }
.admin-side .side-sub a::before { content: ''; }
.admin-side .side-sub a.active { background: var(--cyan-100); color: var(--navy-800); font-weight: 600; }

/* 三级树形导航：一级分组 → 二级功能（默认折叠）→ 三级类目 */
.admin-side .nav-group { margin-bottom: 2px; }
.admin-side .nav-l1 {
  font-weight: 600; color: var(--navy-800); background: #f2f7f9;
  font-size: 13.5px; letter-spacing: .5px; padding: 10px 18px;
}
.admin-side .nav-l1:hover { background: #e8f1f5; }
.admin-side .nav-l2 { display: none; }
.admin-side .nav-l2.open { display: block; }
.admin-side .nav-l2 > a { padding: 8px 20px 8px 30px; font-size: 13px; }
.admin-side .nav-l2 > a::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--border-strong); flex-shrink: 0;
}
.admin-side .nav-l2 > a.active::before { background: var(--cyan-500); }
.admin-side .nav-l3 { display: none; background: #fbfdfe; border-left: 3px solid var(--cyan-100); margin: 2px 0; }
.admin-side .nav-l3.open { display: block; }
.admin-side .nav-l3 a { padding: 6px 18px 6px 44px; font-size: 12.5px; color: var(--text-2); border-left: none; min-height: auto; }
.admin-side .nav-l3 a::before { content: '·'; margin-right: 2px; color: var(--text-3); }
.admin-side .nav-l3 a.active { background: var(--cyan-100); color: var(--navy-800); font-weight: 600; }
.admin-main { flex: 1; padding: 22px; overflow-x: hidden; background: var(--bg); min-width: 0; }
/* 记录表：批量选择列 */
table.data th.col-sel, table.data td.col-sel { width: 34px; text-align: center; padding-left: 8px; padding-right: 8px; }
#r_batchdel[disabled] { opacity: .5; cursor: not-allowed; }

/* 数据集配色区分（Issue3）：核准=蓝 招标=橙 中标=绿 EPC=紫
   仅一条色带 + 克制的浅底色，避免同质页面看错类别 */
#sec-records { --ds-color: transparent; --ds-bg: transparent; }
#sec-records[data-ds="approval"] { --ds-color: #2f6fd0; --ds-bg: #eef4fd; }
#sec-records[data-ds="tender"]   { --ds-color: #c77b16; --ds-bg: #fdf5e9; }
#sec-records[data-ds="winbid"]   { --ds-color: #1f8a5b; --ds-bg: #ecf8f1; }
#sec-records[data-ds="epc"]      { --ds-color: #7a4bc2; --ds-bg: #f3eefb; }
.rec-ds-banner {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 12px;
  border-left: 4px solid var(--ds-color); background: var(--ds-bg);
  border-radius: 0 8px 8px 0; font-size: 13px; color: var(--text-2);
}
.rec-ds-banner .ds-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-color); flex-shrink: 0; }
.rec-ds-banner .ds-tip { color: var(--text-3); font-size: 12px; }
#sec-records[data-ds] .card { border-top: 2px solid var(--ds-color); }
#sec-records[data-ds] #r_ds { border-color: var(--ds-color); color: var(--ds-color); font-weight: 600; }
@media (max-width: 860px) { .admin-side { display: none; } }

/* 权限矩阵 */
.matrix-wrap { overflow-x: auto; }
table.matrix { border-collapse: collapse; font-size: 12.5px; width: 100%; }
table.matrix th, table.matrix td {
  border: 1px solid var(--border); padding: 7px 9px; text-align: center; white-space: nowrap;
}
table.matrix th { background: #f6fafc; font-weight: 600; color: var(--text-2); }
table.matrix td.res { text-align: left; background: #fcfdfe; font-weight: 500; }
table.matrix th.grp { min-width: 132px; }
.matrix-cell { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.matrix-cell .row { display: flex; gap: 6px; align-items: center; font-size: 11.5px; }
.matrix-cell input[type=checkbox] { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--navy-600); }
.matrix-cell .lim {
  width: 52px; padding: 2px 4px; font-size: 11px; border: 1px solid var(--border-strong);
  border-radius: 4px; text-align: center;
}
.matrix-cell select { width: 62px; padding: 2px 3px; font-size: 11px; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* 定义列表（项目详情） */
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.dl > div { padding: 9px 0; border-bottom: 1px dashed #edf2f5; display: flex; gap: 10px; }
.dl dt { color: var(--text-3); width: 90px; flex-shrink: 0; font-size: 13px; }
.dl dd { margin: 0; color: var(--text); font-size: 13.5px; word-break: break-all; }

/* 时间轴 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--cyan-500);
}
.tl-date { font-size: 12px; color: var(--text-3); }
.tl-title { font-weight: 600; color: var(--navy-800); }
.tl-desc { font-size: 13px; color: var(--text-2); }

/* ===================== 站点页脚（页脚元素单行 + ICP / 版权，由后台「页脚元素 / 站点设置」配置驱动） ===================== */
.site-footer {
  margin-top: 28px; padding: 26px 22px 18px; color: var(--text-3);
  font-size: 12.5px; line-height: 1.8; border-top: 1px solid var(--border);
  background: #f7fafc;
}
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--cyan-500); }
/* 页脚底部单行元素：居中、竖线分隔、可换行不溢出 */
.site-footer .footer-items {
  text-align: center; color: var(--text-3); border-top: 1px dashed var(--border);
  padding-top: 12px; max-width: 1480px; margin: 0 auto; line-height: 2; word-break: break-word;
}
.site-footer .footer-items .footer-text { color: var(--text-3); }
.site-footer .footer-items .footer-link {
  color: var(--text-2); text-decoration: none; cursor: pointer; display: inline;
}
.site-footer .footer-items .footer-link:hover { color: var(--cyan-500); text-decoration: underline; }
/* 本站弹窗按钮：外观等同文本链接，无 button 边框 */
.site-footer .footer-items .footer-link-btn {
  border: none; background: none; padding: 0; margin: 0; font: inherit; color: var(--text-2);
  cursor: pointer;
}
.site-footer .footer-items .footer-link-btn:hover { color: var(--cyan-500); text-decoration: underline; }
.site-footer .footer-items .footer-sep { margin: 0 9px; opacity: .4; }


/* --------- 富文本「分栏布局」：编辑器插入的 .fx-cols 容器 --------- */
.richtext .fx-cols { display: flex; gap: 26px; margin: 12px 0; align-items: flex-start; }
.richtext .fx-cols > * { flex: 1 1 0; min-width: 0; }
.richtext .fx-cols.fx-2 > * { flex: 1 1 0; }
.richtext .fx-cols.fx-3 > * { flex: 1 1 0; }
.richtext .fx-cols.fx-left > *:first-child { flex: 0 0 58%; }
.richtext .fx-cols.fx-right > *:last-child { flex: 0 0 58%; }
.richtext .fx-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fff; }
.richtext hr.fx-divider { border: none; border-top: 1px dashed var(--border); margin: 18px 0; }
@media (max-width: 760px) {
  .richtext .fx-cols, .richtext .fx-cols.fx-left > *:first-child, .richtext .fx-cols.fx-right > *:last-child {
    flex-direction: column; flex: 1 1 auto;
  }
}

/* Toast */
#toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast-item {
  background: rgba(7, 38, 60, .93); color: #fff; padding: 10px 20px;
  border-radius: 20px; font-size: 13.5px; box-shadow: var(--shadow-md);
  animation: slideDown .2s ease-out;
}
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 进度条（容量条） */
.bar { height: 6px; background: #eef3f6; border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan-500), var(--navy-600)); border-radius: 3px; }

.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap8 { gap: 8px; }
.wrap { flex-wrap: wrap; }
.loading { padding: 40px; text-align: center; color: var(--text-3); }

/* ============================================================
 * 产业报告 · 等级徽章 / 控件（前台与后台共用）
 * ========================================================== */
.lv-badge {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; line-height: 1.5; white-space: nowrap;
}
.lv-public { background: #eef2f5; color: var(--text-3); }
.lv-normal { background: var(--cyan-100); color: var(--navy-700); }
.lv-vip_trial { background: #eaf3ff; color: #2563b8; }
.lv-vip { background: linear-gradient(135deg, #fff3d6, #ffe39e); color: #9a6a00; border: 1px solid #f0d99a; }
.lv-admin { background: #f0e9ff; color: #6d28d9; }
/* 后台新增的自定义会员等级：没有专属配色时用中性色兜底，保证徽标始终可读 */
.lv-other { background: var(--cyan-100); color: var(--navy-700); }

/* 后台：可见等级多选 */
.lv-check { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 4px 0; }
.lv-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.lv-opt input { width: 16px; height: 16px; accent-color: var(--cyan-500); }

/* 后台：报告封面缩略图 */
img.rp-thumb { width: 52px; height: 36px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border); background: var(--navy-700); }

/* 后台产业报告表：10 列在 1366 视口下原本约 1350px 宽，撑出容器后右侧「下载 / 更新时间 / 操作」被挡在横向滚动区外，
   表现为「右边按钮显示不全」。两处收窄：
   ① 标题列跟随列宽裁成省略号（完整标题见单元格悬浮提示，fitTable 负责写入 title）；
   ② 可见等级从「5 个徽标平铺 ≈330px」改为最多 2 个 + “+N”，并允许折行，空间紧张时这一列自己变窄。 */
#sec-reports .td-clip { max-width: 240px !important; }
#sec-reports td.rp-lv { white-space: normal; }
#sec-reports td.rp-lv .lv-set { display: flex; flex-wrap: wrap; gap: 4px; max-width: 212px; }
#sec-reports td.rp-lv .lv-badge { font-size: 10.5px; padding: 1px 7px; }
/* .lv-all / .lv-more 原本是深色卡片上的浅字配色，白底表格里要换成浅底深字 */
#sec-reports .lv-all { background: var(--cyan-100); color: var(--navy-700); border: 1px solid var(--cyan-200, #bfe9ec); }
#sec-reports .lv-more { background: #eef2f5; color: var(--text-2); }
/* 窄视口（≤1320，如 1280 笔记本）再收一档：标题上限 200、单元格左右内边距 10px，
   否则 10 列仍差几十像素，等级徽标会被挤成三行、右侧操作列要横向滚动才看得到。 */
@media (max-width: 1320px) {
  #sec-reports .td-clip { max-width: 200px !important; }
  #sec-reports td.rp-lv .lv-set { max-width: 196px; }
  #sec-reports table.data th, #sec-reports table.data td { padding-left: 10px; padding-right: 10px; }
}

/* 后台：封面预览框 */
.cover-preview { margin-top: 8px; min-height: 0; }
.cover-preview img { max-width: 220px; max-height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ============================================================
 * 产业报告 · 报告卡片（列表页 与 详情页「相关报告」共用）
 * ========================================================== */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
/* 卡片 = 一张铺满的封面图；标题 / 简介 / 权限叠加在封面下半部，
   中间加一层由透明到深色的渐变遮罩（.report-scrim）强化文字可读性。 */
.report-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; display: block; text-decoration: none; color: #fff;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.report-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--cyan-500); }
.report-cover {
  position: absolute; inset: 0; background: linear-gradient(135deg, var(--navy-700), var(--cyan-500));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.report-cover .report-cover-img,
.report-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.report-cover .ph { position: relative; color: rgba(255,255,255,.85); width: 46px; height: 46px; }
/* 半透明显色层：只铺在承载文字的下半部分，底部较实、向上渐隐；上半张封面保持原色
   （高度随文字区自适应，改文字长度不用回来调数值） */
.report-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; top: auto;
  height: 64%; pointer-events: none; z-index: 2;
  background: linear-gradient(to top,
    rgba(6, 32, 52, .90) 0%,
    rgba(6, 32, 52, .82) 28%,
    rgba(6, 32, 52, .64) 52%,
    rgba(6, 32, 52, .30) 76%,
    rgba(6, 32, 52, 0) 100%);
}
.report-cover .cat-pill {
  position: absolute; top: 10px; left: 10px; z-index: 3; background: rgba(7,38,60,.78); color: #fff;
  padding: 2px 10px; border-radius: 12px; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(2px);
}
.report-cover .lock-badge {
  position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(212,160,23,.95); color: #4a3600;
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.report-cover .lock-badge svg { width: 16px; height: 16px; }
.report-lock-mask { position: absolute; inset: 0; z-index: 2; background: rgba(7,38,60,.34); backdrop-filter: blur(1px); }
/* 叠加文字层 */
.report-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 40px 15px 13px; display: flex; flex-direction: column;
}
.report-title {
  font-size: 15.5px; font-weight: 700; color: #fff; line-height: 1.4; margin: 0 0 7px;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 卡片不再显示简介摘要（只留标题 + 会员等级 + 浏览量），故 .report-intro 规则已移除 */
/* 卡片底部信息区：等级徽标单独占一行（可换行），浏览量另起一行右对齐。
   早期用横排 + margin-left:auto 时，徽标一旦换行就会把「浏览量」挤成竖排文字。 */
.report-meta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  font-size: 12px; color: rgba(255,255,255,.82); margin-top: auto; text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.report-meta .lv-badges { display: flex; gap: 4px; flex-wrap: wrap; row-gap: 5px; }
.report-meta .lv-badge { font-size: 10.5px; padding: 2px 6px; }
.report-meta .report-views {
  align-self: flex-end; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.report-meta .report-views svg { width: 13px; height: 13px; opacity: .85; }

/* ---- 卡片叠加层里的图标尺寸 ----
 * App.icon() 输出的是不带 width/height 的裸 <svg viewBox>，没有 CSS 尺寸时
 * 会被浏览器按默认尺寸渲染、再被 flex 压缩成任意大小（实测 25~90px 不等），
 * 于是标签胶囊被撑成大方块、文字被挤成「一列一个汉字」，按钮也高矮不一。
 * 这里显式约束，保证卡片内所有图标大小一致。 */
.tag { white-space: nowrap; }
.tag svg { width: 14px; height: 14px; flex-shrink: 0; }
/* 深色遮罩上的标签要亮色文字，否则灰字压在深蓝上几乎看不清 */
.report-overlay .tag { color: rgba(255,255,255,.92); background: rgba(255,255,255,.16); }
.manual-actions .btn svg, .manual-detail-actions .btn svg { width: 15px; height: 15px; flex-shrink: 0; }
/* 无封面时的占位图标：撑满 .report-cover .ph 的 46px 方框 */
.report-cover .ph svg { width: 100%; height: 100%; }

/* 兜底：任何未显式设定尺寸的内联品牌图标一律按 1em 渲染，避免再出现上面这种
 * 「图标变成巨块把布局顶坏」的问题。:where() 不贡献特异性，因此各处已有的
 * 「.xxx svg { width: ... }」规则都会正常覆盖本条，不受影响。 */
svg:where(:not([width]):not([height])) { width: 1em; height: 1em; }

/* 「全体会员」/「+N」折叠徽标（等级过多时不再平铺一长串） */
.lv-all { background: rgba(0,168,200,.22); color: #eafaff; border: 1px solid rgba(255,255,255,.45); }
.lv-more { background: rgba(255,255,255,.24); color: #fff; }

.reports-empty { text-align: center; padding: 60px 0; color: var(--text-3); }
.reports-empty svg { width: 48px; height: 48px; opacity: .4; margin-bottom: 10px; }


/* ============================================================
 * Excel 导入任务（进度条 / 中断 / 确认清单 / 模板定制）
 * ========================================================== */
.imp-bar { height: 10px; border-radius: 6px; background: #eef2f6; overflow: hidden; margin: 8px 0 6px; }
.imp-bar > i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan-500), var(--navy-600)); transition: width .35s ease; }
.imp-bar.warn > i { background: linear-gradient(90deg, #f0b357, var(--amber-500)); }

.imp-prog { padding: 4px 2px; }
.imp-prog-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }

.imp-done { border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid var(--border); }
.imp-done.ok { background: #f0faf5; border-color: #c9ecdb; }
.imp-done.warn { background: #fdf6e9; border-color: #f0dcb4; }
.imp-done.err { background: #fdeeee; border-color: #f3cfcf; }

.imp-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
/* 列识别提示：冲突/未识别列的警示条 */
.imp-warn { margin: 0 0 8px; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 12.5px;
  background: #fdf6e9; border: 1px solid #f0dcb4; color: var(--text-2); line-height: 1.6; }
.imp-warn b { color: var(--text); }
.imp-warn.bad { background: #fdeeee; border-color: #f3cfcf; color: #a33; }
.imp-warn.bad b { color: #a33; }
.imp-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.imp-tab { padding: 5px 14px; border: 1px solid var(--border); border-radius: 16px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--text-2); }
.imp-tab:hover { border-color: var(--border-strong); }
.imp-tab.on { background: var(--navy-600); color: #fff; border-color: var(--navy-600); font-weight: 600; }

.imp-list { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.imp-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px;
  border-bottom: 1px solid var(--border); cursor: pointer; }
.imp-row:last-child { border-bottom: 0; }
.imp-row:hover { background: #f7fafc; }
.imp-row.on { background: #f2f9ff; }
.imp-row input[type=checkbox] { margin-top: 3px; width: 15px; height: 15px; }
.imp-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.imp-main .t { font-weight: 600; font-size: 13.5px; }
.imp-chg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); }
.imp-chg-item b { font-weight: 400; color: var(--text-3); text-decoration: line-through; }
.imp-chg-item em { font-style: normal; color: var(--green-500); font-weight: 600; }

.imp-tpl { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.imp-tpl table.data { margin: 0; }
.imp-tpl .btn-sm { padding: 2px 7px; }
.imp-mf { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 140px; overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.imp-mf-item { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }

.imp-float { position: fixed; right: 22px; bottom: 22px; z-index: 900; box-shadow: var(--shadow-md); }

/* ===== 两级结构：海上项目清单（项目父行 + 可展开子项行） ===== */
.tree-toggle { display: inline-block; width: 16px; text-align: center; cursor: pointer; color: var(--primary, #0a6e5c); font-size: 12px; user-select: none; }
.tree-parent { background: #f8fafb; }
.tree-parent:hover { background: #f1f5f4; }
.tree-badge { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px; line-height: 16px; border-radius: 8px;
  background: var(--primary, #0a6e5c); color: #fff; font-weight: 600; }
.tree-child td { background: #fff; padding: 0 !important; border-top: none; }
.tree-child-inner { display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 10px 10px 10px 38px; }
.tree-child-inner .ti { display: flex; gap: 6px; font-size: 12.5px; align-items: baseline; }
.tree-child-inner .tk { color: var(--muted, #6b7280); }
.tree-child-inner .tv { font-weight: 600; }

/* ===== 统计面板（默认折叠） ===== */
.stats-panel { border: 1px solid var(--border); border-radius: var(--radius, 10px); margin-bottom: 14px; background: #fff; overflow: hidden; }
.stats-head { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; background: linear-gradient(90deg, #eaf6f3, #fff); border-radius: 8px 8px 0 0; transition: background .15s; }
.stats-head:hover { background: linear-gradient(90deg, #d8efe9, #f3fbfa); }
.stats-title { font-weight: 700; font-size: 14px; color: var(--primary, #0a6e5c); }
.stats-sum { flex: 1; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-hint { font-size: 12px; font-weight: 600; color: #0a6e5c; background: #d6efe8; border: 1px solid #b7e2d8; border-radius: 999px; padding: 2px 10px; white-space: nowrap; animation: statsPulse 1.8s ease-in-out infinite; }
@keyframes statsPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(10,110,92,.0); } 50% { box-shadow: 0 0 0 4px rgba(10,110,92,.12); } }
.stats-chev { transition: transform .15s; color: var(--muted, #6b7280); font-size: 13px; }

/* 统计分析页：当前数据集醒目提示条 */
.ds-banner { margin: 0 0 12px; padding: 9px 14px; font-size: 13px; line-height: 1.6;
  color: #11453a; background: linear-gradient(90deg, #e7f6f1, #f3fbf9);
  border: 1px solid #bce3d8; border-left: 4px solid #0a6e5c; border-radius: 8px; }
.ds-banner b { color: #0a6e5c; }
.ds-banner.warn { color: #5b3b00; background: linear-gradient(90deg, #fff5e0, #fffaf0);
  border-color: #f3d79a; border-left-color: #d99a00; }
.ds-banner .ds-warn { color: #8a5a00; }
.ds-banner .ds-warn strong { color: #b00404; }
.stats-tip { font-size: 12.5px; color: #4b5563; background: #f1f7f5; border-top: 1px dashed var(--border); padding: 8px 14px; line-height: 1.6; }
.stats-tip b { color: var(--primary, #0a6e5c); }
.stats-basic { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 14px 12px; }
.stat-card { flex: 1; min-width: 120px; background: #f7faf9; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; text-align: center; }
.stat-num { font-size: 22px; font-weight: 800; color: var(--primary, #0a6e5c); line-height: 1.1; }
.stat-lbl { font-size: 12px; color: var(--muted, #6b7280); margin-top: 4px; }
.stats-detail { padding: 12px 16px 16px; border-top: 1px dashed var(--border);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }

/* 每个维度一张独立卡片：边框 + 左色条标题 + 标题下分隔线，避免三张图表糊成一片 */
.stat-sec { min-width: 0; background: #fbfdfe; border: 1px solid #e3edf2; border-radius: 10px;
  padding: 11px 13px 8px; box-shadow: 0 1px 2px rgba(15, 76, 117, .04);
  transition: border-color .15s, box-shadow .15s; }
.stat-sec:hover { border-color: #cfe3ec; box-shadow: 0 2px 8px rgba(15, 76, 117, .07); }

.stat-sec-title { position: relative; display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text);
  padding: 0 0 8px 10px; margin-bottom: 9px; border-bottom: 1px dashed #e3edf2; }
.stat-sec-title::before { content: ''; position: absolute; left: 0; top: 2px;
  width: 3px; height: 13px; border-radius: 2px; background: linear-gradient(180deg, #14b8a6, #0a6e5c); }

.bar-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  margin-bottom: 4px; padding: 2px 4px; border-radius: 5px; transition: background .12s; }
.bar-row:hover { background: #f1f8fa; }
.bar-name { width: 104px; flex: none; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 9px; background: #ecf2f5; border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #0a6e5c); border-radius: 5px; }
.bar-cnt { min-width: 84px; flex: none; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-pct { min-width: 52px; flex: none; text-align: right; color: var(--muted, #9ca3af); font-variant-numeric: tabular-nums; }

/* 「更多」：卡片底部整行分隔链接，不再用 padding-left 硬对齐到条形图起点 */
.bar-more { display: block; width: 100%; margin-top: 7px; padding: 7px 2px 1px;
  font-size: 12px; text-align: right; color: var(--primary, #0a6e5c);
  background: none; border: 0; border-top: 1px dashed #e6eef2;
  cursor: pointer; font-family: inherit; }
.bar-more:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .stats-detail { grid-template-columns: 1fr; }
}

/* 维度排行弹窗：完整图表 + 完整数据表（双栏，各自滚动） */
.rank-sum { font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; }
.rank-sum b { color: var(--primary, #0a6e5c); }
.rank-sum-note { margin-left: 10px; color: var(--muted, #9ca3af); font-size: 12px; }
.rank-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; align-items: start; }
.rank-col { min-width: 0; }
.rank-col-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.rank-col-tip { float: right; font-size: 11px; font-weight: 500; color: var(--primary, #0a6e5c); background: #e6f4f1; border-radius: 4px; padding: 1px 6px; }
.rank-chart { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fbfdfc; }
.rank-chart .bar-name { width: 150px; }
.rank-table-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.rank-table-wrap table { margin: 0; }
.rank-table-wrap thead th { position: sticky; top: 0; z-index: 2; background: #f4f9f7; }
@media (max-width: 860px) {
  .rank-grid { grid-template-columns: 1fr; }
  .rank-chart, .rank-table-wrap { max-height: 42vh; }
}
.sort-tag { float: right; font-size: 11px; font-weight: 500; color: var(--primary, #0a6e5c); background: #e6f4f1; border-radius: 4px; padding: 1px 6px; }
/* 卡片标题是 flex 布局，float 失效 → 用 margin-left:auto 靠右 */
.stat-sec-title .sort-tag { float: none; margin-left: auto; flex: none; }
/* 展开图维度切换：项目个数 / 容量(MW) */
.stats-metric-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 2px 0 6px; }
.stats-metric-lbl { font-size: 12.5px; color: var(--muted, #6b7280); }
.seg { display: inline-flex; align-items: center; padding: 3px 12px; font-size: 12.5px; border: 1px solid var(--border); background: #fff; color: var(--text-2); cursor: pointer; user-select: none; }
.seg:first-of-type { border-radius: 6px 0 0 6px; }
.seg:last-of-type { border-radius: 0 6px 6px 0; border-left: none; }
.seg.active { background: var(--primary, #0a6e5c); border-color: var(--primary, #0a6e5c); color: #fff; font-weight: 600; }

/* 散点图（功率 × 叶轮直径） */
.stats-scatter { padding: 4px 16px 16px; border-top: 1px dashed var(--border); }
.scatter-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted, #6b7280); margin-top: 6px; }
.scatter-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.scatter-legend .scatter-n { margin-left: auto; }

/* 统计面板：Tab 切换 + 年份筛选（降低篇幅、按需查看） */
.stats-controls { padding: 6px 14px 4px; border-top: 1px dashed var(--border); }
.stats-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.stats-tab { padding: 5px 14px; font-size: 13px; border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 7px; cursor: pointer; user-select: none; }
.stats-tab:hover { border-color: var(--primary, #0a6e5c); }
.stats-tab.active { background: var(--primary, #0a6e5c); border-color: var(--primary, #0a6e5c); color: #fff; font-weight: 600; }
.stats-years { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ychip-lbl { font-size: 12.5px; color: var(--muted, #6b7280); margin-right: 2px; }
.ychip { display: inline-flex; align-items: center; padding: 3px 11px; font-size: 12.5px; border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 999px; cursor: pointer; user-select: none; }
.ychip:hover { border-color: var(--primary, #0a6e5c); }
.ychip.active { background: var(--primary, #0a6e5c); border-color: var(--primary, #0a6e5c); color: #fff; font-weight: 600; }
.ychip.sm { border-radius: 6px; padding: 2px 9px; font-size: 12px; }
.sc-mode { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding-left: 8px; border-left: 1px dashed var(--border); }

/* ===== 自定义显示列（列设置弹窗） ===== */
.colset-tip { font-size: 12.5px; color: var(--muted, #6b7280); line-height: 1.7; margin-bottom: 10px; }
.colset-list { max-height: 52vh; overflow-y: auto; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; }
.colset-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-bottom: 1px solid #f2f6f8; }
.colset-row:last-child { border-bottom: none; }
.colset-row:hover { background: #f8fbfb; }
.colset-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin: 0; }
.colset-chk input { cursor: pointer; }
.colset-ops { display: flex; gap: 4px; flex: none; }
.btn-xs { padding: 1px 7px; font-size: 12px; line-height: 18px; }
.colset-row .btn-xs[disabled] { opacity: .35; cursor: not-allowed; }
.colset-reset { display: inline-block; text-decoration: underline; }

/* ===== 项目修改记录 ===== */
.audit-item { border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.audit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.audit-head .muted { font-size: 12px; }
.audit-item table.data.compact { font-size: 12.5px; }

/* ===== 首页「中标结构分析」筛选（国内/海外 · 招标形式 · 项目类型 · 业主类型） ===== */
.flt-panel { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 9px; }
.flt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flt-cap { flex: none; min-width: 60px; font-size: 12px; color: var(--text-3); }
.flt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.flt-chips .chip-btn.is-on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.flt-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.flt-group { position: relative; }
.flt-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-2);
  font-size: 12.5px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.flt-btn:hover { border-color: var(--cyan-500); color: var(--navy-800); }
.flt-btn b {
  font-weight: 600; font-size: 11.5px; color: var(--navy-700);
  background: var(--cyan-100); border-radius: 10px; padding: 1px 6px;
}
.flt-btn.is-filtered { border-color: var(--cyan-500); box-shadow: inset 0 0 0 1px rgba(0, 168, 200, .22); }
.flt-btn.is-filtered b { background: var(--navy-700); color: #fff; }
.flt-btn .caret { font-size: 10px; color: var(--text-3); }
.flt-group.open .flt-btn { border-color: var(--cyan-500); }
.flt-pop {
  display: none; position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 236px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-md); padding: 8px;
}
.flt-group.open .flt-pop { display: block; }
.flt-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-2);
}
.flt-pop-head label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.flt-opts { max-height: 220px; overflow: auto; }
.flt-opt { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12.5px; margin: 0; }
.flt-opt:hover { background: #f2f8fb; }
.flt-opt input { margin: 0; flex: none; cursor: pointer; }
.flt-opt-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-opt-n { font-style: normal; flex: none; font-size: 11.5px; color: var(--text-3); }
.flt-note { font-size: 12px; color: var(--text-3); }
.flt-note b { color: var(--navy-700); }
@media (max-width: 720px) {
  .flt-pop { width: 200px; }
  .flt-cap { min-width: 0; }
}
