:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #1e5594;          /* 科技蓝 */
  --brand-d: #143f6e;
  --brand-l: #2f7bc4;
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --screening: #7c3aed;      /* 初筛（紫色，区别于待确认的橙） */
  --pending: #d97706;
  --confirmed: #0891b2;
  --published: #16a34a;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.topbar {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-l) 50%, var(--brand-d) 100%);
  color: #fff; padding: 10px 20px;
  box-shadow: 0 2px 16px rgba(30,85,148,.28);
  border-bottom: 2px solid rgba(255,255,255,.12);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand {
  font-weight: 700; font-size: 16px; white-space: nowrap;
  letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-link {
  color: #fff; opacity: .9; padding: 5px 12px; border-radius: 6px; font-size: 13px;
}
.nav-link:hover { background: rgba(255,255,255,.18); text-decoration: none; opacity: 1; }
.nav-link.active { background: rgba(255,255,255,.28); font-weight: 600; opacity: 1; }

.container { max-width: 1080px; margin: 18px auto; padding: 0 18px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0 40px; }
.foot a { color: var(--brand); }

/* 卡片 */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 12px; font-size: 17px; }
.card h3 { margin: 16px 0 8px; font-size: 15px; }

/* 统计 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;padding-bottom: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 28px; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat.screening .num { color: var(--screening); }
.stat.pending .num { color: var(--pending); }
.stat.confirmed .num { color: var(--confirmed); }
.stat.published .num { color: var(--published); }
.stat.today .num { color: var(--brand-d); }

/* 表格 */
table.list { width: 100%; border-collapse: collapse; background: var(--panel); }
table.list th, table.list td {
  border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: middle;
}
table.list th { background: #fafafa; color: var(--muted); font-weight: 600; font-size: 13px; }
table.list tr:hover td { background: #fcfcfd; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.col-seq { width: 46px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; padding-left: 6px; padding-right: 6px; }

/* 徽章 */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
}
.badge-screening { color: var(--screening); background: #f5f3ff; border-color: #ddd6fe; }
.badge-pending { color: var(--pending); background: #fff7ed; border-color: #fed7aa; }
.badge-confirmed { color: var(--confirmed); background: #ecfeff; border-color: #a5f3fc; }
.badge-published { color: var(--published); background: #f0fdf4; border-color: #bbf7d0; }
.badge-return { color: var(--danger); background: #fef2f2; border-color: #fecaca; }
.badge-force { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
/* AI 审核状态徽章 */
.badge-ai-none  { color: var(--muted);     background: #f3f4f6; border-color: #e5e7eb; }
.badge-ai-pass  { color: var(--published); background: #f0fdf4; border-color: #bbf7d0; }
.badge-ai-block { color: var(--danger);    background: #fef2f2; border-color: #fecaca; }
.badge-ai-stale { color: #b45309;          background: #fffbeb; border-color: #fde68a; }
/* 信源站同步状态徽章 */
.badge-source     { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; }
.badge-source-off { color: var(--muted); background: #f3f4f6; border-color: #e5e7eb; font-weight: 400; }

/* 按钮 */
.btn {
  display: inline-block; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600;
}
.btn:hover { text-decoration: none; background: #f9fafb; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-success { background: var(--published); border-color: var(--published); color: #fff; }
.btn-success:hover { filter: brightness(.95); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); }
.btn-warning { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn-warning:hover { filter: brightness(.95); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 表单 */
label.field { display: block; margin: 12px 0 4px; font-weight: 600; }
input[type=text], input[type=date], textarea, select.input {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 360px; resize: vertical; line-height: 1.7; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.help { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.flash-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.flash-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* 文章预览 */
.article-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.md-body { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; }
.md-body h1, .md-body h2, .md-body h3 { margin: 1em 0 .5em; }
.md-body p { margin: .6em 0; }
.md-body pre { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow: auto; }
.md-body code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.md-body pre code { background: none; padding: 0; }
.md-body blockquote { border-left: 4px solid var(--line); margin: .8em 0; padding: .2em 1em; color: var(--muted); }
.md-body img { max-width: 100%; }
.md-body hr { border: none; border-top: 1px solid var(--line); margin: 1em 0; }

/* 敏感词警示 */
.warn-banner {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px;
  padding: 12px 14px; margin: 10px 0;
}
.warn-banner b { color: #b91c1c; }
.warn-dup { background: #fff7ed; border-color: #fdba74; color: #9a3412; margin: 6px 0 0; }
.warn-dup b { color: #c2410c; }
.kw-hit { display: inline-block; background: #fee2e2; border: 1px solid #fca5a5; border-radius: 6px; padding: 1px 8px; margin: 3px 4px 0 0; font-size: 12px; }

/* AI 审核结果 */
.ai-issue {
  border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px;
  padding: 10px 12px; margin-top: 10px; background: #fafafa; font-size: 14px; line-height: 1.7;
}
.ai-issue-blocker { border-left-color: #dc2626; background: #fef2f2; }
.ai-issue-warn    { border-left-color: #f59e0b; background: #fffbeb; }
.ai-issue-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.ai-quote {
  background: #fff; border: 1px dashed var(--line); border-radius: 6px;
  padding: 6px 8px; margin: 6px 0; color: #475569; font-size: 13px; word-break: break-word;
}
.ai-suggest { margin-top: 6px; color: #166534; font-size: 13px; }
.ai-fix { margin-top: 6px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 6px; padding: 6px 10px; font-size: 13px; word-break: break-word; }
.ai-fix-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; }
.ai-fix-actions .muted { flex-basis: 100%; }
.ai-act { margin-left: auto; font-size: 13px; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; color: #334155; }
.ai-act input[type=radio] { margin: 0; }
.ai-raw {
  background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  font-size: 12px; line-height: 1.6; max-height: 420px;
}
.checkbox-line {
  display: flex; align-items: flex-start; gap: 8px; margin: 8px 0;
  font-size: 14px; line-height: 1.6; cursor: pointer;
}
.checkbox-line input[type=checkbox] { width: 16px; height: 16px; margin-top: 3px; flex: none; }

/* 两栏 */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search input { flex: 1; max-width: 320px; }

/* 富文本编辑器 */
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line); border-bottom: none; border-radius: 8px 8px 0 0; background: #f8fafc; }
.rte-toolbar button { min-width: 34px; height: 30px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink); }
.rte-toolbar button:hover { background: #eef2ff; border-color: var(--primary); }
.rte-editor { min-height: 360px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 14px 18px; outline: none; background: #fff; line-height: 1.7; overflow: auto; }
.rte-editor:empty:before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rte-source { width: 100%; min-height: 360px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 14px 18px; outline: none; background: #fff; line-height: 1.6; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 13px; color: var(--ink); resize: vertical; }
.rte-source:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.rte-toolbar button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.rte-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.rte-editor p { margin: .6em 0; }
.rte-editor h1, .rte-editor h2, .rte-editor h3 { margin: 1em 0 .5em; }
.rte-editor blockquote { border-left: 4px solid var(--line); margin: .8em 0; padding: .2em 1em; color: var(--muted); }
.rte-editor a { color: var(--primary); }
.mode-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.mode-switch button { border: none; background: #fff; padding: 6px 18px; cursor: pointer; font-size: 13px; color: var(--muted); }
.mode-switch button + button { border-left: 1px solid var(--line); }
.mode-switch button.active { background: var(--primary); color: #fff; }

/* 正文敏感词高亮 */
mark.kw-hl { background: #fecaca; color: #b91c1c; font-weight: 600; padding: 0 2px; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.md-body mark.kw-hl { background: #fee2e2; }

/* ============ 移动端适配 ============ */
html { -webkit-text-size-adjust: 100%; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { min-width: 540px; }
table.list th:first-child, table.list td:first-child { position: sticky; left: 0; background: #fff; z-index: 2; }
table.list thead th:first-child { z-index: 3; }

/* ============ 分页导航（桌面端；注意：必须放在 @media 之外）============
   独立工具条样式，与上方表格留出 24px 间距，避免分页与表格贴太近。 */
.pager {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-top: 24px; padding: 12px 14px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
}
.pager .btn {
  min-width: 34px; text-align: center; padding: 5px 12px; font-size: 13px;
  background: #fff; color: var(--ink);
}
.pager .btn:hover { background: #eef2f7; border-color: #d7dee6; }
.pager .btn.disabled { opacity: .6; pointer-events: none; cursor: default; background: #f3f4f6; color: var(--muted); }
.pager .btn.active {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .3);
}
.pager .btn.active:hover { background: var(--primary-d); }
.pager-gap { color: var(--muted); padding: 0 4px; user-select: none; }
.pager-info {
  margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap;
  padding-left: 12px; border-left: 1px solid var(--line);
}

/* ============ 文章查看页：信源站同步状态 ============ */
.sync-source-box {
  margin-top: 18px; padding: 12px 14px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
}
.sync-source-box .ssb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sync-source-box .ssb-title { font-weight: 700; font-size: 14px; }
.sync-source-box .ssb-line { font-size: 13px; line-height: 1.7; word-break: break-all; }
.sync-source-box .ssb-err { color: var(--danger); }
.sync-source-box .ssb-tip { margin-top: 6px; font-size: 12px; color: var(--pending); }

/* ============ 文章查看页：上一篇 / 下一篇 ============ */
.article-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
}
.article-nav-item {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #f8fafc; color: var(--ink); text-decoration: none;
}
.article-nav-item:hover { background: #eef2f7; border-color: #d7dee6; text-decoration: none; }
.article-nav-item .an-dir { font-size: 12px; font-weight: 600; color: var(--muted); }
.article-nav-item .an-title {
  font-size: 13px; line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.article-nav-item.next { text-align: right; }
.article-nav-item.disabled { background: #fafafa; border-style: dashed; }
.article-nav-item.disabled .an-title { color: var(--muted); }
.article-nav-pos { align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }

@media (max-width: 820px) {
  .topbar { padding: 8px 12px; }
  .topbar-inner { gap: 8px; }
  .topbar-inner .brand { width: 100%; font-size: 15px; }
  .topbar-inner .nav { width: 100%; order: 3; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .topbar .nav-link { white-space: nowrap; }

  .container { padding: 0 12px; margin: 12px auto; }
  .card { padding: 14px; margin-bottom: 14px; }
  .card h2 { font-size: 16px; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 12px 8px; }
  .stat .num { font-size: 24px; }
  .stat .lbl { font-size: 12px; }

  input[type=text], input[type=date], textarea, select.input {
    font-size: 16px; padding: 10px; border-radius: 8px;
  }
  textarea { min-height: 300px; }

  .btn { padding: 11px 16px; min-height: 44px; font-size: 14px; }
  .btn-sm { padding: 9px 12px; min-height: 38px; }

  .toolbar.search { flex-direction: column; align-items: stretch; }
  .toolbar.search input[type=text] { max-width: none; }
  .toolbar.search .btn { width: 100%; }

  .two-col { grid-template-columns: 1fr !important; }
  .two-col .row-actions { margin-top: 4px; }

  .row-actions { flex-wrap: wrap; gap: 8px; }
  .row-actions > .btn,
  form.row-actions .btn-success,
  .card form .btn-danger,
  .card form .btn-success,
  #editForm .btn { width: 100%; }

  .rte-toolbar { flex-wrap: wrap; gap: 6px; }
  .rte-toolbar button { flex: 1 1 auto; min-width: 42px; }
  .rte-editor { min-height: 260px; }
  .mode-switch { width: 100%; }
  .mode-switch button { flex: 1; }

  .md-body { padding: 14px; }
  .article-meta { font-size: 12px; }

  /* 列表改为卡片式堆叠：禁止左右滑动，内容自动换行 */
  .table-wrap { overflow-x: visible; }
  table.list { min-width: 0; width: 100%; display: block; }
  table.list thead { display: none; }
  table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr {
    border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px;
    background: var(--panel); box-shadow: var(--shadow); overflow: hidden;
  }
  table.list th:first-child, table.list td:first-child { position: static; background: transparent; left: auto; }
  table.list td {
    border-bottom: 1px solid var(--line); text-align: left; padding: 10px 12px;
    white-space: normal; word-break: break-word; min-height: 0;
  }
  table.list tr td:last-child { border-bottom: none; }
  table.list td::before {
    content: attr(data-label); display: block; font-size: 12px; font-weight: 600;
    color: var(--muted); margin-bottom: 4px;
  }
  /* 操作列按钮在卡片内换行排布 */
  table.list td.nowrap .btn, table.list td.nowrap a.btn { margin: 0 6px 6px 0; }

  /* 分页导航：窄屏时信息行独占一行 */
  .pager { margin-top: 16px; padding: 10px; gap: 5px; }
  .pager .btn { padding: 7px 10px; min-width: 32px; font-size: 12px; }
  .pager-info {
    margin-left: 0; width: 100%; text-align: center; white-space: normal;
    padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px;
  }

  /* 上一篇 / 下一篇：窄屏改为纵向堆叠 */
  .article-nav { grid-template-columns: 1fr; gap: 10px; }
  .article-nav-pos { order: -1; text-align: center; }
  .article-nav-item.next { text-align: left; }
}

/* ============ 侧边漂浮导航窗 ============ */
.float-nav {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 6px;
  box-shadow: 0 10px 34px rgba(30, 85, 148, .18);
  max-width: 120px;
}
.float-nav .fn-item {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.25;
  color: #475569;
  text-decoration: none;
  border-radius: 9px;
  text-align: center;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.float-nav .fn-item:hover {
  background: #f1f5f9;
  color: var(--brand);
}
.float-nav .fn-item.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-l) 60%, var(--brand-d) 100%);
  color: #fff;
  border-left-color: #fff;
  font-weight: 600;
}
.float-nav .fn-top {
  margin-top: 2px;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
  font-size: 12px;
  color: #94a3b8;
}
.float-nav .fn-top:hover { color: var(--brand); }
/* 视口不足以容纳 1080px 内容 + 导航时隐藏，避免遮挡正文 */
@media (max-width: 1180px) { .float-nav { display: none; } }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef3f9 0%, #e3edf7 100%); padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 24px; box-shadow: var(--shadow);
}
.login-brand {
  font-size: 14px; font-weight: 700; color: var(--brand); text-align: center; margin-bottom: 6px;
  letter-spacing: .3px;
}
.login-card h2 { text-align: center; margin: 0 0 14px; font-size: 19px; }
.login-card .muted { font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.login-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.login-form input,
.user-form input, .user-form select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px;
  background: #fff; color: var(--ink); width: 100%;
}
.login-form input:focus, .user-form input:focus, .user-form select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15);
}
.login-foot { text-align: center; margin: 12px 0 0; font-size: 12px; }
.btn-block { width: 100%; text-align: center; padding: 10px; font-size: 15px; }

/* 顶栏用户菜单 */
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-name { color: #fff; font-size: 13px; opacity: .95; white-space: nowrap; }
.user-menu .nav-link { padding: 5px 10px; }

/* 用户管理表单 */
.user-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > label {
  display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted);
  flex: 1; min-width: 160px;
}
.user-form input[readonly] { background: #f7f8fa; color: var(--muted); }
.checkbox-inline {
  flex-direction: row !important; align-items: center; gap: 6px !important;
  color: var(--ink) !important; min-width: auto !important;
}
.checkbox-inline input { width: auto; }
.inline-form { display: inline; margin: 0; }

/* 新建/编辑文章：图片上传状态提示 */
.img-status {
  margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 13px;
  border: 1px solid transparent;
}
.img-status.uploading { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.img-status.ok { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.img-status.err { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
/* 富文本中插入的图片自适应宽度，避免撑破版式 */
.rte-editor img, .rte-source img { max-width: 100%; height: auto; border-radius: 6px; }

/* ===== 正文内容查找（定位并高亮）===== */
.find-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 8px 0; padding: 8px 10px;
  background: #f6f8fa; border: 1px solid #e3e8ef; border-radius: 8px;
}
.find-bar input[type="text"] {
  flex: 1 1 200px; min-width: 160px; padding: 6px 10px;
  border: 1px solid #d7dde5; border-radius: 6px; font-size: 14px; background: #fff;
}
.find-bar input[type="text"]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.btn-find {
  padding: 5px 10px; border: 1px solid #d7dde5; background: #fff;
  border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1.4;
}
.btn-find:hover { background: #eef2f7; }
.btn-find:disabled { opacity: .5; cursor: not-allowed; }
.find-count { font-size: 13px; color: #5b6b7c; min-width: 76px; }
/* 富文本查找高亮（临时注入，保存前会清除，不会写入正文） */
mark.find-hl { background: #ffe58f; color: inherit; padding: 0 1px; border-radius: 2px; }
mark.find-hl.active { background: #f59e0b; color: #fff; box-shadow: 0 0 0 2px #fbbf24; }

/* 一键复制：源码格式选择 */
.copy-wrap { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.copy-format {
  padding: 4px 6px; border: 1px solid #d7dde5; border-radius: 6px;
  background: #fff; font-size: 13px; cursor: pointer;
}

/* ===== 设置中心：标签页切换 ===== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tab {
  padding: 6px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--muted); font-size: 13px;
}
.tab:hover { background: #f9fafb; text-decoration: none; color: var(--ink); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ===== 文章编辑页底部：快捷插入提示 ===== */
.tip-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tip-chip {
  padding: 6px 14px; border: 1px solid #cfe0f5; border-radius: 999px;
  background: #f2f7fd; color: var(--brand-d); font-size: 13px; cursor: pointer;
  line-height: 1.5; transition: background .15s, border-color .15s;
}
.tip-chip:hover { background: #e4eefb; border-color: var(--primary); }
.tip-chip:active { transform: translateY(1px); }

