﻿/* ============================================================================
 * core.css —— V2 组件样式库（模块作者只需用这些类名，就自动获得统一风格）
 *
 * 包含：
 *   · 布局：.app / .sidebar / .main / .topbar / .content
 *   · 页面：.page-title / .pt-ico / .pt-actions
 *   · 卡片：.cards / .stat-card / .stat-ico
 *   · 面板：.panel / .table-wrap / .grid-2
 *   · 组件：.tag / .feature / .prog / .empty-note / .btn
 *   · 智能工作台：.ai-page / .ai-msg / .ai-md / .ai-src / .ai-inputbox（供 modules/ai-chat.js）
 * ========================================================================== */

/* ---------- 0. 设计令牌（苹果极简 ins + 农业三资主题） ---------- */
:root {
  /* 本平台只有浅色一套视觉：显式声明 color-scheme:light，
     阻止手机深色模式/浏览器强制反色把白底页面变成黑底（配合 head 里的 meta 双保险）。 */
  color-scheme: light;
  /* 主色：麦田绿（乡村振兴）；辅助：沃土棕、稻田金 */
  --primary: #34a853;
  --primary-light: #4cbb6d;
  --primary-dark: #0b1a12;
  --soil: #a9764b;
  --harvest: #e0a33e;

  --bg: #f6f7f9;
  --bg-soft: #fbfbfd;
  --card: #ffffff;
  --text: #0d0d0f;
  --text-2: #48484d;
  --muted: #86868b;
  --muted-2: #b0b0b6;
  --border: #e8e8ed;
  --border-soft: #f0f0f3;

  --warn: #d97706;
  --danger: #e5484d;
  --info: #0a84ff;

  --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .06);
  --sh-3: 0 8px 20px rgba(0, 0, 0, .08), 0 24px 60px rgba(0, 0, 0, .10);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --nav-w: 244px;
}

/* ---------- 1. 基础排版 ---------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0; background: var(--bg-soft); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.65; letter-spacing: -.005em;
}
/* 顶部一抹田野绿光晕，是「ins 感」的来源 */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 440px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1100px 400px at 10% -10%, rgba(52, 168, 83, .10), transparent 62%),
    radial-gradient(900px 340px at 90% -16%, rgba(224, 163, 62, .07), transparent 60%);
}
a { color: inherit; text-decoration: none; }

/* ---------- 2. 布局骨架 ---------- */
.app { position: relative; z-index: 1; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--nav-w);
  background: rgba(255, 255, 255, .80);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-right: 1px solid var(--border-soft);
  overflow-y: auto; z-index: 100;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .12); border-radius: 3px; }
.logo { padding: 22px 20px 18px; }
.logo h1 { font-size: 15px; font-weight: 600; letter-spacing: -.2px; margin: 0; }
.logo p { font-size: 11px; color: var(--muted); margin: 5px 0 0; }
.nav-group { padding: 6px 0 2px; }
.nav-group-title {
  padding: 12px 20px 5px; font-size: 10px; font-weight: 600;
  color: var(--muted-2); letter-spacing: 1.1px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  margin: 1px 8px; padding: 8px 11px; border-radius: 10px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-item:hover { background: rgba(0, 0, 0, .04); color: var(--text); }
.nav-item.active { background: rgba(52, 168, 83, .12); color: #1f7a44; font-weight: 600; }
.nav-item .ico { width: 20px; text-align: center; font-size: 14px; }
.nav-item .badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 9.5px; line-height: 1.6; padding: 1px 6px; border-radius: 8px;
}
.main { margin-left: var(--nav-w); padding: 0 32px 56px; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; margin-bottom: 26px;
  background: rgba(251, 251, 253, .84);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.breadcrumb { font-size: 12.5px; color: var(--muted); }
.breadcrumb b { color: var(--text); font-weight: 600; }
.topbar .search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; box-shadow: var(--sh-1);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.topbar .search:focus-within { border-color: rgba(52, 168, 83, .5); box-shadow: var(--sh-2); }
.topbar .search input { border: none; outline: none; width: 210px; font-size: 13px; background: none; }
.topbar .search input::placeholder { color: var(--muted-2); }
.user {
  display: flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 12.5px; box-shadow: var(--sh-1);
}
#content { position: relative; z-index: 1; }

/* ---------- 3. 页面标题 ---------- */
.page-title {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.page-title h2 {
  margin: 0; font-size: 26px; font-weight: 600;
  letter-spacing: -.6px; color: var(--text); line-height: 1.25;
}
.page-title .pt-ico { margin-right: 10px; }
.page-title .desc { font-size: 13px; color: var(--muted); margin-top: 6px; }
.page-title .pt-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- 4. 按钮 ---------- */
.btn {
  border: none; cursor: pointer; font-family: inherit;
  background: var(--primary); color: #fff;
  padding: 9px 20px; border-radius: 999px; font-size: 13px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 18px rgba(52, 168, 83, .22);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.ghost { background: #fff; color: var(--text-2); border: 1px solid var(--border); box-shadow: var(--sh-1); }
.btn.ghost:hover { border-color: #d8d8de; color: var(--text); }

/* ---------- 5. 卡片 ---------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 18px; margin-bottom: 26px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); padding: 22px 22px 20px; box-shadow: var(--sh-1);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  position: relative; overflow: hidden;
}
.stat-card::after {           /* 右下角极淡的田野纹样，呼应农业主题 */
  content: ""; position: absolute; right: -32px; bottom: -32px;
  width: 108px; height: 108px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(52, 168, 83, .10), transparent 68%);
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .label { font-size: 12.5px; color: var(--muted); }
.stat-card .stat-ico { font-size: 15px; opacity: .5; }
.stat-card .value {
  font-size: 27px; font-weight: 600; letter-spacing: -.8px;
  color: var(--text); margin: 10px 0 6px;
}
.stat-card .trend { font-size: 12px; color: #a1a1a6; }
.stat-card .trend.up { color: var(--danger); }
.stat-card .trend.down { color: var(--primary); }

/* ---------- 6. 面板与表格 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-1); margin-bottom: 24px;
}
.panel h3 {
  margin: 0 0 16px; padding-bottom: 12px; font-size: 15px; font-weight: 600;
  color: var(--text); letter-spacing: -.2px; border-bottom: 1px solid var(--border-soft);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 10px 12px; font-size: 11.5px; font-weight: 500;
  color: var(--muted); letter-spacing: .3px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 13px 12px; color: var(--text-2); border-bottom: 1px solid var(--border-soft); }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover td { background: rgba(52, 168, 83, .035); }
tbody tr:last-child td { border-bottom: none; }

/* ---------- 7. 标签 / 功能块 / 进度 ---------- */
.tag {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .1px;
}
.tag.green { background: rgba(52, 168, 83, .10); color: #1f7a44; }
.tag.red { background: rgba(229, 72, 77, .10); color: #c53034; }
.tag.orange { background: rgba(217, 119, 6, .10); color: #a35b04; }
.tag.blue { background: rgba(10, 132, 255, .10); color: #0a6fd0; }
.tag.gray { background: #f0f0f3; color: var(--muted); }

.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.feature {
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 16px 18px;
  transition: background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.feature:hover { background: #fff; border-color: var(--border); box-shadow: var(--sh-1); }
.feature .f-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.feature .f-desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 6px; }

.prog { margin: 12px 0; }
.prog-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.prog-head b { color: var(--primary); }
.prog-bar { height: 7px; border-radius: 999px; background: #f0f0f3; overflow: hidden; }
.prog-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.prog-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }

.chart-box { height: 300px; width: 100%; }
.empty-note { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
.empty-note .empty-ico { font-size: 30px; opacity: .5; margin-bottom: 10px; }
.empty-note .empty-hint { font-size: 12px; color: var(--muted-2); margin-top: 8px; }

/* ============================================================================
 * 8. 国风意象层 —— 润物细无声
 *    原则：不加卦名、不做图腾；太极/八卦/爻线只以极淡的水印与纹理出现，
 *          主体仍是苹果极简的留白与排版。
 * ========================================================================== */

/* ---------- 8.1 首页品牌区 ---------- */
.brand-hero {
  position: relative; overflow: hidden;
  margin-bottom: 28px; padding: 34px 36px 28px;
  border-radius: 26px;
  background: linear-gradient(165deg, #fcfdfc 0%, #ffffff 46%, #f9fbfa 100%);
  border: 1px solid rgba(0, 0, 0, .045);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .02), 0 16px 48px rgba(15, 46, 34, .05);
}
/* 太极水印：右下角，淡到几乎看不见，只留一层气韵 */
.bh-watermark {
  position: absolute; right: -60px; bottom: -110px; color: #2f6b4f;
  opacity: .5; pointer-events: none;
}
/* 八卦方位环：左上角，细刻度环 */
.bh-ring {
  position: absolute; left: -150px; top: -190px; color: #4a8f6a;
  opacity: .42; pointer-events: none;
}
/* 细密「爻」线纹理，只覆盖上半部，营造经纬感 */
.brand-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: repeating-linear-gradient(0deg, rgba(47, 107, 79, .045) 0 1px, transparent 1px 26px);
  -webkit-mask-image: radial-gradient(560px 220px at 30% 0%, #000, transparent 76%);
  mask-image: radial-gradient(560px 220px at 30% 0%, #000, transparent 76%);
}

.bh-head {
  position: relative; display: flex; align-items: center; gap: 9px;
  margin-bottom: 16px;
}
.bh-wheat { color: var(--primary, #34a853); display: flex; }
.bh-title {
  font-size: 12.5px; letter-spacing: 3px; color: #6d7d74; font-weight: 500;
  font-family: "Songti SC", "STSong", "SimSun", -apple-system, "PingFang SC", serif;
}

.bh-quote {
  position: relative; margin: 0 0 12px; max-width: 620px;
  font-size: 27px; font-weight: 500; line-height: 1.55; letter-spacing: 1.6px;
  color: var(--primary-dark, #0b1a12);
  font-family: "Songti SC", "STSong", "SimSun", -apple-system, "PingFang SC", serif;
}
.bh-desc {
  position: relative; margin: 0 0 26px; max-width: 560px;
  font-size: 13.5px; line-height: 1.85; color: #78867e;
}

.bh-pillars { position: relative; display: flex; gap: 16px; flex-wrap: wrap; }
.bh-pillar {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 20px 13px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(0, 0, 0, .05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .02);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.bh-pillar:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(15, 46, 34, .07); }
.bh-word {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 22px; font-weight: 500; letter-spacing: 1px;
  color: #fff; background: linear-gradient(155deg, #3fbb72, #1e7c48);
  box-shadow: 0 3px 10px rgba(52, 168, 83, .22);
}
.bh-pillar-txt { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #7c8a82; line-height: 1.5; }
.bh-pillar-txt b { font-size: 12.5px; font-weight: 600; letter-spacing: 2px; color: var(--primary-dark, #0b1a12); }

.bh-foot {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, .05);
}
.bh-assets { display: flex; align-items: center; gap: 12px; }
.bh-asset {
  font-size: 12.5px; letter-spacing: 4px; color: #5c6b62;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.bh-asset-dot {
  width: 3px; height: 3px; border-radius: 50%; background: rgba(52, 168, 83, .4);
  display: inline-block;
}
.bh-slogan { font-size: 10.5px; letter-spacing: .3px; color: #a9b3ac; text-align: right; }

/* ---------- 8.2 侧边栏品牌区：治通水墨字标（小、含蓄） ---------- */
.brand-logo {
  padding: 20px 18px 16px !important;
  border-bottom: 1px solid rgba(0, 0, 0, .045) !important;
  background: none !important;
}
.bl-row { display: flex; align-items: center; gap: 11px; }
.bl-row .wordmark {
  flex: 0 0 auto; width: 84px; height: auto;
  opacity: .96;
  transition: opacity .3s cubic-bezier(.22, .61, .36, 1);
}
.brand-logo:hover .bl-row .wordmark { opacity: 1; }
.bl-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bl-en {
  font-size: 8.5px; letter-spacing: 2.6px; text-transform: uppercase;
  color: #9aa49d; line-height: 1;
}
.bl-sub {
  font-size: 11px; letter-spacing: 1.4px; line-height: 1.3; color: #55635b;
  font-family: "Songti SC", "STSong", "SimSun", -apple-system, "PingFang SC", serif;
  white-space: nowrap;
}

/* ---------- 8.3 页脚品牌条 ---------- */
.brand-foot-wrap { margin-top: 44px; }
.brand-foot {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 22px 0 10px; font-size: 11.5px; color: #9aa49d;
  border-top: 1px solid rgba(0, 0, 0, .05);
}
.brand-foot .bf-mark { color: rgba(52, 168, 83, .5); display: flex; }
.brand-foot .bf-name { color: #5c6b62; letter-spacing: .4px; }
.brand-foot .bf-sep { color: #d8dedb; }

/* ---------- 8.4 国风分隔线 ---------- */
.guo-divider {
  display: flex; align-items: center; gap: 14px; margin: 30px 0 20px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 12px; color: #93a09a; letter-spacing: 3px;
}
.guo-divider .gd-line {
  height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, rgba(52, 168, 83, .22), transparent);
}
.guo-divider .gd-mark { color: rgba(52, 168, 83, .45); display: flex; }
.guo-divider .gd-text { white-space: nowrap; }

/* ============================================================================
 * 9. 智能工作台样式（modules/ai-chat.js 使用）
 * ========================================================================== */
/* 高度策略说明（这里踩过坑）：
   原来 .ai-page 用 min-height: calc(100vh - 150px)、.ai-scroll 用
   max-height: calc(100vh - 330px) —— 两个基准不自洽，且 min-height 会让
   内容继续撑高 .main，进而把 body 顶出视口，导致整页出现滚动条、
   底部输入框在小屏幕上被推出可视区（表现为"半截的框"）。
   现在改为：.ai-page 固定高度（不撑高父容器），滚动只发生在 .ai-scroll 内部。 */
.ai-page {
  display: flex; flex-direction: column;
  height: calc(100vh - 118px);      /* 顶栏+内边距约 93px，再留一点余量 */
  min-height: 320px;                 /* 小屏兜底，避免被压成一条 */
}

/* 进入智能工作台时给 body 加 .ai-lock（见 modules/ai-chat.js），
   锁住整页滚动，这样输入框永远贴在视口底部，不会被顶出去 */
body.ai-lock { overflow: hidden; }
body.ai-lock .main { height: 100vh; overflow: hidden; padding-bottom: 10px; }

.ai-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
  flex: 0 0 auto;
}
.ai-head h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.ai-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.ai-head-actions { display: flex; align-items: center; gap: 10px; }
.ai-pill {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 13px; font-size: 11.5px; color: var(--text-2); box-shadow: var(--sh-1);
}
.ai-pill.warn { background: rgba(217, 119, 6, .08); border-color: rgba(217, 119, 6, .22); color: #a35b04; }

/* min-height:0 是 flex 子项能正确收缩的关键（默认 auto 会导致内容把容器撑开，
   滚动条就跑到外层去了——这正是"半截的框"的成因） */
.ai-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; padding: 4px 2px 8px;
}
.ai-scroll::-webkit-scrollbar { width: 8px; }
.ai-scroll::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .10); border-radius: 4px; }
.ai-wrap { max-width: 860px; }

/* 欢迎区 */
.ai-hero { padding: 18px 0 8px; text-align: left; }
.ai-hlogo {
  width: 62px; height: 62px; border-radius: 20px; margin-bottom: 18px;
  background: linear-gradient(145deg, #35b866, #1f8b4c);
  box-shadow: 0 10px 30px rgba(52, 168, 83, .28);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.ai-hero h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.9px; }
.ai-hero p { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.ai-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 24px; }
.ai-card {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 18px;
  padding: 18px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 6px 20px rgba(0, 0, 0, .035);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.ai-card:hover {
  border-color: rgba(52, 168, 83, .35); transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .05), 0 16px 40px rgba(0, 0, 0, .07);
}
.ai-card .ai-ct { font-size: 13.5px; font-weight: 600; }
.ai-card .ai-cd { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.ai-kb {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 18px;
  padding: 18px 20px; margin-top: 22px; box-shadow: var(--sh-1);
  font-size: 12.5px; color: #6e6e73; line-height: 1.9;
}
.ai-kb b { color: var(--text); }
.ai-kb code, .ai-dbody code {
  background: #f5f5f7; border-radius: 6px; padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; color: var(--text-2);
}

/* 消息 */
.ai-msg { display: flex; gap: 14px; margin-bottom: 30px; }
.ai-av {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.ai-msg.user .ai-av { background: #f0f0f3; }
.ai-msg.bot .ai-av { background: linear-gradient(145deg, #35b866, #1f8b4c); box-shadow: 0 3px 12px rgba(52, 168, 83, .26); }
.ai-msg .ai-body { flex: 1; min-width: 0; }
.ai-msg .ai-who { font-size: 11.5px; color: var(--muted-2); margin-bottom: 8px; }
.ai-msg.user .ai-body {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 15px 19px; box-shadow: var(--sh-1); white-space: pre-wrap;
}
.ai-msg.bot .ai-body {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 18px;
  padding: 20px 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 26px rgba(0, 0, 0, .04);
}

/* Markdown 排版 */
.ai-md { font-size: 14.5px; line-height: 1.85; color: #1d1d1f; overflow-wrap: break-word; }
.ai-md h1, .ai-md h2, .ai-md h3, .ai-md h4 { margin: 20px 0 9px; font-weight: 600; letter-spacing: -.3px; color: var(--text); }
.ai-md h1 { font-size: 19px; } .ai-md h2 { font-size: 17px; } .ai-md h3 { font-size: 15.5px; } .ai-md h4 { font-size: 14.5px; }
.ai-md h3::before {
  content: ""; display: inline-block; width: 3px; height: 13px; border-radius: 2px;
  background: var(--primary); margin-right: 9px; vertical-align: -1px;
}
.ai-md p { margin: 9px 0; }
.ai-md ul, .ai-md ol { margin: 9px 0 9px 22px; }
.ai-md li { margin: 5px 0; }
.ai-md strong { font-weight: 600; color: var(--text); }
.ai-md code { background: #f5f5f7; border-radius: 6px; padding: 2px 7px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.ai-md pre { background: #1d1d1f; color: #f5f5f7; border-radius: 14px; padding: 16px; overflow-x: auto; }
.ai-md pre code { background: none; color: inherit; padding: 0; }
.ai-md table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0; font-size: 13px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ai-md th { background: #fafafc; color: var(--text-2); font-weight: 600; font-size: 12px; padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.ai-md td { padding: 11px 14px; border-bottom: 1px solid var(--border-soft); }
.ai-md tr:last-child td { border-bottom: none; }
.ai-md tr:hover td { background: rgba(52, 168, 83, .035); }
.ai-md blockquote {
  margin: 13px 0; padding: 11px 16px; color: var(--text-2);
  background: rgba(52, 168, 83, .05); border-left: 3px solid var(--primary); border-radius: 0 12px 12px 0;
}
.ai-md hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.ai-cursor { display: inline-block; width: 8px; height: 16px; border-radius: 2px; background: var(--primary); margin-left: 3px; vertical-align: -2px; animation: aiblink 1s steps(2) infinite; }
@keyframes aiblink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* 证据来源 */
.ai-src { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.ai-src-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; cursor: pointer; font-size: 12.5px; color: var(--muted); user-select: none; }
.ai-src-head b { color: var(--primary); }
.ai-dim { color: var(--muted-2); }
.ai-src-list { display: none; flex-direction: column; gap: 10px; margin-top: 12px; }
.ai-src-list.on { display: flex; }
.ai-src-item { background: #fafafc; border: 1px solid var(--border-soft); border-radius: 14px; padding: 13px 15px; font-size: 12.5px; transition: background .18s var(--ease); }
.ai-src-item:hover { background: #fff; border-color: var(--border); }
.ai-si-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; color: var(--text); }
.ai-si-txt { color: #6e6e73; line-height: 1.75; margin-top: 7px; }
.ai-chip { background: rgba(52, 168, 83, .10); color: #1f7a44; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 500; }
.ai-chip.vec { background: rgba(10, 132, 255, .10); color: #0a6fd0; }
.ai-chip.score { background: #f0f0f3; color: var(--muted); }
.ai-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 11.5px; color: var(--muted-2); }
.ai-meta .ai-ok { color: var(--primary); }
.ai-meta .ai-err { color: var(--danger); }
.ai-meta .ai-warn { color: #e0a33e; }

/* 构建版本号标记：用于确认前端是否为新版（排查缓存） */
.ai-ver {
  font-size: 11px; font-weight: 400; color: #9aa49d;
  background: #f4f6f5; border: 1px solid #eaeceb;
  border-radius: 6px; padding: 1px 7px; margin-left: 8px;
  vertical-align: middle; letter-spacing: .2px;
}
.ai-ver.warn { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }

/* 检索进度小框：流式生成时显示"正在检索 / 命中 N 条"，让等待有反馈 */
.ai-progress {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; margin: 0 0 10px;
  border-radius: 999px; font-size: 12px; color: var(--muted);
  background: rgba(52, 168, 83, .06); border: 1px solid rgba(52, 168, 83, .18);
}
.ai-prog-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  animation: aiProgPulse 1s ease-in-out infinite;
}
@keyframes aiProgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.7); }
}

/* 输入区 */
.ai-foot { padding: 14px 0 4px; }
.ai-inputbox {
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  padding: 14px 16px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04), 0 14px 40px rgba(0, 0, 0, .06);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.ai-inputbox:focus-within { border-color: rgba(52, 168, 83, .45); box-shadow: 0 2px 10px rgba(52, 168, 83, .10), 0 16px 44px rgba(52, 168, 83, .12); }
.ai-inputbox textarea {
  width: 100%; border: none; outline: none; resize: none; background: none;
  font-family: inherit; font-size: 14.5px; line-height: 1.7; min-height: 26px; max-height: 150px; color: var(--text);
}
.ai-inputbox textarea::placeholder { color: var(--muted-2); }
.ai-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ai-hint { flex: 1; font-size: 11.5px; color: var(--muted-2); }
.ai-send {
  border: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; color: #fff;
  background: var(--primary); border-radius: 999px; padding: 9px 22px;
  box-shadow: 0 2px 6px rgba(52, 168, 83, .24);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.ai-send:hover { background: var(--primary-light); transform: translateY(-1px); }
.ai-send:disabled { background: #e2e2e7; color: #a1a1a6; box-shadow: none; cursor: not-allowed; transform: none; }
.ai-stop { display: none; border: 1px solid rgba(229, 72, 77, .28); background: #fff; color: #c53034; border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.ai-stop.on { display: block; }
.ai-tip { font-size: 11px; color: var(--muted-2); margin-top: 10px; }

/* 弹层 */
.ai-mask {
  position: fixed; inset: 0; z-index: 9500; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ai-mask.on { display: flex; }
.ai-dlg {
  width: 100%; max-width: 580px; max-height: 84vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
}
.ai-dlg h3 { display: flex; align-items: center; margin: 0; padding: 18px 22px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--border-soft); }
.ai-dlg h3 .ai-x { margin-left: auto; cursor: pointer; color: var(--muted-2); font-size: 15px; }
.ai-dbody { padding: 18px 22px; overflow-y: auto; font-size: 13px; color: var(--text-2); line-height: 1.85; }
.ai-note { font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.ai-dfoot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border-soft); }
.ai-form-row { display: flex; align-items: center; gap: 9px; margin: 9px 0; font-size: 13px; }
.ai-log {
  margin-top: 14px; padding: 14px; max-height: 240px; overflow-y: auto;
  background: #f5f5f7; border: 1px solid var(--border-soft); border-radius: 12px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.8;
  white-space: pre-wrap; word-break: break-all; color: var(--text-2);
}

/* ============================================================================
 * 10. 图表（AI 出图 / 表格转图表）
 * ========================================================================== */
.ai-chart {
  width: 100%; min-height: 320px; margin: 12px 0 4px;
  border: 1px solid var(--border-soft, #f0f0f3); border-radius: 14px;
  background: #fff; padding: 8px;
}
.ai-chart-fallback {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 180px; font-size: 12.5px; color: var(--muted, #86868b);
  background: #fafbfa; border-radius: 10px;
}
.ai-table-wrap { margin: 10px 0; }
.ai-chart-actions {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 12px; color: var(--muted, #86868b);
}
.ai-ct-tip { color: #9aa49d; }
.ai-chart-btn {
  border: 1px solid rgba(52,168,83,.28); background: rgba(52,168,83,.06);
  color: #1f7a44; border-radius: 999px; padding: 4px 12px; font-size: 12px;
  cursor: pointer; transition: all .16s ease;
}
.ai-chart-btn:hover { background: rgba(52,168,83,.14); }
.ai-chart-btn.on { background: #34a853; color: #fff; border-color: #34a853; }
/* ============================================================================
 * 11. 隐藏 addon 遗留浮层（重要修复）
 *
 * V2 的 AI 界面由 modules/ai-chat.js 渲染在 #content 里，不再使用 addon 的浮层。
 * 但 addon 的 HTML（<div id="aiApp">…）仍在 v2.html 中，而它自带的
 * "#aiApp{position:fixed;inset:0;display:none}" 样式在构建时被剥离了
 * （V2 改用 panel-v2-ins.css），结果 #aiApp 退化成 static 块级元素，
 * 高达 500+px，把整页撑高约一倍 —— 表现为底部输入框被顶出视口、看着像"半截的框"。
 * 这里强制隐藏，V1（index.html）不加载本文件，不受影响。
 * ========================================================================== */
#aiApp { display: none !important; }
/* ============================================================================
 * 12. 首页：当地农业气象 + 政策速递
 * 视觉规范：与全站一致——白底、16px 圆角、极细边框、轻阴影、农业绿点缀
 * ========================================================================== */
.wx-wrap, .pol-wrap {
  background: #fff; border: 1px solid var(--border, #eaeaec);
  border-radius: 16px; padding: 18px 20px 16px; margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.04);
}
.wx-head, .pol-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.wx-title, .pol-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 600; color: var(--text, #1a1a1c);
}
.wx-badge, .pol-badge {
  font-size: 11px; font-weight: 400; color: #86868b; background: #f5f6f6;
  border: 1px solid #ececee; border-radius: 999px; padding: 2px 9px;
}
.wx-badge.on { color: #1f7a44; background: rgba(52,168,83,.07); border-color: rgba(52,168,83,.2); }
.wx-badge.off { color: #b8860b; background: rgba(184,134,11,.07); border-color: rgba(184,134,11,.22); }
.wx-refresh {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 12px; color: #6e6e73; background: #fff; border: 1px solid #e8e8ed;
  border-radius: 999px; padding: 4px 12px; transition: .16s;
}
.wx-refresh:hover { color: #1f7a44; border-color: rgba(52,168,83,.35); background: rgba(52,168,83,.04); }
.wx-loading, .pol-loading, .pol-empty, .pol-error {
  font-size: 12.5px; color: #a1a1a6; padding: 22px 0; text-align: center;
}
.wx-error { display: flex; align-items: center; gap: 12px; padding: 16px 4px; }
.wx-err-t { font-size: 13px; color: #6e6e73; }
.wx-err-s { font-size: 11.5px; color: #a1a1a6; margin-top: 3px; }

.wx-now { display: flex; align-items: center; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid #f2f4f3; flex-wrap: wrap; }
.wx-now-ico { flex: 0 0 auto; line-height: 0; }
.wx-now-main { flex: 1 1 200px; }
.wx-now-temp { font-size: 40px; font-weight: 300; color: #1a1a1c; line-height: 1.05; letter-spacing: -1.5px; }
.wx-now-temp span { font-size: 16px; font-weight: 400; color: #86868b; margin-left: 2px; }
.wx-now-desc { font-size: 13px; color: #6e6e73; margin-top: 3px; }
.wx-now-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: #86868b; margin-top: 9px; }
.wx-now-meta span { display: inline-flex; align-items: center; gap: 4px; }
.wx-now-sun { flex: 0 0 auto; font-size: 11.5px; color: #86868b; line-height: 2; text-align: right; }
.wx-now-sun div { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }

.wx-days { display: flex; gap: 8px; padding: 14px 0 4px; overflow-x: auto; }
.wx-day {
  flex: 1 0 86px; text-align: center; padding: 10px 6px 9px; border-radius: 12px;
  background: #fafbfa; border: 1px solid #f0f2f1; transition: .18s;
}
.wx-day.today { background: rgba(52,168,83,.055); border-color: rgba(52,168,83,.22); }
.wx-day:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.06); }
.wx-d-date { font-size: 11.5px; color: #6e6e73; margin-bottom: 5px; }
.wx-d-ico { line-height: 0; margin: 2px 0 5px; color: #6e6e73; }
.wx-day.today .wx-d-ico { color: #1f7a44; }
.wx-d-temp { font-size: 13px; color: #1a1a1c; font-weight: 500; }
.wx-d-temp span { color: #a1a1a6; font-weight: 400; }
.wx-d-rain { font-size: 10.5px; color: #0a84ff; margin-top: 3px; display: flex; align-items: center; justify-content: center; gap: 2px; }

.wx-hours-wrap { padding: 10px 0 2px; border-top: 1px solid #f2f4f3; margin-top: 10px; }
.wx-hours-title { font-size: 11.5px; color: #a1a1a6; margin-bottom: 8px; }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.wx-hour { flex: 0 0 54px; text-align: center; font-size: 11px; color: #6e6e73; }
.wx-h-t { color: #a1a1a6; font-size: 10.5px; }
.wx-h-ico { line-height: 0; margin: 3px 0; }
.wx-h-temp { color: #1a1a1c; font-weight: 500; }
.wx-h-rain { color: #0a84ff; font-size: 10px; }

.wx-advice { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f2f4f3; }
.wx-advice-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #1f7a44; margin-bottom: 8px; }
.wx-advice-item {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #3a3a3c;
  padding: 7px 12px; margin-bottom: 6px; border-radius: 9px;
  background: #fafbfa; border-left: 3px solid #d8e3dc; line-height: 1.55;
}
.wx-advice-item.lv-warn { background: #fffaf5; border-left-color: #e0a33e; }
.wx-advice-item.lv-ok { background: #f7fbf8; border-left-color: #34a853; }
.wx-advice-item.lv-info { background: #f7fafd; border-left-color: #0a84ff; }
.wx-source { font-size: 11px; color: #b0b0b5; margin-top: 10px; text-align: right; }

.pol-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pol-tab {
  font-size: 12px; color: #6e6e73; background: #fff; border: 1px solid #e8e8ed;
  border-radius: 999px; padding: 3px 12px; cursor: pointer; transition: .16s;
}
.pol-tab:hover { border-color: rgba(52,168,83,.35); color: #1f7a44; }
.pol-tab.on { background: #1f7a44; border-color: #1f7a44; color: #fff; }
.pol-list { display: flex; flex-direction: column; gap: 10px; }
.pol-item {
  padding: 12px 14px; border-radius: 12px; background: #fafbfa;
  border: 1px solid #f0f2f1; transition: .18s;
}
.pol-item:hover { background: #fff; border-color: rgba(52,168,83,.22); box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.pol-item-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pol-level {
  flex: 0 0 auto; font-size: 10.5px; border: 1px solid; border-radius: 5px;
  padding: 1px 7px; font-weight: 500;
}
.pol-name { font-size: 13.5px; font-weight: 600; color: #1a1a1c; line-height: 1.5; }
.pol-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 11.5px; color: #a1a1a6; margin-top: 6px; }
.pol-dot { color: #d8d8dd; }
.pol-summary { font-size: 12.5px; color: #6e6e73; margin-top: 6px; line-height: 1.6; }
.pol-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pol-tag {
  font-size: 10.5px; color: #1f7a44; background: rgba(52,168,83,.07);
  border: 1px solid rgba(52,168,83,.18); border-radius: 5px; padding: 1px 7px;
}
.pol-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #0a6fd0; text-decoration: none; margin-left: auto; }
.pol-link:hover { text-decoration: underline; }
.pol-source { font-size: 11px; color: #b0b0b5; margin-top: 12px; text-align: center; line-height: 1.6; }

@media (max-width: 820px) {
  .wx-now { gap: 12px; }
  .wx-now-temp { font-size: 32px; }
  .wx-now-sun { display: none; }
  .wx-day { flex: 0 0 74px; }
}
/* ============================================================================
 * 12b. 首页顶部信息条（天气 + 政策）
 * 设计目标：小、贴顶、**不突兀**——
 *   ① 极浅边框 + 几乎无阴影，看起来像页面自身的一条分隔带，而不是"贴上去的卡片"；
 *   ② 字号比正文小一号，次要信息用浅灰，主信息只用一点点重量差；
 *   ③ 交互只用极淡的绿底变化，不做位移/放大，避免视觉跳动。
 * ========================================================================== */
.ti-bar {
  display: flex; align-items: center;
  background: #fff;
  border: 1px solid #f0f2f1;
  border-radius: 13px;
  padding: 8px 14px;
  margin: 0 0 16px;
  font-size: 12.5px; color: #6e6e73;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .015);
  transition: border-color .18s ease, box-shadow .18s ease;
  min-height: 44px;
}
.ti-bar:hover { border-color: #e7ece9; box-shadow: 0 2px 8px rgba(0, 0, 0, .035); }

.ti-seg {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 4px 9px; border-radius: 9px; cursor: pointer;
  transition: background .16s ease;
}
.ti-seg:hover { background: rgba(52, 168, 83, .055); }
.ti-seg.open { background: rgba(52, 168, 83, .075); }
.ti-weather { flex: 0 1 auto; }
.ti-policy { flex: 1 1 auto; min-width: 0; }

.ti-ico { line-height: 0; flex: 0 0 auto; }
.ti-temp {
  font-size: 16.5px; font-weight: 500; color: #1a1a1c;
  letter-spacing: -.3px; flex: 0 0 auto;
}
.ti-desc { color: #6e6e73; flex: 0 0 auto; }
.ti-meta { color: #b0b0b5; font-size: 11.5px; flex: 0 0 auto; }
.ti-days { display: flex; gap: 9px; flex: 0 0 auto; }
.ti-day { font-size: 11.5px; color: #9a9aa0; }
.ti-sep {
  width: 1px; height: 17px; background: #eef0ef;
  margin: 0 11px; flex: 0 0 auto;
}
.ti-plv {
  flex: 0 0 auto; font-size: 10.5px; padding: 1px 7px; border-radius: 5px;
  border: 1px solid rgba(52, 168, 83, .3); background: rgba(52, 168, 83, .06);
  color: #1f7a44; font-weight: 500;
}
.ti-pname {
  flex: 1 1 auto; min-width: 0; color: #3a3a3c;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 展开提示：箭头 + 文字。默认用最浅的灰、最小号字，hover 才变绿——
   目的是"看得见但不出挑"，不让信息条显得花哨 */
.ti-caret {
  display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto;
  color: #c8c8cd; font-size: 11px; margin-left: 3px;
  transition: color .16s ease;
}
.ti-caret-ico { line-height: 0; }
.ti-caret-txt { letter-spacing: .2px; }
.ti-seg:hover .ti-caret { color: #1f7a44; }
.ti-seg.open .ti-caret { color: #1f7a44; }

/* 详情面板：展开时才出现，与信息条保持同一条视觉基线 */
.ti-panel { margin: -6px 0 16px; }
.ti-panel .wx-wrap, .ti-panel .pol-wrap { margin-bottom: 0; }

@media (max-width: 1100px) {
  .ti-days, .ti-meta { display: none; }
}
@media (max-width: 820px) {
  .ti-bar { flex-wrap: wrap; padding: 8px 12px; gap: 2px; }
  .ti-sep { display: none; }
  .ti-policy { flex: 1 1 100%; }
}
/* ---------------- 政策折叠与实时状态 ---------------- */
.pol-item { padding: 10px 13px; }              /* 比天气卡片更紧凑 */
.pol-summary { display: none; }                /* 联网抓取无摘要时不占位 */
.pol-item:has(.pol-summary:not(:empty)) .pol-summary { display: block; }

.pol-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 10px; padding: 8px 0;
  font-size: 12px; color: #1f7a44; cursor: pointer;
  background: rgba(52, 168, 83, .045); border: 1px dashed rgba(52, 168, 83, .28);
  border-radius: 10px; transition: .16s;
}
.pol-more:hover { background: rgba(52, 168, 83, .09); border-style: solid; }
.pol-more-n { font-size: 9px; opacity: .7; }

.pol-source {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid #f4f6f5;
  font-size: 11px; color: #b0b0b5; text-align: left;
}
.pol-live { display: inline-flex; align-items: center; gap: 4px; color: #1f7a44; }
.pol-off { display: inline-flex; align-items: center; gap: 4px; color: #b8860b; }
.pol-upd { color: #b0b0b5; }
.pol-tip { flex: 1 1 100%; color: #c2c2c7; }

.pol-badge.on { color: #1f7a44; background: rgba(52,168,83,.07); border-color: rgba(52,168,83,.2); }
.pol-badge.off { color: #b8860b; background: rgba(184,134,11,.07); border-color: rgba(184,134,11,.22); }
.pol-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pol-refresh {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 12px; color: #6e6e73; background: #fff; border: 1px solid #e8e8ed;
  border-radius: 999px; padding: 3px 11px; transition: .16s;
}
.pol-refresh:hover { color: #1f7a44; border-color: rgba(52,168,83,.35); background: rgba(52,168,83,.04); }
/* ============================================================================
 * 13. 智能检索（联网版）
 * 视觉延续全站语言：白底、16px 圆角、极浅边框；搜索框按"搜索"习惯做得更醒目
 * ========================================================================== */
.ws-page { display: flex; flex-direction: column; height: calc(100vh - 118px); min-height: 320px; }
.ws-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 2px 8px; }
.ws-scroll::-webkit-scrollbar { width: 8px; }
.ws-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,.10); border-radius: 4px; }
.ws-wrap { max-width: 900px; }

/* 初始态：居中大搜索框 */
.ws-hero { padding: 52px 0 30px; text-align: center; }
.ws-hero-title { display: inline-flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 600; color: #1a1a1c; letter-spacing: -.4px; }
.ws-hero-sub { font-size: 12.5px; color: #86868b; margin: 8px 0 22px; }
.ws-hero-box { display: flex; gap: 10px; max-width: 660px; margin: 0 auto; }
.ws-input {
  flex: 1; box-sizing: border-box; padding: 13px 18px; font-size: 14px;
  border: 1px solid #e3e6e5; border-radius: 24px; background: #fff; color: #1a1a1c;
  outline: none; transition: .18s; box-shadow: 0 2px 8px rgba(0,0,0,.04);
  font-family: inherit;
}
.ws-input:focus { border-color: #34a853; box-shadow: 0 0 0 3px rgba(52,168,83,.13), 0 4px 16px rgba(0,0,0,.06); }
.ws-input.small { padding: 9px 16px; font-size: 13px; border-radius: 20px; }
.ws-go {
  padding: 0 26px; font-size: 14px; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(135deg,#34a853,#1f7a44); border: 0; border-radius: 24px;
  transition: .18s; letter-spacing: 1px;
}
.ws-go:hover { filter: brightness(1.06); }
.ws-go.small { padding: 0 18px; font-size: 13px; border-radius: 20px; }
.ws-tips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.ws-tip {
  font-size: 12px; color: #6e6e73; background: #fafbfa; border: 1px solid #eef1f0;
  border-radius: 999px; padding: 5px 13px; cursor: pointer; transition: .16s;
}
.ws-tip:hover { color: #1f7a44; border-color: rgba(52,168,83,.3); background: rgba(52,168,83,.05); }
.ws-note {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 26px;
  font-size: 11.5px; color: #a1a1a6; background: #fafbfa;
  border: 1px solid #f0f2f1; border-radius: 10px; padding: 8px 14px; line-height: 1.6;
}

/* 检索态：顶部固定搜索条 */
.ws-bar { flex: 0 0 auto; padding: 0 0 14px; border-bottom: 1px solid #f2f4f3; margin-bottom: 16px; }
.ws-bar-inner { display: flex; gap: 9px; max-width: 900px; }
.ws-clear {
  padding: 0 16px; font-size: 13px; color: #6e6e73; background: #fff; cursor: pointer;
  border: 1px solid #e8e8ed; border-radius: 20px; transition: .16s;
}
.ws-clear:hover { color: #1f7a44; border-color: rgba(52,168,83,.3); }

/* 消息 */
.ws-msg { margin-bottom: 22px; }
.ws-msg.user { text-align: right; }
.ws-q {
  display: inline-block; text-align: left; background: #f0f7f3; color: #1a1a1c;
  border-radius: 14px 14px 4px 14px; padding: 10px 16px; font-size: 13.5px; max-width: 78%;
}
.ws-body {
  background: #fff; border: 1px solid #f0f2f1; border-radius: 14px;
  padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.02);
}
.ws-who { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #86868b; margin-bottom: 10px; }
.ws-badge {
  font-size: 10.5px; color: #b8860b; background: rgba(184,134,11,.08);
  border: 1px solid rgba(184,134,11,.2); border-radius: 5px; padding: 1px 7px;
}
.ws-md { font-size: 13.5px; line-height: 1.75; color: #1a1a1c; }
.ws-md h1, .ws-md h2, .ws-md h3 { font-size: 14.5px; margin: 10px 0 6px; color: #0b1a12; }
.ws-md p { margin: 6px 0; }
.ws-md ul, .ws-md ol { margin: 6px 0 6px 20px; }
.ws-md li { margin: 3px 0; }
.ws-md code { background: #f4f6f5; border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.ws-md pre { background: #f7f9f8; border-radius: 8px; padding: 10px; overflow-x: auto; }
.ws-md a { color: #0a6fd0; }
.ws-md table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12.5px; }
.ws-md th { background: #1f7a44; color: #fff; padding: 6px 9px; text-align: left; font-weight: 500; }
.ws-md td { padding: 6px 9px; border-bottom: 1px solid #f0f2f1; }
.ws-cursor { display: inline-block; width: 7px; height: 14px; background: #34a853; margin-left: 2px; vertical-align: -2px; animation: wsBlink 1s steps(2) infinite; }
@keyframes wsBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.ws-progress {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; color: #6e6e73;
  background: rgba(52,168,83,.06); border: 1px solid rgba(52,168,83,.18);
}
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: #34a853; animation: wsPulse 1s ease-in-out infinite; }
@keyframes wsPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* 来源 */
.ws-src { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f2f4f3; }
.ws-src-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #1f7a44; font-weight: 600; margin-bottom: 9px; }
.ws-dim { color: #a1a1a6; font-weight: 400; }
.ws-src-item { padding: 9px 12px; border-radius: 10px; background: #fafbfa; border: 1px solid #f0f2f1; margin-bottom: 7px; }
.ws-si-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-si-idx {
  flex: 0 0 auto; width: 18px; height: 18px; line-height: 18px; text-align: center;
  font-size: 10.5px; color: #fff; background: #a1a1a6; border-radius: 5px;
}
.ws-gov { font-size: 10px; color: #1f7a44; background: rgba(52,168,83,.08); border: 1px solid rgba(52,168,83,.2); border-radius: 4px; padding: 0 5px; }
.ws-si-title { font-size: 13px; color: #1a1a1c; text-decoration: none; font-weight: 500; }
.ws-si-title:hover { color: #0a6fd0; text-decoration: underline; }
.ws-si-host { font-size: 11px; color: #b0b0b5; margin-top: 3px; }
.ws-si-snip { font-size: 12px; color: #86868b; margin-top: 5px; line-height: 1.6; }
.ws-err { margin-top: 10px; font-size: 12.5px; color: #c0392b; }
.ws-chart { width: 100%; min-height: 300px; margin-top: 12px; }
.ws-chart-fallback { display: flex; align-items: center; justify-content: center; height: 160px; font-size: 12.5px; color: #a1a1a6; }
@media (max-width: 820px) {
  .ws-hero { padding: 26px 0 18px; }
  .ws-hero-box { flex-direction: column; }
  .ws-go { padding: 12px 0; }
}
/* ============================================================================
 * 14. 趋势预测区块
 * ========================================================================== */
.fc-wrap {
  background: #fff; border: 1px solid var(--border, #eaeaec); border-radius: 16px;
  padding: 18px 20px 16px; margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.04);
}
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fc-title { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--text, #1a1a1c); }
.fc-badge { font-size: 11px; font-weight: 400; color: #86868b; background: #f5f6f6; border: 1px solid #ececee; border-radius: 999px; padding: 2px 9px; }
.fc-badge.on { color: #1f7a44; background: rgba(52,168,83,.07); border-color: rgba(52,168,83,.2); }
.fc-badge.off { color: #b8860b; background: rgba(184,134,11,.07); border-color: rgba(184,134,11,.22); }
.fc-note { font-size: 11px; color: #b0b0b5; }
.fc-loading { font-size: 12.5px; color: #a1a1a6; padding: 20px 0; text-align: center; }
.fc-chart { width: 100%; height: 260px; }
.fc-stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11.5px; color: #86868b; margin: 6px 0 12px; }
.fc-block { display: flex; gap: 12px; align-items: flex-start; background: #fffaf5; border: 1px solid #f4e3cc; border-radius: 12px; padding: 13px 15px; margin-bottom: 14px; }
.fc-block-t { font-size: 13.5px; font-weight: 600; color: #8a5a00; margin-bottom: 5px; }
.fc-reasons { margin: 0 0 6px 18px; font-size: 12.5px; color: #6e6e73; line-height: 1.7; }
.fc-advice { font-size: 12.5px; color: #1f7a44; background: rgba(52,168,83,.06); border-radius: 8px; padding: 7px 11px; margin-top: 6px; }
.fc-hist-title { font-size: 12px; color: #a1a1a6; margin-bottom: 7px; }
.fc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fc-table th { background: #f4f7f5; color: #6e6e73; font-weight: 500; padding: 7px 9px; text-align: left; border-bottom: 1px solid #e8efeb; }
.fc-table td { padding: 7px 9px; border-bottom: 1px solid #f4f6f5; color: #3a3a3c; }
.fc-num { font-variant-numeric: tabular-nums; font-weight: 500; }
.fc-files { color: #a1a1a6; font-size: 11px; }
.fc-foot { font-size: 11px; color: #b0b0b5; margin-top: 10px; line-height: 1.6; }
/* 趋势预测：演示按钮与示例数据标记 */
.fc-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f4f6f5; }
.fc-demo {
  font-size: 12px; color: #6e6e73; background: #fff; border: 1px solid #e8e8ed;
  border-radius: 999px; padding: 5px 14px; cursor: pointer; transition: .16s;
}
.fc-demo:hover { color: #1f7a44; border-color: rgba(52,168,83,.35); background: rgba(52,168,83,.04); }
.fc-demo-tip { font-size: 11px; color: #b0b0b5; }
.fc-badge.demo { color: #b8860b; background: rgba(184,134,11,.09); border-color: rgba(184,134,11,.28); }
/* ============================================================================
 * 15. 移动端适配（<= 768px）
 * 目标：调研现场用手机也能顺畅使用（村干部多数用手机，不用电脑）
 * 桌面端完全不受影响：所有规则都包在 max-width 媒体查询内
 * ========================================================================== */
.m-hamburger, .m-mask { display: none; }

@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* ---- 侧边栏：固定栏 → 抽屉 ---- */
  .sidebar {
    width: 272px;
    max-width: 84vw;
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
    z-index: 1001;
    box-shadow: 2px 0 24px rgba(0, 0, 0, .16);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.m-open { transform: translateX(0); }

  /* ---- 主区域占满 ---- */
  .main {
    margin-left: 0;
    padding: 0 12px 48px;
    min-height: 100vh;
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }

  /* ---- 汉堡按钮 ---- */
  .m-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid #e6e8e7;
    color: #1a1a1c;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .m-hamburger:active { background: #f2f4f3; }

  /* ---- 遮罩 ---- */
  .m-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .38);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s;
  }
  .m-mask.m-show { opacity: 1; pointer-events: auto; }

  /* ---- 顶栏 ---- */
  .topbar { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
  .topbar .search { display: none; }        /* 手机屏幕窄，隐藏全局搜索 */
  .breadcrumb {
    font-size: 12.5px;
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .user { font-size: 11.5px; white-space: nowrap; flex: 0 0 auto; }

  /* ---- 内容区 ---- */
  #content { padding-top: 12px; }
  .page-title, #content > h2 { font-size: 17px !important; }

  /* ---- 面板与网格：一律单列 ---- */
  .panel { padding: 14px; border-radius: 12px; }
  .grid-2 { grid-template-columns: 1fr !important; gap: 14px; }

  /* ---- 统计卡片：两列（<=420px 时单列） ---- */
  .cards { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .stat-card { padding: 12px; border-radius: 12px; }
  .stat-card .value, .stat-card .num { font-size: 20px; }

  /* ---- 表格：横向滚动，不压缩 ---- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 600px; }

  /* ---- 智能工作台 / 智能检索 ---- */
  .ai-page, .ws-page { height: auto !important; min-height: calc(100vh - 112px); }
  .ws-wrap { max-width: 100%; }
  .ws-hero { padding: 26px 0 18px; }
  .ws-hero-box { flex-direction: column; gap: 10px; }
  .ws-go { padding: 12px 0; }
  .ai-input-row, .ai-form-row, .ai-toolbar { flex-direction: column; }

  /* ---- 趋势预测等区块 ---- */
  .fc-wrap { padding: 14px; }
  .fc-chart { height: 220px; }

  /* ---- 触控目标放大（中老年用户友好） ---- */
  .nav-item, .btn, button { min-height: 40px; }
}

@media (max-width: 420px) {
  .cards { grid-template-columns: 1fr !important; }
  .m-hamburger { width: 36px; height: 36px; }
  .user { display: none; }                  /* 极窄屏隐藏用户名，保留面包屑 */
}

/* ============================================================================
 * 16. 移动端二次加固（2026-10-19）
 *
 * 用户反馈（手机竖屏）：
 *   ① 页面整个变成黑底白字（绿色按钮刺眼）—— 手机深色模式把白底页面强制反色了；
 *   ② 智能检索/智能工作台内容看不全，而且手指上下滑不动；
 *   ③ 顶部"搜索/清空"按钮被挤成两行竖排；底部旧版切换器浮层压住正文。
 *
 * 对应策略：
 *   ① head 里加 color-scheme meta（build_frontends.py）+ :root{color-scheme:light} 双保险；
 *   ② 手机上放弃"页面内小滚动区"方案，改为整页自然滚动（嵌套滚动在部分手机浏览器
 *      手势会失效，而且 100vh 在带地址栏的手机上偏大，导致底部被裁 + 滑不动）；
 *      智能工作台的输入框改为 sticky 贴底，不影响使用；
 *   ③ 按钮 nowrap + 不收缩；旧版切换器一律隐藏；底部留出安全区空间。
 *
 * 全部规则包在 max-width:768px 里，桌面端完全不受影响。
 * ========================================================================== */
@media (max-width: 768px) {
  html, body { height: auto; min-height: 100%; overflow-y: auto; overflow-x: hidden; }
  body { -webkit-overflow-scrolling: touch; }
  .main { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }

  /* ---- 智能检索：整页滚动，取消内部滚动条 ---- */
  .ws-page { height: auto !important; min-height: 0 !important; overflow: visible; }
  .ws-scroll { flex: 0 0 auto; min-height: 0; max-height: none; overflow: visible; }
  .ws-wrap { max-width: 100%; }
  .ws-bar-inner { flex-wrap: nowrap; gap: 8px; }
  .ws-input { min-width: 0; }
  .ws-go, .ws-clear { flex: 0 0 auto; white-space: nowrap; padding: 0 16px; }
  .ws-q { max-width: 88%; }
  .ws-body { padding: 14px; }
  .ws-md table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ---- 智能工作台：整页滚动 + 输入框贴底 ---- */
  .ai-page { height: auto !important; min-height: 0 !important; overflow: visible; }
  .ai-scroll { flex: 0 0 auto; min-height: 0; max-height: none; overflow: visible; }
  .ai-wrap { max-width: 100%; }
  .ai-foot {
    position: sticky; bottom: 0; z-index: 30;
    padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(251, 251, 253, 0) 0%, #fbfbfd 22%);
  }
  /* 手机上不再锁整页滚动：锁住后一旦状态没复位，表现就是"页面滑不动" */
  body.ai-lock { overflow-y: auto !important; }
  body.ai-lock .main {
    height: auto; overflow: visible;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .ai-head { flex-wrap: wrap; gap: 8px; }
  .ai-head-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .ai-hero h2 { font-size: 20px; }
  .ai-hlogo { width: 48px; height: 48px; border-radius: 15px; font-size: 24px; }
  .ai-msg.bot .ai-body { padding: 14px 15px; }
  .ai-msg.user .ai-body { padding: 12px 14px; }
  .ai-md table { display: block; overflow-x: auto; }
  .ai-card { padding: 14px; }

  /* ---- 底部浮层：旧版本切换器隐藏；悬浮球避开安全区 ---- */
  #verSwitch { display: none !important; }
  #aiFab {
    right: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 48px; height: 48px; font-size: 20px;
  }

  /* ---- 顶栏：用户名过长时省略，别把面包屑挤没 ---- */
  .topbar { min-height: 46px; }
  #agriUserChip {
    font-size: 11.5px !important; gap: 5px !important; padding-left: 6px !important;
    max-width: 46vw; overflow: hidden;
  }
  #agriUserChip > span { overflow: hidden; text-overflow: ellipsis; }
  #agriUserChip .agri-role { display: none; }

  /* ---- 防止卡片/表格把页面撑宽（撑宽后向右溢出，看起来"显示不全"） ---- */
  #content, .panel, .ws-body, .ai-body, .fc-wrap { min-width: 0; max-width: 100%; }
  .ws-md, .ai-md { overflow-wrap: anywhere; }
}

/* ============================================================================
 * 17. 苹果极简风排版升级（2026-10-19）
 *
 * 用户反馈（手机竖屏）：标题被按钮挤成一列字、卡片过大、emoji 图标不精致、
 * 产品特色没体现。这一段做三件事：
 *   ① 数据卡片的 emoji 图标 → 全站统一的线性 SVG 图标（放在浅绿圆角底上）；
 *   ② 首页新增「产品特色」标签条（数据不出域 / 全链路可溯源 / 手机随拍随传 / 趋势可预测）；
 *   ③ 手机端整体排版重排：标题区竖排、按钮等分不换行、卡片两列、留白与字号收敛，
 *      品牌主视觉压成一张紧凑的"产品名片"，不再是占满一屏的大横幅。
 * 桌面端只受 ① ② 影响（图标更精致、多一条特色标签），其余不变。
 * ========================================================================== */

/* ---- 17.1 数据卡片图标：浅绿底 + 线性 SVG（替换 emoji） ---- */
.stat-card .stat-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(52, 168, 83, .08); color: #1f7a44; font-size: 0; opacity: 1;
}
.stat-card .stat-ico svg { width: 16px; height: 16px; display: block; }

/* ---- 17.2 产品特色标签条 ---- */
.prod-feats { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 20px; }
.pf {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #1f7a44; letter-spacing: .1px;
  background: rgba(52, 168, 83, .06);
  border: 1px solid rgba(52, 168, 83, .14);
  border-radius: 999px; padding: 5px 12px;
}
.pf svg { width: 13px; height: 13px; flex: 0 0 auto; display: block; }

/* ---- 17.3 手机端排版重排 ---- */
@media (max-width: 768px) {
  /* 标题区：竖排，标题不再被按钮挤成一列字；按钮等分一行不换行 */
  .page-title { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .page-title h2 { font-size: 20px !important; line-height: 1.35; letter-spacing: -.3px; }
  .page-title .desc { font-size: 12px; line-height: 1.7; margin-top: 5px; }
  .page-title .pt-actions { display: flex; flex-wrap: nowrap; gap: 8px; width: 100%; }
  .page-title .pt-actions .btn {
    flex: 1 1 0; min-width: 0; padding: 9px 6px; font-size: 12px;
    white-space: nowrap; display: inline-flex; align-items: center;
    justify-content: center; gap: 5px; border-radius: 999px;
  }
  .page-title .pt-actions .btn svg { width: 14px; height: 14px; flex: 0 0 auto; }

  /* 品牌主视觉：压成紧凑"产品名片"，保留水墨气质但不占满一屏 */
  .brand-hero { padding: 18px 16px 14px; border-radius: 20px; margin-bottom: 16px; }
  .bh-watermark { right: -80px; bottom: -140px; opacity: .3; }
  .bh-ring { left: -190px; top: -220px; opacity: .22; }
  .bh-head { margin-bottom: 10px; }
  .bh-title { font-size: 11px; letter-spacing: 2px; }
  .bh-quote { font-size: 18px; line-height: 1.5; letter-spacing: .8px; margin-bottom: 6px; }
  .bh-desc { font-size: 11.5px; line-height: 1.7; margin-bottom: 12px; }
  .bh-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .bh-pillar { padding: 9px 10px; gap: 8px; border-radius: 13px; }
  .bh-word { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; font-size: 16px; }
  .bh-pillar-txt { font-size: 10px; gap: 1px; line-height: 1.45; }
  .bh-pillar-txt b { font-size: 11px; letter-spacing: 1.5px; }
  .bh-foot { margin-top: 12px; padding-top: 10px; gap: 6px; flex-direction: column; align-items: flex-start; }
  .bh-asset { font-size: 11px; letter-spacing: 3px; }
  .bh-slogan { font-size: 9.5px; text-align: left; }

  /* 顶部信息条：两行卡片式，点击区域更大 */
  .ti-bar { padding: 10px 12px; border-radius: 16px; gap: 0; }
  .ti-weather { flex: 1 1 100%; padding: 2px 4px 9px; }
  .ti-policy { flex: 1 1 100%; padding: 9px 4px 2px; border-top: 1px solid #f2f4f3; }
  .ti-sep { display: none; }

  /* 产品特色标签：手机端横向滑动，不换行堆高 */
  .prod-feats {
    flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    margin: 0 0 16px; padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .prod-feats::-webkit-scrollbar { display: none; }
  .pf {
    flex: 0 0 auto; font-size: 11.5px; padding: 5px 10px; gap: 5px;
    background: #fff; border-color: var(--border-soft);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  }

  /* 数据卡片：两列，字号收敛（苹果风格的信息密度） */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 13px 13px 11px; border-radius: 16px; }
  .stat-card .label { font-size: 11px; letter-spacing: -.1px; }
  .stat-card .value { font-size: 20px; letter-spacing: -.5px; margin: 7px 0 4px; }
  .stat-card .trend { font-size: 10.5px; }
  .stat-card .stat-ico { width: 24px; height: 24px; flex-basis: 24px; border-radius: 7px; }
  .stat-card .stat-ico svg { width: 14px; height: 14px; }

  /* 面板 / 图表：圆角与留白统一，图表降高避免一屏只放得下一张 */
  .panel { padding: 14px; border-radius: 16px; margin-bottom: 16px; }
  .panel h3 { font-size: 14px; margin-bottom: 12px; padding-bottom: 10px; }
  .chart-box { height: 220px; }
  .fc-chart { height: 190px; }
  .fc-actions { gap: 8px; }
  .fc-demo { flex: 1 1 auto; }
  .feature-list { grid-template-columns: 1fr; }
  .feature { padding: 13px 14px; }

  /* 表格：保持横向滑动，但圆角裁切更干净 */
  .table-wrap { border-radius: 12px; }
  table { font-size: 12px; }
  thead th { padding: 9px 10px; font-size: 11px; }
  tbody td { padding: 11px 10px; }
}

@media (max-width: 360px) {
  .cards { grid-template-columns: 1fr !important; }
  .page-title .pt-actions .btn { font-size: 11px; padding: 8px 5px; }
  .page-title .pt-actions .btn svg { display: none; }
}

/* ============================================================================
 * 18. 数据来源角标 + 业务台账入口（真实数据）
 *
 * 目的：把"示例数据"和"真实数据"一眼区分开，并给用户一个明确的台账入口。
 *   · 首页 / 分类页标题旁的角标：绿色=真实数据、橙色=示例数据；
 *   · 分类页提示条：说明本页为什么还是示意数据、去哪导入；
 *   · 「资料上传」页的台账入口行：模板下载 + 当前导入状态。
 * ========================================================================== */
.data-src-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500; letter-spacing: .2px;
  vertical-align: 3px; white-space: nowrap;
}
.data-src-badge.demo {
  background: rgba(224, 163, 62, .12); color: #965e12;
  border: 1px solid rgba(224, 163, 62, .3);
}
.data-src-badge.real {
  background: rgba(52, 168, 83, .10); color: #1f7a44;
  border: 1px solid rgba(52, 168, 83, .25);
}

.ledger-note {
  margin: -8px 0 18px; padding: 10px 14px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.75; color: #8a5a00;
  background: #fffaf0; border: 1px solid #f4e3cc;
}
.ledger-note b { color: #965e12; }

.lg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px; border-bottom: 1px dashed var(--border-soft);
}
.lg-row:last-child { border-bottom: 0; }
.lg-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  background: rgba(52, 168, 83, .08); color: #1f7a44;
  display: flex; align-items: center; justify-content: center;
}
.lg-main { flex: 1 1 auto; min-width: 0; }
.lg-name { font-size: 13px; font-weight: 600; color: var(--text); }
.lg-file { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.lg-state { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.lg-state.ok { color: #1f7a44; font-weight: 500; }
.lg-state.err { color: #c0392b; }
.lg-tip { margin-top: 12px; font-size: 11.5px; color: var(--muted-2); line-height: 1.9; }
.lg-tip code { background: #f4f6f5; border-radius: 5px; padding: 1px 5px; font-size: 11px; color: #1f7a44; }

@media (max-width: 768px) {
  .data-src-badge { font-size: 10.5px; padding: 0 7px; margin-left: 6px; }
  .ledger-note { font-size: 12px; margin: -4px 0 14px; }
  .lg-row { padding: 10px 0; gap: 8px; }
  .lg-file { display: none; }
  .lg-state { font-size: 11px; }
  .lg-tip { font-size: 11px; }
}

/* ============================================================================
 * 19. AI 数据中台（modules/ai-ingest.js）
 *
 * 视觉原则（和原界面不冲突）：
 *   · 只用全站已有设计令牌：白卡、16px 圆角、浅边框 #e8e8ed、麦田绿 #34a853、
 *     灰阶文字、克制的阴影；不引入第二套配色/字体。
 *   · 交互块按"投喂→识别→确认→监控→预测"节奏排布，每个面板只做一件事；
 *     状态用胶囊/细进度条表达，不用大色块，保持苹果极简的留白感。
 * ========================================================================== */

/* ---- 顶部：引擎状态 + KPI ---- */
.aix-engine {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); background: #fff;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; box-shadow: var(--sh-1); white-space: nowrap;
}
.aix-engine .aix-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #b0b0b6; display: inline-block;
}
.aix-engine.on { color: #1f7a44; border-color: rgba(52, 168, 83, .25); }
.aix-engine.on .aix-dot { background: var(--primary); box-shadow: 0 0 0 3px rgba(52, 168, 83, .15); }

.aix-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.aix-kpi {
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 13px 15px; box-shadow: var(--sh-1);
}
.aix-kpi-ico {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(52, 168, 83, .08); color: #1f7a44;
}
.aix-kpi-label { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.aix-kpi-value { font-size: 20px; font-weight: 600; letter-spacing: -.4px; color: var(--text); line-height: 1.25; }

.aix-banner {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; line-height: 1.75; color: #40624f;
  background: rgba(52, 168, 83, .055); border: 1px solid rgba(52, 168, 83, .16);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 16px;
}
.aix-banner-ico { flex: 0 0 auto; margin-top: 2px; }

.aix-grid2 { display: grid; grid-template-columns: 1.08fr .92fr; gap: 16px; }
.aix-grid2 > .panel { margin-bottom: 16px; }

/* ---- 投喂区 ---- */
.aix-drop {
  border: 1.5px dashed #d7e5dc; border-radius: 14px; padding: 26px 16px;
  text-align: center; cursor: pointer; background: linear-gradient(180deg, #fbfdfb, #f6faf7);
  transition: .2s var(--ease);
}
.aix-drop:hover, .aix-drop.drag {
  border-color: var(--primary); background: linear-gradient(180deg, #f4fbf6, #eef8f1);
}
.aix-drop-ico { color: #1f7a44; margin-bottom: 4px; }
.aix-drop-t { font-size: 13.5px; font-weight: 600; color: var(--text); }
.aix-drop-t u { color: #1f7a44; text-underline-offset: 3px; }
.aix-drop-s { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.aix-paste-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 0 8px; font-size: 12px; color: var(--muted);
}
.aix-examples a { color: #1f7a44; text-decoration: none; }
.aix-examples a:hover { text-decoration: underline; }
.aix-textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 96px;
  border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
  font-family: inherit; font-size: 13px; line-height: 1.75; color: var(--text);
  background: #fbfcfb; outline: none; transition: .18s var(--ease);
}
.aix-textarea:focus {
  border-color: rgba(52, 168, 83, .45); background: #fff;
  box-shadow: 0 0 0 3px rgba(52, 168, 83, .10);
}
.aix-feed-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.aix-feed-hint { font-size: 11px; color: var(--muted-2); }

/* ---- 识别结果 ---- */
.aix-result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.aix-result-meta { font-size: 11.5px; color: var(--muted); }
.aix-result-summary { font-size: 13px; line-height: 1.8; color: var(--text-2); }
.aix-conf-bar { height: 5px; border-radius: 99px; background: #eef1ef; margin: 10px 0 12px; overflow: hidden; }
.aix-conf-bar i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary)); }
.aix-warns { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.aix-warn {
  display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; line-height: 1.7;
  color: #8a5a00; background: #fffaf0; border: 1px solid #f4e3cc; border-radius: 9px; padding: 6px 10px;
}
.aix-preview { border-top: 1px dashed var(--border-soft); padding-top: 10px; }
.aix-preview-t { font-size: 11px; color: var(--muted-2); margin-bottom: 7px; }
.aix-preview-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.aix-chip {
  display: inline-flex; align-items: baseline; gap: 4px; max-width: 100%;
  font-size: 11.5px; color: var(--text-2); background: #f7f9f8;
  border: 1px solid var(--border-soft); border-radius: 7px; padding: 2px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aix-chip b { font-weight: 500; color: var(--muted); font-size: 10.5px; }
.aix-result-foot { margin-top: 12px; }

/* ---- 待确认记录 ---- */
.aix-rec-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.aix-rec-count { font-size: 12.5px; color: var(--muted); }
.aix-rec-count b { color: #1f7a44; font-size: 15px; }
.aix-rec-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.aix-tbtn {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 999px; font-size: 12px; padding: 6px 14px; cursor: pointer;
  font-family: inherit; transition: .16s var(--ease); white-space: nowrap;
}
.aix-tbtn:hover { border-color: #d8d8de; color: var(--text); }
.aix-tbtn.primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 16px rgba(52, 168, 83, .2);
}
.aix-tbtn.primary:hover { background: var(--primary-light); border-color: var(--primary-light); }

.aix-rec-group { margin-bottom: 14px; }
.aix-rec-gtitle { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.aix-rec-gcount { font-size: 11.5px; color: var(--muted-2); }
.aix-rec {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 13px;
  background: #fcfdfc; margin-bottom: 8px;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.aix-rec:hover { border-color: #e0e7e3; background: #fff; }
.aix-check { flex: 0 0 auto; margin-top: 2px; }
.aix-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.aix-rec-main { flex: 1 1 auto; min-width: 0; }
.aix-rec-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.aix-rec-id { font-size: 11px; color: var(--muted-2); }
.aix-rec-time { font-size: 11px; color: var(--muted-2); }
.aix-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.aix-issues { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.aix-issue {
  font-size: 11px; color: #b45309; background: rgba(224, 163, 62, .12);
  border: 1px solid rgba(224, 163, 62, .26); border-radius: 6px; padding: 1px 7px;
}
.aix-rec-act { display: flex; gap: 6px; flex: 0 0 auto; }
.aix-mini {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 8px; font-size: 11.5px; padding: 4px 10px; cursor: pointer;
  font-family: inherit; transition: .15s;
}
.aix-mini:hover { border-color: #d8d8de; color: var(--text); }
.aix-mini.ok { border-color: rgba(52, 168, 83, .4); color: #1f7a44; background: rgba(52, 168, 83, .06); }

/* ---- 监控 / 风险 ---- */
.aix-sub-t {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--text-2); margin: 2px 0 9px;
}
.aix-sub-t + .aix-alerts { margin-bottom: 14px; }
.aix-sub-n {
  font-size: 10.5px; font-weight: 500; color: #1f7a44;
  background: rgba(52, 168, 83, .10); border-radius: 999px; padding: 0 7px;
}
.aix-alerts { display: flex; flex-direction: column; gap: 6px; }
.aix-alert {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; line-height: 1.7; color: var(--text-2);
  padding: 6px 10px; border-radius: 9px; background: #fbfcfb; border: 1px solid var(--border-soft);
}
.aix-alert-txt { flex: 1 1 auto; min-width: 0; }
.aix-alert-target { flex: 0 0 auto; font-size: 11px; color: var(--muted-2); }

.aix-ranks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.aix-rank-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.aix-rank-bar { height: 5px; border-radius: 99px; background: #eef1ef; margin: 6px 0 5px; overflow: hidden; }
.aix-rank-bar i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary)); }
.aix-rank-bar i.warn { background: linear-gradient(90deg, #f0b429, #d97706); }
.aix-rank-bar i.danger { background: linear-gradient(90deg, #f87171, #e5484d); }
.aix-rank-reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.aix-reason {
  font-size: 10.5px; color: var(--muted); background: #f5f6f6;
  border: 1px solid var(--border-soft); border-radius: 6px; padding: 0 6px;
}
.aix-expiry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.aix-exp-cell {
  text-align: center; background: #fbfcfb; border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 10px 6px;
}
.aix-exp-cell b { display: block; font-size: 19px; font-weight: 600; color: #1f7a44; line-height: 1.3; }
.aix-exp-cell span { font-size: 11px; color: var(--muted); }

/* ---- 预测 / 历史 ---- */
.aix-table-wrap { overflow-x: auto; border-radius: 12px; }
.aix-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.aix-table th {
  text-align: left; font-size: 11px; font-weight: 500; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.aix-table td { padding: 9px 10px; color: var(--text-2); border-bottom: 1px solid var(--border-soft); }
.aix-table tr:last-child td { border-bottom: 0; }
.aix-table td.neg { color: #c0392b; font-weight: 600; }
.aix-table td.pos { color: #1f7a44; font-weight: 600; }
.aix-file { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aix-fc-risk {
  margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: #1f7a44;
  background: rgba(52, 168, 83, .06); border: 1px solid rgba(52, 168, 83, .18);
  border-radius: 10px; padding: 9px 12px;
}
.aix-fc-risk-t { font-weight: 600; margin-right: 6px; }
.aix-fc-risk.high { color: #c0392b; background: #fdf2f1; border-color: #f5d2ce; }
.aix-fc-risk.mid { color: #965e12; background: #fffaf0; border-color: #f4e3cc; }
.aix-fc-caveat { margin-top: 10px; font-size: 11px; color: var(--muted-2); line-height: 1.7; }

/* ---- 空状态 / 提示 ---- */
.aix-empty { text-align: center; padding: 26px 12px; }
.aix-empty-ico { display: inline-flex; margin-bottom: 8px; }
.aix-empty-t { font-size: 13px; color: var(--muted); font-weight: 500; }
.aix-empty-h { font-size: 11.5px; color: var(--muted-2); line-height: 1.8; margin-top: 6px; }

.aix-msg {
  display: none; margin: 0 0 14px; padding: 9px 13px; border-radius: 11px;
  font-size: 12.5px; line-height: 1.7;
  background: #f4fbf6; color: #1f7a44; border: 1px solid #d8ecdf;
}
.aix-msg.on { display: block; }
.aix-msg.warn { background: #fffaf0; color: #b45309; border-color: #f6e3bf; }
.aix-msg.err { background: #fdf2f1; color: #c0392b; border-color: #f5d2ce; }

/* ---- 手机端：单列、卡片化 ---- */
@media (max-width: 768px) {
  .aix-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .aix-kpi { padding: 11px 12px; border-radius: 14px; }
  .aix-kpi-value { font-size: 18px; }
  .aix-grid2 { grid-template-columns: 1fr; gap: 14px; }
  .aix-drop { padding: 20px 12px; }
  .aix-rec-toolbar { align-items: flex-start; flex-direction: column; }
  .aix-rec-actions { width: 100%; }
  .aix-tbtn { flex: 1 1 auto; text-align: center; }
  .aix-rec { padding: 9px 10px; }
  .aix-rec-act { flex-direction: column; }
  .aix-mini { padding: 4px 9px; }
  .aix-paste-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .aix-feed-foot { flex-direction: column; align-items: stretch; }
  .aix-engine { font-size: 11px; padding: 4px 10px; }
}

/* ============================================================================
 * 20. 侧边栏导航：分组折叠 + 搜索（2026-10-19）
 *
 * 背景：原来 6 个分组 30 多个入口全部平铺，手机/小屏上翻半天找不到。
 * 设计（维持原风格与功能不变）：
 *   · 功能一个不少，只是分组默认可折叠；首次进入只展开「总览 + 智能工作台」，
 *     当前页所在分组自动展开，切页也会跟着展开并滚到可视区；
 *   · 折叠状态记在 localStorage，下次进来还是你上次的样子；
 *   · 顶部加一个极简搜索框，输入即筛，回车直达第一个结果；
 *   · 右上角一键「收起全部 / 展开全部」。
 * 视觉延续原侧边栏：同字号层级、同灰色阶、同麦田绿激活色，仅改交互密度。
 * ========================================================================== */
.nav-tools {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px 10px;
}
.nav-search {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 9px; height: 30px; color: var(--muted);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.nav-search:focus-within {
  border-color: rgba(52, 168, 83, .45); color: #1f7a44;
  box-shadow: 0 0 0 3px rgba(52, 168, 83, .10);
}
.nav-search svg { width: 13px; height: 13px; flex: 0 0 auto; }
.nav-search input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 12px; color: var(--text); padding: 0;
}
.nav-search input::placeholder { color: var(--muted-2); }
.nav-toggle {
  width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center;
  justify-content: center; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; color: var(--muted); cursor: pointer; padding: 0;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.nav-toggle svg { width: 14px; height: 14px; }
.nav-toggle:hover { color: #1f7a44; border-color: rgba(52, 168, 83, .28); }

/* ---- 分组：标题可点、chevron 指示、折叠动画 ---- */
#navContainer .nav-group { margin: 2px 8px; }
#navContainer .nav-group.hidden { display: none; }
.nav-group-head {
  width: 100%; display: flex; align-items: center; gap: 6px;
  padding: 7px 9px; margin: 0; border: 0; border-radius: 9px;
  background: transparent; cursor: pointer; text-align: left;
  font-family: inherit; color: var(--muted-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-group-head:hover { background: rgba(0, 0, 0, .035); color: var(--text-2); }
.nav-group.open > .nav-group-head { color: #6f7d75; }
.ng-chev { display: inline-flex; flex: 0 0 auto; transition: transform .2s var(--ease); }
.ng-chev svg { width: 12px; height: 12px; }
.nav-group.open > .nav-group-head .ng-chev { transform: rotate(90deg); }
.ng-title { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; line-height: 1.4; }
.ng-count {
  margin-left: auto; font-size: 9.5px; font-weight: 500; color: var(--muted-2);
  background: #f2f4f3; border-radius: 999px; padding: 0 6px; line-height: 1.7;
}
.nav-items { display: none; padding: 1px 0 4px; }
.nav-group.open > .nav-items { display: block; animation: navIn .18s ease; }
@keyframes navIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
#navContainer .nav-item { margin: 1px 2px; padding: 8px 10px; border-radius: 9px; }
#navContainer .nav-item .ico { width: 20px; flex: 0 0 20px; text-align: center; font-size: 14px; }
.nav-empty {
  padding: 18px 14px; text-align: center; font-size: 11.5px;
  color: var(--muted-2); line-height: 1.7;
}
#navContainer { padding-bottom: 14px; }

/* 手机端：抽屉里同样可折叠；搜索框加大一点方便点 */
@media (max-width: 768px) {
  .nav-tools { padding: 2px 10px 8px; }
  .nav-search { height: 34px; border-radius: 11px; }
  .nav-search input { font-size: 13px; }
  .nav-toggle { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }
  .nav-group-head { padding: 9px 10px; }
  #navContainer .nav-item { padding: 9px 10px; }
}

/* ============================================================================
 * 21. 系统自检（modules/system-check.js）
 *
 * 沿用全站白卡 / 16~20px 圆角 / 浅边框 / 麦田绿 / 线性图标。
 * 结构：健康分大卡（左分数、右统计）→ 检查明细 + 数据体检两栏 → 处理建议。
 * 状态只用三色语义（绿=正常、金=关注、红=异常），与全站预警配色一致。
 * ========================================================================== */
.sys-hero {
  display: flex; align-items: center; gap: 26px;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); padding: 22px 26px; margin-bottom: 18px;
  box-shadow: var(--sh-1); position: relative; overflow: hidden;
}
.sys-hero::after {
  content: ""; position: absolute; right: -36px; bottom: -46px; width: 168px; height: 168px;
  border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(52, 168, 83, .10), transparent 68%);
  pointer-events: none;
}
.sys-hero.warn::after { background: radial-gradient(circle at 30% 30%, rgba(224, 163, 62, .14), transparent 68%); }
.sys-hero.danger::after { background: radial-gradient(circle at 30% 30%, rgba(229, 72, 77, .12), transparent 68%); }
.sys-score { flex: 0 0 auto; text-align: center; width: 108px; }
.sys-score-num {
  font-size: 46px; font-weight: 600; letter-spacing: -2px; line-height: 1.05; color: #1f7a44;
  font-variant-numeric: tabular-nums;
}
.sys-hero.warn .sys-score-num { color: #b45309; }
.sys-hero.danger .sys-score-num { color: #c0392b; }
.sys-score-txt { font-size: 11.5px; color: var(--muted); margin-top: 4px; letter-spacing: 2px; }
.sys-hero-main { flex: 1 1 auto; min-width: 0; position: relative; z-index: 1; }
.sys-hero-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sys-badge {
  display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.sys-badge.ok { background: rgba(52, 168, 83, .12); color: #1f7a44; }
.sys-badge.warn { background: rgba(224, 163, 62, .16); color: #965e12; }
.sys-badge.danger { background: rgba(229, 72, 77, .12); color: #c0392b; }
.sys-hero-time { font-size: 11.5px; color: var(--muted-2); }
.sys-hero-stats { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.sys-stat { font-size: 12.5px; color: var(--muted); }
.sys-stat b { font-size: 17px; font-weight: 600; margin-left: 2px; font-variant-numeric: tabular-nums; }
.sys-stat.ok b { color: #1f7a44; }
.sys-stat.warn b { color: #b45309; }
.sys-stat.danger b { color: #c0392b; }
.sys-hero-tip { font-size: 11px; color: var(--muted-2); margin-top: 10px; line-height: 1.7; }

.sys-grid2 { display: grid; grid-template-columns: 1.12fr .88fr; gap: 16px; }
.sys-grid2 > .panel { margin-bottom: 16px; }
.sys-cat {
  font-size: 10.5px; font-weight: 600; letter-spacing: 1.3px; color: var(--muted-2);
  margin: 12px 0 4px;
}
.sys-cat:first-child { margin-top: 0; }
.sys-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed var(--border-soft); }
.sys-check:last-child { border-bottom: 0; }
.sys-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; margin-top: 7px; }
.sys-dot.ok { background: var(--primary); box-shadow: 0 0 0 3px rgba(52, 168, 83, .12); }
.sys-dot.warn { background: #e0a33e; box-shadow: 0 0 0 3px rgba(224, 163, 62, .14); }
.sys-dot.danger { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }
.sys-check-main { flex: 1 1 auto; min-width: 0; }
.sys-check-name { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sys-check-detail { font-size: 12px; color: var(--text-2); line-height: 1.7; margin-top: 2px; word-break: break-all; }
.sys-check-hint { font-size: 11.5px; color: #8a5a00; background: #fffaf0; border: 1px solid #f4e3cc; border-radius: 8px; padding: 4px 9px; margin-top: 6px; line-height: 1.7; }
.sys-tag { display: inline-flex; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 500; line-height: 1.7; }
.sys-tag.ok { background: rgba(52, 168, 83, .10); color: #1f7a44; }
.sys-tag.warn { background: rgba(224, 163, 62, .16); color: #965e12; }
.sys-tag.danger { background: rgba(229, 72, 77, .12); color: #c0392b; }

.sys-q-summary { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.sys-q-summary b { font-size: 24px; font-weight: 600; color: #1f7a44; letter-spacing: -1px; margin-right: 2px; }
.sys-q-row { padding: 9px 0; border-bottom: 1px dashed var(--border-soft); }
.sys-q-row:last-child { border-bottom: 0; }
.sys-q-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.sys-q-top small { color: var(--muted-2); margin-left: 6px; font-size: 11px; }
.sys-q-score { font-size: 15px; font-weight: 600; color: #1f7a44; font-variant-numeric: tabular-nums; }
.sys-q-score.warn { color: #b45309; }
.sys-q-score.danger { color: #c0392b; }
.sys-q-na { font-size: 11.5px; color: var(--muted-2); }
.sys-q-bar { height: 5px; border-radius: 99px; background: #eef1ef; margin: 7px 0 5px; overflow: hidden; }
.sys-q-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary-light), var(--primary)); }
.sys-q-bar i.warn { background: linear-gradient(90deg, #f0b429, #d97706); }
.sys-q-bar i.danger { background: linear-gradient(90deg, #f87171, #e5484d); }
.sys-q-issues { display: flex; flex-wrap: wrap; gap: 5px; }
.sys-q-issue { font-size: 11px; color: #b45309; background: rgba(224, 163, 62, .12); border: 1px solid rgba(224, 163, 62, .26); border-radius: 6px; padding: 1px 7px; }
.sys-q-ok { font-size: 11px; color: #1f7a44; }
.sys-allgood { font-size: 13px; color: #1f7a44; display: flex; align-items: center; gap: 8px; padding: 6px 2px; }
.sys-advice-list { display: flex; flex-direction: column; gap: 8px; }
.sys-advice { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; font-size: 12.5px; padding: 8px 10px; background: #fbfcfb; border: 1px solid var(--border-soft); border-radius: 10px; }
.sys-advice-name { font-weight: 600; color: var(--text); }
.sys-advice-hint { color: var(--muted); font-size: 12px; }
.sys-empty { text-align: center; padding: 24px 10px; }
.sys-empty-ico { display: inline-flex; margin-bottom: 8px; }
.sys-empty-t { font-size: 13px; color: var(--muted); }
.sys-empty-h { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.8; }
.sys-msg {
  display: none; margin: 0 0 14px; padding: 9px 13px; border-radius: 11px; font-size: 12.5px;
  background: #f4fbf6; color: #1f7a44; border: 1px solid #d8ecdf;
}
.sys-msg.on { display: block; }
.sys-msg.err { background: #fdf2f1; color: #c0392b; border-color: #f5d2ce; }

@media (max-width: 768px) {
  .sys-hero { gap: 16px; padding: 16px; border-radius: 18px; align-items: flex-start; }
  .sys-score { width: 74px; }
  .sys-score-num { font-size: 34px; }
  .sys-hero-stats { gap: 12px; }
  .sys-grid2 { grid-template-columns: 1fr; gap: 14px; }
  .sys-check-detail { font-size: 11.5px; }
}

/* ============================================================================
 * 22. 端云协同 · AI 脱敏（AI 数据中台顶部状态卡 + 识别结果路由标签）
 * 视觉与全站一致：白卡/浅边框/麦田绿/线性图标；三种链路用同一套语义色：
 *   本地=绿、脱敏上云=金、云端=蓝灰（与预警三色语义区分开，避免误读）。
 * ========================================================================== */
.aix-privacy {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 14px 18px; margin-bottom: 16px;
  box-shadow: var(--sh-1);
}
.aix-pv-loading { font-size: 12px; color: var(--muted-2); padding: 6px 0; }
.aix-pv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aix-pv-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.aix-pv-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  border-radius: 999px; padding: 2px 9px;
}
.aix-pv-pill.on { color: #1f7a44; background: rgba(52, 168, 83, .10); }
.aix-pv-pill.off { color: #965e12; background: rgba(224, 163, 62, .14); }
.aix-pv-dot { width: 6px; height: 6px; border-radius: 50%; background: #b0b0b6; display: inline-block; }
.aix-pv-pill.on .aix-pv-dot { background: var(--primary); box-shadow: 0 0 0 3px rgba(52, 168, 83, .14); }
.aix-pv-pill.off .aix-pv-dot { background: #e0a33e; }
.aix-pv-policy { font-size: 11.5px; color: var(--muted); }
.aix-pv-refresh {
  margin-left: auto; border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 999px; font-size: 11px; padding: 3px 10px; cursor: pointer; font-family: inherit;
}
.aix-pv-refresh:hover { color: #1f7a44; border-color: rgba(52, 168, 83, .3); }
.aix-pv-status { font-size: 11.5px; color: var(--muted-2); line-height: 1.7; margin: 8px 0 4px; }
.aix-pv-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 10px; }
.aix-pv-stat { font-size: 11.5px; color: var(--muted); }
.aix-pv-stat b { font-size: 16px; font-weight: 600; color: var(--text); margin-right: 3px; font-variant-numeric: tabular-nums; }
.aix-pv-stat:nth-child(1) b { color: #1f7a44; }
.aix-pv-stat:nth-child(3) b { color: #b45309; }
.aix-pv-test { display: flex; gap: 8px; align-items: center; }
.aix-pv-input {
  flex: 1 1 auto; min-width: 0; height: 34px; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 11px; font-family: inherit; font-size: 12px; color: var(--text); background: #fbfcfb; outline: none;
}
.aix-pv-input:focus { border-color: rgba(52, 168, 83, .45); background: #fff; box-shadow: 0 0 0 3px rgba(52, 168, 83, .10); }
.aix-pv-out { margin-top: 10px; }
.aix-pv-detect-t { font-size: 11px; color: var(--muted-2); margin-bottom: 6px; }
.aix-pv-kind {
  display: inline-block; font-size: 11px; color: #8a5a00; background: #fffaf0;
  border: 1px solid #f4e3cc; border-radius: 6px; padding: 1px 7px; margin: 0 5px 5px 0;
}
.aix-pv-kind.none { color: #1f7a44; background: #f4fbf6; border-color: #d8ecdf; }
.aix-pv-route {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-2); background: #fbfcfb; border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 8px 11px; line-height: 1.7;
}
.aix-pv-tag {
  display: inline-flex; flex: 0 0 auto; font-size: 10.5px; font-weight: 600;
  border-radius: 999px; padding: 0 8px; line-height: 1.8; background: #eef2f0; color: #4b5563;
}
.aix-pv-tag.local { background: rgba(52, 168, 83, .12); color: #1f7a44; }
.aix-pv-tag.mask { background: rgba(224, 163, 62, .16); color: #965e12; }
.aix-pv-tag.cloud { background: #eef1f5; color: #4b5563; }
.aix-pv-result {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 10px; padding: 7px 11px; border-radius: 10px; font-size: 11.5px; line-height: 1.7;
}
.aix-pv-result.local { background: rgba(52, 168, 83, .07); border: 1px solid rgba(52, 168, 83, .18); color: #1f7a44; }
.aix-pv-result.mask { background: #fffaf0; border: 1px solid #f4e3cc; color: #8a5a00; }
.aix-pv-result.cloud { background: #f7f9fb; border: 1px solid #e7ecf2; color: #566070; }
.aix-pv-txt { flex: 1 1 auto; min-width: 0; }
.aix-pv-mask { flex: 0 0 auto; font-size: 10.5px; color: #b45309; }
.aix-pv-tips { margin-top: 8px; }
.aix-pv-tip { font-size: 11px; color: var(--muted-2); line-height: 1.8; }
.aix-pv-err { font-size: 11.5px; color: #c0392b; }

@media (max-width: 768px) {
  .aix-privacy { padding: 12px 14px; }
  .aix-pv-head { gap: 7px; }
  .aix-pv-stats { gap: 12px; }
  .aix-pv-test { flex-direction: column; align-items: stretch; }
  .aix-pv-input { width: 100%; box-sizing: border-box; }
  .aix-pv-test .aix-tbtn { flex: 0 0 auto; }
}


/* ============================================================================
 * 23. 首页顶部小组件：热讯速递 + 光影兰洋（2026-10 改版）
 *
 * 改版原因：原来两个模块是页面底部的大区块，占屏且要滚到底才看得到；
 * 现在改成首页顶部一行两个小组件（与数据看板同宽、白卡、18px 圆角、浅边框），
 * 一屏内即可看到"城镇热点 + 城镇风景"，同时不打断下面的统计与图表。
 *
 * 视觉延续全站：白卡/浅灰标题/麦田绿；相册小舞台用深色衬托照片，和苹果相册一致。
 * ========================================================================== */
.dw-row {
  display: grid; grid-template-columns: 1.06fr .94fr; gap: 16px;
  margin: 0 0 18px;
}
.dw-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); padding: 14px 18px 12px;
  box-shadow: var(--sh-1); min-width: 0; display: flex; flex-direction: column;
}
.dw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dw-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--text); min-width: 0; }
.dw-ico { display: inline-flex; }
.dw-sub { font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.dw-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.dw-badge { font-size: 10px; color: var(--muted-2); background: #f5f6f6; border-radius: 999px; padding: 1px 8px; }
.dw-icon {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--muted); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; padding: 0;
}
.dw-icon:hover { color: #1f7a44; border-color: rgba(52, 168, 83, .3); }
.dw-pub {
  border: 0; border-radius: 999px; background: var(--primary); color: #fff;
  font-family: inherit; font-size: 11px; padding: 4px 11px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(52, 168, 83, .18);
}
.dw-pub:hover { background: var(--primary-light); }

/* ---- 热讯小组件 ---- */
.dw-hot-list { flex: 1 1 auto; }
.dw-hot-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 2px;
  border-bottom: 1px dashed var(--border-soft); cursor: pointer;
  transition: background .15s var(--ease); border-radius: 6px;
}
.dw-hot-item:last-child { border-bottom: 0; }
.dw-hot-item:hover { background: #fbfcfb; }
.dw-hot-item:hover .dw-hot-name { color: #1f7a44; }
.dw-rank {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 600; color: var(--muted-2); background: #f5f6f6;
  font-variant-numeric: tabular-nums;
}
.dw-rank.top { color: #fff; background: linear-gradient(135deg, #f2a13c, #e0762a); }
.dw-hot-item:nth-child(1) .dw-rank.top { background: linear-gradient(135deg, #f26d5b, #d94a3a); }
.dw-hot-name {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--text);
  line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.dw-seed { flex: 0 0 auto; font-size: 9px; color: var(--muted-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.dw-cat { flex: 0 0 auto; font-size: 9.5px; border-radius: 4px; padding: 0 5px; line-height: 1.7; }
.dw-cat.blue { color: #0a6fd0; background: rgba(10, 132, 255, .08); }
.dw-cat.green { color: #1f7a44; background: rgba(52, 168, 83, .09); }
.dw-cat.red { color: #c0392b; background: rgba(229, 72, 77, .09); }
.dw-cat.orange { color: #965e12; background: rgba(224, 163, 62, .14); }
.dw-cat.gray { color: var(--muted); background: #f3f4f4; }
.dw-time { flex: 0 0 auto; font-size: 10px; color: var(--muted-2); }
.dw-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 7px; border-top: 1px solid var(--border-soft); margin-top: 4px; }
.dw-foot-note { font-size: 9.5px; color: var(--muted-2); }
.dw-more { border: 0; background: transparent; color: #1f7a44; font-size: 10.5px; font-family: inherit; cursor: pointer; padding: 0; }
.dw-more:hover { text-decoration: underline; }
.dw-loading, .dw-empty { padding: 16px 4px; text-align: center; font-size: 11.5px; color: var(--muted-2); }

/* ---- 相册小组件 ---- */
.dw-gal-stage {
  position: relative; flex: 1 1 auto; height: 190px; border-radius: 14px;
  overflow: hidden; background: #101613; isolation: isolate;
}
.dw-gal-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  color: rgba(255, 255, 255, .6); font-size: 11.5px;
}
.dw-slide { position: absolute; inset: 0; opacity: 0; z-index: 1; transition: opacity 1s var(--ease); }
.dw-slide.on { opacity: 1; z-index: 2; }
.dw-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); }
.dw-slide.on img { animation: dwKen 12s ease-out forwards; }
@keyframes dwKen { from { transform: scale(1.02); } to { transform: scale(1.09); } }
.dw-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 36px 14px 12px;
  background: linear-gradient(180deg, rgba(6, 12, 9, 0), rgba(6, 12, 9, .66));
  color: #fff; pointer-events: none;
}
.dw-cap-t { font-size: 14px; font-weight: 600; text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
.dw-cap-m { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 9.5px; color: rgba(255, 255, 255, .62); }
.dw-gal-del {
  position: absolute; right: 8px; top: 8px; z-index: 6; width: 22px; height: 22px;
  border-radius: 50%; border: 0; cursor: pointer; background: rgba(20, 26, 23, .45);
  color: #fff; font-size: 12px; line-height: 1; opacity: 0; transition: opacity .2s;
}
.dw-gal-stage:hover .dw-gal-del { opacity: .95; }
.dw-gal-del:hover { background: rgba(229, 72, 77, .8); }
.dw-gal-dots { display: flex; justify-content: center; gap: 5px; padding: 7px 0 2px; }
.dw-dot {
  width: 5px; height: 5px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: #d6dcd8; transition: width .22s var(--ease), background .22s;
}
.dw-dot.on { width: 14px; border-radius: 999px; background: var(--primary); }
.dw-gal-thumbs { display: flex; gap: 6px; padding-top: 6px; overflow-x: auto; }
.dw-thumb {
  flex: 0 0 46px; height: 32px; border-radius: 7px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer; background: #f2f4f3;
}
.dw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dw-thumb.on { border-color: var(--primary); }

/* ---- 热讯详情弹层 ---- */
.dw-detail { display: flex; flex-direction: column; gap: 10px; }
.dw-d-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.6; }
.dw-d-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dw-tag { font-size: 10.5px; color: var(--muted); background: #f4f5f5; border-radius: 5px; padding: 1px 7px; }
.dw-tag.pin { color: #c0392b; background: rgba(229, 72, 77, .10); }
.dw-d-src { font-size: 11px; color: var(--muted-2); }
.dw-d-sum { font-size: 13px; color: var(--text-2); line-height: 1.85; background: #fbfcfb; border-left: 2px solid rgba(52, 168, 83, .35); border-radius: 0 8px 8px 0; padding: 9px 12px; }

/* ---- 通用小弹层（发布 / 添加照片 / 详情） ---- */
.dm-overlay {
  position: fixed; inset: 0; z-index: 4000; background: rgba(12, 16, 14, .38);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: dmFade .18s ease;
}
@keyframes dmFade { from { opacity: 0; } to { opacity: 1; } }
.dm-card {
  width: 100%; max-width: 500px; max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 20px; box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
  padding: 20px 22px 16px;
}
.dm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dm-title { font-size: 16px; font-weight: 600; color: var(--text); }
.dm-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #f3f4f4; color: var(--muted); font-size: 16px; cursor: pointer; line-height: 1; }
.dm-x:hover { background: #e9ebea; }
.dm-body { padding: 12px 0 4px; }
.dm-form { display: flex; flex-direction: column; gap: 2px; }
.dm-label { font-size: 12px; color: var(--muted); margin: 8px 0 5px; }
.dm-req { color: #e5484d; margin-left: 3px; }
.dm-input, .dm-textarea, .dm-file {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border);
  border-radius: 11px; padding: 9px 12px; font-family: inherit; font-size: 13px;
  color: var(--text); background: #fbfcfb; outline: none; transition: .16s var(--ease);
}
.dm-input:focus, .dm-textarea:focus { border-color: rgba(52, 168, 83, .45); background: #fff; box-shadow: 0 0 0 3px rgba(52, 168, 83, .10); }
.dm-textarea { resize: vertical; line-height: 1.7; }
.dm-file { padding: 7px 10px; background: #fff; }
.dm-hint { font-size: 10.5px; color: var(--muted-2); line-height: 1.7; margin-top: 6px; }
.dm-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; }
.dm-cancel, .dm-ok { border-radius: 999px; font-family: inherit; font-size: 12.5px; padding: 8px 18px; cursor: pointer; }
.dm-cancel { border: 1px solid var(--border); background: #fff; color: var(--text-2); }
.dm-cancel:hover { border-color: #d8d8de; }
.dm-ok { border: 0; }
.dm-progress { height: 6px; border-radius: 99px; background: #eef1ef; overflow: hidden; margin-top: 12px; }
.dm-progress-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--primary-light), var(--primary)); transition: width .2s; }

/* ---- 手机端 ---- */
@media (max-width: 768px) {
  .dw-row { grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
  .dw-card { padding: 12px 14px 10px; border-radius: 16px; }
  .dw-title { font-size: 13.5px; gap: 6px; }
  .dw-sub { display: none; }
  .dw-hot-name { font-size: 12px; }
  .dw-time { display: none; }
  .dw-gal-stage { height: 168px; border-radius: 12px; }
  .dw-thumb { flex-basis: 40px; height: 28px; }
  .dw-cap-t { font-size: 13px; }
  .dm-overlay { padding: 0; align-items: flex-end; }
  .dm-card { max-width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; padding: 18px 16px 20px; }
}


/* ============================================================================
 * 24. 品牌区右侧照片格（光影兰洋融入首页顶部大框）
 *
 * 目标：在大框右侧"空白处"放一个独立小格子，苹果相册感：白玻璃卡 + 圆角照片 +
 * 小标题/日期 + 小圆点；不抢主标题，不突兀。左上角是品牌主张，右侧是照片墙，
 * 一柔一实，形成"治·理"与"城镇面貌"的呼应。
 * 交互：6 秒自动轮播 + 点击小图切换；admin/县农经中心有 ＋（添加）与整理入口。
 * ========================================================================== */
.brand-hero { display: flex; align-items: stretch; gap: 30px; }
.bh-main { position: relative; flex: 1 1 auto; min-width: 0; }
.bh-media { position: relative; flex: 0 0 356px; max-width: 356px; display: flex; align-items: center; z-index: 2; }

.bh-g-card {
  width: 100%; box-sizing: border-box;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(31, 122, 68, .10);
  border-radius: 18px; padding: 10px 11px 8px;
  box-shadow: 0 10px 30px rgba(15, 46, 34, .08);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.bh-g-top { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; min-height: 22px; }
.bh-g-label { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .5px; color: #1f7a44; }
.bh-g-count { font-size: 9.5px; color: #a9b3ac; }
.bh-g-tools { margin-left: auto; display: flex; gap: 4px; }
.bh-g-ico {
  width: 22px; height: 22px; border-radius: 7px; padding: 0; cursor: pointer;
  border: 1px solid rgba(31, 122, 68, .16); background: rgba(255, 255, 255, .82);
  color: #1f7a44; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s, box-shadow .18s;
}
.bh-g-ico:hover { background: #fff; box-shadow: 0 2px 8px rgba(15, 46, 34, .10); }
.bh-g-btn {
  margin-left: auto; border: 0; border-radius: 999px; background: #1f7a44; color: #fff;
  font-family: inherit; font-size: 11px; padding: 5px 12px; cursor: pointer;
}

.bh-g-grid {
  display: grid; grid-template-columns: 1.55fr .8fr;
  grid-template-rows: repeat(3, 1fr); gap: 6px; height: 198px;
}
.bh-g-main { grid-row: 1 / 4; position: relative; border-radius: 12px; overflow: hidden; background: #eef2ef; }
.bh-g-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.bh-g-slide.on { opacity: 1; }
.bh-g-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.01); transition: transform 6s ease-out; }
.bh-g-slide.on img { transform: scale(1.06); }
.bh-g-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 10px 8px; display: flex; flex-direction: column; gap: 1px;
  background: linear-gradient(180deg, transparent, rgba(8, 14, 10, .58));
  color: #fff; pointer-events: none;
}
.bh-g-cap-t { font-size: 11.5px; font-weight: 600; }
.bh-g-cap-d { font-size: 9px; color: rgba(255, 255, 255, .72); }
.bh-g-tile {
  position: relative; border: 0; padding: 0; border-radius: 9px; overflow: hidden;
  cursor: pointer; background: #eef2ef; min-height: 0;
}
.bh-g-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.bh-g-tile:hover img { transform: scale(1.06); }
.bh-g-tile-add {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed rgba(31, 122, 68, .28); background: rgba(255, 255, 255, .55);
  color: #1f7a44; font-size: 9px; line-height: 1.35;
}
.bh-g-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; gap: 8px; }
.bh-g-dots { display: flex; gap: 4px; align-items: center; }
.bh-g-dot {
  width: 4px; height: 4px; border-radius: 50%; border: 0; padding: 0;
  background: #cfd8d2; cursor: pointer; transition: width .22s var(--ease), background .22s;
}
.bh-g-dot.on { width: 11px; border-radius: 999px; background: #34a853; }
.bh-g-hint { font-size: 8.5px; color: #a9b3ac; white-space: nowrap; }
.bh-g-empty {
  height: 176px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: #9aa79f; font-size: 11px;
  background: #f7faf8; border-radius: 12px; border: 1px dashed rgba(31, 122, 68, .16);
}

/* 热讯改为顶部单列小组件（照片已移入品牌区） */
.dw-row.dw-single { grid-template-columns: 1fr; }
.dw-row.dw-single .dw-hot-list { display: grid; grid-template-columns: 1fr; }

/* ---- 整理照片弹层 ---- */
.bh-m-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.bh-m-row {
  display: flex; align-items: center; gap: 10px; padding: 6px;
  border: 1px solid var(--border-soft); border-radius: 10px; background: #fbfcfb;
}
.bh-m-img { width: 52px; height: 38px; object-fit: cover; border-radius: 7px; flex: 0 0 52px; }
.bh-m-main { flex: 1 1 auto; min-width: 0; }
.bh-m-title { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-m-sub { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.bh-m-acts { display: flex; gap: 4px; flex: 0 0 auto; }
.bh-m-btn {
  min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--border);
  background: #fff; border-radius: 7px; color: var(--muted); font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.bh-m-btn:disabled { opacity: .35; cursor: not-allowed; }
.bh-m-btn.danger { color: #c0392b; border-color: #f5d2ce; }
.bh-m-tip { font-size: 10.5px; color: var(--muted-2); margin-bottom: 8px; line-height: 1.7; }
.bh-m-add {
  margin-top: 10px; width: 100%; border: 1px dashed rgba(52, 168, 83, .4);
  background: rgba(52, 168, 83, .05); color: #1f7a44; border-radius: 10px;
  padding: 8px; font-family: inherit; font-size: 12px; cursor: pointer;
}
.bh-m-add:hover { background: rgba(52, 168, 83, .10); }

/* ---- 手机端：品牌区上下排列，照片格放到文字下方 ---- */
@media (max-width: 768px) {
  .brand-hero { flex-direction: column; gap: 16px; }
  .bh-media { flex: 0 0 auto; max-width: none; width: 100%; }
  .bh-g-grid { height: 168px; grid-template-columns: 1.5fr .8fr; }
  .bh-g-hint { display: none; }
  .bh-quote { font-size: 22px; }
}


/* 照片格文字按钮（添加照片 / 整理）：小胶囊、清晰可点，不抢标题 */
.bh-g-tools { margin-left: auto; display: flex; gap: 5px; }
.bh-g-btn {
  border: 1px solid rgba(31, 122, 68, .22); border-radius: 999px;
  background: rgba(52, 168, 83, .08); color: #1f7a44;
  font-family: inherit; font-size: 10px; line-height: 1.6; padding: 1px 8px;
  cursor: pointer; white-space: nowrap;
}
.bh-g-btn:hover { background: rgba(52, 168, 83, .14); }
.bh-g-btn.ghost { background: rgba(255, 255, 255, .8); color: #6d7d74; border-color: rgba(0, 0, 0, .10); }
.bh-g-btn.ghost:hover { color: #1f7a44; border-color: rgba(31, 122, 68, .25); }
@media (max-width: 768px) {
  .bh-g-btn { font-size: 9.5px; padding: 1px 7px; }
}


/* ============================================================================
 * 25. UI 统一修饰：智能检索整版重排 + 全站对齐/精致化（2026-10）
 *
 * 目标（用户反馈："这个界面太歪了，所有 UI 修饰一下，简约大气、符合风格、对齐"）：
 *   ① 智能检索：改成和其他页面一致的"左对齐页头 + 居中内容列（1024px）+ 白卡"，
 *      搜索框/提示/结果全部同一左基准线，不再出现"文字居中、盒子偏左"的歪感；
 *   ② 全站：页头统一底部分隔线与对齐、面板/卡片圆角与内边距统一、按钮高度统一、
 *      表格垂直居中、栅格等高；只做对齐与留白，不改原有配色与品牌元素。
 * ========================================================================== */

/* ---- ① 智能检索整版 ---- */
.ws-shell { max-width: 1024px; margin: 0 auto; padding: 0 2px 28px; }
.ws-headchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  font-size: 12px; color: #1f7a44; background: rgba(52, 168, 83, .07);
  border: 1px solid rgba(52, 168, 83, .18); border-radius: 999px; white-space: nowrap;
}
.ws-hero-card {
  background: var(--card, #fff); border: 1px solid var(--border-soft, #eef1f0);
  border-radius: 20px; padding: 24px 26px 20px; box-shadow: var(--sh-1);
}
.ws-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ws-hero-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: #1f7a44; background: rgba(52, 168, 83, .08); border-radius: 999px; padding: 3px 11px;
}
.ws-hero-hint { font-size: 11.5px; color: var(--muted-2, #a1a1a6); }
.ws-hero-box { display: flex; gap: 10px; }
.ws-input {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box; height: 48px; padding: 0 18px;
  font-size: 14px; font-family: inherit; color: #1a1a1c;
  border: 1px solid #e3e6e5; border-radius: 14px; background: #fbfcfb; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.ws-input:focus { border-color: #34a853; background: #fff; box-shadow: 0 0 0 3px rgba(52, 168, 83, .12); }
.ws-input.small { height: 40px; border-radius: 12px; font-size: 13px; }
.ws-go {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 26px; border: 0; border-radius: 14px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; color: #fff; letter-spacing: .5px;
  background: linear-gradient(135deg, #34a853, #1f7a44);
  box-shadow: 0 6px 18px rgba(52, 168, 83, .22); transition: filter .18s, transform .18s;
}
.ws-go:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ws-go.small { height: 40px; padding: 0 20px; font-size: 13px; border-radius: 12px; box-shadow: none; }
.ws-tips-wrap { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; }
.ws-tips-label { flex: 0 0 auto; font-size: 11.5px; color: var(--muted-2, #a1a1a6); line-height: 26px; }
.ws-tips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; margin-top: 0; }
.ws-tip {
  font-size: 12px; color: #6e6e73; background: #fafbfa; border: 1px solid #eef1f0;
  border-radius: 999px; padding: 4px 12px; cursor: pointer; line-height: 1.6; transition: .16s;
}
.ws-tip:hover { color: #1f7a44; border-color: rgba(52, 168, 83, .3); background: rgba(52, 168, 83, .05); }
.ws-note {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-soft, #eef1f0);
  font-size: 11.5px; color: var(--muted-2, #a1a1a6); line-height: 1.7;
}
.ws-note b { color: #8a5a00; font-weight: 600; }
.ws-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ws-feat {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px;
  background: var(--card, #fff); border: 1px solid var(--border-soft, #eef1f0);
  border-radius: 16px; box-shadow: var(--sh-1);
}
.ws-feat-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(52, 168, 83, .08);
}
.ws-feat b { font-size: 12.5px; color: var(--text, #1a1a1c); font-weight: 600; }
.ws-feat p { margin: 3px 0 0; font-size: 11px; color: var(--muted-2, #a1a1a6); line-height: 1.6; }

/* 检索态：搜索条与结果同宽、吸顶 */
.ws-bar {
  position: sticky; top: 0; z-index: 20; padding: 8px 0 12px;
  margin-bottom: 14px; background: rgba(247, 248, 247, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft, #eef1f0);
}
.ws-bar-inner { display: flex; gap: 9px; max-width: none; }
.ws-clear {
  flex: 0 0 auto; height: 40px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  font-family: inherit; font-size: 13px; color: #6e6e73; background: #fff;
  border: 1px solid #e8e8ed; transition: .16s;
}
.ws-clear:hover { color: #1f7a44; border-color: rgba(52, 168, 83, .3); }
.ws-scroll { min-height: 0; }
.ws-wrap { max-width: none; }

/* 检索态消息：与页头同一左基准线 */
.ws-msg { margin-bottom: 18px; }
.ws-q {
  display: inline-block; text-align: left; background: #f0f7f3; color: #1a1a1c;
  border: 1px solid #e3efe7; border-radius: 14px 14px 4px 14px;
  padding: 10px 16px; font-size: 13.5px; max-width: 80%; line-height: 1.6;
}
.ws-body {
  background: var(--card, #fff); border: 1px solid var(--border-soft, #eef1f0);
  border-radius: 16px; padding: 18px 20px; box-shadow: var(--sh-1);
}
.ws-md { font-size: 13.5px; line-height: 1.8; color: #1a1a1c; }
.ws-src-item { background: #fbfcfb; }

/* ---- ② 全站一致：页头 / 面板 / 栅格 / 按钮 / 表格 ---- */
#content { padding-top: 2px; }
.page-title {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft, #eef1f0);
}
.page-title h2 { font-size: 23px; line-height: 1.35; letter-spacing: -.4px; }
.page-title .desc { font-size: 12.5px; line-height: 1.7; margin-top: 6px; color: var(--muted, #86868b); }
.page-title .pt-actions { align-items: center; gap: 8px; }
.page-title .pt-actions .btn { height: 34px; display: inline-flex; align-items: center; gap: 5px; }

.panel { border-radius: 18px; padding: 20px 22px; }
.panel h3 { font-size: 14.5px; letter-spacing: .2px; margin-bottom: 14px; }
.grid-2 { gap: 16px; align-items: stretch; }
.cards { gap: 14px; }
.stat-card { min-height: 96px; }
.btn { min-height: 34px; }

.table th { font-size: 11.5px; letter-spacing: .2px; padding: 9px 12px; }
.table td { padding: 10px 12px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

@media (max-width: 768px) {
  .ws-shell { padding-bottom: 20px; }
  .ws-hero-card { padding: 18px 16px 16px; border-radius: 16px; }
  .ws-hero-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ws-hero-box { flex-direction: column; }
  .ws-input { height: 44px; }
  .ws-go { width: 100%; height: 44px; }
  .ws-tips-wrap { flex-direction: column; gap: 6px; }
  .ws-tips-label { line-height: 1.5; }
  .ws-feats { grid-template-columns: 1fr; gap: 9px; }
  .ws-bar { padding-top: 4px; }
  .ws-bar-inner { flex-wrap: wrap; }
  .ws-bar-inner .ws-input { flex: 1 1 100%; }
  .ws-bar-inner .ws-go, .ws-bar-inner .ws-clear { flex: 1 1 auto; }
  .ws-q { max-width: 92%; }
  .page-title { align-items: flex-start; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; }
  .page-title h2 { font-size: 20px; }
  .page-title .pt-actions .btn { height: 32px; }
  .panel { padding: 15px 15px; border-radius: 16px; }
}


/* 实时自动更新标识（天气 / 政策标题旁的小绿点胶囊） */
.rt-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: #1f7a44; letter-spacing: .2px;
  background: rgba(52, 168, 83, .08); border: 1px solid rgba(52, 168, 83, .18);
  border-radius: 999px; padding: 1px 8px; white-space: nowrap; font-weight: 400;
}
.rt-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: #34a853; animation: rtPulse 1.8s ease-in-out infinite;
}
@keyframes rtPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@media (max-width: 768px) {
  .rt-tag { font-size: 9.5px; padding: 1px 7px; }
}
