/* ===== 全局变量与基础 ===== */
:root {
  --brand: #1f9d76;        /* 公益绿主色 */
  --brand-dark: #157a5c;
  --brand-light: #e6f6f0;
  --accent: #f2994a;       /* 暖橙点缀 */
  --bg: #f5f7f6;
  --surface: #ffffff;
  --text: #1f2d2b;
  --text-soft: #5b6b68;
  --border: #e3e9e7;
  --danger: #e05a4d;
  --shadow: 0 2px 12px rgba(31, 157, 118, 0.08);
  --radius: 12px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===== 顶部导航（PC） ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px; height: 60px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--brand-dark);
  white-space: nowrap;
}
.logo .dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.nav-tabs { display: flex; gap: 6px; margin-left: 6px; }
.user-bar { position: relative; margin-left: auto; }
.user-chip { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.user-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.user-menu { position: absolute; top: 110%; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); min-width: 180px; padding: 6px; z-index: 70; }
.user-menu .um-title { font-size: 12px; color: var(--text-soft); padding: 6px 10px; }
.user-menu .um-item { padding: 9px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.user-menu .um-item:hover { background: var(--bg); }
.user-menu .um-item.on { color: var(--brand-dark); font-weight: 700; }
.user-menu .um-add { color: var(--brand); font-weight: 600; }
.user-menu .um-del { color: var(--danger); }

/* 后台门禁 */
.admin-gate { position: fixed; inset: 0; z-index: 300; background: rgba(20,40,35,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-card { background: #fff; border-radius: 16px; width: 100%; max-width: 380px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.gate-card h3 { margin: 0 0 14px; }
.gate-card .foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.nav-tabs button {
  border: none; background: transparent; color: var(--text-soft);
  padding: 9px 16px; border-radius: 9px; font-size: 15px; font-weight: 600;
  transition: all .15s;
}
.nav-tabs button:hover { background: var(--brand-light); color: var(--brand-dark); }
.nav-tabs button.active { background: var(--brand); color: #fff; }

/* ===== 容器 ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 20px 90px; }
.page { display: none; }
.page.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== 通用组件 ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.section-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 { margin: 0; font-size: 20px; }
.section-head .sub { color: var(--text-soft); font-size: 13px; margin: 2px 0 0; }
.spacer { flex: 1; }

/* 提示词子标签：公益提示词 / 更多提示词 */
.prompt-subtabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.prompt-subtabs button {
  border: 1px solid var(--border); background: #fff; color: var(--text-soft);
  padding: 7px 16px; border-radius: 999px; font-size: 14px; cursor: pointer;
  transition: all .15s ease;
}
.prompt-subtabs button:hover { border-color: var(--brand); color: var(--brand-dark); }
.prompt-subtabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.btn {
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: 9px 16px; border-radius: 9px; font-size: 14px; font-weight: 600;
  transition: .15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-light); }
.btn.gray { background: #fff; color: var(--text-soft); border-color: var(--border); }
.btn.gray:hover { background: var(--bg); }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #fdecea; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--text);
  background: #fff; transition: border .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.7; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-soft); }

.pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: 12px; font-weight: 600; margin: 0 6px 6px 0;
}
.pill.active { background: var(--brand); color: #fff; }
.pill.outline { background: #fff; border: 1px solid var(--border); color: var(--text-soft); }

/* 标签芯片（编辑器多选 + 前台筛选） */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text-soft);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .cnt { font-size: 11px; opacity: .75; margin-left: 4px; }

/* ===== 提示词模块 ===== */
.layout-2 { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li {
  padding: 10px 12px; border-radius: 9px; cursor: pointer; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; color: var(--text-soft);
}
.cat-list li:hover { background: var(--bg); }
.cat-list li.active { background: var(--brand-light); color: var(--brand-dark); }
.cat-list li.pin-red { background: #fff0f0; color: #d9212c; border-left: 3px solid #d9212c; }
.cat-list li.pin-red:hover { background: #ffe6e6; }
.cat-list li.pin-red.active { background: #d9212c; color: #fff; border-left-color: #b5161f; }
.cat-list li.pin-red .pin-tag { font-size: 10px; background: rgba(217,33,44,.12); color: #d9212c; border-radius: 5px; padding: 0 5px; margin-left: 2px; vertical-align: middle; }
.cat-list li.pin-red.active .pin-tag { background: rgba(255,255,255,.25); color: #fff; }
.cat-list li .cnt { font-size: 12px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.cat-list li.pin-red .cnt { background: #fff; color: #d9212c; border-color: #ffd0d0; }
.cat-list li.pin-red.active .cnt { background: rgba(255,255,255,.3); color: #fff; border-color: transparent; }

.prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.prompt-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; transition: .15s; }
.prompt-card:hover { box-shadow: var(--shadow); border-color: var(--brand); }
.prompt-card h3 { margin: 0; font-size: 16px; }
.prompt-card .meta { color: var(--text-soft); font-size: 12px; }
.prompt-card .content { font-size: 13px; color: var(--text-soft); white-space: pre-wrap; max-height: 160px; overflow-y: auto; cursor: grab; }
.prompt-card .content.dragging { cursor: grabbing; user-select: none; }
.prompt-card .content::-webkit-scrollbar { width: 8px; }
.prompt-card .content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.prompt-card .content::-webkit-scrollbar-thumb:hover { background: #cdd6d3; }
.prompt-card .content::-webkit-scrollbar-track { background: transparent; }
.prompt-card .acts { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.badge-opt { font-size: 11px; background: #fff4e9; color: var(--accent); border: 1px solid #f7d9bc; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.badge-me { font-size: 11px; background: #eaf7f1; color: var(--brand); border: 1px solid #bfe6d4; border-radius: 999px; padding: 1px 8px; font-weight: 600; }

/* ===== 公众号排版 ===== */
.wechat-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.wechat-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.editor-box { border: 1px solid var(--border); border-radius: var(--radius); min-height: 320px; padding: 14px; background: #fff; overflow: auto; }
.editor-box:focus { outline: none; border-color: var(--brand); }
.editor-box:empty:before { content: attr(placeholder); color: #aab5b2; }
.tpl-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tpl-chip { border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; cursor: pointer; font-size: 13px; font-weight: 600; background: #fff; color: var(--text-soft); }
.tpl-chip.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.code-box { width: 100%; min-height: 200px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; border: 1px solid var(--border); border-radius: 9px; padding: 12px; background: #fbfdfc; white-space: pre-wrap; word-break: break-all; }
.preview-frame { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 0; overflow: hidden; }
.preview-frame .phone { max-width: 677px; margin: 0 auto; }
.preview-frame .phone .screen { padding: 16px; }

/* 右栏预览框：占满列内剩余高度并独立纵向滚动（长文可直接下滑，不随整列溢出） */
.wechat3-preview .preview-frame { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
/* 滚动条样式（预览框内细滚动条，贴边不突兀） */
.wechat3-preview .preview-frame::-webkit-scrollbar { width: 9px; }
.wechat3-preview .preview-frame::-webkit-scrollbar-thumb { background: rgba(0,0,0,.16); border-radius: 9px; }
.wechat3-preview .preview-frame::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.28); }
.wechat3-preview .preview-frame::-webkit-scrollbar-track { background: transparent; }

/* ===== 公众号排版 · 三列布局（仿 wx.wangq.asia） ===== */
.wechat3 {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(290px, 0.92fr) minmax(340px, 1fr);
  gap: 16px; align-items: stretch;
  min-height: 540px; height: calc(100vh - 150px);
}
.wechat3-col {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; min-height: 0; overflow: auto;
}
.wechat3-edit .wechat3-body { flex: 1; min-height: 0; display: flex; }
.wechat3-body .md-editor, .wechat3-body .wc-rich-host { flex: 1; }
.wc-rich-host {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; background: #fff; overflow: auto; line-height: 1.8;
}

/* 左栏：标题栏 / 模式切换 / 工具栏 */
.wechat3-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wechat3-title { font-weight: 800; font-size: 15px; }
.wechat3-count { font-size: 12px; color: var(--text-soft); }
.wechat3-head-spacer { flex: 1; }
.wechat3-mode { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.wechat3-mode-btn {
  border: none; background: #fff; padding: 5px 11px; font-size: 12.5px; cursor: pointer;
  color: var(--text-soft); font-weight: 600;
}
.wechat3-mode-btn.active { background: var(--brand); color: #fff; }
.wechat3-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.wtb {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1;
}
.wtb:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); }
.wtb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }

/* 中栏：分区 / 主题卡片 / 动作按钮 */
.wechat3-section { margin-bottom: 14px; }
.wechat3-section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 13.5px; color: var(--text); margin-bottom: 9px;
}
.wechat3-section-act {
  border: 1px solid var(--border); background: #fff; color: var(--text-soft);
  border-radius: 7px; padding: 3px 9px; font-size: 12px; cursor: pointer; font-weight: 600;
}
.wechat3-section-act:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.color-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.mythemes-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.theme-card {
  border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; cursor: pointer;
  background: #fff; transition: .15s; position: relative; flex: 1 1 150px; min-width: 0;
}
.theme-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.theme-card.active { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 0 0 2px var(--brand-light); }
.tc-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 6px; }
.tc-name { font-weight: 800; font-size: 14px; color: var(--text); display: inline; }
.tc-desc { font-size: 11.5px; color: var(--text-soft); margin-top: 6px; line-height: 1.5; }
/* 色卡墙：小色块形式 */
.color-swatch { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 6px; min-width: 0; }
.cs-block { width: 32px; height: 32px; border-radius: 8px; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.10); }
.cs-name { font-size: 10.5px; color: var(--text-soft); text-align: center; line-height: 1.25; max-width: 60px; }
/* 我的主题：虚线描边区分内置/色卡 */
.theme-card.custom-theme { border-style: dashed; border-color: var(--brand); }
.wechat3-export { display: flex; flex-direction: column; gap: 8px; }
.wechat3-action {
  width: 100%; text-align: center; border-radius: 9px; padding: 10px 12px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; border: 1px solid var(--border); background: #fff; color: var(--text);
  transition: .15s;
}
.wechat3-action.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.wechat3-action.primary:hover { filter: brightness(1.05); }
.wechat3-action.ghost:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); }
.wechat3-ai-row { display: flex; flex-direction: column; gap: 12px; }
.wechat3-history { display: flex; flex-direction: column; gap: 7px; max-height: 220px; overflow: auto; margin-bottom: 10px; }
.wechat3-empty { font-size: 12.5px; color: var(--text-soft); padding: 8px 2px; }
.wechat3-import { display: flex; flex-direction: column; gap: 8px; }

/* 右栏：预览头 / 合规 / 源码 */
.wechat3-phead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 700; font-size: 14px; }
.wechat3-ptheme { font-size: 12.5px; font-weight: 600; color: var(--brand-dark); }
.wc-comp-ok { color: #237804; background: #f6ffed; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.wc-comp-err { color: #cf1322; background: #fff1f0; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.wechat3-code { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.wechat3-code-head { font-size: 12px; color: var(--text-soft); margin-bottom: 6px; }
.wechat3-code .code-box { min-height: 160px; max-height: 320px; }

/* 模板管理弹窗 */
.tm-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.tm-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.tm-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tm-name { font-weight: 700; font-size: 14px; }
.tm-key { font-size: 11px; color: var(--text-soft); background: var(--bg); border-radius: 6px; padding: 2px 7px; }
.tm-actions { margin-left: auto; display: flex; gap: 6px; }
.tm-act { border: 1px solid var(--border); background: #fff; border-radius: 7px; padding: 4px 9px; font-size: 12px; cursor: pointer; color: var(--text-soft); }
.tm-act:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); }
.tm-act.danger:hover { border-color: var(--danger); color: var(--danger); background: #fff1f0; }

/* 自定义主题弹窗 */
.ct-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ct-row > label { width: 78px; font-size: 13px; color: var(--text); flex: none; }
.ct-row input[type=text] { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; }
.ct-row input[type=text]:focus { outline: none; border-color: var(--brand); }
.ct-colors { flex-wrap: wrap; align-items: center; }
.ct-colors label { width: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-soft); }
.ct-colors input[type=color] { width: 34px; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: #fff; cursor: pointer; padding: 2px; }

/* 合规校验弹窗 */
.cp-list { display: flex; flex-direction: column; gap: 9px; margin: 8px 0 14px; }
.cp-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.cp-tag { flex: none; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 8px; color: #fff; }
.cp-err { background: #fff1f0; } .cp-err .cp-tag { background: #cf1322; }
.cp-warn { background: #fffbe6; } .cp-warn .cp-tag { background: #d48806; }
.cp-info { background: #f0f5ff; } .cp-info .cp-tag { background: #2f54eb; }
.cp-msg { font-size: 13px; color: var(--text); line-height: 1.6; }

/* 历史记录条目 */
.wh-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; cursor: pointer; }
.wh-item:hover { border-color: var(--brand); background: var(--brand-light); }
.wh-title { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-meta { font-size: 11px; color: var(--text-soft); flex: none; }
.wh-del { border: none; background: transparent; color: var(--text-soft); font-size: 16px; cursor: pointer; line-height: 1; padding: 0 4px; }
.wh-del:hover { color: var(--danger); }

@media (max-width: 980px) {
  .wechat3 { grid-template-columns: 1fr; height: auto; }
  .wechat3-col { overflow: visible; }
}

/* 公众号排版：Markdown 输入文本框 + 语法提示 */
.md-editor { width: 100%; box-sizing: border-box; resize: vertical; min-height: 440px;
  font-family: "SFMono-Regular", Consolas, Monaco, "Courier New", monospace;
  font-size: 13px; line-height: 1.85; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.wechat-hint { font-size: 11px; color: #9aa6a2; line-height: 1.5; flex: 1 1 200px; min-width: 160px; }
.wechat-auto-opt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2);
  background: var(--bg-2, #f4f6f5); border: 1px solid var(--border, #e3e8e6); border-radius: 8px; padding: 4px 10px; cursor: pointer; user-select: none; white-space: nowrap; }
.wechat-auto-opt input { width: 14px; height: 14px; accent-color: var(--primary, #1f7a5a); cursor: pointer; margin: 0; }

/* ===== AI 导航 ===== */
.nav-cat-block { margin-bottom: 22px; }
.nav-cat-block > h3 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.nav-cat-block > h3 .bar { width: 4px; height: 18px; background: var(--brand); border-radius: 3px; }
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.nav-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: #fff; display: flex; gap: 10px; align-items: center; transition: .15s; position: relative; }
.nav-card:hover { box-shadow: var(--shadow); border-color: var(--brand); transform: translateY(-2px); }
.nav-card .fav { width: 36px; height: 36px; border-radius: 9px; background: var(--brand-light); display: grid; place-items: center; font-weight: 700; color: var(--brand-dark); flex: none; overflow: hidden; }
.nav-card .fav img { width: 100%; height: 100%; object-fit: cover; }
.nav-card .info { min-width: 0; flex: 1; }
.nav-card .info .nm { font-weight: 700; font-size: 14px; }
.nav-card .info .ds { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-card .row-acts { display: flex; gap: 4px; }
.nav-card .row-acts button { border: none; background: var(--bg); border-radius: 6px; padding: 3px 7px; font-size: 12px; color: var(--text-soft); }
.nav-card .row-acts button:hover { background: var(--brand-light); color: var(--brand-dark); }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(20,40,35,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.modal h3 { margin: 0 0 16px; font-size: 18px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ===== 格式转化（anydoc 本地 WASM）弹窗 ===== */
.fc-head { position: relative; padding-right: 34px; }
.fc-head h3 { margin: 0 0 4px; font-size: 17px; }
.fc-close {
  position: absolute; top: -2px; right: 0; width: 28px; height: 28px;
  border: none; background: transparent; border-radius: 8px; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--text-soft); transition: .15s;
}
.fc-close:hover { background: var(--brand-light); color: var(--brand); }
.fc-head .sub { margin: 0 0 14px; font-size: 12.5px; color: var(--text-soft); line-height: 1.6; }
.fc-head .sub strong { color: var(--brand); }
.fc-drop { border: 2px dashed var(--border); border-radius: 12px; padding: 26px 16px; text-align: center; cursor: pointer; transition: .15s; background: var(--bg); }
.fc-drop:hover, .fc-drop.drag { border-color: var(--brand); background: var(--brand-light); }
.fc-drop-inner { font-size: 14px; color: var(--text); }
.fc-link { color: var(--brand); text-decoration: underline; }
.fc-formats { margin-top: 8px; font-size: 11.5px; color: var(--text-soft); }
.fc-status { white-space: pre-wrap; font-size: 12.5px; margin: 12px 0; padding: 10px 12px; border-radius: 9px; background: #f6f8f7; color: var(--text-soft); }
.fc-status.warn { background: #fff8e6; color: #8a6d1a; }
.fc-status.err { background: #fdecea; color: var(--danger); }
.fc-meta { font-size: 12px; color: var(--text-soft); margin-bottom: 8px; }
.fc-gallery { display: none; margin: 4px 0 12px; }
.fc-gal-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 2px 0 10px; }
.fc-gallery figure { display: inline-block; margin: 0 12px 12px 0; padding: 0; vertical-align: top;
  width: 188px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.fc-gallery img { display: block; width: 100%; height: auto; max-height: 150px; object-fit: contain; background: #fafafa; }
.fc-gallery .fc-img-ph { display: block; width: 100%; height: 96px; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; color: var(--text-soft); background: #fafafa; text-align: center; padding: 0 8px; }
.fc-gallery figcaption { font-size: 11px; color: var(--text-soft); padding: 5px 8px; display: flex; justify-content: space-between;
  align-items: center; gap: 6px; border-top: 1px solid var(--border); }
.fc-gallery figcaption a.fc-img-dl { color: var(--brand); text-decoration: none; white-space: nowrap; }
.fc-gallery figcaption a.fc-img-dl:hover { text-decoration: underline; }
.fc-out { min-height: 240px; max-height: 52vh; }
.fc-actions { display: flex; gap: 10px; margin-top: 12px; align-items: center; }

/* 一键导入公众号文章弹窗 */
.wi-row { display: flex; gap: 10px; margin: 4px 0 10px; }
.wi-url { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--bg); color: var(--text); }
.wi-url:focus { outline: none; border-color: var(--brand); }
.wi-opt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; cursor: pointer; }
.wi-status { font-size: 13px; min-height: 20px; margin: 6px 0; color: var(--text-soft); }
.wi-status.err { color: #d4380d; }
.wi-status.ok { color: #237804; }
.wi-status.warn { color: #ad6800; }

/* ===== AI 优化 · 动态加载动画 ===== */
.opt-out-wrap { position: relative; }
.opt-loading {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center; flex-direction: column; gap: 16px;
  background: rgba(255, 255, 255, .82); border-radius: 9px; z-index: 3;
}
.opt-loading.show { display: flex; animation: fade .18s ease; }
.opt-spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid var(--brand-light); border-top-color: var(--brand);
  animation: opt-spin .8s linear infinite;
}
@keyframes opt-spin { to { transform: rotate(360deg); } }
.opt-loading .opt-tip { color: var(--brand-dark); font-size: 14px; font-weight: 600; letter-spacing: .5px; }
.opt-loading .opt-tip .dot { animation: opt-blink 1.2s infinite; }
.opt-loading .opt-tip .dot:nth-child(2) { animation-delay: .2s; }
.opt-loading .opt-tip .dot:nth-child(3) { animation-delay: .4s; }
@keyframes opt-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ===== 生成模块 AI 优化弹窗 · 当前内容预览 ===== */
.opt-prev {
  max-height: 132px; overflow-y: auto;
  padding: 10px 12px; border: 1px solid var(--border, #e3e8ef); border-radius: 8px;
  background: var(--bg-soft, #f6f8fb); color: var(--text-soft, #5b6472);
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
/* ===== 空状态 / 提示 ===== */
.empty { text-align: center; color: var(--text-soft); padding: 40px 10px; }
.empty .big { font-size: 40px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #1f2d2b; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== H5 底部标签栏（移动端） ===== */
.tabbar { display: none; }

/* ===== 响应式 ===== */
@media (max-width: 820px) {
  .layout-2 { grid-template-columns: 1fr; }
  .wechat-layout { grid-template-columns: 1fr; }
  .topbar-inner { height: 54px; padding: 0 14px; gap: 10px; }
  .logo span.txt { display: none; }
  .nav-tabs { display: none; }       /* 移动端用底部标签栏 */
  .wrap { padding: 16px 14px 80px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  }
  .tabbar button {
    flex: 1; border: none; background: transparent; padding: 8px 0 10px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--text-soft); font-size: 11px; font-weight: 600;
  }
  .tabbar button .ic { font-size: 20px; line-height: 1; }
  .tabbar button.active { color: var(--brand); }
  .section-head h2 { font-size: 18px; }
  .nav-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .prompt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .nav-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== 未登录登录墙（前台功能页需登录） ===== */
body.app-locked .topbar, body.app-locked .wrap, body.app-locked .tabbar, body.app-locked .wb { display: none !important; }
.login-wall { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #5b4af5, #ec4899); padding: 20px; }
.login-wall-card { background: #fff; border-radius: 18px; max-width: 420px; width: 100%; padding: 40px 32px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.lw-logo { font-size: 44px; color: #5b4af5; margin-bottom: 8px; }
.login-wall-card h2 { margin: 0 0 8px; font-size: 22px; color: #1e1e2e; }
.lw-sub { color: #777; font-size: 14px; margin: 0 0 24px; line-height: 1.6; }
.lw-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.lw-actions .btn { min-width: 110px; justify-content: center; }
.lw-actions .btn:not(.gray) { background: #5b4af5; border-color: #5b4af5; }
.lw-actions .btn:not(.gray):hover { background: #4a3ad6; }
.lw-actions .btn.gray { color: #5b4af5; border-color: #5b4af5; }
.lw-actions .btn.gray:hover { background: #f1eefe; }
.lw-home { color: #5b4af5; font-size: 13px; text-decoration: none; }
.lw-home:hover { text-decoration: underline; }

/* ===== 首页（home.html） ===== */
.home { display: block; }
.sec-title { font-size: 22px; margin: 0 0 18px; color: var(--text); }

/* Hero */
.hero {
  background: radial-gradient(1200px 400px at 50% -10%, rgba(31,157,118,.18), transparent 60%),
              linear-gradient(180deg, #f3fbf8 0%, var(--bg) 100%);
  padding: 56px 20px 44px;
  text-align: center;
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-badge {
  display: inline-block; background: #fff; border: 1px solid var(--border);
  color: var(--brand-dark); font-size: 13px; font-weight: 600;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 {
  font-size: 38px; line-height: 1.25; margin: 0 0 16px;
  background: linear-gradient(120deg, var(--brand-dark), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--text-soft); font-size: 16px; max-width: 620px; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats .stat {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 22px; min-width: 120px; box-shadow: var(--shadow);
}
.hero-stats .stat b { display: block; font-size: 26px; color: var(--brand-dark); }
.hero-stats .stat span { font-size: 13px; color: var(--text-soft); }

/* 功能卡片 */
.features { margin-top: 8px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  transition: .18s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: 0 8px 24px rgba(31,157,118,.14); }
.feature-card .ic {
  width: 48px; height: 48px; border-radius: 12px; font-size: 24px;
  background: var(--brand-light); display: grid; place-items: center;
}
.feature-card h3 { margin: 4px 0 0; font-size: 18px; }
.feature-card p { margin: 0; color: var(--text-soft); font-size: 14px; flex: 1; }
.feature-card .more { color: var(--brand); font-weight: 700; font-size: 14px; }

/* 三步开始 */
.steps { margin-top: 6px; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step .num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; margin-bottom: 10px;
}
.step h4 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* 关于平台 */
.about { margin-top: 6px; }
.about-card { margin-top: 6px; }
.about-card h2 { margin: 0 0 14px; font-size: 20px; }
.about-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; }
.about-list li { font-size: 14px; color: var(--text-soft); line-height: 1.7; }
.about-list li b { color: var(--text); }

/* 页脚 */
.home-footer { border-top: 1px solid var(--border); background: #fff; margin-top: 30px; }
.home-footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between;
}
.hf-logo { font-weight: 700; color: var(--brand-dark); }
.home-footer .muted { color: var(--text-soft); font-size: 13px; }

@media (max-width: 820px) {
  .hero { padding: 40px 16px 32px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .feature-grid, .step-grid { grid-template-columns: 1fr; }
  .about-list { grid-template-columns: 1fr; }
  .sec-title { font-size: 20px; }
}

/* ===== AI 导航（仿 AI龙虾导航 ai.txdd.cn） ===== */
.navv-hero {
  background: linear-gradient(135deg, #5b4af5, #ec4899);
  color: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.navv-hero-title { font-size: 24px; font-weight: 800; margin: 0; }
.navv-hero-accent { font-weight: 500; opacity: .92; font-size: 15px; }
.navv-hero-sub { margin: 6px 0 0; opacity: .9; font-size: 13px; }
.navv-search {
  flex: 1; min-width: 240px;
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 100px;
  padding: 0 16px; height: 44px; color: #333;
}
.navv-search-ic { opacity: .5; }
.navv-search-input { border: 0; outline: 0; flex: 1; font-size: 14px; background: transparent; color: #1e1e2e; }
.navv-actions { display: flex; gap: 8px; }
.navv-layout { display: flex; gap: 18px; align-items: flex-start; }
.navv-side {
  width: 210px; flex: 0 0 210px;
  position: sticky; top: 74px;
  background: #fff; border: 1px solid #e8eaee; border-radius: 14px;
  padding: 8px; max-height: calc(100vh - 92px); overflow: auto;
}
.navv-side-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: #555; cursor: pointer;
}
.navv-side-link:hover { background: #f5f3ff; color: #5b4af5; }
.navv-side-link.active { background: #ede9fe; color: #4338ca; font-weight: 600; }
.navv-side-count { font-size: 11px; color: #999; background: #f3f4f6; border-radius: 100px; padding: 1px 8px; }
.navv-main { flex: 1; min-width: 0; }
.navv-cat { margin-bottom: 26px; scroll-margin-top: 80px; }
.navv-cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #f0f1f3; }
.navv-cat-emoji { width: 28px; height: 28px; border-radius: 8px; background: #f5f3ff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.navv-cat-name { font-size: 17px; font-weight: 700; margin: 0; color: #1e1e2e; }
.navv-cat-count { margin-left: auto; font-size: 12px; color: #999; }
.links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.link-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; background: #fff; border-radius: 10px;
  border: 1px solid #eef0f3; text-decoration: none; color: inherit;
  position: relative; overflow: hidden; transition: all .25s cubic-bezier(.25,.8,.25,1);
}
.link-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, #5b4af5, #ec4899, #5b4af5);
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.link-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.link-card:hover::before { transform: scaleX(1); }
.lc-fav {
  position: relative; width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 9px; background: #f3f4f6; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #5b4af5; overflow: hidden;
}
.lc-fav img { width: 100%; height: 100%; object-fit: cover; }
.navv-badge { position: absolute; top: -4px; right: -4px; font-size: 9px; padding: 1px 4px; border-radius: 6px; color: #fff; line-height: 1.4; }
.navv-badge.hot { background: #ef4444; }
.navv-badge.rec { background: #5b4af5; }
.lc-info { flex: 1; min-width: 0; }
.lc-name { font-size: 14px; font-weight: 600; color: #1e1e2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-desc { font-size: 12px; color: #888; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-acts { position: absolute; top: 8px; right: 8px; display: none; gap: 4px; }
.link-card:hover .lc-acts { display: flex; }
.lc-acts button { border: 0; background: #fff; border: 1px solid #eee; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 12px; }
.lc-acts button:hover { background: #f5f3ff; }
.navv-empty { text-align: center; color: #999; padding: 60px 0; font-size: 15px; }
.nav-icon-row { display: flex; align-items: center; gap: 12px; }
.nav-icon-prev { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; background: #f3f4f6; border: 1px solid #eef0f3; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #5b4af5; font-weight: 700; font-size: 18px; }
.nav-icon-prev img { width: 100%; height: 100%; object-fit: cover; }
.nav-icon-ctl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-icon-ctl .input { padding: 6px 8px; font-size: 13px; }
.nav-icon-hint { font-size: 11px; color: #999; }
.th-swrow { display: flex; gap: 4px; }
.th-sw { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); display: inline-block; }
.th-color-row { display: flex; align-items: center; gap: 10px; }
.th-color-row label { width: 86px; margin: 0; }
.th-color { width: 46px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; }
@media (max-width: 1100px) { .links-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .links-grid { grid-template-columns: repeat(1, 1fr); }
  .navv-side { display: none; }
}

/* ===================== 公众号排版：PDF 导入加载动画 ===================== */
#page-wechat { position: relative; }
.pdf-loading {
  display: none;
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  flex-direction: row; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid rgba(31, 157, 118, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  border-radius: 999px;
}
.pdf-loading.show { display: flex; }
.pdf-loading .spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(31, 157, 118, 0.22);
  border-top-color: #1f9d76;
  animation: pdf-spin 0.8s linear infinite;
}
.pdf-loading-text { font-size: 13px; color: #1f9d76; letter-spacing: 0.3px; font-weight: 600; }
@keyframes pdf-spin { to { transform: rotate(360deg); } }

/* ===== 政策法规库 / 资源整合 通用 ===== */
.layout-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .layout-2-col { grid-template-columns: 1fr; } }

.reg-hero {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, rgba(31,157,118,.08), rgba(31,157,118,.02));
  border: 1px solid rgba(31,157,118,.16); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 16px;
}
.reg-hero-text h1 { font-size: 20px; margin: 0 0 4px; color: var(--text, #2b3a36); }
.reg-hero-accent { color: var(--brand, #1f9d76); font-weight: 700; font-size: 14px; }
.reg-hero-text p { margin: 0; color: var(--text-soft, #6b7c77); font-size: 13px; line-height: 1.6; max-width: 560px; }
.reg-search {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--border, #e3e9e7); border-radius: 999px; padding: 8px 14px; min-width: 240px;
}
.reg-search-ic { font-size: 14px; }
.reg-search-input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--text, #2b3a36); }

.reg-side { display: flex; flex-direction: column; gap: 6px; }
.cat-link {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 14px;
  color: var(--text-soft, #6b7c77); border: 1px solid transparent; background: transparent;
}
.cat-link:hover { background: var(--bg-soft, #f3f7f5); }
.cat-link.on { background: rgba(31,157,118,.12); color: var(--brand, #1f9d76); font-weight: 700; border-color: rgba(31,157,118,.28); }
.cat-link.on .cat-count { background: #fff; color: var(--brand, #1f9d76); }
.cat-link.due.on { color: #e0820a; border-color: rgba(224,130,10,.3); background: rgba(224,130,10,.1); }
.cat-count { font-size: 12px; background: var(--bg-soft, #f3f7f5); padding: 1px 8px; border-radius: 999px; color: var(--text-soft, #6b7c77); }

/* 法规卡片 */
.reg-grid, .res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.reg-card, .res-card {
  position: relative; background: #fff; border: 1px solid var(--border, #e3e9e7);
  border-radius: 14px; padding: 14px 15px; transition: box-shadow .15s, transform .15s;
}
.reg-card:hover, .res-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.08); transform: translateY(-2px); }
.reg-card-cat, .res-card-cat {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--brand, #1f9d76);
  background: rgba(31,157,118,.1); padding: 2px 9px; border-radius: 999px; margin-bottom: 8px;
}
.reg-card-title, .res-card-title { font-size: 15px; font-weight: 700; color: var(--text, #2b3a36); line-height: 1.4; margin-bottom: 6px; }
.reg-card-sum, .res-card-sum { font-size: 13px; color: var(--text-soft, #6b7c77); line-height: 1.6; margin-bottom: 8px; }
.reg-card-meta { font-size: 12px; color: #9aa8a3; }

/* 政策法规：文章目录（每行 2 篇） */
.reg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.reg-list-item {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border, #e3e9e7); border-radius: 12px;
  padding: 11px 14px; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.reg-list-item:hover { box-shadow: 0 6px 18px rgba(0,0,0,.07); border-color: var(--brand, #1f9d76); transform: translateY(-1px); }
.reg-li-no { flex: 0 0 auto; width: 22px; text-align: center; font-size: 13px; font-weight: 700; color: var(--brand, #1f9d76); }
.reg-li-main { flex: 1; min-width: 0; }
.reg-li-title { font-size: 14px; font-weight: 700; color: var(--text, #2b3a36); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-li-meta { font-size: 12px; color: var(--text-soft, #6b7c77); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-li-acts { flex: 0 0 auto; display: flex; gap: 6px; }
.reg-li-acts button {
  border: 1px solid var(--border, #e3e9e7); background: #fff; border-radius: 8px;
  padding: 4px 10px; cursor: pointer; font-size: 13px; color: var(--text-soft, #6b7c77); white-space: nowrap;
}
.reg-li-acts button:hover { border-color: var(--brand, #1f9d76); color: var(--brand, #1f9d76); }
.reg-card-due, .res-card-due { font-size: 13px; color: var(--text-soft, #6b7c77); margin-top: 4px; }
.reg-card-contact, .res-card-contact { font-size: 13px; color: var(--text-soft, #6b7c77); margin-top: 2px; }
.reg-card-acts, .res-card-acts { display: flex; gap: 6px; margin-top: 10px; }
.reg-card-acts button, .res-card-acts button {
  border: 1px solid var(--border, #e3e9e7); background: #fff; border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; font-size: 14px; color: var(--text-soft, #6b7c77);
}
.reg-card-acts button:hover, .res-card-acts button:hover { border-color: var(--brand, #1f9d76); color: var(--brand, #1f9d76); }
.res-go { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; text-decoration: none;
  background: var(--brand, #1f9d76); color: #fff; font-size: 13px; font-weight: 600; }
.res-go:hover { filter: brightness(.95); }
.res-card { cursor: pointer; }

/* 截止提醒面板 */
.res-remind { background: linear-gradient(120deg, rgba(224,130,10,.1), rgba(224,130,10,.03)); border: 1px solid rgba(224,130,10,.25);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.res-remind-head { font-weight: 700; color: #c9740a; font-size: 14px; margin-bottom: 8px; }
.res-remind-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed rgba(224,130,10,.22); font-size: 13px; }
.res-remind-item:first-of-type { border-top: none; }
.res-remind-title { font-weight: 600; color: var(--text, #2b3a36); }
.res-remind-cat { color: var(--text-soft, #6b7c77); }
.res-remind-due { margin-left: auto; color: #9a6a08; }

/* 截止状态徽标 */
.res-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.res-badge.long { background: #eef2f1; color: #6b7c77; }
.res-badge.active { background: rgba(31,157,118,.12); color: #1f9d76; }
.res-badge.soon { background: rgba(240,180,40,.16); color: #b07d00; }
.res-badge.urgent { background: rgba(240,120,30,.16); color: #d2620a; }
.res-badge.expired { background: rgba(220,60,60,.14); color: #c5342b; }

.res-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.res-card-top .res-card-cat { margin-bottom: 0; }

/* 分类区块标题 */
.reg-cat-sec, .res-cat-sec { margin-bottom: 18px; }
.reg-cat-head, .res-cat-head { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--text, #2b3a36); margin: 4px 0 12px; }
.reg-cat-count, .res-cat-count { font-size: 12px; font-weight: 600; color: var(--text-soft, #6b7c77); background: var(--bg-soft, #f3f7f5); padding: 1px 9px; border-radius: 999px; }

/* 法规详情弹窗 */
.reg-detail-meta { font-size: 12px; color: #9aa8a3; margin: 6px 0 10px; }
.reg-detail-sum { background: rgba(31,157,118,.07); border-left: 3px solid var(--brand, #1f9d76); padding: 8px 12px; border-radius: 6px; color: var(--text-soft, #6b7c77); font-size: 13px; margin-bottom: 10px; }
.reg-detail-body { font-size: 14px; line-height: 1.8; color: var(--text, #2b3a36); white-space: normal; }

/* 导入预览 */
.imp-preview { font-size: 13px; color: var(--text-soft, #6b7c77); margin: 8px 0; line-height: 1.7; }

/* 空状态（前台 workbench.css 已定义，此处为后台 admin.html 兜底） */
.wb-empty { color: var(--text-soft, #6b7c77); text-align: center; padding: 30px 0; font-size: 14px; }
