/* 数据查阅平台（主从式数据终端）——全屏布局
   顶部横向工具条 + 主区(列表 50% | 详情 50%)铺满整屏，各自滚动。
   原则：克制降噪——不用色块做间距，靠细线/留白分隔；复用 common.css 令牌。 */

/* 公共头部 .searchbox 为 position:fixed; height:60px。终端需让出这 60px */
:root { --pf-nav-h: 60px; }

.pf-body { background: #fff; }

/* —— 全屏外壳（让出固定头部，铺满剩余视口） —— */
.pf-app {
  display: flex;
  flex-direction: column;
  margin-top: var(--pf-nav-h);
  height: calc(100vh - var(--pf-nav-h));
  background: #fff;
}

/* —— 搜索表单条（已收进左栏顶部） —— */
.pf-toolbar {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #ebeef5;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pf-toolbar-row { display: flex; align-items: center; gap: 12px; }

/* 频道 + 搜索 */
.pf-channel { display: flex; gap: 14px; flex-shrink: 0; }
.pf-channel-item { display: flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; margin: 0; }
.pf-search { position: relative; flex: 1; display: flex; gap: 8px; }
.pf-search-input {
  flex: 1; height: 34px; border: 1px solid #dcdfe6; border-radius: 4px;
  padding: 0 12px; font-size: 14px;
}
.pf-search-input:focus { border-color: var(--primary-color, #1A4FBE); outline: none; }
.pf-search-btn {
  height: 34px; padding: 0 18px; background: var(--primary-color, #1A4FBE);
  color: #fff; border: none; border-radius: 4px; cursor: pointer; white-space: nowrap;
}
.pf-search .search-suggestions-dropdown,
.pf-search .search-dropdown { top: 38px; left: 0; right: auto; width: 100%; max-width: 600px; }

/* 筛选——收敛为下拉气泡：放在左栏列表头部（高级过滤之后），点开才展开选项 */
.pf-filter { position: relative; }
.pf-filter-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: #fff; border: 1px solid #dcdfe6; border-radius: 4px;
  font-size: 13px; color: #606266; cursor: pointer; white-space: nowrap;
}
.pf-filter-trigger:hover { border-color: var(--primary-color, #1A4FBE); }
.pf-filter-name { color: #909399; }
.pf-filter.open .pf-filter-trigger,
.pf-filter.has-value .pf-filter-trigger { border-color: var(--primary-color, #1A4FBE); }
.pf-filter.has-value .pf-filter-name { color: #606266; }
.pf-filter-val { color: var(--primary-color, #1A4FBE); font-weight: 500; max-width: 168px; overflow: hidden; text-overflow: ellipsis; }
.pf-filter-val:empty { display: none; }
.pf-filter-caret { font-size: 12px; color: #c0c4cc; transition: transform .15s; }
.pf-filter.open .pf-filter-caret { transform: rotate(180deg); }

/* 气泡面板 */
.pf-pop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 1000;
  min-width: 240px;
  background: #fff; border: 1px solid #e4e7ed; border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: 8px;
}
.pf-filter.open .pf-pop { display: block; }
.pf-pop .region-type-selector { margin: 0 0 10px; display: inline-flex; }
.pf-pop .region-type-btn { margin: 0; }
.pf-pop .pf-region-selects { display: flex; gap: 8px; margin-bottom: 10px; }
.pf-pop .pf-region-selects .form-select { width: 130px; }
.pf-pop .pf-region-confirm {
  width: 100%;
  height: 32px;
  border: none;
  border-radius: 4px;
  background: var(--primary-color, #1A4FBE);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.pf-pop .pf-region-confirm:not(:disabled):hover { filter: brightness(0.95); }
.pf-pop .pf-region-confirm:disabled { background: #c0c4cc; cursor: not-allowed; }
/* 分类/周期：标准单列下拉菜单——每个选项独占一行，竖向排列 */
.pf-tags-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 168px; max-height: 320px; overflow-y: auto; }
.pf-pop .filter-tag {
  display: block; width: 100%; box-sizing: border-box; margin: 0;
  padding: 7px 12px; border: none; border-radius: 4px;
  font-size: 13px; text-align: left; color: #4A5568; background: transparent; white-space: nowrap;
}
.pf-pop .filter-tag:hover { background: #f2f3f5; color: var(--primary-color, #1A4FBE); }
.pf-pop .filter-tag.active { background: rgba(26,79,190,.08); color: var(--primary-color, #1A4FBE); font-weight: 600; }
/* 最右侧（周期）气泡靠右对齐，避免溢出列表右边界 */
.pf-pop-right { left: auto; right: 0; }
/* 顶部「重置」按钮（搜索按钮之后）——次要样式，区别于蓝色搜索按钮 */
.pf-reset-btn { background: #fff; color: #606266; border: 1px solid #dcdfe6; }
.pf-reset-btn:hover { background: #f7f8fa; border-color: var(--primary-color, #1A4FBE); color: var(--primary-color, #1A4FBE); }

/* —— 主区：列表 50% | 详情 50% —— */
.pf-main { flex: 1; display: flex; min-height: 0; }
.pf-list-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #ebeef5;
}
.pf-list-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 12px;
  flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid #f2f3f5;
}
.pf-result-count { font-size: 13px; color: #606266; flex-shrink: 0; }
.pf-result-count b { color: var(--primary-color, #1A4FBE); }
.pf-list-head-right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
/* 头部内：排序下拉 / 高级过滤 / 筛选触发 统一 30px 高，视觉对齐 */
.pf-list-head-right .form-select { width: auto; font-size: 12px; height: 30px; }
.pf-list-head-right > .btn-pro { height: 30px; display: inline-flex; align-items: center; }
.pf-batch-bar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 14px; border-bottom: 1px solid #f2f3f5;
}
.pf-batch-bar-bottom { border-bottom: none; border-top: 1px solid #f2f3f5; }
.pf-batch-all { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; }
.pf-batch-actions { display: flex; gap: 8px; }
.pf-list-scroll { flex: 1; overflow-y: auto; min-height: 0; }

/* 索引行：仅靠细线分隔，无色块 */
.pf-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid #f4f5f7;
  cursor: pointer;
}
.pf-item:hover { background: #fafbfc; }
.pf-item.active { box-shadow: inset 3px 0 0 var(--primary-color, #1A4FBE); }
.pf-item-check { margin-top: 4px; flex-shrink: 0; }
/* 行内：标题(左) → 打开独立页图标 → 参数(靠右) */
.pf-item-body { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 8px; }
.pf-item-title {
  flex: 0 1 auto; min-width: 0;
  font-size: 14px; color: #303133; line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 打开独立页：标题后的图标按钮，免开右栏直达单页 */
.pf-item-open {
  flex-shrink: 0; color: #c0c4cc; font-size: 13px; line-height: 1;
  text-decoration: none; padding: 2px 4px; border-radius: 3px;
}
.pf-item-open:hover { color: var(--primary-color, #1A4FBE); background: #eef2fb; }
.pf-item-meta { margin-left: auto; }
.pf-item.active .pf-item-title { color: var(--primary-color, #1A4FBE); font-weight: 600; }
/* 参数定宽列：时间范围 / 单位 / 周期 各占固定宽度且右对齐，跨行竖向对齐不穿插 */
.pf-item-meta {
  flex: 0 0 auto; font-size: 12px; color: #909399; white-space: nowrap;
  display: grid; grid-template-columns: 112px 80px 36px; gap: 8px;
}
.pf-item-meta > span { overflow: hidden; text-overflow: ellipsis; text-align: right; }
.pf-meta-range { font-variant-numeric: tabular-nums; }
.pf-meta-time { grid-column: 1 / -1; }

/* —— 右栏：详情主舞台（白底直铺，无嵌套卡片/色块） —— */
.pf-detail-col { flex: 1; min-width: 0; overflow-y: auto; }
.pf-detail { padding: 18px 22px; min-height: 100%; }
.pf-detail-empty {
  height: 600px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #c0c4cc; gap: 8px;
}
.pf-detail-empty .iconfont { font-size: 48px; }

/* 右栏头部：标题压成一行（标题+来源）；下方控制栏左=收藏/订阅/对比，右=图表类型 */
.pf-titlebar { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.pf-head-title { font-size: 15px; font-weight: 600; color: var(--text-dark, #2D3748); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pf-head-src { font-size: 12px; color: #a8acb3; white-space: nowrap; flex-shrink: 0; }
.pf-detail .pro-chart-controls.pf-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; }
.pf-detail .chart-action-btns { display: flex; align-items: center; gap: 8px; }
.pf-detail .chart-type-btns { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pf-range-val { color: var(--primary-color, #1A4FBE); }

/* 数据明细标题行 + 操作按钮组（未来预测/数据报告/高级分析/下载/独立页） */
.pf-table-head { margin-top: 22px; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.pf-table-head .data-actions-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 锁定数据解锁链接 */
.pf-detail .link-access { color: var(--color-link, #1A4FBE); text-decoration: none; white-space: nowrap; }
.pf-detail .link-access:hover { text-decoration: underline; }

/* 图表权限锁提示 Dock：不再单独定义，直接复用单页 detail-consolidated.css 的 .chart-lock-hint
   / .chart-lock-hint-btn（克制灰字 + 浅蓝描边按钮），保持与独立单页完全一致 */

/* —— 社区文章阅读视图（右栏） —— */
.pf-community .pf-c-titlebar { align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.pf-c-title { font-size: 20px; font-weight: 700; color: #1d2129; line-height: 1.4; margin: 0; }
.pf-c-open { flex-shrink: 0; white-space: nowrap; }
.pf-c-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid #f0f1f3; }
.pf-c-author { display: flex; align-items: center; gap: 10px; }
.pf-c-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.pf-c-name { font-size: 14px; color: #1d2129; font-weight: 600; }
.pf-c-time { font-size: 12px; color: #909399; }
.pf-c-content { font-size: 15px; line-height: 1.8; color: #2d3138; word-break: break-word; }
.pf-c-content img { max-width: 100%; height: auto; }
.pf-c-content p { margin: 0 0 14px; }
.pf-c-content table { max-width: 100%; border-collapse: collapse; }
.pf-c-datacard { margin-top: 18px; padding: 14px 16px; background: #f8fafc; border: 1px solid #eef0f3; border-radius: 8px; }
.pf-c-datacard-h { font-size: 13px; font-weight: 600; color: #4a5568; margin-bottom: 10px; }
.pf-c-dataname { display: inline-block; font-size: 14px; color: var(--primary-color, #1A4FBE); font-weight: 500; margin-bottom: 8px; text-decoration: none; }
.pf-c-datarow { display: flex; justify-content: space-between; font-size: 13px; color: #606266; padding: 3px 0; }
.pf-c-datarow span:first-child { color: #909399; }

/* —— 社区数据卡片（快讯/排行/对比）——从 community.css 提取、scoped 到 .pf-community 避免污染平台 —— */
.pf-community .data-rank-table { margin: 20px 0; background: #fff; border-radius: var(--border-radius-md, 8px); overflow: hidden; }
.pf-community .data-rank-table table { width: 100%; border-collapse: collapse; }
.pf-community .data-rank-table th { background: var(--bg-gray-th-2, #f5f7fa); padding: 8px 14px; text-align: center; font-weight: 600; color: var(--text-dark, #2D3748); font-size: 13px; line-height: 1.2; border: 1px solid #eee; }
.pf-community .data-rank-table td { padding: 8px 14px; font-size: 13px; color: var(--text-dark, #2D3748); font-feature-settings: "tnum" on, "lnum" on; border: 1px solid #eee; }
.pf-community .data-rank-table tbody tr:hover { background: #f0f4fa; }
.pf-community .rank-title { font-size: 16px; font-weight: 600; color: var(--text-dark, #2D3748); margin-bottom: 14px; }
.pf-community .rank-badge { display: inline-block; height: 20px; line-height: 20px; text-align: center; border-radius: var(--border-radius-sm, 4px); font-size: 12px; padding: 0 6px; }
.pf-community .rank-badge.top1 { background: #F6C90E; color: #5A3E00; }
.pf-community .rank-badge.top2 { background: #C9CDD4; color: #3D4152; }
.pf-community .rank-badge.top3 { background: #CD7F32; color: #fff; }
.pf-community .rank-badge.normal { background: var(--bg-light, #f4f5f7); color: var(--text-muted, #909399); }
.pf-community .rank-footer { padding: 10px 14px; background: var(--bg-gray-th-2, #f5f7fa); border-top: 1px solid var(--border-color, #ebeef5); font-size: 12px; color: var(--text-light, #a8acb3); }
.pf-community .community-data-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color, #ebeef5); font-size: 13px; color: var(--text-light, #a8acb3); }
.pf-community .quicknews-table-title { font-size: 15px; font-weight: 600; color: var(--text-dark, #2D3748); margin-bottom: 12px; }
.pf-community .qn-card-label { width: 80px; color: var(--text-muted, #909399); font-weight: 500; }
.pf-community .qn-card-value { font-feature-settings: "tnum" on, "lnum" on; }
.pf-community .qn-card-primary { color: var(--primary-color, #1A4FBE); }
.pf-community .positive { color: #0A7C4E; }
.pf-community .negative { color: #BA2A20; }
.pf-community .rank-chart-container { margin: 16px 0; padding: 16px; background: #fff; border-radius: var(--border-radius-md, 8px); border: 1px solid var(--border-color-dark, #e4e7ed); }
.pf-community .rank-chart-container .chart-type-btns { display: flex; justify-content: flex-end; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.pf-community .rank-chart-container .chart-wrapper { position: relative; width: 100%; height: 300px; overflow: hidden; }
.pf-community .rank-chart-container .chart-wrapper canvas { position: absolute; left: 0; top: 0; width: 100% !important; height: 100% !important; }
.pf-community .data-compare-chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
.pf-community .data-compare-chart-header .chart-title { font-size: 15px; font-weight: 600; color: var(--text-dark, #2D3748); }

/* —— 滚动条：清晰可见 ——
   注意：不要设标准 scrollbar-width/scrollbar-color，新版 Chrome 一旦检测到它们就改用
   标准细滚动条、忽略下方 ::-webkit-scrollbar 自定义，导致又细又淡几乎看不见。
   这里只用 ::-webkit-scrollbar 精确控制，并把拇指色加深确保可见。 */
.pf-list-scroll::-webkit-scrollbar,
.pf-detail-col::-webkit-scrollbar { width: 12px; height: 12px; }
.pf-list-scroll::-webkit-scrollbar-track,
.pf-detail-col::-webkit-scrollbar-track { background: #eceef0; }
.pf-list-scroll::-webkit-scrollbar-thumb,
.pf-detail-col::-webkit-scrollbar-thumb { background: #9aa0a8; border-radius: 6px; border: 2px solid #eceef0; }
.pf-list-scroll::-webkit-scrollbar-thumb:hover,
.pf-detail-col::-webkit-scrollbar-thumb:hover { background: #787e87; }

/* 范围滑块 #slider-range-min 的样式已移到 detail-consolidated.css（全局，单页+平台通用），此处不再重复 */

/* —— 骨架屏（避免内容闪现） —— */
.pf-skel-line {
  border-radius: 4px;
  background: linear-gradient(90deg, #f2f3f5 25%, #e9ebee 37%, #f2f3f5 63%);
  background-size: 400% 100%;
  animation: pf-shimmer 1.2s ease infinite;
}
@keyframes pf-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.pf-skel-title { height: 24px; width: 46%; margin-bottom: 10px; }
.pf-skel-meta { height: 12px; width: 30%; margin-bottom: 18px; }
.pf-skel-stats { display: flex; gap: 28px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid #ebeef5; }
.pf-skel-stat { width: 80px; }
.pf-skel-stat .pf-skel-line:first-child { height: 12px; width: 60%; margin-bottom: 8px; }
.pf-skel-stat .pf-skel-line:last-child { height: 20px; width: 100%; }
.pf-skel-chart { height: 300px; margin-bottom: 16px; }
.pf-skel-rows .pf-skel-line { height: 30px; margin-bottom: 6px; }

/* —— 分页：轻量化，去 Bootstrap 重边框，对齐框架风格 —— */
#searchPagination {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; padding: 12px 14px; margin: 0;
}
#searchPagination .pagination-info { font-size: 12px; color: #909399; margin: 0; }
#searchPagination .pagination { display: flex; gap: 4px; margin: 0; }
#searchPagination .page-item { list-style: none; }
#searchPagination .page-item .page-link {
  border: none; background: transparent; color: #606266;
  min-width: 30px; height: 30px; padding: 0 9px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; font-size: 13px; box-shadow: none;
}
#searchPagination .page-item .page-link:hover { background: #f2f3f5; color: var(--primary-color, #1A4FBE); }
#searchPagination .page-item.active .page-link { background: var(--primary-color, #1A4FBE); color: #fff; }
#searchPagination .page-item.disabled .page-link { color: #c8ccd2; background: transparent; cursor: default; }

/* —— 窄屏降级：详情移到列表下方 —— */
@media (max-width: 1024px) {
  .pf-app { height: auto; }
  .pf-main { flex-direction: column; }
  .pf-list-col { border-right: none; border-bottom: 1px solid #ebeef5; }
  .pf-list-scroll { max-height: 50vh; }
  .pf-stats { gap: 18px; }
}

/* ── 区域/频道意图区（搜索结果上方） ─────────────────────────────────────
   搜「杭州GDP」时后端认出杭州并把结果限定在杭州，这一区负责把这件事显式告诉用户、
   给出撤销口，并把这个地方在各频道的入口摆出来。认不出时整块为空，不占一个像素。
   克制原则：细边框、圆角 2px、无阴影、hover 只轻微加深底色。 */
#pfIntent:empty { display: none; }

.pf-intent-applied {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; margin: 8px 12px 0;
  font-size: 12px; color: #5a6270;
  background: #f7f8fa; border-radius: 2px;
}
.pf-intent-applied b { color: var(--primary-color, #1A4FBE); font-weight: 600; }
.pf-intent-undo { margin-left: auto; color: #8a909c; font-size: 12px; }
.pf-intent-undo:hover { color: var(--primary-color, #1A4FBE); }

.pf-region-card {
  margin: 8px 12px; padding: 10px 12px;
  border: 1px solid #ebeef5; border-radius: 2px; background: #fff;
}
.pf-region-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.pf-region-name { font-size: 15px; font-weight: 600; color: #1f2329; }
.pf-region-name:hover { color: var(--primary-color, #1A4FBE); }
.pf-region-path { font-size: 12px; color: #8a909c; }
.pf-region-count { font-size: 12px; color: #8a909c; margin-left: auto; }

/* 区域+频道组合主入口（「福州房价」）：卡片里唯一一个用户十有八九就是要点的去处。
   用浅主色底 + 主色描边把它和灰底芯片拉开层级，但不做实心大按钮——
   这是内容页不是落地页，克制规范里不许反色跳变。hover 只轻微加深。 */
.pf-region-entry {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; padding: 9px 12px;
  background: #f2f6fd; border: 1px solid #c9d6ef; border-radius: 2px;
}
.pf-region-entry:hover { background: #e9f0fb; }
.pf-region-entry-title { font-size: 14px; font-weight: 600; color: var(--primary-color, #1A4FBE); }
.pf-region-entry-go { margin-left: auto; font-size: 12px; color: var(--primary-color, #1A4FBE); }
.pf-region-entry-go .iconfont { font-size: 10px; }

/* 频道十几个，全铺开会撑出四五行、把结果列表挤下去。
   收起时只留前几个 + 「更多」，点开才展开全部——不用横滑：
   PC 上隐藏了滚动条又不能拖拽，等于滑不动、用户也看不出还有内容。
   「更多」跟在芯片后、同在 chips 里；展开后随芯片换行。 */
.pf-region-chips { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 8px; min-width: 0; overflow: hidden; }
.pf-region-chips.expanded { flex-wrap: wrap; overflow: visible; }
.pf-region-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 10px;
  font-size: 12px; color: #5a6270;
  background: #f7f8fa; border: 1px solid #ebeef5; border-radius: 2px;
}
.pf-region-chip:hover { background: #eef1f6; color: var(--primary-color, #1A4FBE); }
.pf-region-chip em { font-style: normal; color: #a8adb7; margin-left: 4px; }

/* 「更多 / 收起」：与芯片同尺寸，但用主色描边区分出它是操作而不是频道 */
.pf-region-more {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 3px;
  height: 26px; padding: 0 10px;
  font-size: 12px; line-height: 1;
  color: var(--primary-color, #1A4FBE);
  background: #fff;
  border: 1px solid #c9d6ef; border-radius: 2px;
  cursor: pointer;
}
.pf-region-more:hover { background: #f2f6fd; }
.pf-region-more .iconfont { font-size: 10px; }

.pf-intent-channel {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 8px 12px 0;
  font-size: 13px; color: #5a6270;
  background: #f7f8fa; border: 1px solid #ebeef5; border-radius: 2px;
}
.pf-intent-go { margin-left: auto; color: var(--primary-color, #1A4FBE); font-size: 13px; }
.pf-intent-go:hover { text-decoration: underline; }
